diff --git a/htdocs/langs/en_US/loan.lang b/htdocs/langs/en_US/loan.lang
index 4922c0fc0a1..056ce1d0b48 100644
--- a/htdocs/langs/en_US/loan.lang
+++ b/htdocs/langs/en_US/loan.lang
@@ -18,6 +18,18 @@ ErrorLoanCapital=Loan amount has to be numeric and greate
ErrorLoanLength=Loan length has to be numeric and greater than zero.
ErrorLoanInterest=Annual interest has to be numeric and greater than zero.
# Calc
+LoanCalc=Bank Loans Calculator
+PurchaseFinanceInfo=Purchase & Financing Information
+SalePriceOfAsset=Sale Price of Asset
+PercentageDown=Percentage Down
+LengthOfMortgage=Length of Mortgage
+AnnualInterestRate=Annual Interest Rate
+ExplainCalculations=Explain Calculations
+ShowMeCalculationsAndAmortization=Show me the calculations and amortization
+MortgagePaymentInformation=Mortgage Payment Information
+DownPayment=Down Payment
+AmountFinanced=Amount Financed
+AmortizationMonthlyPaymentOverYears=Amortization For Monthly Payment: %s over %s years
Totalsforyear=Totals for year
MonthlyPayment=Monthly Payment
LoanCalcDesc=This mortgage calculator can be used to figure out monthly payments of a home mortgage loan, based on the home's sale price, the term of the loan desired, buyer's down payment percentage, and the loan's interest rate.
This calculator factors in PMI (Private Mortgage Insurance) for loans where less than 20% is put as a down payment. Also taken into consideration are the town property taxes, and their effect on the total monthly mortgage payment.
diff --git a/htdocs/loan/calc.php b/htdocs/loan/calc.php
index 0a5ee21923a..06b62231a67 100644
--- a/htdocs/loan/calc.php
+++ b/htdocs/loan/calc.php
@@ -56,13 +56,13 @@ if (isset($_REQUEST['form_complete'])) {
$show_progress = (isset($_REQUEST['show_progress'])) ? $_REQUEST['show_progress'] : false;
$form_complete = $_REQUEST['form_complete'];
}
-
+
// This function does the actual mortgage calculations
// by plotting a PVIFA (Present Value Interest Factor of Annuity)
// table...
function get_interest_factor($year_term, $monthly_interest_rate) {
global $base_rate;
-
+
$factor = 0;
$base_rate = 1 + $monthly_interest_rate;
$denominator = $base_rate;
@@ -71,7 +71,7 @@ function get_interest_factor($year_term, $monthly_interest_rate) {
$denominator *= $base_rate;
}
return $factor;
-}
+}
// If the form is complete, we'll start the math
if ($form_complete) {
@@ -109,18 +109,19 @@ if ($form_complete) {
if (!$down_percent) { $down_percent = $default_down_percent; }
if (!$show_progress) { $show_progress = $default_show_progress; }
}
-
+
if (! empty($errors)) {
setEventMessages('', $errors, 'errors');
$form_complete = false;
}
-
+
/*
* View
*/
llxHeader();
+print_fiche_titre($langs->trans("LoanCalc"));
print $langs->trans('LoanCalcDesc');
print '