From 972e68086043ccac70ccea09d7870bb3c700a935 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Mar 2023 20:46:12 +0100 Subject: [PATCH] Debug v17 --- htdocs/compta/bank/transfer.php | 44 +++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 9f5d4facf9e..d7cc6910de2 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -49,6 +49,8 @@ $action = GETPOST('action', 'aZ09'); $hookmanager->initHooks(array('banktransfer')); +$MAXLINES = 10; + /* * Actions @@ -63,7 +65,7 @@ if ($action == 'add') { $langs->load('errors'); $i = 1; - while ($i < 20) { + while ($i < $MAXLINES) { $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'); $amount[$i] = intval(price2num(GETPOST($i.'_amount', 'alpha'), 'MT', 2)); @@ -81,7 +83,7 @@ if ($action == 'add') { } $n = 1; - while ($n < 20) { + while ($n < $MAXLINES) { if ($tabnum[$n] === 1) { if ($accountfrom[$n] < 0) { $errori[$n]++; @@ -205,7 +207,6 @@ llxHeader('', $title, $help_url); print '