"Current outstanding bill" - wrong amount calculated in thirdparty's "Customer tab"

The amount is wrongly calculated in mentioned tab (from the topic title). In case an invoice is overpayed the overpayed amount will be created as a credit note. The calculated amount for “Current outstanding bill” calculates the whole payment amount for the previous facture and also takes an amount from the credit note for customer, which is not correct. Maybe it’s fixed in newer versions of dolibarr? I’m using Dolibarr 9.0.3

Hi,

Have you tried to upgrade to 9.0.4 at least ?

No. But I’ve checked the code on the github for 9.0.4 version and for the 10.0 version and I didn’t find any change in societe.class.php (method getOutstandingBills) which has change regarding this issue. I didn’t try it though to be certain but on the first look it looks like the problem exists in the 10.0 version as well.

I’ve made a use case on the demo.dolibarr.org (please choose the demo profile "Company manufacturing products).
A customer “Elitasoft” has 2 invoices (1000e and 1500e). The first payment of 1300e arrives and I assign it to the invoice of 1000e. The overpayment of 300e I create as an absolute credit for this customer. But, the total amount of unpaid bills is still 1500e.
Here’s a link
https://demo.dolibarr.org/comm/card.php?socid=130
And when a user opens
https://demo.dolibarr.org/compta/recap-compta.php?socid=130
the total balance is correct

Hi,

Could you report the bug to GitHub ?

It works ok in the current version (demo’s current vers). If user adds absolute discount it will show the correct amount for “Current outstanding bill”. I’ll try during a day if the problem exists in the version 10 and I’ll create an issue in the 10 branch.

I’ll mark this issue like it has solution… Since the error doesn’t exist in newer versions.