fix: Fetch discount details from Payment Terms only if Discount Type = Percentage
This commit is contained in:
parent
0588382c38
commit
5b33e75c65
@ -1179,9 +1179,14 @@ class AccountsController(TransactionBase):
|
|||||||
'payment_term': schedule.payment_term,
|
'payment_term': schedule.payment_term,
|
||||||
'due_date': schedule.due_date,
|
'due_date': schedule.due_date,
|
||||||
'invoice_portion': schedule.invoice_portion,
|
'invoice_portion': schedule.invoice_portion,
|
||||||
'discount_type': schedule.discount_type,
|
'mode_of_payment': schedule.mode_of_payment,
|
||||||
'discount': schedule.discount
|
'description': schedule.description
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if schedule.discount_type == 'Percentage':
|
||||||
|
payment_schedule['discount_type'] = schedule.discount_type
|
||||||
|
payment_schedule['discount'] = schedule.discount
|
||||||
|
|
||||||
self.append("payment_schedule", payment_schedule)
|
self.append("payment_schedule", payment_schedule)
|
||||||
|
|
||||||
def set_due_date(self):
|
def set_due_date(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user