Bank Reconciliation, Get Payment Entries Error

Hi,
Please I need your support or advice if I am missing any setup/config.

Doctype : Bank Reconciliation

When I press button Get Payment Entries I get below error (below output is after I press button Report this issue.

Please type some additional information that could help us reproduce this issue:
App Versions
{
“erpnext”: “11.1.17”,
“frappe”: “11.1.17”
}
Route
Form/Bank Reconciliation
Error Report
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = 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 1028, 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 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py”, line 83, in get_payment_entries
amount = d.get(‘debit’, 0) - d.get(‘credit’, 0)
TypeError: unsupported operand type(s) for -: ‘unicode’ and ‘unicode’
Locals
Locals (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
{
“request”: “”,
“rollback”: true,
“e”: “unsupported operand type(s) for -: ‘unicode’ and ‘unicode’”,
“response”: null
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
{
“cmd”: “runserverobj”,
“data”: null
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
{
“cmd”: “runserverobj”,
“method”: “”,
“from_async”: false
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1028, in call
{
“newargs”: {
“docs”: “{“include_reconciled_entries”:0,“include_pos_transactions”:0,“total_amount”:0,“modified_by”:“Administrator”,“name”:“Bank Reconciliation”,“creation”:“2019-01-02 22:19:33.541385”,“modified”:“2019-01-02 22:19:33.541385”,“doctype”:“Bank Reconciliation”,“idx”:“0”,“payment_entries”:[],“owner”:“Administrator”,“docstatus”:0,”__last_sync_on":“2019-03-29T15:31:05.346Z”,“bank_account”:“532110 - STB - TT”,“from_date”:“2019-01-01”,“to_date”:“2019-03-31”,"__unsaved":1}",
“method”: “get_payment_entries”
},
“args”: [],
“fn”: “”,
“kwargs”: {
“docs”: “{“include_reconciled_entries”:0,“include_pos_transactions”:0,“total_amount”:0,“modified_by”:“Administrator”,“name”:“Bank Reconciliation”,“creation”:“2019-01-02 22:19:33.541385”,“modified”:“2019-01-02 22:19:33.541385”,“doctype”:“Bank Reconciliation”,“idx”:“0”,“payment_entries”:[],“owner”:“Administrator”,“docstatus”:0,”__last_sync_on":“2019-03-29T15:31:05.346Z”,“bank_account”:“532110 - STB - TT”,“from_date”:“2019-01-01”,“to_date”:“2019-03-31”,"__unsaved":1}",
“cmd”: “runserverobj”,
“method”: “get_payment_entries”
}
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 84, in runserverobj
{
“dn”: null,
“docs”: “{“include_reconciled_entries”:0,“include_pos_transactions”:0,“total_amount”:0,“modified_by”:“Administrator”,“name”:“Bank Reconciliation”,“creation”:“2019-01-02 22:19:33.541385”,“modified”:“2019-01-02 22:19:33.541385”,“doctype”:“Bank Reconciliation”,“idx”:“0”,“payment_entries”:[],“owner”:“Administrator”,“docstatus”:0,”__last_sync_on":“2019-03-29T15:31:05.346Z”,“bank_account”:“532110 - STB - TT”,“from_date”:“2019-01-01”,“to_date”:“2019-03-31”,"__unsaved":1}",
“args”: null,
“arg”: null,
“dt”: null,
“method”: “get_payment_entries”
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py”, line 36, in runserverobj
{
“dn”: null,
“docs”: “{“include_reconciled_entries”:0,“include_pos_transactions”:0,“total_amount”:0,“modified_by”:“Administrator”,“name”:“Bank Reconciliation”,“creation”:“2019-01-02 22:19:33.541385”,“modified”:“2019-01-02 22:19:33.541385”,“doctype”:“Bank Reconciliation”,“idx”:“0”,“payment_entries”:[],“owner”:“Administrator”,“docstatus”:0,”__last_sync_on":“2019-03-29T15:31:05.346Z”,“bank_account”:“532110 - STB - TT”,“from_date”:“2019-01-01”,“to_date”:“2019-03-31”,"__unsaved":1}",
“doc”: “”,
“arg”: null,
“args”: “”,
“fnargs”: [
“self”
],
“defaults”: null,
“varargs”: null,
“dt”: null,
“varkw”: null,
“method”: “get_payment_entries”
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
{
“self”: “”,
“args”: [],
“method”: “get_payment_entries”,
“fn”: “”,
“kwargs”: {}
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
{
“composed”: “”,
“compose”: “”,
“f”: “”,
“hooks”: [],
“self”: “”,
“args”: [],
“kwargs”: {},
“doc_events”: {
“Sales Taxes and Charges Template”: {
“on_update”: [
“erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings”
]
},
“Email Group Member”: {
“validate”: [
“frappe.email.doctype.email_group.email_group.restrict_email_group”
]
},
"
": {
“on_update”: [
“frappe.desk.notifications.clear_doctype_notifications”,
“frappe.core.doctype.activity_log.feed.update_feed”,
“frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions”
],
“on_cancel”: [
“frappe.desk.notifications.clear_doctype_notifications”,
“frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions”
],
“after_rename”: [
“frappe.desk.notifications.clear_doctype_notifications”
],
“on_trash”: [
“frappe.desk.notifications.clear_doctype_notifications”,
“frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions”
],
“on_change”: [
“frappe.core.doctype.feedback_trigger.feedback_trigger.trigger_feedback_request”
]
},
“Delivery Note”: {
“validate”: [
“erpnext.regional.india.utils.set_place_of_supply”
]
},
“Contact”: {
“on_trash”: [
“erpnext.support.doctype.issue.issue.update_issue”
]
},
“Sales Invoice”: {
“on_trash”: [
“erpnext.regional.check_deletion_permission”
],
“on_cancel”: [
“erpnext.regional.italy.utils.sales_invoice_on_cancel”
],
“validate”: [
“erpnext.regional.india.utils.set_place_of_supply”
],
“on_submit”: [
“erpnext.regional.france.utils.create_transaction_log”,
“erpnext.regional.italy.utils.sales_invoice_on_submit”
]
},
“User”: {
“on_update”: [
“erpnext.hr.doctype.employee.employee.update_user_permissions”,
“erpnext.portal.utils.set_default_role”
],
“validate”: [
“erpnext.hr.doctype.employee.employee.validate_employee_role”
],
“after_insert”: [
“frappe.contacts.doctype.contact.contact.update_contact”
]
},
“Website Settings”: {
“validate”: [
“erpnext.portal.doctype.products_settings.products_settings.home_page_is_products”
]
},
“Address”: {
“validate”: [
“erpnext.regional.india.utils.validate_gstin_for_india”,
“erpnext.regional.italy.utils.set_state_code”
]
},
“Payment Entry”: {
“on_trash”: [
“erpnext.regional.check_deletion_permission”
],
“on_submit”: [
“erpnext.regional.france.utils.create_transaction_log”,
“erpnext.accounts.doctype.payment_request.payment_request.make_status_as_paid”
]
},
“Purchase Invoice”: {
“validate”: [
“erpnext.regional.india.utils.set_place_of_supply”
]
},
“Stock Entry”: {
“on_cancel”: [
“erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty”
],
“on_submit”: [
“erpnext.stock.doctype.material_request.material_request.update_completed_and_requested_qty”
]
},
“Price List”: {
“on_update”: [
“erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings”
]
}
},
“method”: “get_payment_entries”
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
{
“hooks”: [],
“self”: “”,
“args”: [],
“add_to_return_value”: “”,
“kwargs”: {},
“method”: “get_payment_entries”,
“fn”: “”
}
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 766, in
{
“self”: “”,
“args”: [],
“method”: “get_payment_entries”,
“kwargs”: {}
}
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py”, line 83, in get_payment_entries
{
“payment_entries”: [
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-02-18”,
“credit”: “475.000000”,
“payment_entry”: “ACC-PAY-2019-00001”,
“debit”: “”,
“posting_date”: “2019-02-18”,
“cheque_number”: “123”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-08”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00003”,
“debit”: “15.000000”,
“posting_date”: “2019-03-08”,
“cheque_number”: “A100025”,
“account_currency”: “TND”,
“against_account”: “Tunisie Telecom”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-08”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00002”,
“debit”: “1.500000”,
“posting_date”: “2019-03-08”,
“cheque_number”: “A1000012”,
“account_currency”: “TND”,
“against_account”: “Tunisie Telecom”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “1970.000000”,
“payment_entry”: “ACC-PAY-2019-00007”,
“debit”: “”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “9542.875000”,
“payment_entry”: “ACC-PAY-2019-00006”,
“debit”: “”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “23800.000000”,
“payment_entry”: “ACC-PAY-2019-00005”,
“debit”: “”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00004”,
“debit”: “12.500000”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “Hayat School”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-14”,
“credit”: “11.900000”,
“payment_entry”: “ACC-PAY-2019-00009”,
“debit”: “”,
“posting_date”: “2019-03-14”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-14”,
“credit”: “11900.000000”,
“payment_entry”: “ACC-PAY-2019-00008”,
“debit”: “”,
“posting_date”: “2019-03-14”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-16”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00010”,
“debit”: “0.003000”,
“posting_date”: “2019-03-16”,
“cheque_number”: “c123”,
“account_currency”: “TND”,
“against_account”: “Passager”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-18”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00012”,
“debit”: “3.218000”,
“posting_date”: “2019-03-18”,
“cheque_number”: “CH1000026”,
“account_currency”: “TND”,
“against_account”: “Bel Azure”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-18”,
“credit”: “23.800000”,
“payment_entry”: “ACC-PAY-2019-00011”,
“debit”: “”,
“posting_date”: “2019-03-18”,
“cheque_number”: “CH100025”,
“account_currency”: “TND”,
“against_account”: “Inoplast”
}
],
“d”: {
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-02-18”,
“credit”: “475.000000”,
“payment_entry”: “ACC-PAY-2019-00001”,
“debit”: “”,
“posting_date”: “2019-02-18”,
“cheque_number”: “123”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
“self”: “”,
“journal_entries”: [],
“entries”: [
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-02-18”,
“credit”: “475.000000”,
“payment_entry”: “ACC-PAY-2019-00001”,
“debit”: “”,
“posting_date”: “2019-02-18”,
“cheque_number”: “123”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-08”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00003”,
“debit”: “15.000000”,
“posting_date”: “2019-03-08”,
“cheque_number”: “A100025”,
“account_currency”: “TND”,
“against_account”: “Tunisie Telecom”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-08”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00002”,
“debit”: “1.500000”,
“posting_date”: “2019-03-08”,
“cheque_number”: “A1000012”,
“account_currency”: “TND”,
“against_account”: “Tunisie Telecom”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “1970.000000”,
“payment_entry”: “ACC-PAY-2019-00007”,
“debit”: “”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “9542.875000”,
“payment_entry”: “ACC-PAY-2019-00006”,
“debit”: “”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “23800.000000”,
“payment_entry”: “ACC-PAY-2019-00005”,
“debit”: “”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-12”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00004”,
“debit”: “12.500000”,
“posting_date”: “2019-03-12”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “Hayat School”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-14”,
“credit”: “11.900000”,
“payment_entry”: “ACC-PAY-2019-00009”,
“debit”: “”,
“posting_date”: “2019-03-14”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-14”,
“credit”: “11900.000000”,
“payment_entry”: “ACC-PAY-2019-00008”,
“debit”: “”,
“posting_date”: “2019-03-14”,
“cheque_number”: “.”,
“account_currency”: “TND”,
“against_account”: “3M bookstore”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-16”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00010”,
“debit”: “0.003000”,
“posting_date”: “2019-03-16”,
“cheque_number”: “c123”,
“account_currency”: “TND”,
“against_account”: “Passager”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-18”,
“credit”: “”,
“payment_entry”: “ACC-PAY-2019-00012”,
“debit”: “3.218000”,
“posting_date”: “2019-03-18”,
“cheque_number”: “CH1000026”,
“account_currency”: “TND”,
“against_account”: “Bel Azure”
},
{
“payment_document”: “Payment Entry”,
“clearance_date”: null,
“cheque_date”: “2019-03-18”,
“credit”: “23.800000”,
“payment_entry”: “ACC-PAY-2019-00011”,
“debit”: “”,
“posting_date”: “2019-03-18”,
“cheque_number”: “CH100025”,
“account_currency”: “TND”,
“against_account”: “Inoplast”
}
],
“pos_entries”: [],
“condition”: “and (clearance_date is null or clearance_date=‘0000-00-00’)”,
“row”: “”
}
Request Data
{
“type”: “POST”,
“args”: {
“cmd”: “runserverobj”,
“docs”: “{“include_reconciled_entries”:0,“include_pos_transactions”:0,“total_amount”:0,“modified_by”:“Administrator”,“name”:“Bank Reconciliation”,“creation”:“2019-01-02 22:19:33.541385”,“modified”:“2019-01-02 22:19:33.541385”,“doctype”:“Bank Reconciliation”,“idx”:“0”,“payment_entries”:[],“owner”:“Administrator”,“docstatus”:0,”__last_sync_on":“2019-03-29T15:31:05.346Z”,“bank_account”:“532110 - STB - TT”,“from_date”:“2019-01-01”,“to_date”:“2019-03-31”,"__unsaved":1}",
“method”: “get_payment_entries”
},
“url”: “/”
}
Response JSON
{}

rgds
Nofal

I’m getting the same error since updating to v11.1.17

When did you last update?

This fix was committed 14 hours ago https://github.com/frappe/erpnext/pull/17048

shall I do bench update now?

I did bench update, still error showing

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = 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 1028, 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 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py”, line 83, in get_payment_entries
amount = d.get(‘debit’, 0) - d.get(‘credit’, 0)
TypeError: unsupported operand type(s) for -: ‘unicode’ and ‘unicode’

Installed Apps

ERPNext: v11.1.17 (master)

Frappe Framework: v11.1.17 (master)

This notes the change line # 83 is currently in the hotfix branch not master
https://github.com/frappe/erpnext/tree/master/erpnext/accounts/doctype/bank_reconciliation

I can’t say what internal review/test process happens for the hotfix to be merged into master.

Only after that occurs will bench update pull the changes to your local.

1 Like

issue resolved