Closed jw7712 closed 1 year ago
Hello @jw7712,
"cbc:SupplierAssignedAccountID" doesn't appear to be part of the EN 16931 standard nor PEPPOL BIS 3.0.
@josemmo Thanks for your reply. I see that indeed it's not part of the standard, but some accounting packages make use of it to match a contact by id.
When searching for it i see that exact online is also using this: https://support.exactonline.com/community/s/knowledge-base#All-All-HNO-Concept-general-importexport-gen-impexp-ublineolc
Adding this feature is not feasible because is non-standard and, in some cases, not allowed.
But if you need to add the field to a document, you can do it manually after generating the XML:
use Einvoicing\Invoice;
use Einvoicing\Presets;
use Einvoicing\Writers\UblWriter;
use UXML\UXML;
// Generate invoice
$inv = new Invoice(Presets\Peppol::class);
// [...]
// Export invoice
$writer = new UblWriter();
$xml = UXML::fromString($writer->export($inv));
$xml->get('cac:AccountingCustomerParty')->add('cbc:SupplierAssignedAccountID', '0011223344'); // <---
echo $xml->asXML();
Great, thanks for the great support! I will try it!
The issue can be closed.
I'm trying to export UBL invoices for importing in an accounting application (Venice) and need to add cac:AccountingCustomerParty/cbc:SupplierAssignedAccountID to the XML file.
How can this be done using this package?
Thanks in advance