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

Payment Entry Form: Getting Error While Fetching Outstanding for Shareholder #33121

Closed
jalajc opened this issue Nov 26, 2022 · 1 comment
Closed
Labels

Comments

@jalajc
Copy link

jalajc commented Nov 26, 2022

Information about bug

Getting error while fetching outstanding amount inside the Payment Entry Form.

App Versions

{
	"erpnext": "13.42.0",
	"frappe": "13.44.0"
}

Route

Form/Payment Entry/PAYE00003/2211

Trackeback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, 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 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1457, in call
    return fn(*args, **newargs)
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 1279, in get_outstanding_reference_documents
    orders_to_be_billed = get_orders_to_be_billed(
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 1389, in get_orders_to_be_billed
    if voucher_type:
UnboundLocalError: local variable 'voucher_type' referenced before assignment

Request Data

{
	"type": "POST",
	"args": {
		"args": "{\"posting_date\":\"2021-04-03\",\"company\":\"JmacaireFY22\",\"party_type\":\"Shareholder\",\"payment_type\":\"Pay\",\"party\":\"ACC-SH-2022-00003\",\"party_account\":\"Director Payroll Payable - JFY22\",\"from_posting_date\":\"2021-04-01\",\"to_posting_date\":\"2022-11-26\",\"outstanding_amt_greater_than\":0,\"outstanding_amt_less_than\":0,\"allocate_payment_amount\":0}"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/erpnext.accounts.doctype.payment_entry.payment_entry.get_outstanding_reference_documents"
}

Response Data

{
	"exception": "UnboundLocalError: local variable 'voucher_type' referenced before assignment"
}

Module

accounts

Version

"erpnext": "13.42.0",
"frappe": "13.44.0"

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, 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 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1457, in call
    return fn(*args, **newargs)
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 1279, in get_outstanding_reference_documents
    orders_to_be_billed = get_orders_to_be_billed(
  File "apps/erpnext/erpnext/accounts/doctype/payment_entry/payment_entry.py", line 1389, in get_orders_to_be_billed
    if voucher_type:
UnboundLocalError: local variable 'voucher_type' referenced before assignment
@jalajc jalajc added the bug label Nov 26, 2022
@jalajc jalajc changed the title Getting Error While Fetching Outstanding for Shareholder Payment Entry Form: Getting Error While Fetching Outstanding for Shareholder Nov 26, 2022
@Nihantra-Patel
Copy link
Contributor

Hi @jalajc,

Issue has been resolved #35779

Thank You!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants