erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

Error on Payment Reconciliation Tool -- TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'

Open innomalous opened this issue 8 months ago • 0 comments

Information about bug

When we use Payment Reconciliation Tool with Party Type = Supplier, and any party that does not have either an outstanding invoice or unreconciled payment, the following error is thrown on clicking "Get Unreconciled Entries": TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'

Module

accounts

Version

"erpnext": "14.70.8", "frappe": "14.77.5", "hrms": "14.28.8", "india_compliance": "14.28.1", "payments": "0.0.1"

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
	"erpnext": "14.70.8",
	"frappe": "14.77.5",
	"hrms": "14.28.8",
	"india_compliance": "14.28.1",
	"payments": "0.0.1"
}

Route

Form/Payment Reconciliation/Payment Reconciliation

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 97, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 48, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1619, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/handler.py", line 312, in run_doc_method
    response = doc.run_method(method)
  File "apps/frappe/frappe/model/document.py", line 931, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1283, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1265, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 928, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py", line 88, in get_unreconciled_entries
    self.get_nonreconciled_payment_entries()
  File "apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py", line 102, in get_nonreconciled_payment_entries
    non_reconciled_payments = payment_entries + journal_entries + dr_or_cr_notes
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'

Request Data

{
	"type": "POST",
	"args": {
		"docs": "{\"name\":\"Payment Reconciliation\",\"minimum_invoice_amount\":0,\"minimum_payment_amount\":0,\"maximum_invoice_amount\":0,\"maximum_payment_amount\":0,\"invoice_limit\":50,\"payment_limit\":50,\"doctype\":\"Payment Reconciliation\",\"payments\":[],\"allocation\":[],\"invoices\":[],\"company\":\"Innomalous Technologies Private Limited\",\"party_type\":\"Supplier\",\"party\":\"Anil Mandi\",\"receivable_payable_account\":\"Creditors/Payables - ITPL\",\"__unsaved\":1,\"docstatus\":0,\"idx\":0}",
		"method": "get_unreconciled_entries"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/run_doc_method"
}

Response Data

{
	"exception": "TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'"
}

innomalous avatar Jul 06 '24 08:07 innomalous