Invoice addition problem
Submitted by Guest on Fri, 28/10/2011 - 23:30
We encountered a problem with the addition in an invoice. It looks like it's adding up $20 and $30, and getting $111.25. Tony mentioned that this had been seen before, but is difficult to trace. I just wanted to log this instance of it.
I've attached a screenshot of the database as well. The transaction (invoice) number is 25578 (as printed on the invoice).
Cheers, Paul
Re: Invoice addition problem
Some questions:
1. What version of OpenVPMS are you running?
2. Were there previously items or amounts/rates in the invoice so that the total added up $111.25?
3. Are there error messages in openvpms-full.log at the time when the invoice was edited?
-Tim
Re: Invoice addition problem
Hi Tim,
Cheers, Paul
Re: Invoice addition problem
I have more information about this after digging a little. It looks like the system thought (incorrectly) that the customer had a balance of $41.25. The present invoice was for $70. Looking at the code for the invoice generation, it looks like it will add the outstanding balance to the running balance when calculating the total.
Re: Invoice addition problem
The code you reference above is actually for payments.
When you create a new payment item, its total defaults to that of the customer's balance minus the amounts of any other payment items.
Can you take a backup of the database and click the 'Check' button Customers -> Accounts workspace and report what it says?
I'd like to take a look at the backed up database if possible. I can develop some SQL to anonymize the data to avoid privacy concerns. Send a mail to tma at netspace dot net dot au and I'll get back to you.
Thanks,
Tim
Re: Invoice addition problem
Hi Tim,
Thanks. I clicked the check button, and it reported "Customer Account Balance OK". I'll send the database to that address in another email.
Cheers,
Paul
Re: Invoice addition problem
I've had a minor epiphany and worked out whats going on.
If you are in a Check Out workflow and click the close button (little 'x' in the top right), it should cancel the current edit and the workflow. However it actually goes to the next workflow step which saves the current invoice, minus any of the new items you may have added.
Net result is that the total on the invoice doesn't agree with that of the saved invoice items.
I'll fix this ASAP for 1.5-beta-3.
-Tim
Re: Invoice addition problem
Fantastic sleuthing Tim. Thanks!
-Paul
Re: Invoice addition problem
This has now been fixed. The fix will be available in the 1.5-beta-3 release.
Regards,
Tim