I am unable to cancel LCV for a particular invoice which is throwing the below error.
I can not cancel the purchase invoice as well to amend the Purchase invoice and then repost LCV. It is a redundant issue. This error started after updating to the latest Version
ERPNext: v13.21.0 (version-13)
Frappe Framework: v13.21.0 (version-13)
It is very annoying that every few minutes an error notification pops up.
Traceback (most recent call last):
File "apps/erpnext/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py", line 103, in repost
repost_gl_entries(doc)
File "apps/erpnext/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py", line 153, in repost_gl_entries
update_gl_entries_after(doc.posting_date, doc.posting_time,
File "apps/erpnext/erpnext/accounts/utils.py", line 923, in update_gl_entries_after
repost_gle_for_stock_vouchers(stock_vouchers, posting_date, company, warehouse_account)
File "apps/erpnext/erpnext/accounts/utils.py", line 944, in repost_gle_for_stock_vouchers
voucher_obj.make_gl_entries(gl_entries=expected_gle, from_repost=True)
File "apps/erpnext/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py", line 450, in make_gl_entries
make_gl_entries(gl_entries, update_outstanding=update_outstanding, merge_entries=False, from_repost=from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 25, in make_gl_entries
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 152, in save_entries
round_off_debit_credit(gl_map)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 205, in round_off_debit_credit
frappe.throw(_("Debit and Credit not equal for {0} #{1}. Difference is {2}.")
File "apps/frappe/frappe/__init__.py", line 444, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File "apps/frappe/frappe/__init__.py", line 423, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 378, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Debit and Credit not equal for Purchase Invoice #ACC-PINV-2020-00137. Difference is 772.854.