Fixing style errors.

This commit is contained in:
stickler-ci 2023-03-16 11:30:43 +00:00
parent 596aefa008
commit 6dc5e3a709

View File

@ -63,8 +63,7 @@ if ($action == 'add') {
$langs->load('errors'); $langs->load('errors');
$i = 1; $i = 1;
while($i < 20){ while ($i < 20) {
$dateo[$i] = dol_mktime(12, 0, 0, GETPOST($i.'_month', 'int'), GETPOST($i.'_day', 'int'), GETPOST($i.'_year', 'int')); $dateo[$i] = dol_mktime(12, 0, 0, GETPOST($i.'_month', 'int'), GETPOST($i.'_day', 'int'), GETPOST($i.'_year', 'int'));
$label[$i] = GETPOST($i.'_label', 'alpha'); $label[$i] = GETPOST($i.'_label', 'alpha');
$amount[$i] = intval(price2num(GETPOST($i.'_amount', 'alpha'), 'MT', 2)); $amount[$i] = intval(price2num(GETPOST($i.'_amount', 'alpha'), 'MT', 2));
@ -82,7 +81,7 @@ if ($action == 'add') {
} }
$n = 1; $n = 1;
while($n < 20){ while ($n < 20) {
if ($tabnum[$n] === 1) { if ($tabnum[$n] === 1) {
if ($accountfrom[$n] < 0) { if ($accountfrom[$n] < 0) {
$errori[$n]++; $errori[$n]++;
@ -92,11 +91,11 @@ if ($action == 'add') {
$errori[$n]++; $errori[$n]++;
setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("TransferTo")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("TransferTo")), null, 'errors');
} }
if (!$type[$n]){ if (!$type[$n]) {
$errori[$n]++; $errori[$n]++;
setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("Type")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("Type")), null, 'errors');
} }
if (!$dateo[$n]){ if (!$dateo[$n]) {
$errori[$n]++; $errori[$n]++;
setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("Date")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", '#'.$n. ' ' .$langs->transnoentities("Date")), null, 'errors');
} }
@ -297,14 +296,13 @@ print '</tr>';
print '<style>.hidejs {visibility:hidden;}</style>'; print '<style>.hidejs {visibility:hidden;}</style>';
for($i = 1 ; $i< 20; $i++){ for ($i = 1 ; $i< 20; $i++) {
$label = ''; $label = '';
$amount = ''; $amount = '';
if ($errori[$i]) { if ($errori[$i]) {
$label = GETPOST($i.'_label', 'alpha'); $label = GETPOST($i.'_label', 'alpha');
$amount = GETPOST($i.'_amount', 'alpha'); $amount = GETPOST($i.'_amount', 'alpha');
} }
if ($i == 1) { if ($i == 1) {