mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
fix: Make repayment entry only if amount exists
This commit is contained in:
@@ -107,10 +107,11 @@ def execute():
|
|||||||
''', (loan.name, loan.loan_account), as_dict=1)
|
''', (loan.name, loan.loan_account), as_dict=1)
|
||||||
|
|
||||||
for payment in payments:
|
for payment in payments:
|
||||||
|
if payment.credit_in_account_currency:
|
||||||
repayment_entry = make_repayment_entry(loan.name, loan.loan_applicant_type, loan.applicant,
|
repayment_entry = make_repayment_entry(loan.name, loan.loan_applicant_type, loan.applicant,
|
||||||
loan_type, loan.company)
|
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.posting_date = payment.posting_date
|
||||||
repayment_entry.save()
|
repayment_entry.save()
|
||||||
repayment_entry.submit()
|
repayment_entry.submit()
|
||||||
|
|||||||
Reference in New Issue
Block a user