From 79a7e4c1499aea92b2a3b21953375fd5708b3e88 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sat, 13 Jun 2020 07:44:48 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/core/lib/loan.lib.php | 3 +-- htdocs/loan/class/paymentloan.class.php | 3 +-- htdocs/loan/payment/payment.php | 15 +++++---------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php index a6deb5ad712..f6b61db794c 100644 --- a/htdocs/core/lib/loan.lib.php +++ b/htdocs/core/lib/loan.lib.php @@ -106,8 +106,7 @@ function loanCalcMonthlyPayment($mens, $capital, $rate, $echance, $nbterm) $int = 0; $cap_rest = $capital; } - else - { + else { $int = ($capital * ($rate / 12)); $int = round($int, 2, PHP_ROUND_HALF_UP); $cap_rest = round($capital - ($mens - $int), 2, PHP_ROUND_HALF_UP); diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index d50850cd949..2bb530ef5d6 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -520,8 +520,7 @@ class PaymentLoan extends CommonObject $this->db->commit(); return 1; } - else - { + else { $this->db->rollback(); return -1; } diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index d817cbf3928..07002965079 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -41,8 +41,7 @@ $datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'in $socid = 0; if ($user->socid > 0) $socid = $user->socid; -else - if (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int'); +elseif (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int'); if (empty($user->rights->loan->write)) accessforbidden(); $loan = new Loan($db); @@ -210,7 +209,6 @@ if ($action == 'add_payment') $error++; break; } - } } else // Only add fk_bank bank to schedule line (mark as paid) @@ -308,7 +306,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; if (empty($datepaid)) if (empty($ts_temppaid)) $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:dol_now(); - else $datepayment = $ts_temppaid; + else $datepayment = $ts_temppaid; else $datepayment = $datepaid; print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); print ""; @@ -375,8 +373,7 @@ if ($action == 'create') { print $langs->trans("LoanCapital") .': '; } - else - { + else { print '-'; } print '
'; @@ -384,8 +381,7 @@ if ($action == 'create') { print $langs->trans("Insurance") .': '; } - else - { + else { print '-'; } print '
'; @@ -393,8 +389,7 @@ if ($action == 'create') { print $langs->trans("Interest") .': '; } - else - { + else { print '-'; } print "";