After an item added to quote then clicked Pay an error shows

on the webshop, when I select one item from all-products page and then hit “Add to Quote” it works fine but after that when i click on Pay an error shows up as below “server error” “status 500”

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 114, in application
response = frappe.api.handle(request)
File “apps/frappe/frappe/api/init.py”, line 49, in handle
data = endpoint(**arguments)
File “apps/frappe/frappe/api/v1.py”, line 36, in handle_rpc_call
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 49, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1768, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/utils/typing_validations.py”, line 31, in wrapper
return func(*args, **kwargs)
File “apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py”, line 430, 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 542, in get_amount
if grand_total > 0:
UnboundLocalError: local variable ‘grand_total’ referenced before assignment

@NCP do you think its an issue from my end or might be a bug?