fix: partial return on POS invoice
(cherry picked from commit 76289fa8dc)
# Conflicts:
# erpnext/accounts/doctype/pos_invoice/pos_invoice.py
This commit is contained in:
committed by
Mergify
parent
8f81fdba4f
commit
ef7d4fe84a
@@ -381,8 +381,14 @@ class POSInvoice(SalesInvoice):
|
|||||||
|
|
||||||
if self.is_return:
|
if self.is_return:
|
||||||
invoice_total = self.rounded_total or self.grand_total
|
invoice_total = self.rounded_total or self.grand_total
|
||||||
|
<<<<<<< HEAD
|
||||||
if total_amount_in_payments and total_amount_in_payments < invoice_total:
|
if total_amount_in_payments and total_amount_in_payments < invoice_total:
|
||||||
frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total))
|
frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_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:
|
||||||
|
frappe.throw(_("Total payments amount can't be greater than {}").format(invoice_total))
|
||||||
|
>>>>>>> 76289fa8dc (fix: partial return on POS invoice)
|
||||||
|
|
||||||
def validate_company_with_pos_company(self):
|
def validate_company_with_pos_company(self):
|
||||||
if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"):
|
if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"):
|
||||||
|
|||||||
Reference in New Issue
Block a user