Debit and Credit not equal for Payment Entry Bug

Debit and Credit not equal for Payment Entry #ACC-PAY-2021-00003. Difference is 174.0.
Im paying School Fee with the amount of $87.00 and I get this when trying to submit.

This is my production:
ERPNext: v13.2.1 (version-13)
Frappe Framework: v13.2.2 (version-13)

Whats your base currency ???

Base Currency is TOP

Facing the same issue on v13.4.1

Any solution out there?

Thank you.

Found the cause of the duplicate of the amount

payment_entry.py line 554

dr_or_cr = “credit” if erpnext.get_party_account_type(self.party_type) == ‘Receivable’ else “debit”

We put a temp fix for now.

dr_or_cr = “credit” #if erpnext.get_party_account_type(self.party_type) == ‘Receivable’ else “debit”

Is this fixed in latest version ?

For me it was a missing entries in Party Type. These are type to Account Types

Es fehlten Einträge des DocTypes “Party Type” an diesen Typen ist ein Account Type hinterlegt welcher für die SOLL / HABEN Zuordnung der Buchung verantwortlich ist.

1 Like

For me it was a missing entries in Party Type. These are type to Account Types

This was my problem as well. Info on how I had to fix it here.

I have base currency of Pound Sterling.
Have done two payments against dollar customer Purchase Order.
Now when trying to post the Purchase Invoice against the Purchase Order, and then get advance payments two payments that match against the purchase invoice amount, I get the very similar error message:

Debit and Credit not equal for Payment Entry #ACC-PAY-2023-00017. Difference is 35.5635.

The dollar amounts match. My versions:

ERPNext: v13.32.0 (version-13)
Frappe Framework: v13.31.0 (version-13)

Anyone could help or is it still the same issue as above? (And have to start learn modifying the python code?) My Party Types are fine.

Modified on the payment_entry.py on line 816 (ERPNext: v13.49.5 (version-13) Frappe Framework: v13.51.1 (version-13))

dr_or_cr = (
“credit” # if erpnext.get_party_account_type(self.party_type) == “Receivable” else “debit”
)

But I still get the error message
Debit and Credit not equal for Payment Entry #ACC-PAY-2023-00017. Difference is -###.
when try to Submit the purchase invoice.

I have two dollar payments, and then on the Purchase Invoice, selected the Advance Payments. The Advance Payments total match the total advance amount in USD.

But the above error message appears when trying to post. I’m convinced that is because the base currency is in GBP and there is difference in the exchange rate between the payment entries & invoice entry
→ GBP amounts are not the same, but the dollar amounts are the same.
→ The difference should be posted to the exchange rate variance account.

Anyone can help?

I had the same problem in USD dollar payment reconciliation (GBP is the base currency).

In the end I found the fix by upgrading to v14.19.0 ERPNext (upgrade is pain but seems to hang together so far)