Merge pull request #2489 from frederic34/loan
Note private and Note public for loan
This commit is contained in:
commit
0c1a51ddae
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,35 +33,45 @@ function loan_prepare_head($object)
|
|||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$h = 0;
|
$tab = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/loan/card.php?id='.$object->id;
|
$head[$tab][0] = DOL_URL_ROOT.'/loan/card.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans('Card');
|
$head[$tab][1] = $langs->trans('Card');
|
||||||
$head[$h][2] = 'card';
|
$head[$tab][2] = 'card';
|
||||||
$h++;
|
$tab++;
|
||||||
|
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||||
|
{
|
||||||
|
$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
|
||||||
|
$head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;
|
||||||
|
$head[$tab][1] = $langs->trans("Notes");
|
||||||
|
if($nbNote > 0) $head[$tab][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||||
|
$head[$tab][2] = 'note';
|
||||||
|
$tab++;
|
||||||
|
}
|
||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'loan');
|
complete_head_from_modules($conf, $langs, $object, $head, $tab,'loan');
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$upload_dir = $conf->loan->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->loan->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
|
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id;
|
$head[$tab][0] = DOL_URL_ROOT.'/loan/document.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Documents");
|
$head[$tab][1] = $langs->trans("Documents");
|
||||||
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
if($nbFiles > 0) $head[$tab][1].= ' ('.$nbFiles.')';
|
||||||
$head[$h][2] = 'documents';
|
$head[$tab][2] = 'documents';
|
||||||
$h++;
|
$tab++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/loan/info.php?id='.$object->id;
|
$head[$tab][0] = DOL_URL_ROOT.'/loan/info.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Info");
|
$head[$tab][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'info';
|
$head[$tab][2] = 'info';
|
||||||
$h++;
|
$tab++;
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'loan','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$tab,'loan','remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
@ -32,7 +32,8 @@ create table llx_loan
|
|||||||
dateend date,
|
dateend date,
|
||||||
nbterm real,
|
nbterm real,
|
||||||
rate double NOT NULL,
|
rate double NOT NULL,
|
||||||
note text,
|
note_private text,
|
||||||
|
note_public text,
|
||||||
capital_position real default 0,
|
capital_position real default 0,
|
||||||
date_position date,
|
date_position date,
|
||||||
paid smallint default 0 NOT NULL,
|
paid smallint default 0 NOT NULL,
|
||||||
@ -56,7 +57,8 @@ create table llx_payment_loan
|
|||||||
amount_interest real DEFAULT 0,
|
amount_interest real DEFAULT 0,
|
||||||
fk_typepayment integer NOT NULL,
|
fk_typepayment integer NOT NULL,
|
||||||
num_payment varchar(50),
|
num_payment varchar(50),
|
||||||
note text,
|
note_private text,
|
||||||
|
note_public text,
|
||||||
fk_bank integer NOT NULL,
|
fk_bank integer NOT NULL,
|
||||||
fk_user_creat integer,
|
fk_user_creat integer,
|
||||||
fk_user_modif integer
|
fk_user_modif integer
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
-- Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
-- Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -32,7 +33,8 @@ create table llx_loan
|
|||||||
nbterm real,
|
nbterm real,
|
||||||
rate double NOT NULL,
|
rate double NOT NULL,
|
||||||
|
|
||||||
note text,
|
note_private text,
|
||||||
|
note_public text,
|
||||||
|
|
||||||
capital_position real default 0, -- If not a new loan, just have the position of capital
|
capital_position real default 0, -- If not a new loan, just have the position of capital
|
||||||
date_position date,
|
date_position date,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
-- Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
-- Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
-- Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -28,7 +29,8 @@ create table llx_payment_loan
|
|||||||
amount_interest real DEFAULT 0,
|
amount_interest real DEFAULT 0,
|
||||||
fk_typepayment integer NOT NULL,
|
fk_typepayment integer NOT NULL,
|
||||||
num_payment varchar(50),
|
num_payment varchar(50),
|
||||||
note text,
|
note_private text,
|
||||||
|
note_public text,
|
||||||
fk_bank integer NOT NULL,
|
fk_bank integer NOT NULL,
|
||||||
fk_user_creat integer, -- creation user
|
fk_user_creat integer, -- creation user
|
||||||
fk_user_modif integer -- last modification user
|
fk_user_modif integer -- last modification user
|
||||||
|
|||||||
@ -13,14 +13,38 @@ LoanAccountancyInsuranceCode=Accountancy code insurance
|
|||||||
LoanAccountancyInterestCode=Accountancy code interest
|
LoanAccountancyInterestCode=Accountancy code interest
|
||||||
LoanPayment=Loan payment
|
LoanPayment=Loan payment
|
||||||
ConfirmDeleteLoan=Confirm deleting this loan
|
ConfirmDeleteLoan=Confirm deleting this loan
|
||||||
|
LoanDeleted=Loan Deleted Successfully
|
||||||
ConfirmPayLoan=Confirm classify paid this loan
|
ConfirmPayLoan=Confirm classify paid this loan
|
||||||
ErrorLoanCapital=<font color=red>Loan amount</font> has to be numeric and greater than zero.
|
LoanPaid=Loan Paid
|
||||||
ErrorLoanLength=<font color=red>Loan length</font> has to be numeric and greater than zero.
|
ErrorLoanCapital=Loan amount has to be numeric and greater than zero.
|
||||||
ErrorLoanInterest=<font color=red>Annual interest</font> has to be numeric and greater than zero.
|
ErrorLoanLength=Loan length has to be numeric and greater than zero.
|
||||||
|
ErrorLoanInterest=Annual interest has to be numeric and greater than zero.
|
||||||
# Calc
|
# 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
|
||||||
|
DownPaymentDesc=The <b>down payment</b> = The price of the home multiplied by the percentage down divided by 100 (for 5% down becomes 5/100 or 0.05)
|
||||||
|
InterestRateDesc=The <b>interest rate</b> = The annual interest percentage divided by 100
|
||||||
|
MonthlyFactorDesc=The <b>monthly factor</b> = The result of the following formula
|
||||||
|
MonthlyInterestRateDesc=The <b>monthly interest rate</b> = The annual interest rate divided by 12 (for the 12 months in a year)
|
||||||
|
MonthTermDesc=The <b>month term</b> of the loan in months = The number of years you've taken the loan out for times 12
|
||||||
|
MonthlyPaymentDesc=The montly payment is figured out using the following formula
|
||||||
|
AmortizationPaymentDesc=The <a href="#amortization">amortization</a> breaks down how much of your monthly payment goes towards the bank's interest, and how much goes into paying off the principal of your loan.
|
||||||
|
AmountFinanced=Amount Financed
|
||||||
|
AmortizationMonthlyPaymentOverYears=Amortization For Monthly Payment: <b>%s</b> over %s years
|
||||||
Totalsforyear=Totals for year
|
Totalsforyear=Totals for year
|
||||||
MonthlyPayment=Monthly Payment
|
MonthlyPayment=Monthly Payment
|
||||||
LoanCalcDesc=This <b>mortgage calculator</b> 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.<br> 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.<br>
|
LoanCalcDesc=This <b>mortgage calculator</b> 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.<br> 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.<br>
|
||||||
|
GoToInterest=%s will go towards INTEREST
|
||||||
|
GoToPrincipal=%s will go towards PRINCIPAL
|
||||||
|
YouWillSpend=You will spend %s on your house in year %s
|
||||||
# Admin
|
# Admin
|
||||||
ConfigLoan=Configuration of the module loan
|
ConfigLoan=Configuration of the module loan
|
||||||
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accountancy code capital by default
|
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accountancy code capital by default
|
||||||
|
|||||||
@ -121,6 +121,7 @@ if (! empty($errors)) {
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
print_fiche_titre($langs->trans("LoanCalc"));
|
||||||
print $langs->trans('LoanCalcDesc');
|
print $langs->trans('LoanCalcDesc');
|
||||||
|
|
||||||
print '<form method="GET" name="information" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="GET" name="information" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
@ -131,33 +132,33 @@ print '<table cellpadding="2" cellspacing="0" border="0" width="100%">';
|
|||||||
//print '<td align="smalltext" width="100%"><img src="/images/clear.gif" width="250" height="1" border="0" alt=""></td>';
|
//print '<td align="smalltext" width="100%"><img src="/images/clear.gif" width="250" height="1" border="0" alt=""></td>';
|
||||||
//print '</tr>';
|
//print '</tr>';
|
||||||
print '<tr bgcolor="#cccccc">';
|
print '<tr bgcolor="#cccccc">';
|
||||||
print '<td align="center" colspan="2"><b>Purchase & Financing Information</b></td>';
|
print '<td align="center" colspan="2"><b>'.$langs->trans('PurchaseFinanceInfo').'</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr bgcolor="#eeeeee">';
|
print '<tr bgcolor="#eeeeee">';
|
||||||
print '<td align="right">Sale Price of Home:</td>';
|
print '<td align="right">'.$langs->trans('SalePriceOfAsset').':</td>';
|
||||||
print '<td><input type="text" size="10" name="sale_price" value="'.$sale_price.'"> '.$langs->trans("Currency".$conf->currency).'</td>';print '</tr>';
|
print '<td><input type="text" size="10" name="sale_price" value="'.$sale_price.'"> '.$langs->trans("Currency".$conf->currency).'</td>';print '</tr>';
|
||||||
print '<tr bgcolor="#eeeeee">';
|
print '<tr bgcolor="#eeeeee">';
|
||||||
print '<td align="right">Percentage Down:</td>';
|
print '<td align="right">'.$langs->trans('PercentageDown').':</td>';
|
||||||
print '<td><input type="text" size="5" name="down_percent" value="'.$down_percent.'">%</td>';
|
print '<td><input type="text" size="5" name="down_percent" value="'.$down_percent.'">%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr bgcolor="#eeeeee">';
|
print '<tr bgcolor="#eeeeee">';
|
||||||
print '<td align="right">Length of Mortgage:</td>';
|
print '<td align="right">'.$langs->trans('LengthOfMortgage').':</td>';
|
||||||
print '<td><input type="text" size="3" name="year_term" value="'.$year_term.'">years</td>';
|
print '<td><input type="text" size="3" name="year_term" value="'.$year_term.'">years</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr bgcolor="#eeeeee">';
|
print '<tr bgcolor="#eeeeee">';
|
||||||
print '<td align="right">Annual Interest Rate:</td>';
|
print '<td align="right">'.$langs->trans('AnnualInterestRate').':</td>';
|
||||||
print '<td><input type="text" size="5" name="annual_interest_percent" value="'.$annual_interest_percent.'">%</td>';
|
print '<td><input type="text" size="5" name="annual_interest_percent" value="'.$annual_interest_percent.'">%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr bgcolor="#eeeeee">';
|
print '<tr bgcolor="#eeeeee">';
|
||||||
print '<td align="right">Explain Calculations:</td>';
|
print '<td align="right">'.$langs->trans('ExplainCalculations').':</td>';
|
||||||
|
|
||||||
if (! empty($show_progress))
|
if (! empty($show_progress))
|
||||||
{
|
{
|
||||||
print '<td><input type="checkbox" name="show_progress" value="1" checked>Show me the calculations and amortization</td>';
|
print '<td><input type="checkbox" name="show_progress" value="1" checked>'.$langs->trans('ShowMeCalculationsAndAmortization').'</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td><input type="checkbox" name="show_progress" value="1">Show me the calculations and amortization</td>';
|
print '<td><input type="checkbox" name="show_progress" value="1">'.$langs->trans('ShowMeCalculationsAndAmortization').'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -173,18 +174,18 @@ if ($form_complete && $monthly_payment)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table cellpadding="2" cellspacing="0" border="0" width="100%">';
|
print '<table cellpadding="2" cellspacing="0" border="0" width="100%">';
|
||||||
print '<tr valign="top">';
|
print '<tr valign="top">';
|
||||||
print '<td align="center" colspan="2" bgcolor="#000000"><font color="#ffffff"><b>Mortgage Payment Information</b></font></td>';
|
print '<td align="center" colspan="2" bgcolor="#000000"><font color="#ffffff"><b>'.$langs->trans('MortgagePaymentInformation').'</b></font></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top" bgcolor="#eeeeee">';
|
print '<tr valign="top" bgcolor="#eeeeee">';
|
||||||
print '<td align="right">Down Payment:</td>';
|
print '<td align="right">'.$langs->trans('DownPayment').':</td>';
|
||||||
print '<td><b>' . number_format($down_payment, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '</b></td>';
|
print '<td><b>' . number_format($down_payment, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top" bgcolor="#eeeeee">';
|
print '<tr valign="top" bgcolor="#eeeeee">';
|
||||||
print '<td align="right">Amount Financed:</td>';
|
print '<td align="right">'.$langs->trans('AmountFinanced').':</td>';
|
||||||
print '<td><b>' . number_format($financing_price, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '</b></td>';
|
print '<td><b>' . number_format($financing_price, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '</b></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top" bgcolor="#cccccc">';
|
print '<tr valign="top" bgcolor="#cccccc">';
|
||||||
print '<td align="right">Monthly Payment:</td>';
|
print '<td align="right">'.$langs->trans('MonthlyPayment').':</td>';
|
||||||
print '<td><b>' . number_format($monthly_payment, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '</b><br><font>(Principal & Interest ONLY)</font></td>';
|
print '<td><b>' . number_format($monthly_payment, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '</b><br><font>(Principal & Interest ONLY)</font></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -203,7 +204,7 @@ if ($form_complete && $monthly_payment)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top" bgcolor="#FFFF99">';
|
print '<tr valign="top" bgcolor="#FFFF99">';
|
||||||
print '<td align="right">Monthly Payment:</td>';
|
print '<td align="right">'.$langs->trans('MonthlyPayment').':</td>';
|
||||||
print '<td><b>' . number_format(($monthly_payment + $pmi_per_month), "2", ".", ",") . $langs->trans("Currency".$conf->currency) . '</b><br><font>';
|
print '<td><b>' . number_format(($monthly_payment + $pmi_per_month), "2", ".", ",") . $langs->trans("Currency".$conf->currency) . '</b><br><font>';
|
||||||
print '(Principal & Interest, and PMI)</td>';
|
print '(Principal & Interest, and PMI)</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -254,49 +255,46 @@ if ($form_complete && $show_progress) {
|
|||||||
print '<tr valign="top">';
|
print '<tr valign="top">';
|
||||||
print '<td><b>'. $step++ .'</b></td>';
|
print '<td><b>'. $step++ .'</b></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
echo 'The <b>down payment</b>
|
print $langs->trans('DownPaymentDesc').'<br><br>';
|
||||||
= The price of the home multiplied by the percentage down divided by 100 (for 5% down becomes 5/100 or 0.05)<br><br>
|
print number_format($down_payment,"2",".",",") . ' ' . $langs->trans("Currency".$conf->currency) . ' = ';
|
||||||
' . number_format($down_payment,"2",".",",") . ' ' . $langs->trans("Currency".$conf->currency) . ' = '.number_format($sale_price,"2",".",",") . ' ' . $langs->trans("Currency".$conf->currency) . ' X
|
print number_format($sale_price,"2",".",",") . ' ' . $langs->trans("Currency".$conf->currency) . ' X (' . $down_percent . ' / 100)';
|
||||||
('.$down_percent.' / 100)';
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top">';
|
print '<tr valign="top">';
|
||||||
print '<td><b>' . $step++ . '</b></td>';
|
print '<td><b>' . $step++ . '</b></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print 'The <b>interest rate</b> = The annual interest percentage divided by 100<br><br>';
|
print $langs->trans('InterestRateDesc') . '<br><br>';
|
||||||
print $annual_interest_rate . ' = ' . $annual_interest_percent . '% / 100';
|
print $annual_interest_rate . ' = ' . $annual_interest_percent . '% / 100';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top" bgcolor="#cccccc">';
|
print '<tr valign="top" bgcolor="#cccccc">';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print 'The <b>monthly factor</b> = The result of the following formula:';
|
print $langs->trans('MonthlyFactorDesc') . ':';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top">';
|
print '<tr valign="top">';
|
||||||
print '<td><b>' . $step++ . '</b></td>';
|
print '<td><b>' . $step++ . '</b></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print 'The <b>monthly interest rate</b> = The annual interest rate divided by 12 (for the 12 months in a year)<br><br>';
|
print $langs->trans('MonthlyInterestRateDesc') . '<br><br>';
|
||||||
print $monthly_interest_rate . ' = ' . $annual_interest_rate . ' / 12';
|
print $monthly_interest_rate . ' = ' . $annual_interest_rate . ' / 12';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top">';
|
print '<tr valign="top">';
|
||||||
print '<td><b>' . $step++ . '</b></td>';
|
print '<td><b>' . $step++ . '</b></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print 'The <b>month term</b> of the loan in months = The number of years you\'ve taken the loan out for times 12<br><br>';
|
print $langs->trans('MonthTermDesc') . '<br><br>';
|
||||||
print $month_term . ' Months = ' . $year_term . ' Years X 12';
|
print $month_term . ' '. $langs->trans('Months') . ' = ' . $year_term . ' '. $langs->trans('Years') . ' X 12';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr valign="top">';
|
print '<tr valign="top">';
|
||||||
print '<td><b>' . $step++ . '</b></td>';
|
print '<td><b>' . $step++ . '</b></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print 'The montly payment is figured out using the following formula:<br>';
|
print $langs->trans('MonthlyPaymentDesc') . ':<br>';
|
||||||
print 'Monthly Payment = ' . number_format($financing_price, "2", "", "") . ' * ';
|
|
||||||
print $langs->trans('MonthlyPayment').' = ' . number_format($financing_price, "2", "", "") . ' * ';
|
print $langs->trans('MonthlyPayment').' = ' . number_format($financing_price, "2", "", "") . ' * ';
|
||||||
print '(1 - ((1 + ' . number_format($monthly_interest_rate, "4", "", "") . ')';
|
print '(1 - ((1 + ' . number_format($monthly_interest_rate, "4", "", "") . ')';
|
||||||
print '<sup>-(' . $month_term . ')</sup>)))';
|
print '<sup>-(' . $month_term . ')</sup>)))';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
print 'The <a href="#amortization">amortization</a> breaks down how much of your monthly payment goes towards the bank\'s interest,';
|
print $langs->trans('AmortizationPaymentDesc');
|
||||||
print 'and how much goes into paying off the principal of your loan.';
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -313,7 +311,7 @@ if ($form_complete && $show_progress) {
|
|||||||
$denom = pow((1 + $monthly_interest_rate), $power);
|
$denom = pow((1 + $monthly_interest_rate), $power);
|
||||||
$monthly_payment = $principal * ($monthly_interest_rate / (1 - $denom));
|
$monthly_payment = $principal * ($monthly_interest_rate / (1 - $denom));
|
||||||
|
|
||||||
print "<br><br><a name=\"amortization\"></a>Amortization For Monthly Payment: <b>" . number_format($monthly_payment, "2", ".", ",") . "</b> over " . $year_term . " years<br>\n";
|
print '<br><br><a name="amortization"></a>'.$langs->trans('AmortizationMonthlyPaymentOverYears', number_format($monthly_payment, "2", ".", ","), $year_term)."<br>\n";
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
@ -357,9 +355,9 @@ if ($form_complete && $show_progress) {
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print 'You will spend ' . number_format($total_spent_this_year, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . ' on your house in year ' . $current_year . '<br>';
|
print $langs->trans('YouWillSpend', number_format($total_spent_this_year, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency), $current_year) . '<br>';
|
||||||
print number_format($this_year_interest_paid, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . ' will go towards INTEREST<br>';
|
print $langs->trans('GoToInterest', number_format($this_year_interest_paid, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency)) . '<br>';
|
||||||
print number_format($this_year_principal_paid, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . ' will go towards PRINCIPAL<br>';
|
print $langs->trans('GoToPrincipal', number_format($this_year_principal_paid, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency)) . '<br>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -51,6 +52,14 @@ if ($action == 'confirm_paid' && $confirm == 'yes')
|
|||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->set_paid($user);
|
$result = $object->set_paid($user);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
setEventMessage($langs->trans('LoanPaid'));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessage($loan->error, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete loan
|
// Delete loan
|
||||||
@ -60,6 +69,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes')
|
|||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
setEventMessage($langs->trans('LoanDeleted'));
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -101,6 +111,8 @@ if ($action == 'add' && $user->rights->loan->write)
|
|||||||
$object->dateend = $dateend;
|
$object->dateend = $dateend;
|
||||||
$object->nbterm = $_POST["nbterm"];
|
$object->nbterm = $_POST["nbterm"];
|
||||||
$object->rate = $_POST["rate"];
|
$object->rate = $_POST["rate"];
|
||||||
|
$object->note_private = GETPOST('note_private');
|
||||||
|
$object->note_public = GETPOST('note_public');
|
||||||
|
|
||||||
$object->account_capital = $_POST["accountancy_account_capital"];
|
$object->account_capital = $_POST["accountancy_account_capital"];
|
||||||
$object->account_insurance = $_POST["accountancy_account_insurance"];
|
$object->account_insurance = $_POST["accountancy_account_insurance"];
|
||||||
@ -219,15 +231,24 @@ if ($action == 'create')
|
|||||||
// Rate
|
// Rate
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Rate").'</td><td><input name="rate" size="5" value="' . GETPOST("rate") . '"> %</td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Rate").'</td><td><input name="rate" size="5" value="' . GETPOST("rate") . '"> %</td></tr>';
|
||||||
|
|
||||||
// Note
|
// Note Private
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="border" valign="top">'.$langs->trans('Note').'</td>';
|
print '<td class="border" valign="top">'.$langs->trans('NotePrivate').'</td>';
|
||||||
print '<td valign="top" colspan="2">';
|
print '<td valign="top" colspan="2">';
|
||||||
|
|
||||||
$doleditor = new DolEditor('note', GETPOST('note', 'alpha'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100);
|
$doleditor = new DolEditor('note_private', GETPOST('note_private', 'alpha'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100);
|
||||||
print $doleditor->Create(1);
|
print $doleditor->Create(1);
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Note Public
|
||||||
|
print '<tr>';
|
||||||
|
print '<td class="border" valign="top">'.$langs->trans('NotePublic').'</td>';
|
||||||
|
print '<td valign="top" colspan="2">';
|
||||||
|
$doleditor = new DolEditor('note_public', GETPOST('note_public', 'alpha'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, 100);
|
||||||
|
print $doleditor->Create(1);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -358,6 +379,12 @@ if ($id > 0)
|
|||||||
// Rate
|
// Rate
|
||||||
print '<tr><td>'.$langs->trans("Rate").'</td><td>'.$object->rate.' %</td></tr>';
|
print '<tr><td>'.$langs->trans("Rate").'</td><td>'.$object->rate.' %</td></tr>';
|
||||||
|
|
||||||
|
// Note Private
|
||||||
|
print '<tr><td>'.$langs->trans('NotePrivate').'</td><td>'.nl2br($object->note_private).'</td></tr>';
|
||||||
|
|
||||||
|
// Note Public
|
||||||
|
print '<tr><td>'.$langs->trans('NotePublic').'</td><td>'.nl2br($object->note_public).'</td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4, $totalpaye).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4, $totalpaye).'</td></tr>';
|
||||||
|
|
||||||
@ -457,25 +484,25 @@ if ($id > 0)
|
|||||||
// Edit
|
// Edit
|
||||||
if ($user->rights->loan->write)
|
if ($user->rights->loan->write)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/loan/card.php?id=$object->id&action=edit\">".$langs->trans("Modify")."</a>";
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit payment
|
// Emit payment
|
||||||
if ($object->paid == 0 && ((price2num($object->capital) > 0 && round($staytopay) < 0) || (price2num($object->capital) > 0 && round($staytopay) > 0)) && $user->rights->loan->write)
|
if ($object->paid == 0 && ((price2num($object->capital) > 0 && round($staytopay) < 0) || (price2num($object->capital) > 0 && round($staytopay) > 0)) && $user->rights->loan->write)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/loan/payment/payment.php?id=$object->id&action=create\">".$langs->trans("DoPayment")."</a>";
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&action=create">'.$langs->trans("DoPayment").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classify 'paid'
|
// Classify 'paid'
|
||||||
if ($object->paid == 0 && round($staytopay) <=0 && $user->rights->loan->write)
|
if ($object->paid == 0 && round($staytopay) <=0 && $user->rights->loan->write)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/loan/card.php?id=$object->id&action=paid\">".$langs->trans("ClassifyPaid")."</a>";
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&action=paid">'.$langs->trans("ClassifyPaid").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if ($user->rights->loan->delete)
|
if ($user->rights->loan->delete)
|
||||||
{
|
{
|
||||||
print "<a class=\"butActionDelete\" href=\"".DOL_URL_ROOT."/loan/card.php?id=$object->id&action=delete\">".$langs->trans("Delete")."</a>";
|
print '<a class="butActionDelete" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -41,7 +42,8 @@ class Loan extends CommonObject
|
|||||||
var $capital;
|
var $capital;
|
||||||
var $nbterm;
|
var $nbterm;
|
||||||
var $rate;
|
var $rate;
|
||||||
var $note;
|
var $note_private;
|
||||||
|
var $note_public;
|
||||||
var $paid;
|
var $paid;
|
||||||
var $account_capital;
|
var $account_capital;
|
||||||
var $account_insurance;
|
var $account_insurance;
|
||||||
@ -73,7 +75,7 @@ class Loan extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id)
|
||||||
{
|
{
|
||||||
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.nbterm, l.rate, l.note,";
|
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.nbterm, l.rate, l.note_private, l.note_public,";
|
||||||
$sql.= " l.paid";
|
$sql.= " l.paid";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."loan as l";
|
$sql.= " FROM ".MAIN_DB_PREFIX."loan as l";
|
||||||
$sql.= " WHERE l.rowid = ".$id;
|
$sql.= " WHERE l.rowid = ".$id;
|
||||||
@ -94,7 +96,8 @@ class Loan extends CommonObject
|
|||||||
$this->capital = $obj->capital;
|
$this->capital = $obj->capital;
|
||||||
$this->nbterm = $obj->nbterm;
|
$this->nbterm = $obj->nbterm;
|
||||||
$this->rate = $obj->rate;
|
$this->rate = $obj->rate;
|
||||||
$this->note = $obj->note;
|
$this->note_private = $obj->note_private;
|
||||||
|
$this->note_public = $obj->note_public;
|
||||||
$this->paid = $obj->paid;
|
$this->paid = $obj->paid;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -129,7 +132,8 @@ class Loan extends CommonObject
|
|||||||
|
|
||||||
// clean parameters
|
// clean parameters
|
||||||
$newcapital=price2num($this->capital,'MT');
|
$newcapital=price2num($this->capital,'MT');
|
||||||
if (isset($this->note)) $this->note = trim($this->note);
|
if (isset($this->note_private)) $this->note_private = trim($this->note_private);
|
||||||
|
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
|
||||||
if (isset($this->account_capital)) $this->account_capital = trim($this->account_capital);
|
if (isset($this->account_capital)) $this->account_capital = trim($this->account_capital);
|
||||||
if (isset($this->account_insurance)) $this->account_insurance = trim($this->account_insurance);
|
if (isset($this->account_insurance)) $this->account_insurance = trim($this->account_insurance);
|
||||||
if (isset($this->account_interest)) $this->account_interest = trim($this->account_interest);
|
if (isset($this->account_interest)) $this->account_interest = trim($this->account_interest);
|
||||||
@ -151,7 +155,7 @@ class Loan extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."loan (label, fk_bank, capital, datestart, dateend, nbterm, rate, note";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."loan (label, fk_bank, capital, datestart, dateend, nbterm, rate, note_private, note_public";
|
||||||
$sql.= " ,accountancy_account_capital, accountancy_account_insurance, accountancy_account_interest, entity";
|
$sql.= " ,accountancy_account_capital, accountancy_account_insurance, accountancy_account_interest, entity";
|
||||||
$sql.= " ,datec, fk_user_author)";
|
$sql.= " ,datec, fk_user_author)";
|
||||||
$sql.= " VALUES ('".$this->db->escape($this->label)."',";
|
$sql.= " VALUES ('".$this->db->escape($this->label)."',";
|
||||||
@ -161,7 +165,8 @@ class Loan extends CommonObject
|
|||||||
$sql.= " '".$this->db->idate($this->dateend)."',";
|
$sql.= " '".$this->db->idate($this->dateend)."',";
|
||||||
$sql.= " '".$this->db->escape($this->nbterm)."',";
|
$sql.= " '".$this->db->escape($this->nbterm)."',";
|
||||||
$sql.= " '".$this->db->escape($this->rate)."',";
|
$sql.= " '".$this->db->escape($this->rate)."',";
|
||||||
$sql.= " '".$this->db->escape($this->note)."',";
|
$sql.= " '".$this->db->escape($this->note_private)."',";
|
||||||
|
$sql.= " '".$this->db->escape($this->note_public)."',";
|
||||||
$sql.= " '".$this->db->escape($this->account_capital)."',";
|
$sql.= " '".$this->db->escape($this->account_capital)."',";
|
||||||
$sql.= " '".$this->db->escape($this->account_insurance)."',";
|
$sql.= " '".$this->db->escape($this->account_insurance)."',";
|
||||||
$sql.= " '".$this->db->escape($this->account_interest)."',";
|
$sql.= " '".$this->db->escape($this->account_interest)."',";
|
||||||
@ -390,12 +395,18 @@ class Loan extends CommonObject
|
|||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$this->id.'">';
|
$tooltip = '<u>' . $langs->trans("ShowLoan") . '</u>';
|
||||||
|
if (! empty($this->ref))
|
||||||
|
$tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||||
|
if (! empty($this->label))
|
||||||
|
$tooltip .= '<br><b>' . $langs->trans('Label') . ':</b> ' . $this->label;
|
||||||
|
$link = '<a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$this->id.'"';
|
||||||
|
$linkclose = '" title="'.str_replace('\n', '', dol_escape_htmltag($tooltip, 1)).'" class="classfortooltip">';
|
||||||
$linkend = '</a>';
|
$linkend = '</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($link.img_object($langs->trans("ShowLoan").': '.$this->label,'bill').$linkend.' ');
|
if ($withpicto) $result.=($link.$linkclose.img_object($langs->trans("ShowLoan").': '.$this->label,'bill', 'class="classfortooltip"').$linkend.' ');
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$link.($maxlen?dol_trunc($this->label,$maxlen):$this->label).$linkend;
|
if ($withpicto != 2) $result.=$link.$linkclose.($maxlen?dol_trunc($this->label,$maxlen):$this->label).$linkend;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -45,7 +46,8 @@ class PaymentLoan extends CommonObject
|
|||||||
var $amount_interest;
|
var $amount_interest;
|
||||||
var $fk_typepayment;
|
var $fk_typepayment;
|
||||||
var $num_payment;
|
var $num_payment;
|
||||||
var $note;
|
var $note_private;
|
||||||
|
var $note_public;
|
||||||
var $fk_bank;
|
var $fk_bank;
|
||||||
var $fk_user_creat;
|
var $fk_user_creat;
|
||||||
var $fk_user_modif;
|
var $fk_user_modif;
|
||||||
@ -89,7 +91,8 @@ class PaymentLoan extends CommonObject
|
|||||||
if (isset($this->amount_interest)) $this->amount_interest = trim($this->amount_interest);
|
if (isset($this->amount_interest)) $this->amount_interest = trim($this->amount_interest);
|
||||||
if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment);
|
if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment);
|
||||||
if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
|
if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
|
||||||
if (isset($this->note)) $this->note = trim($this->note);
|
if (isset($this->note_private)) $this->note = trim($this->note_private);
|
||||||
|
if (isset($this->note_public)) $this->note = trim($this->note_public);
|
||||||
if (isset($this->fk_bank)) $this->fk_bank = trim($this->fk_bank);
|
if (isset($this->fk_bank)) $this->fk_bank = trim($this->fk_bank);
|
||||||
if (isset($this->fk_user_creat)) $this->fk_user_creat = trim($this->fk_user_creat);
|
if (isset($this->fk_user_creat)) $this->fk_user_creat = trim($this->fk_user_creat);
|
||||||
if (isset($this->fk_user_modif)) $this->fk_user_modif = trim($this->fk_user_modif);
|
if (isset($this->fk_user_modif)) $this->fk_user_modif = trim($this->fk_user_modif);
|
||||||
@ -112,11 +115,11 @@ class PaymentLoan extends CommonObject
|
|||||||
if ($totalamount != 0)
|
if ($totalamount != 0)
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_loan (fk_loan, datec, datep, amount_capital, amount_insurance, amount_interest,";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_loan (fk_loan, datec, datep, amount_capital, amount_insurance, amount_interest,";
|
||||||
$sql.= " fk_typepayment, num_payment, note, fk_user_creat, fk_bank)";
|
$sql.= " fk_typepayment, num_payment, note_private, note_public, fk_user_creat, fk_bank)";
|
||||||
$sql.= " VALUES ($this->chid, '".$this->db->idate($now)."',";
|
$sql.= " VALUES (".$this->chid.", '".$this->db->idate($now)."',";
|
||||||
$sql.= " '".$this->db->idate($this->datepaid)."',";
|
$sql.= " '".$this->db->idate($this->datepaid)."',";
|
||||||
$sql.= " ".$totalamount.",";
|
$sql.= " ".$totalamount.",";
|
||||||
$sql.= " ".$this->paymenttype.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note)."', ".$user->id.",";
|
$sql.= " ".$this->paymenttype.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note_private)."', '".$this->db->escape($this->note_public)."', ".$user->id.",";
|
||||||
$sql.= " 0)";
|
$sql.= " 0)";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||||
@ -127,6 +130,7 @@ class PaymentLoan extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->error=$this->db->lasterror();
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +171,8 @@ class PaymentLoan extends CommonObject
|
|||||||
$sql.= " t.amount_interest,";
|
$sql.= " t.amount_interest,";
|
||||||
$sql.= " t.fk_typepayment,";
|
$sql.= " t.fk_typepayment,";
|
||||||
$sql.= " t.num_payment,";
|
$sql.= " t.num_payment,";
|
||||||
$sql.= " t.note,";
|
$sql.= " t.note_private,";
|
||||||
|
$sql.= " t.note_public,";
|
||||||
$sql.= " t.fk_bank,";
|
$sql.= " t.fk_bank,";
|
||||||
$sql.= " t.fk_user_creat,";
|
$sql.= " t.fk_user_creat,";
|
||||||
$sql.= " t.fk_user_modif,";
|
$sql.= " t.fk_user_modif,";
|
||||||
@ -197,7 +202,8 @@ class PaymentLoan extends CommonObject
|
|||||||
$this->amount_interest = $obj->amount_interest;
|
$this->amount_interest = $obj->amount_interest;
|
||||||
$this->fk_typepayment = $obj->fk_typepayment;
|
$this->fk_typepayment = $obj->fk_typepayment;
|
||||||
$this->num_payment = $obj->num_payment;
|
$this->num_payment = $obj->num_payment;
|
||||||
$this->note = $obj->note;
|
$this->note_private = $obj->note_private;
|
||||||
|
$this->note_public = $obj->note_public;
|
||||||
$this->fk_bank = $obj->fk_bank;
|
$this->fk_bank = $obj->fk_bank;
|
||||||
$this->fk_user_creat = $obj->fk_user_creat;
|
$this->fk_user_creat = $obj->fk_user_creat;
|
||||||
$this->fk_user_modif = $obj->fk_user_modif;
|
$this->fk_user_modif = $obj->fk_user_modif;
|
||||||
@ -239,7 +245,8 @@ class PaymentLoan extends CommonObject
|
|||||||
if (isset($this->amount_interest)) $this->amount_interest=trim($this->amount_interest);
|
if (isset($this->amount_interest)) $this->amount_interest=trim($this->amount_interest);
|
||||||
if (isset($this->fk_typepayment)) $this->fk_typepayment=trim($this->fk_typepayment);
|
if (isset($this->fk_typepayment)) $this->fk_typepayment=trim($this->fk_typepayment);
|
||||||
if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment);
|
if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment);
|
||||||
if (isset($this->note)) $this->note=trim($this->note);
|
if (isset($this->note_private)) $this->note=trim($this->note_private);
|
||||||
|
if (isset($this->note_public)) $this->note=trim($this->note_public);
|
||||||
if (isset($this->fk_bank)) $this->fk_bank=trim($this->fk_bank);
|
if (isset($this->fk_bank)) $this->fk_bank=trim($this->fk_bank);
|
||||||
if (isset($this->fk_user_creat)) $this->fk_user_creat=trim($this->fk_user_creat);
|
if (isset($this->fk_user_creat)) $this->fk_user_creat=trim($this->fk_user_creat);
|
||||||
if (isset($this->fk_user_modif)) $this->fk_user_modif=trim($this->fk_user_modif);
|
if (isset($this->fk_user_modif)) $this->fk_user_modif=trim($this->fk_user_modif);
|
||||||
@ -259,7 +266,8 @@ class PaymentLoan extends CommonObject
|
|||||||
$sql.= " amount_interest=".(isset($this->amount_interest)?$this->amount_interest:"null").",";
|
$sql.= " amount_interest=".(isset($this->amount_interest)?$this->amount_interest:"null").",";
|
||||||
$sql.= " fk_typepayment=".(isset($this->fk_typepayment)?$this->fk_typepayment:"null").",";
|
$sql.= " fk_typepayment=".(isset($this->fk_typepayment)?$this->fk_typepayment:"null").",";
|
||||||
$sql.= " num_payment=".(isset($this->num_payment)?"'".$this->db->escape($this->num_payment)."'":"null").",";
|
$sql.= " num_payment=".(isset($this->num_payment)?"'".$this->db->escape($this->num_payment)."'":"null").",";
|
||||||
$sql.= " note=".(isset($this->note)?"'".$this->db->escape($this->note)."'":"null").",";
|
$sql.= " note_private=".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null").",";
|
||||||
|
$sql.= " note_public=".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null").",";
|
||||||
$sql.= " fk_bank=".(isset($this->fk_bank)?$this->fk_bank:"null").",";
|
$sql.= " fk_bank=".(isset($this->fk_bank)?$this->fk_bank:"null").",";
|
||||||
$sql.= " fk_user_creat=".(isset($this->fk_user_creat)?$this->fk_user_creat:"null").",";
|
$sql.= " fk_user_creat=".(isset($this->fk_user_creat)?$this->fk_user_creat:"null").",";
|
||||||
$sql.= " fk_user_modif=".(isset($this->fk_user_modif)?$this->fk_user_modif:"null")."";
|
$sql.= " fk_user_modif=".(isset($this->fk_user_modif)?$this->fk_user_modif:"null")."";
|
||||||
@ -522,5 +530,3 @@ class PaymentLoan extends CommonObject
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -30,7 +31,7 @@ $langs->load("banks");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
$socid = GETPOST('socid', int);
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'loan', '', '', '');
|
$result = restrictedArea($user, 'loan', '', '', '');
|
||||||
|
|
||||||
@ -117,12 +118,15 @@ if ($resql)
|
|||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
$loan_static->id = $obj->rowid;
|
||||||
|
$loan_static->ref = $obj->rowid;
|
||||||
|
$loan_static->label = $obj->label;
|
||||||
|
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td><a href="card.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowLoan"),"label").' '.$obj->rowid.'</a></td>';
|
print '<td>'.$loan_static->getLinkUrl(1, 42).'</td>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.dol_trunc($obj->label,42).'</td>';
|
print '<td>'.dol_trunc($obj->label,42).'</td>';
|
||||||
|
|||||||
99
htdocs/loan/note.php
Normal file
99
htdocs/loan/note.php
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/loan/note.php
|
||||||
|
* \brief Tab for notes on loan
|
||||||
|
* \ingroup loan
|
||||||
|
*/
|
||||||
|
|
||||||
|
require '../main.inc.php';
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php');
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
||||||
|
|
||||||
|
$action = GETPOST('action');
|
||||||
|
|
||||||
|
$langs->load('loan');
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$id = GETPOST('id','int');
|
||||||
|
$result = restrictedArea($user, 'loan', $id, '&loan');
|
||||||
|
|
||||||
|
$object = new Loan($db);
|
||||||
|
if ($id > 0) $object->fetch($id);
|
||||||
|
|
||||||
|
$permissionnote=$user->rights->loan->read; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
|
llxHeader('',$langs->trans("LoanArea").' - '.$langs->trans("Notes"),'');
|
||||||
|
|
||||||
|
if ($id > 0)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Affichage onglets
|
||||||
|
*/
|
||||||
|
|
||||||
|
$head = loan_prepare_head($object);
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'note', $langs->trans("Loan"),0,'loan');
|
||||||
|
|
||||||
|
|
||||||
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Ref
|
||||||
|
print '<tr><td width="25%">'.$langs->trans('Ref').'</td>';
|
||||||
|
print '<td colspan="3">';
|
||||||
|
print $form->showrefnav($object,'id','','','rowid','ref');
|
||||||
|
print '</td></tr>';
|
||||||
|
// Name
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Name").'</td>';
|
||||||
|
print '<td colspan="3">'.$object->label.'</td></tr>';
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
$colwidth='25';
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
}
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
|
|
||||||
@ -167,8 +167,11 @@ print '<tr><td valign="top">'.$langs->trans('Capital').'</td><td colspan="3">'.p
|
|||||||
print '<tr><td valign="top">'.$langs->trans('Insurance').'</td><td colspan="3">'.price($payment->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
print '<tr><td valign="top">'.$langs->trans('Insurance').'</td><td colspan="3">'.price($payment->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||||
print '<tr><td valign="top">'.$langs->trans('Interest').'</td><td colspan="3">'.price($payment->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
print '<tr><td valign="top">'.$langs->trans('Interest').'</td><td colspan="3">'.price($payment->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||||
|
|
||||||
// Note
|
// Note Private
|
||||||
print '<tr><td valign="top">'.$langs->trans('Note').'</td><td colspan="3">'.nl2br($payment->note).'</td></tr>';
|
print '<tr><td valign="top">'.$langs->trans('NotePrivate').'</td><td colspan="3">'.nl2br($payment->note_private).'</td></tr>';
|
||||||
|
|
||||||
|
// Note Public
|
||||||
|
print '<tr><td valign="top">'.$langs->trans('NotePublic').'</td><td colspan="3">'.nl2br($payment->note_public).'</td></tr>';
|
||||||
|
|
||||||
// Bank account
|
// Bank account
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -55,21 +56,21 @@ if ($action == 'add_payment')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
$datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||||
|
|
||||||
if (! $_POST["paymenttype"] > 0)
|
if (! $_POST["paymenttype"] > 0)
|
||||||
{
|
{
|
||||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode"));
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode")), 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if ($datepaid == '')
|
if ($datepaid == '')
|
||||||
{
|
{
|
||||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("Date"));
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Date")), 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (! empty($conf->banque->enabled) && ! $_POST["accountid"] > 0)
|
if (! empty($conf->banque->enabled) && ! $_POST["accountid"] > 0)
|
||||||
{
|
{
|
||||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToCredit"));
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToCredit")), 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,8 +90,8 @@ if ($action == 'add_payment')
|
|||||||
|
|
||||||
if (count($amounts) <= 0)
|
if (count($amounts) <= 0)
|
||||||
{
|
{
|
||||||
|
setEventMessage($langs->trans('ErrorNoPaymentDefined'), 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg='ErrorNoPaymentDefined';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -102,29 +103,30 @@ if ($action == 'add_payment')
|
|||||||
$payment->chid = $chid;
|
$payment->chid = $chid;
|
||||||
$payment->datepaid = $datepaid;
|
$payment->datepaid = $datepaid;
|
||||||
$payment->amounts = $amounts; // Tableau de montant
|
$payment->amounts = $amounts; // Tableau de montant
|
||||||
$payment->amount_capital = $_POST["amount_capital"];
|
$payment->amount_capital = GETPOST('amount_capital');
|
||||||
$payment->amount_insurance = $_POST["amount_insurance"];
|
$payment->amount_insurance = GETPOST('amount_insurance');
|
||||||
$payment->amount_interest = $_POST["amount_interest"];
|
$payment->amount_interest = GETPOST('amount_interest');
|
||||||
$payment->paymenttype = $_POST["paymenttype"];
|
$payment->paymenttype = GETPOST('paymenttype');
|
||||||
$payment->num_payment = $_POST["num_payment"];
|
$payment->num_payment = GETPOST('num_payment');
|
||||||
$payment->note = $_POST["note"];
|
$payment->note_private = GETPOST('note_private');
|
||||||
|
$payment->note_public = GETPOST('note_public');
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$paymentid = $payment->create($user);
|
$paymentid = $payment->create($user);
|
||||||
if ($paymentid < 0)
|
if ($paymentid < 0)
|
||||||
{
|
{
|
||||||
$errmsg=$payment->error;
|
setEventMessage($payment->error, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$result=$payment->addPaymentToBank($user,'payment_loan','(LoanPayment)',$_POST['accountid'],'','');
|
$result=$payment->addPaymentToBank($user, 'payment_loan', '(LoanPayment)', GETPOST('accountid', 'int'), '', '');
|
||||||
if (! $result > 0)
|
if (! $result > 0)
|
||||||
{
|
{
|
||||||
$errmsg=$payment->error;
|
setEventMessage($payment->error, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,11 +170,6 @@ if ($_GET["action"] == 'create')
|
|||||||
print_fiche_titre($langs->trans("DoPayment"));
|
print_fiche_titre($langs->trans("DoPayment"));
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
if ($mesg)
|
|
||||||
{
|
|
||||||
print "<div class=\"error\">$mesg</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">';
|
print '<form name="add_payment" action="'.$_SERVER['PHP_SELF'].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="id" value="'.$chid.'">';
|
print '<input type="hidden" name="id" value="'.$chid.'">';
|
||||||
@ -236,10 +233,14 @@ if ($_GET["action"] == 'create')
|
|||||||
print '<td colspan="2"><input name="num_payment" type="text" value="'.GETPOST('num_payment').'"></td></tr>'."\n";
|
print '<td colspan="2"><input name="num_payment" type="text" value="'.GETPOST('num_payment').'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td valign="top">'.$langs->trans("Comments").'</td>';
|
print '<td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
||||||
print '<td valign="top" colspan="2"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
|
print '<td valign="top" colspan="2"><textarea name="note_private" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
print '<tr>';
|
||||||
|
print '<td valign="top">'.$langs->trans("NotePublic").'</td>';
|
||||||
|
print '<td valign="top" colspan="2"><textarea name="note_public" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
|
||||||
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user