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,
|
||||
'due_date': schedule.due_date,
|
||||
'invoice_portion': schedule.invoice_portion,
|
||||
'discount_type': schedule.discount_type,
|
||||
'discount': schedule.discount
|
||||
'mode_of_payment': schedule.mode_of_payment,
|
||||
'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)
|
||||
|
||||
def set_due_date(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user