added a new penal charge endpoint
This commit is contained in:
@@ -445,10 +445,11 @@ def report():
|
||||
def process_penal_charges():
|
||||
try:
|
||||
OVERDUE_GRACE_PERIOD_DAYS = settings.OVERDUE_GRACE_PERIOD_DAYS
|
||||
OVERDUE_PROCESSING_LIST_LIMIT = settings.OVERDUE_PROCESSING_LIST_LIMIT
|
||||
|
||||
overdue_loans = (
|
||||
LoanRepaymentScheduleService
|
||||
.get_overdue_repayment_schedule_with_grace_period(OVERDUE_GRACE_PERIOD_DAYS)
|
||||
.get_overdue_repayment_schedule_with_grace_period(OVERDUE_GRACE_PERIOD_DAYS,OVERDUE_PROCESSING_LIST_LIMIT)
|
||||
)
|
||||
|
||||
logger.info(f"Found {len(overdue_loans)} overdue loans.")
|
||||
@@ -464,7 +465,7 @@ def process_penal_charges():
|
||||
for loan in overdue_loans:
|
||||
# TODO: apply penal charge logic here
|
||||
# PenalChargeService.apply_penal_charge(loan)
|
||||
|
||||
LoanRepaymentScheduleService.update_due_process_date_and_count(loan.id)
|
||||
processed_loans.append(loan.to_dict())
|
||||
|
||||
return ResponseHelper.success(
|
||||
|
||||
Reference in New Issue
Block a user