Beispiel #1
0
##
## Author(s): Stoq Team <*****@*****.**>
##

import codecs
import datetime
from hashlib import md5
import operator

from kiwi.datatypes import number
from stoqdrivers.enum import TaxType
from stoqlib.lib import latscii

from .ecfdomain import ECFDocumentHistory

latscii.register_codec()


def _argtype_name(argtype):
    if argtype == number:
        return 'number'
    else:
        return argtype.__name__


# See
# http://www.fazenda.gov.br/confaz/confaz/atos/atos_cotepe/2004/ac017_04.htm
# for a complete list of this:

BRAND_CODES = {
    'daruma': 'DR',
Beispiel #2
0
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., or visit: http://www.gnu.org/.
##
##
## Author(s): Stoq Team <*****@*****.**>
##

import datetime
from decimal import Decimal

from stoqlib.lib import latscii
latscii.register_codec()

_number_type = (int, long, Decimal)


def argtype_name(argtype):
    if argtype == _number_type:
        return 'number'
    else:
        return argtype.__name__


class SintegraError(Exception):
    pass