fix: Make repayment entry only if amount exists
This commit is contained in:
parent
78690af440
commit
a862eb25e6
@ -107,10 +107,11 @@ def execute():
|
||||
''', (loan.name, loan.loan_account), as_dict=1)
|
||||
|
||||
for payment in payments:
|
||||
if payment.credit_in_account_currency:
|
||||
repayment_entry = make_repayment_entry(loan.name, loan.loan_applicant_type, loan.applicant,
|
||||
loan_type, loan.company)
|
||||
|
||||
repayment_entry.amount_paid = payment.debit_in_account_currency
|
||||
repayment_entry.amount_paid = payment.credit_in_account_currency
|
||||
repayment_entry.posting_date = payment.posting_date
|
||||
repayment_entry.save()
|
||||
repayment_entry.submit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user