Hi,
I have a client requirement where the Outstanding Amount for the Invoices
against the payment need to be calculated.
For Example: Invoice=$1500, Payment=$800. Then Outstanding Amount =
1500-800=$700.
I first took a shot at Orders, Invoices and Payments flow in ofbiz and found
Outstanding Amount in following two places.
1. Outstanding amount on the *FindPayments* (
https://localhost:8443/accounting/control/findPayments) screen is calculated
as below
Outstanding Amount = Product.amount minus ProductApplication.amountApplied
(Logic is given in PaymentWorker.java)
For e.g. After making payment of $800, I check the tables and columns and
found that
Outstanding Amount = 800 (Product.amount) minus 0
(ProductApplication.amountApplied) = $800.
I was hoping that Outstanding Amount will give the answer, but the result
($800) is not matching with expected output ($700)
2. Invoices (
https://localhost:8443/accounting/control/*findInvoices*) are
only getting created once the full Payments (Receive Payment) is made on the
orders. So if the $800 payment is made for $1500 Order amt, then Invoice is
not getting generated.
So using both find Invoice and Payment screens, I havent been able to find
the Outstanding amount.
Looking forward from the community to see if anybody has faced similar
situation to find the Outstanding amount.
Cheers