josemmo / einvoicing

Library for reading and creating European-compliant electronic invoices (EN 16931)
https://josemmo.github.io/einvoicing/
MIT License
112 stars 29 forks source link

How to add the informations payment #43

Closed escarrie closed 1 year ago

escarrie commented 1 year ago

Hello,

How can I add the bank account number where I pay the invoice amount and the structured communication?

josemmo commented 1 year ago

Hello @escarrie,

You can use the Payments\Payment class and its Payments\Payment::addTransfer() method for that purpose. To assign the payment to an invoice, call Invoice::setPayment().

For a credit transfer, you need to set the means code of the payment to "30" according to the UNCL4461 code list.