fix(pos): do not reset mode of payments in case of consolidation

This commit is contained in:
Saqib Ansari 2022-03-12 19:20:48 +05:30
parent 6794148c04
commit e8a7a54d5a

View File

@ -633,7 +633,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()