ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

[V12] Can't make reconciliation work


#1

Can’t make payment reconciliation for supplier. It is trying to access “sales invoice”, but I’m trying to reconciliate purchases not sales.

Is it a bug or am I doing something wrong?


#2

Please post the Server Error traceback and the steps to reproduce the error

thanks


#3

Frappe v12.0.3
ERPNext v12.0.3

  1. Fresh install
  2. Create a supplier as “Electrical” group
  3. Create Item “Eletricity” and do not maintain stock
  4. Create a purchase invoice for this supplier and submit
  5. Try to make a payment reconciliation
pymysql.err.InternalError: (1054, "Unknown column 'tabSales Invoice.name' in 'group statement'")
[ERROR] 2019-08-06 14:57:24,477 | /home/frappe/frappe-bench/apps/frappe/frappe/app.py:
Site: testex
Form Dict: {
 "cmd": "runserverobj",
 "docs": "{\"name\":\"Payment Reconciliation\",\"owner\":\"Administrator\",\"creation\":\"2019-08-06 18:48:09.684187\",\"modified\":\"2019$
 "method": "get_unreconciled_entries"
}
Request Error
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 60, in application
    response = frappe.api.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1036, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 84, in runserverobj
    frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py", line 36, in runserverobj
    r = doc.run_method(method)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 786, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1055, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1038, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 780, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py", line 15, in g$
    self.get_nonreconciled_payment_entries()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py", line 25, in g$
    dr_or_cr_notes = self.get_dr_or_cr_notes()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py", line 104, in $
    }, as_dict=1)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 156, in sql
    self._cursor.execute(query, values)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 517, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 732, in _read_query_result
    result.read()
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 1075, in read
    first_packet = self.connection._read_packet()
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 684, in _read_packet
    packet.check_error()
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.InternalError: (1054, "Unknown column 'tabSales Invoice.name' in 'group statement'")

#4

#5