mirror of
https://notabug.org/scuti/amort
synced 2024-12-28 11:10:24 +05:30
fixed payments towards principal applying twice toward remaining balance
This commit is contained in:
parent
5cc813a346
commit
53029f9925
1
amort.py
1
amort.py
@ -31,7 +31,6 @@ def generate_amortization_schedule(principal, interest_rate, loan_term, extra_pa
|
||||
# Apply one-time payment if provided
|
||||
if one_time_payment and payment_number == one_time_payment['payment_number']:
|
||||
principal_payment += one_time_payment['amount']
|
||||
remaining_balance -= one_time_payment['amount']
|
||||
if extra_payments != []:
|
||||
one_time_payment = extra_payments.pop(0)
|
||||
# Update remaining balance
|
||||
|
Loading…
Reference in New Issue
Block a user