Error - Debit and Credit not equal for Payment Entry for Payments Entry against Sales Invoice

I face an issue in creating payments against Sales invoices.
I created a sales invoice for 21240/- which is over due. While I make a payment entry against it for 9000 as 1st installment from client. The payment entry gets saved but while I submit it it gives the following error

Debit and Credit not equal for Payment Entry against Si-xxx-xxxx. The difference is 18000.

When I changed the received amount to 8000/- it says the difference amount is 16000.

that’s an issue somewhere as the received amount is shown as double in the error message. HAs anyone find a solution to over come this?

I also have the same issue. The difference shows double the amount paid.

I face the same issue from version 13.7 and I put a temporarily fix until a permanent one.

on the pyment_entry.py file line 694

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

here is my temp fix

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

Hope that will help you until a permanent solution.

I will check and get back to you with one of my new ERp v13 experimental VM.

Could you please advise me : i have v12 with lots of data. I am installing new v13 on a separate VM. Ho do i migrate to data to new v13 machine ?

I just migrate a client from v10 to v13.11.

  1. Take a backup of the v10 database
  2. Install the v13.11 and make sure its on the correct branch not the develop branch
  3. Restored the v10 database
  4. Run bench update --patch --requirements
    5)Run bench migrate
  5. If you run into errors re-run bench update
    Hopes that will help.

Sione, excellent i followed steps as mentioned by you and i am out of words…!!! Awesome.

All data is available in v13 as of now. I will use it parallely with v12 and check if some error comes up.

Anyways, thanks a lot for your kind guidance and support…! Email me at abdul.ansari2007@gmail.com i would love to be in touch with you.

One more solution to this payment credit and doubling issue. I found as under:

When entering partial payment, for example sales invoice is 5000 and you are making payment entry of 3000, in the “paid amount (currency)” we should write 3000 and in the below table of References, add same 3000 in “Allocated Amount” column. Then you will be able to submit the payment entry. Basically this shall get auto update so that the error would vanish.

I also noticed this issue when creating the Purchase Invoice for a Asset Purchase Receipt in a scenario where first the Asset depreciate schedules where passed and then the Purchase invoice was submitted.