diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php
index 5f6959cccd8..032b3ac6e3e 100644
--- a/htdocs/accountancy/admin/categories_list.php
+++ b/htdocs/accountancy/admin/categories_list.php
@@ -47,8 +47,10 @@ if (!$user->hasRight('accounting', 'chartofaccount')) {
accessforbidden();
}
+$acts = array();
$acts[0] = "activate";
$acts[1] = "disable";
+$actl = array();
$actl[0] = img_picto($langs->trans("Disabled"), 'switch_off', 'class="size15x"');
$actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"');
@@ -117,7 +119,7 @@ $tabcond[32] = isModEnabled('accounting');
// List of help for fields
$tabhelp = array();
-$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"), 'category_type'=>$langs->trans("SetToYesIfGroupIsComputationOfOtherGroups"), 'formula'=>$langs->trans("EnterCalculationRuleIfPreviousFieldIsYes"));
+$tabhelp[32] = array('code' => $langs->trans("EnterAnyCode"), 'category_type' => $langs->trans("SetToYesIfGroupIsComputationOfOtherGroups"), 'formula' => $langs->trans("EnterCalculationRuleIfPreviousFieldIsYes"));
// List of check for fields (NOT USED YET)
$tabfieldcheck = array();
@@ -247,7 +249,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) {
$result = $db->query($sql);
if ($result) { // Add is ok
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
- $_POST = array('id'=>$id); // Clean $_POST array, we keep only
+ $_POST = array('id' => $id); // Clean $_POST array, we keep only
} else {
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
@@ -582,7 +584,7 @@ if ($tabname[$id]) {
}
$tmpaction = 'create';
- $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
+ $parameters = array('fieldlist' => $fieldlist, 'tabname' => $tabname[$id]);
$reshook = $hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager->error;
$errors = $hookmanager->errors;
@@ -786,7 +788,7 @@ if ($resql) {
print '
';
print '';
foreach ($remainingdata as $datar) {
- $father = array('rowid'=>$datar['rowid'], 'title'=>"???", 'mainmenu'=>$datar['fk_mainmenu'], 'leftmenu'=>$datar['fk_leftmenu'], 'fk_mainmenu'=>'', 'fk_leftmenu'=>'');
+ $father = array('rowid' => $datar['rowid'], 'title' => "???", 'mainmenu' => $datar['fk_mainmenu'], 'leftmenu' => $datar['fk_leftmenu'], 'fk_mainmenu' => '', 'fk_leftmenu' => '');
//print 'Start with rowid='.$datar['rowid'].' mainmenu='.$father ['mainmenu'].' leftmenu='.$father ['leftmenu'].' '."\n";
tree_recur($data, $father, 0, 'iddivjstree'.$datar['rowid'], 1, 1);
}
diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php
index 382106a9b94..5c2de506880 100644
--- a/htdocs/admin/mrp.php
+++ b/htdocs/admin/mrp.php
@@ -327,6 +327,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php
index 98f7b8d2a9e..9ba965e6bfc 100644
--- a/htdocs/admin/oauthlogintokens.php
+++ b/htdocs/admin/oauthlogintokens.php
@@ -143,6 +143,7 @@ if ($mode == 'setup' && $user->admin) {
print ''.$langs->trans("OAuthSetupForLogin")."
\n";
// Define $listinsetup
+ $listinsetup = array();
foreach ($conf->global as $key => $val) {
if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) {
$provider = preg_replace('/_ID$/', '', $key);
@@ -156,7 +157,7 @@ if ($mode == 'setup' && $user->admin) {
}
}
- $oauthstateanticsrf = bin2hex(random_bytes(128/8));
+ $oauthstateanticsrf = bin2hex(random_bytes(128 / 8));
// $list is defined into oauth.lib.php to the list of supporter OAuth providers.
foreach ($listinsetup as $key) {
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index 2eb1ed3c820..6913857a69f 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -390,6 +390,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php
index 2f921128690..3b5ee37b77c 100644
--- a/htdocs/admin/reception_setup.php
+++ b/htdocs/admin/reception_setup.php
@@ -331,6 +331,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php
index 4c6a5610067..ab111f7c67f 100644
--- a/htdocs/admin/security.php
+++ b/htdocs/admin/security.php
@@ -198,6 +198,7 @@ $dir = "../core/modules/security/generate";
clearstatcache();
$handle = opendir($dir);
$i = 1;
+$arrayhandler = array();
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
if (preg_match('/(modGeneratePass[a-z]+)\.class\.php$/i', $file, $reg)) {
diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index b611e00c2ca..4c8c5fc51ae 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -571,6 +571,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php
index 314b24d9fb0..b7e027db2b2 100644
--- a/htdocs/admin/stocktransfer.php
+++ b/htdocs/admin/stocktransfer.php
@@ -50,8 +50,8 @@ $label = GETPOST('label', 'alpha');
$scandir = GETPOST('scan_dir', 'alpha');
$arrayofparameters = array(
- 'STOCKTRANSFER_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1),
- 'STOCKTRANSFER_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1)
+ 'STOCKTRANSFER_MYPARAM1' => array('css' => 'minwidth200', 'enabled' => 1),
+ 'STOCKTRANSFER_MYPARAM2' => array('css' => 'minwidth500', 'enabled' => 1)
);
$error = 0;
@@ -233,7 +233,7 @@ print ''.$langs->trans("StockTransferSetupPage").'
$moduledir = 'stocktransfer';
$myTmpObjects = array();
-$myTmpObjects[$moduledir]=array('includerefgeneration'=>1, 'includedocgeneration'=>1, 'class'=>'StockTransfer');
+$myTmpObjects[$moduledir] = array('includerefgeneration' => 1, 'includedocgeneration' => 1, 'class' => 'StockTransfer');
foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
if ($myTmpObjectKey == 'MyObject') {
@@ -396,6 +396,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php
index 82a55ca18d6..09728fbe93e 100644
--- a/htdocs/admin/supplier_proposal.php
+++ b/htdocs/admin/supplier_proposal.php
@@ -379,6 +379,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php
index 19405ddbf4b..60cc1ce67b5 100644
--- a/htdocs/admin/ticket.php
+++ b/htdocs/admin/ticket.php
@@ -408,6 +408,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php
index 2053df210be..6cd21cd1567 100644
--- a/htdocs/admin/user.php
+++ b/htdocs/admin/user.php
@@ -231,6 +231,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php
index 19d6a23afd2..598b8a687e8 100644
--- a/htdocs/admin/usergroup.php
+++ b/htdocs/admin/usergroup.php
@@ -154,6 +154,7 @@ foreach ($dirmodels as $reldir) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/webhook.php b/htdocs/admin/webhook.php
index 4301353540f..7755856f8a0 100644
--- a/htdocs/admin/webhook.php
+++ b/htdocs/admin/webhook.php
@@ -210,7 +210,7 @@ if ($action == 'edit') {
print '| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | ';
foreach ($arrayofparameters as $constname => $val) {
- if ($val['enabled']==1) {
+ if ($val['enabled'] == 1) {
$setupnotempty++;
print '| ';
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
@@ -221,7 +221,7 @@ if ($action == 'edit') {
print '\n";
- } elseif ($val['type']== 'html') {
+ } elseif ($val['type'] == 'html') {
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
$doleditor->Create();
@@ -300,7 +300,7 @@ if ($action == 'edit') {
print ' | | '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | ';
foreach ($arrayofparameters as $constname => $val) {
- if ($val['enabled']==1) {
+ if ($val['enabled'] == 1) {
$setupnotempty++;
print '';
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
@@ -309,7 +309,7 @@ if ($action == 'edit') {
if ($val['type'] == 'textarea') {
print dol_nl2br(getDolGlobalString($constname));
- } elseif ($val['type']== 'html') {
+ } elseif ($val['type'] == 'html') {
print getDolGlobalString($constname);
} elseif ($val['type'] == 'yesno') {
print ajax_constantonoff($constname);
@@ -320,7 +320,7 @@ if ($action == 'edit') {
$tmp = explode(':', $val['type']);
$template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalString($constname));
- if ($template<0) {
+ if ($template < 0) {
setEventMessages(null, $formmail->errors, 'errors');
}
print $langs->trans($template->label);
@@ -338,13 +338,13 @@ if ($action == 'edit') {
print '' . implode(' ', $toprint) . ' ';
}
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
- if (getDolGlobalInt($constname)==2) {
+ if (getDolGlobalInt($constname) == 2) {
print $langs->trans("Prospect");
- } elseif (getDolGlobalInt($constname)==3) {
+ } elseif (getDolGlobalInt($constname) == 3) {
print $langs->trans("ProspectCustomer");
- } elseif (getDolGlobalInt($constname)==1) {
+ } elseif (getDolGlobalInt($constname) == 1) {
print $langs->trans("Customer");
- } elseif (getDolGlobalInt($constname)==0) {
+ } elseif (getDolGlobalInt($constname) == 0) {
print $langs->trans("NorProspectNorCustomer");
}
} elseif ($val['type'] == 'product') {
@@ -377,7 +377,8 @@ if ($action == 'edit') {
$moduledir = 'webhook';
-$myTmpObjects['MyObject'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0);
+$myTmpObjects = array();
+$myTmpObjects['MyObject'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0);
foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
@@ -539,6 +540,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php
index de2e7de2e74..67c2bb9869a 100644
--- a/htdocs/admin/workstation.php
+++ b/htdocs/admin/workstation.php
@@ -222,7 +222,7 @@ if ($action == 'edit') {
$moduledir = 'workstation';
$myTmpObjects = array();
-$myTmpObjects['workstation'] = array('includerefgeneration'=>1, 'includedocgeneration'=>0);
+$myTmpObjects['workstation'] = array('includerefgeneration' => 1, 'includedocgeneration' => 0);
foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
@@ -385,6 +385,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php
index 135a487952d..72e6cac37ea 100644
--- a/htdocs/asset/admin/setup.php
+++ b/htdocs/asset/admin/setup.php
@@ -47,8 +47,8 @@ $scandir = GETPOST('scan_dir', 'alpha');
$type = 'asset';
$arrayofparameters = array(
- 'ASSET_ACCOUNTANCY_CATEGORY'=>array('type'=>'accountancy_category', 'enabled'=>1),
- 'ASSET_DEPRECIATION_DURATION_PER_YEAR'=>array('type'=>'string', 'css'=>'minwidth200', 'enabled'=>1),
+ 'ASSET_ACCOUNTANCY_CATEGORY' => array('type' => 'accountancy_category', 'enabled' => 1),
+ 'ASSET_DEPRECIATION_DURATION_PER_YEAR' => array('type' => 'string', 'css' => 'minwidth200', 'enabled' => 1),
//'ASSET_MYPARAM2'=>array('type'=>'textarea','enabled'=>1),
//'ASSET_MYPARAM3'=>array('type'=>'category:'.Categorie::TYPE_CUSTOMER, 'enabled'=>1),
//'ASSET_MYPARAM4'=>array('type'=>'emailtemplate:thirdparty', 'enabled'=>1),
@@ -197,7 +197,7 @@ echo ''.$langs->trans("AssetSetupPage").'';
$moduledir = 'asset';
$myTmpObjects = array();
-$myTmpObjects['Asset'] = array('includerefgeneration'=>1, 'includedocgeneration'=>0);
+$myTmpObjects['Asset'] = array('includerefgeneration' => 1, 'includedocgeneration' => 0);
foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
@@ -359,6 +359,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
+ $filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
@@ -466,7 +467,7 @@ if ($action == 'edit') {
print ' | | '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | ';
foreach ($arrayofparameters as $constname => $val) {
- if ($val['enabled']==1) {
+ if ($val['enabled'] == 1) {
$setupnotempty++;
print '| ';
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
@@ -477,7 +478,7 @@ if ($action == 'edit') {
print '\n";
- } elseif ($val['type']== 'html') {
+ } elseif ($val['type'] == 'html') {
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%');
$doleditor->Create();
@@ -581,7 +582,7 @@ if ($action == 'edit') {
print ' | | '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | ';
foreach ($arrayofparameters as $constname => $val) {
- if ($val['enabled']==1) {
+ if ($val['enabled'] == 1) {
$setupnotempty++;
print '';
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
@@ -590,7 +591,7 @@ if ($action == 'edit') {
if ($val['type'] == 'textarea') {
print dol_nl2br(getDolGlobalString($constname));
- } elseif ($val['type']== 'html') {
+ } elseif ($val['type'] == 'html') {
print getDolGlobalString($constname);
} elseif ($val['type'] == 'yesno') {
print ajax_constantonoff($constname);
@@ -601,7 +602,7 @@ if ($action == 'edit') {
$tmp = explode(':', $val['type']);
$template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalString($constname));
- if ($template<0) {
+ if ($template < 0) {
setEventMessages(null, $formmail->errors, 'errors');
}
print $langs->trans($template->label);
@@ -619,13 +620,13 @@ if ($action == 'edit') {
print '' . implode(' ', $toprint) . ' ';
}
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
- if (getDolGlobalInt($constname)==2) {
+ if (getDolGlobalInt($constname) == 2) {
print $langs->trans("Prospect");
- } elseif (getDolGlobalInt($constname)==3) {
+ } elseif (getDolGlobalInt($constname) == 3) {
print $langs->trans("ProspectCustomer");
- } elseif (getDolGlobalInt($constname)==1) {
+ } elseif (getDolGlobalInt($constname) == 1) {
print $langs->trans("Customer");
- } elseif (getDolGlobalInt($constname)==0) {
+ } elseif (getDolGlobalInt($constname) == 0) {
print $langs->trans("NorProspectNorCustomer");
}
} elseif ($val['type'] == 'product') {
diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php
index 9f39d925bb6..9dbc437758c 100644
--- a/htdocs/barcode/printsheet.php
+++ b/htdocs/barcode/printsheet.php
@@ -222,6 +222,7 @@ if (empty($reshook)) {
);
complete_substitutions_array($substitutionarray, $langs);
+ $arrayofrecords = array();
// For labels
if ($mode == 'label') {
$txtforsticker = "%PHOTO%"; // Photo will be barcode image, %BARCODE% possible when using TCPDF generator
@@ -236,14 +237,14 @@ if (empty($reshook)) {
if ($numberofsticker <= $MAXSTICKERS) {
for ($i = 0; $i < $numberofsticker; $i++) {
$arrayofrecords[] = array(
- 'textleft'=>$textleft,
- 'textheader'=>$textheader,
- 'textfooter'=>$textfooter,
- 'textright'=>$textright,
- 'code'=>$code,
- 'encoding'=>$encoding,
- 'is2d'=>$is2d,
- 'photo'=>!empty($barcodeimage) ? $barcodeimage : '' // Photo must be a file that exists with format supported by TCPDF
+ 'textleft' => $textleft,
+ 'textheader' => $textheader,
+ 'textfooter' => $textfooter,
+ 'textright' => $textright,
+ 'code' => $code,
+ 'encoding' => $encoding,
+ 'is2d' => $is2d,
+ 'photo' => !empty($barcodeimage) ? $barcodeimage : '' // Photo must be a file that exists with format supported by TCPDF
);
}
} else {
diff --git a/htdocs/bookcal/availabilities_list.php b/htdocs/bookcal/availabilities_list.php
index d27b46dd02c..16efbe2d5df 100644
--- a/htdocs/bookcal/availabilities_list.php
+++ b/htdocs/bookcal/availabilities_list.php
@@ -113,6 +113,16 @@ foreach ($object->fields as $key => $val) {
// $fieldstosearchall = array_merge($fieldstosearchall, empty($hookmanager->resArray['fieldstosearchall']) ? array() : $hookmanager->resArray['fieldstosearchall']);
// }
+
+// $fieldstosearchall is supposedly defined further below, ensure that it is.
+if (!isset($fieldstosearchall) || !is_array($fieldstosearchall)) {
+ $fieldstosearchall = array();
+}
+'
+ @phan-var-force array $fieldstosearchall
+';
+
+
// Definition of array of fields for columns
$arrayfields = array();
foreach ($object->fields as $key => $val) {
@@ -120,11 +130,11 @@ foreach ($object->fields as $key => $val) {
if (!empty($val['visible'])) {
$visible = (int) dol_eval($val['visible'], 1);
$arrayfields['t.'.$key] = array(
- 'label'=>$val['label'],
- 'checked'=>(($visible < 0) ? 0 : 1),
- 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
- 'position'=>$val['position'],
- 'help'=> isset($val['help']) ? $val['help'] : ''
+ 'label' => $val['label'],
+ 'checked' => (($visible < 0) ? 0 : 1),
+ 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
+ 'position' => $val['position'],
+ 'help' => isset($val['help']) ? $val['help'] : ''
);
}
}
@@ -460,8 +470,8 @@ print '';
$newcardbutton = '';
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/bookcal/availabilities_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
@@ -563,7 +573,7 @@ foreach ($object->fields as $key => $val) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
-$parameters = array('arrayfields'=>$arrayfields);
+$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
/*if (!empty($arrayfields['anotherfield']['checked'])) {
@@ -609,7 +619,7 @@ foreach ($object->fields as $key => $val) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
-$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
+$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
/*if (!empty($arrayfields['anotherfield']['checked'])) {
@@ -741,7 +751,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
- $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
+ $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
/*if (!empty($arrayfields['anotherfield']['checked'])) {
@@ -786,7 +796,7 @@ if ($num == 0) {
$db->free($resql);
-$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
+$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
diff --git a/htdocs/bookcal/calendar_list.php b/htdocs/bookcal/calendar_list.php
index 781cad7732e..7a735b81c86 100644
--- a/htdocs/bookcal/calendar_list.php
+++ b/htdocs/bookcal/calendar_list.php
@@ -111,6 +111,14 @@ foreach ($object->fields as $key => $val) {
// $fieldstosearchall = array_merge($fieldstosearchall, empty($hookmanager->resArray['fieldstosearchall']) ? array() : $hookmanager->resArray['fieldstosearchall']);
// }
+// $fieldstosearchall is supposedly defined further below, ensure that it is.
+if (!isset($fieldstosearchall) || !is_array($fieldstosearchall)) {
+ $fieldstosearchall = array();
+}
+'
+ @phan-var-force array $fieldstosearchall
+';
+
// Definition of array of fields for columns
$arrayfields = array();
foreach ($object->fields as $key => $val) {
@@ -118,11 +126,11 @@ foreach ($object->fields as $key => $val) {
if (!empty($val['visible'])) {
$visible = (int) dol_eval($val['visible'], 1);
$arrayfields['t.'.$key] = array(
- 'label'=>$val['label'],
- 'checked'=>(($visible < 0) ? 0 : 1),
- 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
- 'position'=>$val['position'],
- 'help'=> isset($val['help']) ? $val['help'] : ''
+ 'label' => $val['label'],
+ 'checked' => (($visible < 0) ? 0 : 1),
+ 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
+ 'position' => $val['position'],
+ 'help' => isset($val['help']) ? $val['help'] : ''
);
}
}
@@ -444,8 +452,8 @@ print '';
$newcardbutton = '';
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/bookcal/calendar_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
@@ -546,7 +554,7 @@ foreach ($object->fields as $key => $val) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
-$parameters = array('arrayfields'=>$arrayfields);
+$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
/*if (!empty($arrayfields['anotherfield']['checked'])) {
@@ -592,7 +600,7 @@ foreach ($object->fields as $key => $val) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
-$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
+$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
/*if (!empty($arrayfields['anotherfield']['checked'])) {
@@ -724,7 +732,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
- $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
+ $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
/*if (!empty($arrayfields['anotherfield']['checked'])) {
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 7ce401bc3c9..f0843f3c990 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -2069,12 +2069,13 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
//print img_picto($langs->trans("Birthday"), 'birthday-cake').' ';
$tmpid = $event->id;
+
if (empty($cachecontacts[$tmpid])) {
$newcontact = new Contact($db);
$newcontact->fetch($tmpid);
- $cachecontact[$tmpid] = $newcontact;
+ $cachecontacts[$tmpid] = $newcontact;
}
- print $cachecontact[$tmpid]->getNomUrl(1, '', 0, '', -1, 0, 'valignmiddle inline-block');
+ print $cachecontacts[$tmpid]->getNomUrl(1, '', 0, '', -1, 0, 'valignmiddle inline-block');
//$event->picto = 'birthday-cake';
//print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'birthday', 'contact');
diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php
index 0eec5b4bb58..0451f7d48fe 100644
--- a/htdocs/commande/list_det.php
+++ b/htdocs/commande/list_det.php
@@ -1485,6 +1485,7 @@ if ($resql) {
$totalarray = array();
$totalarray['nbfield'] = 0;
+ $subtotalarray = array();
$subtotalarray['nbfield'] = 0;
$totalarray['val']['cdet.total_tva'] = 0;
$totalarray['val']['cdet.total_ttc'] = 0;
diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php
index ba40644c70c..5978fcc75b8 100644
--- a/htdocs/compta/bank/annuel.php
+++ b/htdocs/compta/bank/annuel.php
@@ -103,6 +103,8 @@ if (!empty($id)) {
$sql .= " GROUP BY dm";
$resql = $db->query($sql);
+$encaiss = array();
+$decaiss = array();
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
@@ -301,6 +303,7 @@ if ($result < 0) {
// CRED PART
// Chargement du tableau des années
+ $tblyear = array();
$tblyear[0] = array();
$tblyear[1] = array();
$tblyear[2] = array();
@@ -339,6 +342,7 @@ if ($result < 0) {
$data_year_0 = array();
$data_year_1 = array();
$data_year_2 = array();
+ $datamin = array();
for ($i = 0; $i < 12; $i++) {
$data_year_0[$i] = isset($tblyear[0][substr("0".($i + 1), -2)]) ? $tblyear[0][substr("0".($i + 1), -2)] : 0;
diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php
index dd0b5d1cfe6..6ef7b315179 100644
--- a/htdocs/compta/bank/graph.php
+++ b/htdocs/compta/bank/graph.php
@@ -195,6 +195,7 @@ if ($result < 0) {
$xmonth = substr($textdate, 4, 2);
$i = 0;
+ $dataall = array();
while ($xmonth == $month) {
$subtotal = $subtotal + (isset($amounts[$textdate]) ? $amounts[$textdate] : 0);
if ($day > time()) {
diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php
index 36e525add58..551934ba258 100644
--- a/htdocs/compta/bank/info.php
+++ b/htdocs/compta/bank/info.php
@@ -66,6 +66,7 @@ $object->info($id);
$h = 0;
+$head = array();
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$id;
$head[$h][1] = $langs->trans("BankTransaction");
$h++;
diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php
index 588ca81e0e8..4adeb8913d6 100644
--- a/htdocs/compta/deplacement/index.php
+++ b/htdocs/compta/deplacement/index.php
@@ -83,6 +83,8 @@ $sql .= " GROUP BY d.type";
$sql .= " ORDER BY d.type";
$result = $db->query($sql);
+$somme = array();
+$nb = array();
if ($result) {
$num = $db->num_rows($result);
$i = 0;
@@ -113,6 +115,7 @@ print ''.$langs->trans("Statistics").' | ';
print " | \n";
$listoftype = $tripandexpense_static->listOfTypes();
+$dataseries = array();
foreach ($listoftype as $code => $label) {
$dataseries[] = array($label, (isset($nb[$code]) ? (int) $nb[$code] : 0));
}
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index a0748e540ed..66afe9fcb73 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -139,7 +139,7 @@ $hookmanager->initHooks(array('invoicecard', 'globalcard'));
$usercanread = $user->hasRight("facture", "lire");
$usercancreate = $user->hasRight("facture", "creer");
$usercanissuepayment = $user->hasRight("facture", "paiement");
-$usercandelete = $user->hasRight("facture", "supprimer");
+$usercandelete = $user->hasRight("facture", "supprimer") || ($usercancreate && isset($object->status) && $object->status == $object::STATUS_DRAFT);
$usercancreatecontract = $user->hasRight("contrat", "creer");
// Advanced Permissions
@@ -2447,6 +2447,7 @@ if (empty($reshook)) {
}
if (!$error) {
+ '@phan-var-force array $lines';
// Add batchinfo if the detail_batch array is defined
if (isModEnabled('productbatch') && !empty($lines[$i]->detail_batch) && is_array($lines[$i]->detail_batch) && getDolGlobalString('INVOICE_INCUDE_DETAILS_OF_LOTS_SERIALS')) {
$langs->load('productbatch');
@@ -4452,6 +4453,7 @@ if ($action == 'create') {
$close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("Other"), $close[$i]['label'], 1);
$i++;
// arrayreasons[code]=reason
+ $arrayreasons = [];
foreach ($close as $key => $val) {
$arrayreasons[$close[$key]['code']] = $close[$key]['reason'];
}
@@ -4484,6 +4486,7 @@ if ($action == 'create') {
$close[1]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $object->ref), $close[1]['label'], 1);
$close[2]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close[2]['label'], 1);
// arrayreasons
+ $arrayreasons = [];
$arrayreasons[$close[1]['code']] = $close[1]['reason'];
$arrayreasons[$close[2]['code']] = $close[2]['reason'];
diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php
index 2797c3203c9..e302bcc2ee1 100644
--- a/htdocs/compta/localtax/card.php
+++ b/htdocs/compta/localtax/card.php
@@ -215,6 +215,7 @@ if ($action == 'create') {
// View mode
if ($id) {
$h = 0;
+ $head = array();
$head[$h][0] = DOL_URL_ROOT.'/compta/localtax/card.php?id='.$object->id;
$head[$h][1] = $langs->trans('Card');
$head[$h][2] = 'card';
diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php
index 29cd19534e9..9af72aa1a1f 100644
--- a/htdocs/compta/paiement/cheque/card.php
+++ b/htdocs/compta/paiement/cheque/card.php
@@ -333,6 +333,7 @@ if ($action == 'new') {
}
$h = 0;
+ $head = array();
$head[$h][0] = $_SERVER["PHP_SELF"].'?id='.$object->id;
$head[$h][1] = $langs->trans("CheckReceipt");
$hselected = $h;
diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php
index 55df11fe81b..9288421622e 100644
--- a/htdocs/compta/payment_sc/card.php
+++ b/htdocs/compta/payment_sc/card.php
@@ -100,6 +100,7 @@ $form = new Form($db);
$h = 0;
+$head = array();
$head[$h][0] = DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$id;
$head[$h][1] = $langs->trans("PaymentSocialContribution");
$hselected = $h;
diff --git a/htdocs/compta/payment_vat/card.php b/htdocs/compta/payment_vat/card.php
index b49e93ebed3..4d9d34abc75 100644
--- a/htdocs/compta/payment_vat/card.php
+++ b/htdocs/compta/payment_vat/card.php
@@ -129,6 +129,7 @@ $form = new Form($db);
$h = 0;
+$head = array();
$head[$h][0] = DOL_URL_ROOT.'/compta/payment_vat/card.php?id='.$id;
$head[$h][1] = $langs->trans("VATPayment");
$hselected = $h;
diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php
index 6bf465d1ea1..23eee162758 100644
--- a/htdocs/compta/prelevement/orders_list.php
+++ b/htdocs/compta/prelevement/orders_list.php
@@ -103,6 +103,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
// Delete draft
if (($massaction == "delete" || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) {
+ $TMsg = array();
$db->begin();
$objecttmp = new BonPrelevement($db);
foreach ($toselect as $toselectid) {
@@ -279,8 +280,8 @@ if ($type != '') {
}
$newcardbutton = '';
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
-$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
+$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
if ($usercancreate) {
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php?type='.urlencode($type));
diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php
index ea5fe2d3ca9..0f2b503da99 100644
--- a/htdocs/compta/sociales/list.php
+++ b/htdocs/compta/sociales/list.php
@@ -638,6 +638,10 @@ $totalarray = array();
$totalarray['nbfield'] = 0;
$totalarray['val'] = array('totalttcfield' => 0);
$imaxinloop = ($limit ? min($num, $limit) : $num);
+if (!isset($TLoadedUsers) || !is_array($TLoadedUsers)) {
+ // Ensure array is initialised
+ $TLoadedUsers = array();
+}
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php
index 6a52f9ee62a..0d364c64625 100644
--- a/htdocs/compta/stats/cabyprodserv.php
+++ b/htdocs/compta/stats/cabyprodserv.php
@@ -209,7 +209,7 @@ $allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
-$paramslink="";
+$paramslink = "";
foreach ($allparams as $key => $value) {
$paramslink .= '&'.$key.'='.$value;
}
@@ -232,8 +232,8 @@ if ($modecompta == "BOOKKEEPINGCOLLECTED") {
$modecompta = "RECETTES-DEPENSES";
}
-$exportlink="";
-$namelink="";
+$exportlink = "";
+$namelink = "";
// Show report header
if ($modecompta == "CREANCES-DETTES") {
@@ -360,6 +360,9 @@ if ($modecompta == 'CREANCES-DETTES') {
dol_syslog("cabyprodserv", LOG_DEBUG);
$result = $db->query($sql);
+ $amount_ht = array();
+ $amount = array();
+ $qty = array();
if ($result) {
$num = $db->num_rows($result);
$i = 0;
diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php
index eb69cefa804..38619a7eacf 100644
--- a/htdocs/compta/stats/cabyuser.php
+++ b/htdocs/compta/stats/cabyuser.php
@@ -166,7 +166,7 @@ $allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
-$paramslink="";
+$paramslink = "";
foreach ($allparams as $key => $value) {
$paramslink .= '&'.$key.'='.$value;
}
@@ -187,8 +187,8 @@ if ($modecompta == "BOOKKEEPINGCOLLECTED") {
$modecompta = "RECETTES-DEPENSES";
}
-$exportlink="";
-$namelink="";
+$exportlink = "";
+$namelink = "";
// Show report header
if ($modecompta == "CREANCES-DETTES") {
@@ -288,6 +288,7 @@ $sql .= " GROUP BY u.rowid, u.lastname, u.firstname";
$sql .= " ORDER BY u.rowid";
$amount = array();
+$amount_ht = array();
dol_syslog("cabyuser", LOG_DEBUG);
$result = $db->query($sql);
diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php
index 6c1b1c3558a..b7d157302c1 100644
--- a/htdocs/compta/stats/casoc.php
+++ b/htdocs/compta/stats/casoc.php
@@ -197,7 +197,7 @@ $allparams = array_merge($commonparams, $headerparams, $tableparams);
$headerparams = array_merge($commonparams, $headerparams);
$tableparams = array_merge($commonparams, $tableparams);
-$paramslink="";
+$paramslink = "";
foreach ($allparams as $key => $value) {
$paramslink .= '&'.$key.'='.$value;
}
@@ -221,8 +221,8 @@ if ($modecompta == "BOOKKEEPINGCOLLECTED") {
$modecompta = "RECETTES-DEPENSES";
}
-$exportlink="";
-$namelink="";
+$exportlink = "";
+$namelink = "";
// Show report header
if ($modecompta == "CREANCES-DETTES") {
@@ -354,6 +354,10 @@ $sql .= " ORDER BY s.rowid";
//echo $sql;
$amount = array();
+$amount_ht = array();
+$address_zip = array();
+$address_town = array();
+$address_pays = array();
dol_syslog("casoc", LOG_DEBUG);
$result = $db->query($sql);
diff --git a/htdocs/compta/stats/supplier_turnover_by_prodserv.php b/htdocs/compta/stats/supplier_turnover_by_prodserv.php
index e9568c4aa73..67c38c55d4b 100644
--- a/htdocs/compta/stats/supplier_turnover_by_prodserv.php
+++ b/htdocs/compta/stats/supplier_turnover_by_prodserv.php
@@ -263,6 +263,9 @@ if (isModEnabled('accounting') && $modecompta != 'BOOKKEEPING') {
$name = array();
+$amount = array();
+$amount_ht = array();
+$qty = array();
// SQL request
$catotal = 0;
diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php
index 205f9000031..ef2f7fe3177 100644
--- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php
+++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php
@@ -245,6 +245,9 @@ $catotal_ht = 0;
$name = array();
$amount = array();
$amount_ht = array();
+$address_zip = array();
+$address_town = array();
+$address_pays = array();
if ($modecompta == 'CREANCES-DETTES') {
$sql = "SELECT DISTINCT s.rowid as socid, s.nom as name, s.zip, s.town, s.fk_pays,";
$sql .= " sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
diff --git a/htdocs/core/class/html.formcategory.class.php b/htdocs/core/class/html.formcategory.class.php
index 34a1961bc84..193967845ab 100644
--- a/htdocs/core/class/html.formcategory.class.php
+++ b/htdocs/core/class/html.formcategory.class.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2024 Frédéric France
*
* 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
@@ -81,7 +82,7 @@ class FormCategory extends Form
$filter .= $langs->trans('UseOrOperatorShort');
$filter .= '';
- $filter .= ' |