mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
Merge pull request #43253 from Nihantra-Patel/pos_return_v15
fix: partial return on POS invoice
This commit is contained in:
@@ -450,7 +450,7 @@ class POSInvoice(SalesInvoice):
|
|||||||
if self.is_return and entry.amount > 0:
|
if self.is_return and entry.amount > 0:
|
||||||
frappe.throw(_("Row #{0} (Payment Table): Amount must be negative").format(entry.idx))
|
frappe.throw(_("Row #{0} (Payment Table): Amount must be negative").format(entry.idx))
|
||||||
|
|
||||||
if self.is_return:
|
if self.is_return and self.docstatus != 0:
|
||||||
invoice_total = self.rounded_total or self.grand_total
|
invoice_total = self.rounded_total or self.grand_total
|
||||||
total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total"))
|
total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total"))
|
||||||
if total_amount_in_payments and total_amount_in_payments < invoice_total:
|
if total_amount_in_payments and total_amount_in_payments < invoice_total:
|
||||||
|
|||||||
Reference in New Issue
Block a user