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