Currently invoice numbering comes from Woocommerce, and the reference is the eway reference number (I’m using eway for payments – I presume it would use Paypal ref if I used Paypal, etc). This means my invoice numbering in Xero isn’t used. I would prefer to just let Invoice allocate the number, and the Woocommerce order number go in the reference.
Open
Last updated: July 18, 2018
Log in to comment on this feature request.
This is a small edit for code-savvy folks.
Edit the file /woocommerce-xero/includes/class-wc-xr-invoice.php end comment these lines:
// $invoice_number = $this->get_invoice_number();
// if ( null !== $invoice_number ) {
// $xml .= ” . $invoice_number . ”;
// }
In this way the plugin won’t send the invoice number, and XERO will allocate one.
Yes this is a very sensible idea. I create invoices in Xero AND send invoices from Woocommerce and in order to maintain a rational sequence a function allowing Xero to allocate invoice numbers would be ideal.
The order number should really be part of the invoice reference. This happens in Xeroom, an alternative plugin which does the same job. Xeroom also allows Xero to create the invoice number.
I would love for WooCommerce Xero plugin to offer an option to the admin saying “Let Xero manage invoice numbers”, if checked, the Xero auto-incremented numbering would take place instead of the forced numbering (this would work perfectly in conjunction with the Xero Reference field being controlled / other feature request).
Xero invoice doc : https://developer.xero.com/documentation/api/accounting/invoices/#post-invoices
Clearly says “InvoiceNumber ACCREC – Unique alpha numeric code identifying invoice ( when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)”