Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Error while reconcile entries and/or while creating Payment Entry from Purchase Invoice. #86

Open
ameerbab opened this issue May 20, 2024 · 0 comments

Comments

@ameerbab
Copy link

App Versions

{
	"chat": "0.0.1",
	"erpnext": "14.70.0",
	"erpnext_telegram_integration": "1.2.0",
	"frappe": "14.74.1",
	"frappe_whatsapp": "0.0.2",
	"hrms": "16.0.0-dev",
	"india_compliance": "14.26.5",
	"payments": "0.0.1"
}

Route

Form/Payment Reconciliation/Payment Reconciliation

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, 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 317, 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 467, in reconcile
    self.reconcile_allocations()
  File "apps/erpnext/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py", line 441, in reconcile_allocations
    reconcile_against_document(entry_list, skip_ref_details_update_for_pe, self.dimensions)
  File "apps/erpnext/erpnext/accounts/utils.py", line 473, in reconcile_against_document
    referenced_row = update_reference_in_payment_entry(
  File "apps/erpnext/erpnext/accounts/utils.py", line 685, in update_reference_in_payment_entry
    payment_entry.set_missing_ref_details(
  File "apps/hrms/hrms/overrides/employee_payment_entry.py", line 43, in set_missing_ref_details
    ref_details = get_payment_reference_details(
  File "apps/hrms/hrms/overrides/employee_payment_entry.py", line 214, in get_payment_reference_details
    return get_reference_details(
TypeError: get_reference_details() takes 3 positional arguments but 5 were given

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\",\"allocation\":[{\"docstatus\":0,\"idx\":1,\"reference_type\":\"Payment Entry\",\"reference_name\":\"PAY240502\",\"invoice_type\":\"Purchase Invoice\",\"invoice_number\":\"PV240101\",\"allocated_amount\":30.35,\"unreconciled_amount\":30.350017962,\"amount\":30.350017962,\"difference_amount\":10.31899999999996,\"gain_loss_posting_date\":\"2024-01-20\",\"difference_account\":\"Exchange Gain/Loss - IWI\",\"exchange_rate\":83.17,\"currency\":\"USD\",\"parent\":\"Payment Reconciliation\",\"parentfield\":\"allocation\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Allocation\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-allocation-ytoopalhrr\"},{\"docstatus\":0,\"idx\":2,\"reference_type\":\"Payment Entry\",\"reference_name\":\"PAY240502\",\"invoice_type\":\"Purchase Invoice\",\"invoice_number\":\"PV240107\",\"allocated_amount\":0.000017961999997595512,\"unreconciled_amount\":30.350017962,\"amount\":0.000017961999997595512,\"difference_amount\":0.000011495679998461007,\"gain_loss_posting_date\":\"2024-01-20\",\"difference_account\":\"Exchange Gain/Loss - IWI\",\"exchange_rate\":82.87,\"currency\":\"USD\",\"parent\":\"Payment Reconciliation\",\"parentfield\":\"allocation\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Allocation\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-allocation-qlyxdlvkpi\"},{\"docstatus\":0,\"idx\":3,\"reference_type\":\"Payment Entry\",\"reference_name\":\"PAY240501\",\"invoice_type\":\"Purchase Invoice\",\"invoice_number\":\"PV240107\",\"allocated_amount\":23.799982038000003,\"unreconciled_amount\":23.800023949,\"amount\":23.800023949,\"difference_amount\":15.231988504320043,\"gain_loss_posting_date\":\"2024-03-20\",\"difference_account\":\"Exchange Gain/Loss - IWI\",\"exchange_rate\":82.87,\"currency\":\"USD\",\"parent\":\"Payment Reconciliation\",\"parentfield\":\"allocation\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Allocation\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-allocation-rhfkaripws\"},{\"docstatus\":0,\"idx\":4,\"reference_type\":\"Payment Entry\",\"reference_name\":\"PAY240501\",\"invoice_type\":\"Purchase Invoice\",\"invoice_number\":\"PV240501\",\"allocated_amount\":0.000041910999996730425,\"unreconciled_amount\":23.800023949,\"amount\":0.000041910999996730425,\"difference_amount\":0.0000033528799997383125,\"gain_loss_posting_date\":\"2024-03-20\",\"difference_account\":\"Exchange Gain/Loss - IWI\",\"exchange_rate\":83.43,\"currency\":\"USD\",\"parent\":\"Payment Reconciliation\",\"parentfield\":\"allocation\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Allocation\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-allocation-tbrvkimtme\"}],\"invoices\":[{\"docstatus\":0,\"idx\":1,\"invoice_type\":\"Purchase Invoice\",\"invoice_number\":\"PV240101\",\"invoice_date\":\"2024-01-01\",\"amount\":30.35,\"outstanding_amount\":30.35,\"currency\":\"USD\",\"exchange_rate\":0,\"parent\":\"Payment Reconciliation\",\"parentfield\":\"invoices\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Invoice\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-uxjjdwxqmm\"},{\"docstatus\":0,\"idx\":2,\"invoice_type\":\"Purchase Invoice\",\"invoice_number\":\"PV240107\",\"invoice_date\":\"2024-03-01\",\"amount\":23.8,\"outstanding_amount\":23.8,\"currency\":\"USD\",\"exchange_rate\":0,\"parent\":\"Payment Reconciliation\",\"parentfield\":\"invoices\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Invoice\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-hytvnfvdzc\"},{\"docstatus\":0,\"idx\":3,\"invoice_type\":\"Purchase Invoice\",\"invoice_number\":\"PV240501\",\"invoice_date\":\"2024-05-01\",\"amount\":23.96,\"outstanding_amount\":23.96,\"currency\":\"USD\",\"exchange_rate\":0,\"parent\":\"Payment Reconciliation\",\"parentfield\":\"invoices\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Invoice\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-xgejfatjwr\"}],\"payments\":[{\"docstatus\":0,\"idx\":1,\"reference_type\":\"Payment Entry\",\"reference_name\":\"PAY240502\",\"posting_date\":\"2024-01-20\",\"amount\":30.350017962,\"difference_amount\":0,\"currency\":\"USD\",\"exchange_rate\":83.51,\"parent\":\"Payment Reconciliation\",\"parentfield\":\"payments\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Payment\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-xkwghmqdno\"},{\"docstatus\":0,\"idx\":2,\"reference_type\":\"Payment Entry\",\"reference_name\":\"PAY240501\",\"posting_date\":\"2024-03-20\",\"amount\":23.800023949,\"difference_amount\":0,\"currency\":\"USD\",\"exchange_rate\":83.51,\"parent\":\"Payment Reconciliation\",\"parentfield\":\"payments\",\"parenttype\":\"Payment Reconciliation\",\"doctype\":\"Payment Reconciliation Payment\",\"__islocal\":1,\"name\":\"new-payment-reconciliation-payment-dkbqfemkcd\"}],\"company\":\"iWEX Infomatics\",\"party_type\":\"Supplier\",\"party\":\"DigitalOcean LLC\",\"receivable_payable_account\":\"Creditors (USD) - IWI\",\"__unsaved\":1,\"docstatus\":0,\"idx\":0,\"from_invoice_date\":\"2024-01-01\",\"to_invoice_date\":\"2024-05-20\",\"from_payment_date\":\"2024-01-01\",\"to_payment_date\":\"2024-05-20\"}",
		"method": "reconcile"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/run_doc_method"
}

Response Data

{
	"exception": "TypeError: get_reference_details() takes 3 positional arguments but 5 were given"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant