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

Payments app - UnboundLocalError: local variable 'grand_total' referenced before assignment #43286

Open
eleben opened this issue Sep 18, 2024 · 1 comment
Labels

Comments

@eleben
Copy link

eleben commented Sep 18, 2024

Information about bug

image

Clicked on "Pay $1000.00" and get the following message

error UnboundLocalError: local variable 'grand_total' referenced before assignment

Module

accounts

Version

Version - Frappe Cloud (latest versions for each under the "version-14" branch)
ERPNext: v14.74.1 (HEAD)
Frappe Framework: v14.81.4 (HEAD)
Payments: v0.0.1 (HEAD)

image

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

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/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py", line 410, in make_payment_request
    grand_total = get_amount(ref_doc, gateway_account.get("payment_account"))
  File "apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py", line 522, in get_amount
    if grand_total > 0:
UnboundLocalError: local variable 'grand_total' referenced before assignment
@eleben eleben added the bug label Sep 18, 2024
@AlaaL
Copy link

AlaaL commented Sep 19, 2024

i have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants