Finance-Loan-Private
view release on metacpan or search on metacpan
script/privateloan.pl view on Meta::CPAN
sub yearEndSummary {
printf ("Gross interest paid in the past year\t%8.2f\n", $totalInterest);
printf("Total tax deducted in the past year\t%8.2f\n", $totalTax);
print "\n";
$totalTax = 0;
$totalInterest =0;
$YearEnd += $Year;
print "Date\t\tPrincipal\tGross interest due\tTax due\tAmount paid\tPrincipal repaid\n";
}
sub updateLoan {
$InterestRate = $Advances[0]->{rate} if exists($Advances[0]->{rate});
$Principal += $Advances[0]->{amount} if exists($Advances[0]->{amount});
$Premium = $Advances[0]->{premium} if exists($Advances[0]->{premium});
shift @Advances;
}
sub updateTax {
$TaxRate = $TaxRates[0]->{rate} if exists($TaxRates[0]->{rate});
shift @TaxRates;
}
=head1 AUTHOR
Raphael Mankin <rapmankin@cpan.org>
( run in 0.636 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )