fix: Fetch discount details from Payment Terms only if Discount Type = Percentage
This commit is contained in:
parent
e4a07d8ff3
commit
5c21eea13d
@ -1174,9 +1174,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