Every Cancelled invoice is counted as unpaid in the "Total Unpaid" of the Supplier

Hello there we are running

ERPNext: v13.42.3 (HEAD)
Frappe Framework: v13.45.3 (HEAD)

and our problem is that every cancelled invoice is counted as a non paid and the ammount is calculated in the “Total Unpaid” of the Supplier, even though the ammended *-2 invoice is paid.

Please help us fix this as this is happenning for noumerous invoices - suppliers.
e.g:

vs

Thanks in advance

The outstanding is probably not coming from this document. Once a document is cancelled, it does not show up anywhere.

To inspect further, please look up the Supplier Ledger. And see if this invoice is there in the ledger.

Accounting Ledger, makes things even more complicated @Azhar_Umar.

Its seems like we double “payed” an ammended invoice and even though the Ledge Balance is Positive its the same positive ammount is calculated as unpaid ?

Im confused.

Can you shade some light of what happened here?

Parts of picture are blanced for privacy*

For a supplier if the unpaid balance is -ve, it means you have over paid than what you owe him. Mostly an advance payment.

For a customer if the unpaid balance is -ve, it means the customer has overpaid than what customer owes you. Mostly an advance payment.

In your case, the second payment entry of 2,205.53 is either over paid mistakenly or a duplicate entry. Check the references number of both the payment entries. And also on your bank statement to see if actually two payments have been made.

If there are no two payments in bank statement, just delete one entry and you’re all set.