From 53029f99255e37629ccddf7df469481daae26706 Mon Sep 17 00:00:00 2001 From: scuti Date: Sat, 11 May 2024 21:31:47 -0700 Subject: [PATCH] fixed payments towards principal applying twice toward remaining balance --- amort.py | 1 - 1 file changed, 1 deletion(-) diff --git a/amort.py b/amort.py index df39cef..09498e0 100644 --- a/amort.py +++ b/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