POS-Awesome
POS-Awesome copied to clipboard
[BUG]: When Using the return Function while Rounding is Enabled Gives an error.
Versions
- Frappe: v14.62.1
- Erpnext: v14.58.1
- POS Awesome: 6.1.3
Stacktrace / full error message
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 47, 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 1628, in call
return fn(*args, **newargs)
File "apps/posawesome/posawesome/posawesome/api/posapp.py", line 555, in update_invoice
invoice_doc.save()
File "apps/frappe/frappe/model/document.py", line 309, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 331, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 262, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1058, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 922, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1284, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1266, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 919, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 118, in validate
self.validate_pos()
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 812, in validate_pos
frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total"))
File "apps/frappe/frappe/__init__.py", line 540, in throw
msgprint(
File "apps/frappe/frappe/__init__.py", line 508, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 454, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Paid amount + Write Off Amount can not be greater than Grand Total
Steps to reproduce
- Open posawesome, and create a new offer in which the total is i.e.(146.63) the rounding system will change it to (146.50), "in my case I created an item with UOM of (Kg) and the item Price of (110) and the Qty (1.333).
3. After creating the sales invoice, Press the return button find the invoice that has been created and select it.
5. now when pressing the pay button an error occurs, "Paid amount + Write Off Amount can not be greater than Grand Total".
What is Expected?
The Expected behaviour is that when the pay button is pressed, you can return the invoice and change the status of the original invoice to "Credit Note Issued".
What is actually happening?
An error Occures "Paid amount + Write Off Amount can not be greater than Grand Total"