fix: Remove accrual type from process

This commit is contained in:
Deepesh Garg 2020-11-05 21:21:40 +05:30
parent a2bff7fbfc
commit 1145b3796c
3 changed files with 5 additions and 11 deletions

View File

@ -135,7 +135,7 @@ def make_accrual_interest_entry_for_demand_loans(posting_date, process_loan_inte
for loan in open_loans:
calculate_accrual_amount_for_demand_loans(loan, posting_date, process_loan_interest, accrual_type)
def make_accrual_interest_entry_for_term_loans(posting_date, process_loan_interest, term_loan=None, loan_type=None):
def make_accrual_interest_entry_for_term_loans(posting_date, process_loan_interest, term_loan=None, loan_type=None, accrual_type="Regular"):
curr_date = posting_date or add_days(nowdate(), 1)
term_loans = get_term_loans(curr_date, term_loan, loan_type)
@ -154,7 +154,8 @@ def make_accrual_interest_entry_for_term_loans(posting_date, process_loan_intere
'payable_principal': loan.principal_amount,
'process_loan_interest': process_loan_interest,
'repayment_schedule_name': loan.payment_entry,
'posting_date': posting_date
'posting_date': posting_date,
'accrual_type': accrual_type
})
make_loan_interest_accrual_entry(args)

View File

@ -10,7 +10,6 @@
"loan_type",
"loan",
"process_type",
"accrual_type",
"amended_from"
],
"fields": [
@ -48,18 +47,12 @@
"hidden": 1,
"label": "Process Type",
"read_only": 1
},
{
"fieldname": "accrual_type",
"fieldtype": "Select",
"label": "Accrual Type",
"options": "Regular\nRepayment\nDisbursement"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2020-10-26 07:14:31.491249",
"modified": "2020-11-05 10:49:35.657728",
"modified_by": "Administrator",
"module": "Loan Management",
"name": "Process Loan Interest Accrual",

View File

@ -20,7 +20,7 @@ class ProcessLoanInterestAccrual(Document):
if (not self.loan or not loan_doc.is_term_loan) and self.process_type != 'Term Loans':
make_accrual_interest_entry_for_demand_loans(self.posting_date, self.name,
open_loans = open_loans, loan_type = self.loan_type, accrual_type=self.accrual_type)
open_loans = open_loans, loan_type = self.loan_type)
if (not self.loan or loan_doc.is_term_loan) and self.process_type != 'Demand Loans':
make_accrual_interest_entry_for_term_loans(self.posting_date, self.name, term_loan=self.loan,