fix(pos): do not reset mode of payments in case of consolidation
This commit is contained in:
Saqib Ansari
2022-03-14 12:34:40 +05:30
committed by GitHub
2 changed files with 16 additions and 3 deletions

View File

@@ -636,7 +636,12 @@ class calculate_taxes_and_totals(object):
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) + flt(change_amount),
self.doc.precision("outstanding_amount"))
if self.doc.doctype == 'Sales Invoice' and self.doc.get('is_pos') and self.doc.get('is_return'):
if (
self.doc.doctype == 'Sales Invoice'
and self.doc.get('is_pos')
and self.doc.get('is_return')
and not self.doc.get('is_consolidated')
):
self.set_total_amount_to_default_mop(total_amount_to_pay)
self.calculate_paid_amount()