@@ -572,8 +572,8 @@ discard block |
||
572 | 572 | $sql .= "ip"; |
573 | 573 | $sql .= ") VALUES ("; |
574 | 574 | $sql .= "'(PROV)', "; |
575 | - $sql .= "'" . $this->db->idate($now) . "', "; // date creation |
|
576 | - $sql .= "'" . $this->db->idate($this->datep) . "', "; // date start event |
|
575 | + $sql .= "'" . $this->db->idate($now) . "', "; // date creation |
|
576 | + $sql .= "'" . $this->db->idate($this->datep) . "', "; // date start event |
|
577 | 577 | $sql .= (strval($this->datef) != '' ? "'" . $this->db->idate($this->datef) . "'" : "null") . ", "; |
578 | 578 | $sql .= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '') ? "'" . $this->db->escape($this->durationp) . "'" : "null") . ", "; // deprecated |
579 | 579 | $sql .= (isset($this->type_id) ? $this->type_id : "null") . ","; |
@@ -1341,7 +1341,7 @@ discard block |
||
1341 | 1341 | $sql .= " FROM " . MAIN_DB_PREFIX . "actioncomm as a"; |
1342 | 1342 | // Fields from hook |
1343 | 1343 | $parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype); |
1344 | - $reshook = $hookmanager->executeHooks('getActionsListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1344 | + $reshook = $hookmanager->executeHooks('getActionsListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1345 | 1345 | if (!empty($hookmanager->resPrint)) { |
1346 | 1346 | $sql .= $hookmanager->resPrint; |
1347 | 1347 | } |
@@ -1365,7 +1365,7 @@ discard block |
||
1365 | 1365 | } |
1366 | 1366 | // Fields where hook |
1367 | 1367 | $parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype); |
1368 | - $reshook = $hookmanager->executeHooks('getActionsListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
1368 | + $reshook = $hookmanager->executeHooks('getActionsListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
1369 | 1369 | if (!empty($hookmanager->resPrint)) { |
1370 | 1370 | $sql .= $hookmanager->resPrint; |
1371 | 1371 | } |
@@ -1442,7 +1442,7 @@ discard block |
||
1442 | 1442 | |
1443 | 1443 | $resql = $this->db->query($sql); |
1444 | 1444 | if ($resql) { |
1445 | - $response = null; // Ensure the variable is defined |
|
1445 | + $response = null; // Ensure the variable is defined |
|
1446 | 1446 | if (empty($load_state_board)) { |
1447 | 1447 | $agenda_static = new ActionComm($this->db); |
1448 | 1448 | $response = new WorkboardResponse(); |
@@ -1745,8 +1745,8 @@ discard block |
||
1745 | 1745 | } |
1746 | 1746 | if (!empty($this->note_private)) { |
1747 | 1747 | $tooltip .= '<br><br><b>' . $langs->trans('Description') . ':</b><br>'; |
1748 | - $texttoshow = dolGetFirstLineOfText($this->note_private, 8); // Try to limit length of content |
|
1749 | - $tooltip .= '<div class="tenlinesmax">'; // Restrict height of content into the tooltip |
|
1748 | + $texttoshow = dolGetFirstLineOfText($this->note_private, 8); // Try to limit length of content |
|
1749 | + $tooltip .= '<div class="tenlinesmax">'; // Restrict height of content into the tooltip |
|
1750 | 1750 | $tooltip .= (dol_textishtml($texttoshow) ? str_replace(array("\r", "\n"), "", $texttoshow) : str_replace(array("\r", "\n"), '<br>', $texttoshow)); |
1751 | 1751 | $tooltip .= '</div>'; |
1752 | 1752 | } |
@@ -2629,7 +2629,7 @@ discard block |
||
2629 | 2629 | //Select all action comm reminders |
2630 | 2630 | $sql = "SELECT rowid as id FROM " . MAIN_DB_PREFIX . "actioncomm_reminder"; |
2631 | 2631 | $sql .= " WHERE typeremind = 'email'"; |
2632 | - $sql .= " AND status = 0"; // 0=No yet sent, -1=Error. TODO Include reminder in error once we can count number of error, so we can try 5 times and not more on errors. |
|
2632 | + $sql .= " AND status = 0"; // 0=No yet sent, -1=Error. TODO Include reminder in error once we can count number of error, so we can try 5 times and not more on errors. |
|
2633 | 2633 | $sql .= " AND dateremind <= '" . $this->db->idate($now) . "'"; |
2634 | 2634 | $sql .= " AND entity IN (" . getEntity('actioncomm') . ")"; |
2635 | 2635 | $sql .= $this->db->order("dateremind", "ASC"); |
@@ -2637,7 +2637,7 @@ discard block |
||
2637 | 2637 | |
2638 | 2638 | if ($resql) { |
2639 | 2639 | $formmail = new FormMail($this->db); |
2640 | - $to = null; // Ensure 'to' is defined for static analysis |
|
2640 | + $to = null; // Ensure 'to' is defined for static analysis |
|
2641 | 2641 | |
2642 | 2642 | while ($obj = $this->db->fetch_object($resql)) { |
2643 | 2643 | $res = $actionCommReminder->fetch($obj->id); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $action = GETPOST('action', 'aZ09'); |
50 | 50 | $backtopage = GETPOST('backtopage', 'alpha'); |
51 | 51 | $value = GETPOST('value', 'alpha'); |
52 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
52 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
53 | 53 | |
54 | 54 | $label = GETPOST('label', 'alpha'); |
55 | 55 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | // Search template files |
120 | 120 | $file = ''; |
121 | 121 | $className = ''; |
122 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
122 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
123 | 123 | foreach ($dirmodels as $reldir) { |
124 | 124 | $file = dol_buildpath($reldir . "core/modules/knowledgemanagement/doc/pdf_" . $modele . "_" . strtolower($tmpobjectkey) . ".modules.php", 0); |
125 | 125 | if (file_exists($file)) { |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | $form = new Form($db); |
197 | 197 | |
198 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
198 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
199 | 199 | |
200 | 200 | $page_name = "KnowledgeManagementSetup"; |
201 | 201 | llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-knowledgemanagement'); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | $action = GETPOST('action', 'aZ09'); |
53 | 53 | $value = GETPOST('value', 'alpha'); |
54 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
54 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
55 | 55 | |
56 | 56 | $label = GETPOST('label', 'alpha'); |
57 | 57 | $scandir = GETPOST('scan_dir', 'alpha'); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | // Search template files |
107 | 107 | $file = ''; |
108 | 108 | $classname = ''; |
109 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
109 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
110 | 110 | foreach ($dirmodels as $reldir) { |
111 | 111 | $file = dol_buildpath($reldir . "core/modules/facture/doc/pdf_" . $modele . ".modules.php", 0); |
112 | 112 | if (file_exists($file)) { |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | * View |
281 | 281 | */ |
282 | 282 | |
283 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
283 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
284 | 284 | |
285 | 285 | llxHeader("", $langs->trans("BillsSetup"), 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura', '', 0, 0, '', '', '', 'mod-admin page-invoice'); |
286 | 286 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // Parameters |
53 | 53 | $action = GETPOST('action', 'aZ09'); |
54 | 54 | $backtopage = GETPOST('backtopage', 'alpha'); |
55 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
55 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
56 | 56 | |
57 | 57 | $value = GETPOST('value', 'alpha'); |
58 | 58 | $label = GETPOST('label', 'alpha'); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $setupnotempty = count($formSetup->items); |
76 | 76 | |
77 | 77 | |
78 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
78 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
79 | 79 | |
80 | 80 | |
81 | 81 | /* |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | |
176 | 176 | if ($action == 'edit') { |
177 | - if ($useFormSetup && (float)DOL_VERSION >= 15) { |
|
177 | + if ($useFormSetup && (float) DOL_VERSION >= 15) { |
|
178 | 178 | print $formSetup->generateOutput(true); |
179 | 179 | } else { |
180 | 180 | print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | print '<br>'; |
262 | 262 | } else { |
263 | - if ($useFormSetup && (float)DOL_VERSION >= 15) { |
|
263 | + if ($useFormSetup && (float) DOL_VERSION >= 15) { |
|
264 | 264 | if (!empty($formSetup->items)) { |
265 | 265 | print $formSetup->generateOutput(); |
266 | 266 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $value = GETPOST('value', 'alpha'); |
59 | 59 | $label = GETPOST('label', 'alpha'); |
60 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
60 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
61 | 61 | |
62 | 62 | $scandir = GETPOST('scan_dir', 'alpha'); |
63 | 63 | $type = 'evaluation'; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $error = 0; |
71 | 71 | $setupnotempty = 0; |
72 | 72 | |
73 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
73 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
74 | 74 | |
75 | 75 | $moduledir = 'hrm'; |
76 | 76 | // TODO Scan list of objects to fill this array |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | // Search template files |
140 | 140 | $file = ''; |
141 | 141 | $classname = ''; |
142 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
142 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
143 | 143 | foreach ($dirmodels as $reldir) { |
144 | 144 | $file = dol_buildpath($reldir . "core/modules/hrm/doc/pdf_" . $modele . ".modules.php", 0); |
145 | 145 | if (file_exists($file)) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | // Search template files |
98 | 98 | $file = ''; |
99 | 99 | $classname = ''; |
100 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
100 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
101 | 101 | foreach ($dirmodels as $reldir) { |
102 | 102 | $file = dol_buildpath($reldir . "core/modules/stocktransfer/doc/pdf_" . $modele . ".modules.php", 0); |
103 | 103 | if (file_exists($file)) { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | $form = new Form($db); |
165 | 165 | |
166 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
166 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
167 | 167 | |
168 | 168 | $page_name = "StockTransferSetup"; |
169 | 169 | llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-stocktransfer'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->db = $db; |
98 | 98 | $this->name = "cornas"; |
99 | 99 | $this->description = $langs->trans('SuppliersCommandModel'); |
100 | - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
100 | + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
101 | 101 | |
102 | 102 | // Page size for A4 format |
103 | 103 | $this->type = 'pdf'; |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; |
693 | 693 | }*/ |
694 | 694 | |
695 | - $vatrate = (string)$object->lines[$i]->tva_tx; |
|
695 | + $vatrate = (string) $object->lines[$i]->tva_tx; |
|
696 | 696 | |
697 | 697 | // Retrieve type from database for backward compatibility with old records |
698 | 698 | if ( |
@@ -1343,7 +1343,7 @@ discard block |
||
1343 | 1343 | //{ |
1344 | 1344 | //Local tax 1 |
1345 | 1345 | foreach ($this->localtax1 as $localtax_type => $localtax_rate) { |
1346 | - if (in_array((string)$localtax_type, array('2', '4', '6'))) { |
|
1346 | + if (in_array((string) $localtax_type, array('2', '4', '6'))) { |
|
1347 | 1347 | continue; |
1348 | 1348 | } |
1349 | 1349 | |
@@ -1355,8 +1355,8 @@ discard block |
||
1355 | 1355 | $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); |
1356 | 1356 | |
1357 | 1357 | $tvacompl = ''; |
1358 | - if (preg_match('/\*/', (string)$tvakey)) { |
|
1359 | - $tvakey = str_replace('*', '', (string)$tvakey); |
|
1358 | + if (preg_match('/\*/', (string) $tvakey)) { |
|
1359 | + $tvakey = str_replace('*', '', (string) $tvakey); |
|
1360 | 1360 | $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")"; |
1361 | 1361 | } |
1362 | 1362 | $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code) . ' '; |
@@ -1373,7 +1373,7 @@ discard block |
||
1373 | 1373 | //{ |
1374 | 1374 | //Local tax 2 |
1375 | 1375 | foreach ($this->localtax2 as $localtax_type => $localtax_rate) { |
1376 | - if (in_array((string)$localtax_type, array('2', '4', '6'))) { |
|
1376 | + if (in_array((string) $localtax_type, array('2', '4', '6'))) { |
|
1377 | 1377 | continue; |
1378 | 1378 | } |
1379 | 1379 | |
@@ -1385,8 +1385,8 @@ discard block |
||
1385 | 1385 | $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); |
1386 | 1386 | |
1387 | 1387 | $tvacompl = ''; |
1388 | - if (preg_match('/\*/', (string)$tvakey)) { |
|
1389 | - $tvakey = str_replace('*', '', (string)$tvakey); |
|
1388 | + if (preg_match('/\*/', (string) $tvakey)) { |
|
1389 | + $tvakey = str_replace('*', '', (string) $tvakey); |
|
1390 | 1390 | $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")"; |
1391 | 1391 | } |
1392 | 1392 | $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code) . ' '; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | return $numFinal; |
146 | 146 | } |
147 | 147 | |
148 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
148 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
149 | 149 | /** |
150 | 150 | * Return next free value |
151 | 151 | * |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function commande_get_num($objsoc, $objforref) |
157 | 157 | { |
158 | - // phpcs:enable |
|
158 | + // phpcs:enable |
|
159 | 159 | return $this->getNextValue($objsoc, $objforref); |
160 | 160 | } |
161 | 161 | } |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; |
634 | 634 | }*/ |
635 | 635 | |
636 | - $vatrate = (string)$object->lines[$i]->tva_tx; |
|
636 | + $vatrate = (string) $object->lines[$i]->tva_tx; |
|
637 | 637 | |
638 | 638 | // Retrieve type from database for backward compatibility with old records |
639 | 639 | if ( |
@@ -1516,7 +1516,7 @@ discard block |
||
1516 | 1516 | //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') |
1517 | 1517 | //{ |
1518 | 1518 | foreach ($this->localtax1 as $localtax_type => $localtax_rate) { |
1519 | - if (in_array((string)$localtax_type, array('1', '3', '5'))) { |
|
1519 | + if (in_array((string) $localtax_type, array('1', '3', '5'))) { |
|
1520 | 1520 | continue; |
1521 | 1521 | } |
1522 | 1522 | |
@@ -1548,7 +1548,7 @@ discard block |
||
1548 | 1548 | //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') |
1549 | 1549 | //{ |
1550 | 1550 | foreach ($this->localtax2 as $localtax_type => $localtax_rate) { |
1551 | - if (in_array((string)$localtax_type, array('1', '3', '5'))) { |
|
1551 | + if (in_array((string) $localtax_type, array('1', '3', '5'))) { |
|
1552 | 1552 | continue; |
1553 | 1553 | } |
1554 | 1554 | |
@@ -1610,7 +1610,7 @@ discard block |
||
1610 | 1610 | //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on') |
1611 | 1611 | //{ |
1612 | 1612 | foreach ($this->localtax1 as $localtax_type => $localtax_rate) { |
1613 | - if (in_array((string)$localtax_type, array('2', '4', '6'))) { |
|
1613 | + if (in_array((string) $localtax_type, array('2', '4', '6'))) { |
|
1614 | 1614 | continue; |
1615 | 1615 | } |
1616 | 1616 | |
@@ -1643,7 +1643,7 @@ discard block |
||
1643 | 1643 | //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on') |
1644 | 1644 | //{ |
1645 | 1645 | foreach ($this->localtax2 as $localtax_type => $localtax_rate) { |
1646 | - if (in_array((string)$localtax_type, array('2', '4', '6'))) { |
|
1646 | + if (in_array((string) $localtax_type, array('2', '4', '6'))) { |
|
1647 | 1647 | continue; |
1648 | 1648 | } |
1649 | 1649 |