fixed FAS01b y FAS01a

FossilOrigin-Name: e593722ec6e2c353bf615dcd080c365123aeb809899936a9f5219fbfffdfe5b5
This commit is contained in:
lubricantes 2021-09-07 14:59:26 +00:00
parent 50b1a13c0a
commit 4c871afb73

View File

@ -427,10 +427,10 @@ class DIANInvoiceXML(fe.FeXML):
#tax_amount_for['01']['tax_amount'] = Amount(0.0)
#tax_amount_for['01']['taxable_amount'] = Amount(0.0)
#DIAN 1.7.-2020: FAS07 => Se debe construir estrategia para su manejo
#tax_amount_for['04']['tax_amount'] = 0.0
#tax_amount_for['04']['taxable_amount'] = 0.0
#tax_amount_for['03']['tax_amount'] = 0.0
#tax_amount_for['03']['taxable_amount'] = 0.0
#tax_amount_for['04']['tax_amount'] += 0.0
#tax_amount_for['04']['taxable_amount'] += 0.0
#tax_amount_for['03']['tax_amount'] += 0.0
#tax_amount_for['03']['taxable_amount'] += 0.0
total_tax_amount = Amount(0.0)
@ -445,6 +445,7 @@ class DIANInvoiceXML(fe.FeXML):
total_tax_amount += subtotal.tax_amount
if total_tax_amount != Amount(0.0):
fexml.placeholder_for('./cac:TaxTotal')
fexml.set_element_amount('./cac:TaxTotal/cbc:TaxAmount',
total_tax_amount)
@ -456,7 +457,6 @@ class DIANInvoiceXML(fe.FeXML):
#DIAN 1.7.-2020: FAS01
line = fexml.fragment('./cac:TaxTotal', append=next_append)
#DIAN 1.7.-2020: FAU06
tax_amount = amount_of['tax_amount']
fexml.set_element_amount_for(line,
@ -482,8 +482,11 @@ class DIANInvoiceXML(fe.FeXML):
if percent_for[cod_impuesto]:
line.set_element('/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:Percent',
percent_for[cod_impuesto])
line.set_element('/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID',
cod_impuesto)
line.set_element('/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:Name',
'IVA')
# abstract method
def tag_document(fexml):
@ -502,7 +505,6 @@ class DIANInvoiceXML(fe.FeXML):
fexml.set_element_amount_for(line,
'./cac:TaxTotal/cac:TaxSubtotal/cbc:TaxableAmount',
invoice_line.taxable_amount)
for subtotal in invoice_line.tax.subtotals:
line.set_element('./cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount', subtotal.tax_amount, currencyID='COP')