Fixing style errors.
This commit is contained in:
parent
9217ec47dc
commit
79a7e4c149
@ -106,8 +106,7 @@ function loanCalcMonthlyPayment($mens, $capital, $rate, $echance, $nbterm)
|
|||||||
$int = 0;
|
$int = 0;
|
||||||
$cap_rest = $capital;
|
$cap_rest = $capital;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
$int = ($capital * ($rate / 12));
|
$int = ($capital * ($rate / 12));
|
||||||
$int = round($int, 2, PHP_ROUND_HALF_UP);
|
$int = round($int, 2, PHP_ROUND_HALF_UP);
|
||||||
$cap_rest = round($capital - ($mens - $int), 2, PHP_ROUND_HALF_UP);
|
$cap_rest = round($capital - ($mens - $int), 2, PHP_ROUND_HALF_UP);
|
||||||
|
|||||||
@ -520,8 +520,7 @@ class PaymentLoan extends CommonObject
|
|||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,8 +41,7 @@ $datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'in
|
|||||||
$socid = 0;
|
$socid = 0;
|
||||||
if ($user->socid > 0)
|
if ($user->socid > 0)
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
else
|
elseif (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int');
|
||||||
if (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int');
|
|
||||||
if (empty($user->rights->loan->write)) accessforbidden();
|
if (empty($user->rights->loan->write)) accessforbidden();
|
||||||
|
|
||||||
$loan = new Loan($db);
|
$loan = new Loan($db);
|
||||||
@ -210,7 +209,6 @@ if ($action == 'add_payment')
|
|||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Only add fk_bank bank to schedule line (mark as paid)
|
else // Only add fk_bank bank to schedule line (mark as paid)
|
||||||
@ -375,8 +373,7 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
print $langs->trans("LoanCapital") .': <input type="text" size="8" name="amount_capital" value="'.(GETPOSTISSET('amount_capital')?GETPOST('amount_capital'):$amount_capital).'">';
|
print $langs->trans("LoanCapital") .': <input type="text" size="8" name="amount_capital" value="'.(GETPOSTISSET('amount_capital')?GETPOST('amount_capital'):$amount_capital).'">';
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
print '-';
|
print '-';
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -384,8 +381,7 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
print $langs->trans("Insurance") .': <input type="text" size="8" name="amount_insurance" value="'.(GETPOSTISSET('amount_insurance')?GETPOST('amount_insurance'):$amount_insurance).'">';
|
print $langs->trans("Insurance") .': <input type="text" size="8" name="amount_insurance" value="'.(GETPOSTISSET('amount_insurance')?GETPOST('amount_insurance'):$amount_insurance).'">';
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
print '-';
|
print '-';
|
||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -393,8 +389,7 @@ if ($action == 'create')
|
|||||||
{
|
{
|
||||||
print $langs->trans("Interest") .': <input type="text" size="8" name="amount_interest" value="'.(GETPOSTISSET('amount_interest')?GETPOST('amount_interest'):$amount_interest).'" '.(!empty($line)?'disabled title="'.$langs->trans('CantModifyInterestIfScheduleIsUsed').'"':'').'>';
|
print $langs->trans("Interest") .': <input type="text" size="8" name="amount_interest" value="'.(GETPOSTISSET('amount_interest')?GETPOST('amount_interest'):$amount_interest).'" '.(!empty($line)?'disabled title="'.$langs->trans('CantModifyInterestIfScheduleIsUsed').'"':'').'>';
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
print '-';
|
print '-';
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user