fix: payment terms on Sales Order when Invoice Portion field is empty (#27259)

This commit is contained in:
Frappe PR Bot 2021-08-31 19:01:03 +05:30 committed by GitHub
parent 3e404f15ff
commit 81fb493850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1206,7 +1206,7 @@ class AccountsController(TransactionBase):
d.base_payment_amount = flt(base_grand_total * flt(d.invoice_portion / 100), d.precision('base_payment_amount')) d.base_payment_amount = flt(base_grand_total * flt(d.invoice_portion / 100), d.precision('base_payment_amount'))
d.outstanding = d.payment_amount d.outstanding = d.payment_amount
elif not d.invoice_portion: elif not d.invoice_portion:
d.base_payment_amount = flt(base_grand_total * self.get("conversion_rate"), d.precision('base_payment_amount')) d.base_payment_amount = flt(d.payment_amount * self.get("conversion_rate"), d.precision('base_payment_amount'))
def get_order_details(self): def get_order_details(self):