Try ERPNext Buy Support Partners Foundation

Error: Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction

Hello,

I’m getting an error when I try to submit salary slips to accounting:

Traceback (most recent call last):
  File "/home/tfm/frappe-bench/apps/erpnext/erpnext/hr/doctype/payroll_entry/payroll_entry.py", line 300, in make_accrual_jv_entry
    journal_entry.submit()
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 867, in submit
    self._submit()
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 856, in _submit
    self.save()
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 273, in save
    return self._save(*args, **kwargs)
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 326, in _save
    self.run_post_save_methods()
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 930, in run_post_save_methods
    self.run_method("on_submit")
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 797, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 1071, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 1054, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/tfm/frappe-bench/apps/frappe/frappe/model/document.py", line 791, in 
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/tfm/frappe-bench/apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py", line 49, in on_submit
    self.make_gl_entries()
  File "/home/tfm/frappe-bench/apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py", line 524, in make_gl_entries
    make_gl_entries(gl_map, cancel=cancel, adv_adj=adv_adj)
  File "/home/tfm/frappe-bench/apps/erpnext/erpnext/accounts/general_ledger.py", line 26, in make_gl_entries
    frappe.throw(_("Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction."))
  File "/home/tfm/frappe-bench/apps/frappe/frappe/__init__.py", line 376, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable)
  File "/home/tfm/frappe-bench/apps/frappe/frappe/__init__.py", line 355, in msgprint
    _raise_exception()
  File "/home/tfm/frappe-bench/apps/frappe/frappe/__init__.py", line 315, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction.

I’ve carefully checked all fields and there shouldn’t be a mistake.

Any help is appreciated! Thanks.