facho/fe/form.py(AllowanceChargeReason): nueva clase.
FossilOrigin-Name: 881f04165931e442524f575efcbf25c2b8a03a0e55f1bba757d9fe590fa34c85
This commit is contained in:
parent
ee1052ce78
commit
b024533934
@ -95,3 +95,4 @@ Municipio = CodeList(path_for_codelist('Municipio-2.1.gc'), 'code', 'name')
|
|||||||
Departamento = CodeList(path_for_codelist('Departamentos-2.1.gc'), 'code', 'name')
|
Departamento = CodeList(path_for_codelist('Departamentos-2.1.gc'), 'code', 'name')
|
||||||
Paises = CodeList(path_for_codelist('Paises-2.1.gc'), 'code', 'name')
|
Paises = CodeList(path_for_codelist('Paises-2.1.gc'), 'code', 'name')
|
||||||
TipoIdFiscal = CodeList(path_for_codelist('TipoIdFiscal-2.1.gc'), 'code', 'name')
|
TipoIdFiscal = CodeList(path_for_codelist('TipoIdFiscal-2.1.gc'), 'code', 'name')
|
||||||
|
CodigoDescuento = CodeList(path_for_codelist('CodigoDescuento-2.1.gc'), 'code', 'name')
|
||||||
|
@ -344,11 +344,23 @@ class LegalMonetaryTotal:
|
|||||||
payable_amount: Amount = Amount(0.0)
|
payable_amount: Amount = Amount(0.0)
|
||||||
prepaid_amount: Amount = Amount(0.0)
|
prepaid_amount: Amount = Amount(0.0)
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class AllowanceChargeReason:
|
||||||
|
code: str
|
||||||
|
reason: str
|
||||||
|
|
||||||
|
def __post_init__(self):
|
||||||
|
if self.code not in codelist.CodigoDescuento:
|
||||||
|
raise ValueError("code [%s] not found" % (self.code))
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class AllowanceCharge:
|
class AllowanceCharge:
|
||||||
#DIAN 1.7.-2020: FAQ03
|
#DIAN 1.7.-2020: FAQ03
|
||||||
charge_indicator: bool = True
|
charge_indicator: bool = True
|
||||||
amount: Amount = Amount(0.0)
|
amount: Amount = Amount(0.0)
|
||||||
|
reason: AllowanceChargeReason = None
|
||||||
|
|
||||||
def isCharge(self):
|
def isCharge(self):
|
||||||
return self.charge_indicator == True
|
return self.charge_indicator == True
|
||||||
@ -362,6 +374,8 @@ class AllowanceCharge:
|
|||||||
def asDiscount(self):
|
def asDiscount(self):
|
||||||
self.charge_indicator = False
|
self.charge_indicator = False
|
||||||
|
|
||||||
|
def hasReason(self):
|
||||||
|
return self.reason is not None
|
||||||
|
|
||||||
class NationalSalesInvoiceDocumentType(str):
|
class NationalSalesInvoiceDocumentType(str):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user