From 413a02fe8ca53552665f85fe8c8c40f972e386fa Mon Sep 17 00:00:00 2001 From: "alnus@disroot.org" Date: Wed, 9 Sep 2020 01:29:37 +0000 Subject: [PATCH] FASK61 fix #13 FossilOrigin-Name: 486c9aba1a42edb9048a91a60202134a0e885c40b42f6bf290f2e640460a1b53 --- facho/fe/form.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/facho/fe/form.py b/facho/fe/form.py index 46a76bb..04a55cc 100644 --- a/facho/fe/form.py +++ b/facho/fe/form.py @@ -323,6 +323,7 @@ class DIANInvoiceXML(fe.FeXML): self.attach_invoice(invoice) def set_supplier(fexml, invoice): + #DIAN 1.7.-2020: FAK61 fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cbc:AdditionalAccountID', invoice.invoice_supplier.organization_code) fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyName/cbc:Name', @@ -378,9 +379,13 @@ class DIANInvoiceXML(fe.FeXML): def set_customer(fexml, invoice): + fexml.placeholder_for('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification') + fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID', + invoice.invoice_customer.ident) + + fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cbc:AdditionalAccountID', invoice.invoice_customer.organization_code) - fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyName/cbc:Name', invoice.invoice_customer.name) fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PhysicalLocation/cac:Address/cac:AddressLine/cbc:Line',