Closed XaphanBael closed 3 weeks ago
I don't believe the package itself is the issue, and it’s also unlikely to be a problem with the API versus XML. Are you completely certain that there hasn't been a change in the rounding approach—where previously it might have rounded each line item individually, but now it’s rounding the invoice total?
In my experience, most rounding discrepancies of one or two cents on invoices come from differences in logic. Sometimes, one system calculates the total by summing all line items and then rounding, while another rounds each line item first and then adds them up. This tends to cause issues, especially with invoices where tax calculations are involved.
Hi @remkobrenters turns out you were right. There are (unfortunally) different methods in place to do with the invoice calculations, it will be a substantial job to correct this, but it has to be done. Thanks for your reply.
Good to hear and happy to help.
Hello wizards,
One of our clients has had their CMS (Laravel) for quite some years now, constantly adding and upgrading features. Their CMS has used the Exact online integration using XML for several years, based on plain custom code where a .xml file would be generated and posted to the API. Funny enough, comparing the old method compared to the new code utilizing this package, it's not even all that different.
Now, to get to the reason of me writing this issue...
The client told us that before updating the codebase, their invoices would be rounded, matchtign the amount shown on the invoice. However, since our update it does not appear to do so. For instance, an invoice with a grand total of € 5.900,00 in the CMS would be stored as € 5.900,01 in Exact Whilst another invoice, with a grand total of € 1.500,00 in the CMS would be stored as € 1.499,99 in Exact The result is that Exact does not reconcile them and that the client has to adjust the invoice in Exact.
So, i compared the old code to the new code, focussing on the part where the invoice lines containing the amounts were added to see if there were any obvious differences, but i saw nothing out of the ordinary.
Old XML code
New Picqer code
So i came here, hoping people with more experience working with this package could tell me if i'm missing something.
Thanks in advance.