From 8ca35d3459ed23b6e6910425dc75787bd86cc447 Mon Sep 17 00:00:00 2001 From: glyn Date: Mon, 9 Jun 2014 17:03:49 +0100 Subject: [PATCH] maintain overpayments in total paid figure --- mcalc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcalc.pl b/mcalc.pl index 6bb7578..57812dd 100755 --- a/mcalc.pl +++ b/mcalc.pl @@ -95,7 +95,7 @@ do_it: { for ($month = 1; $month <= 12; $month++) { $month_value = $month_value+($month_value*$monthly_interest)-($monthly_payment+$monthly_overpayment); - $total_paid = $total_paid + $monthly_payment; + $total_paid = $total_paid + $monthly_payment + $monthly_overpayment; $interest_accrued = $interest_accrued + ($month_value*$monthly_interest); if (($month == 12) || ($month_value <= 0)){ print "End of year ", pack("A5",$year); -- 2.39.5