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 Request Validations #41352

Open
riddhisolanki001 opened this issue May 7, 2024 · 0 comments
Open

Payment Request Validations #41352

riddhisolanki001 opened this issue May 7, 2024 · 0 comments
Labels

Comments

@riddhisolanki001
Copy link

Information about bug

When we are making a Payment request from a purchase invoice with the same amount, still system throw the error payment amount can not be greater then invoice amount. and also there is no any other payment request generated against the same invoice
image
image
image

Module

accounts

Version

ERPNext: v14.66.4 (version-14)

Frappe Framework: v14.71.0 (version-14)

Installation method

None

Relevant log output / Stack trace / Full Error Message.

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 1611, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 31, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 307, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 342, in _save
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1061, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 928, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1280, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1262, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 925, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py", line 39, in validate
    self.validate_payment_request_amount()
  File "apps/erpnext/erpnext/accounts/doctype/payment_request/payment_request.py", line 57, in validate_payment_request_amount
    frappe.throw(
  File "apps/frappe/frappe/__init__.py", line 541, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 509, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 455, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Total Payment Request amount cannot be greater than Purchase Invoice amount
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

1 participant