@@ -18,7 +18,7 @@ |
||
18 | 18 | if (!empty($conf->global->THEME_DARKMODEENABLED)) { |
19 | 19 | print "/* For dark mode */\n"; |
20 | 20 | if ($conf->global->THEME_DARKMODEENABLED != 2) { |
21 | - print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes |
|
21 | + print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes |
|
22 | 22 | } else { |
23 | 23 | print "@media not print {"; |
24 | 24 | } |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; |
346 | 346 | $sql .= " fk_bank=".(isset($this->fk_bank) ? ((int) $this->fk_bank) : "null").","; |
347 | 347 | $sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? ((int) $this->fk_user_creat) : "null").","; |
348 | - $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ?((int) $this->fk_user_modif) : "null"); |
|
348 | + $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? ((int) $this->fk_user_modif) : "null"); |
|
349 | 349 | $sql .= " WHERE rowid=".((int) $this->id); |
350 | 350 | |
351 | 351 | $this->db->begin(); |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | $result .= $linkend; |
656 | 656 | |
657 | 657 | global $action; |
658 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
658 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
659 | 659 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
660 | 660 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
661 | 661 | if ($reshook > 0) { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | return $pass; |
195 | 195 | } |
196 | 196 | |
197 | - return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
197 | + return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | global $langs; |
210 | 210 | |
211 | - $this->initAll(); // For the case this method is called alone |
|
211 | + $this->initAll(); // For the case this method is called alone |
|
212 | 212 | |
213 | 213 | $password_a = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY); |
214 | 214 | $maj = preg_split('//u', $this->Maj, null, PREG_SPLIT_NO_EMPTY); |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | if (is_array($cpt)) { |
628 | 628 | $listofaccount = ''; |
629 | 629 | foreach ($cpt as $cptcursor) { |
630 | - if (! is_null($cptcursor)) { |
|
630 | + if (!is_null($cptcursor)) { |
|
631 | 631 | if ($listofaccount) { |
632 | 632 | $listofaccount .= ","; |
633 | 633 | } |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | |
777 | 777 | $sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens"; |
778 | 778 | $sql .= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c"; |
779 | - $sql .= " WHERE c.active = " . (int) $active; |
|
779 | + $sql .= " WHERE c.active = ".(int) $active; |
|
780 | 780 | $sql .= " AND c.entity = ".$conf->entity; |
781 | 781 | if ($categorytype >= 0) { |
782 | 782 | $sql .= " AND c.category_type = 1"; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public $fk_website; |
58 | 58 | |
59 | - public $fk_page; // If translation of another page |
|
59 | + public $fk_page; // If translation of another page |
|
60 | 60 | |
61 | 61 | public $pageurl; |
62 | 62 | public $aliasalt; |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public $fk_object; |
120 | 120 | |
121 | - const STATUS_DRAFT = 0; // offline |
|
122 | - const STATUS_VALIDATED = 1; // online |
|
121 | + const STATUS_DRAFT = 0; // offline |
|
122 | + const STATUS_VALIDATED = 1; // online |
|
123 | 123 | |
124 | 124 | |
125 | 125 | /** |
@@ -53,25 +53,25 @@ discard block |
||
53 | 53 | |
54 | 54 | $trclass = 'oddeven'; |
55 | 55 | |
56 | - echo '<tr class="' . $trclass . '" >'; |
|
57 | - echo '<td class="linkedcol-element tdoverflowmax100">' . $langs->trans("ManufacturingOrder"); |
|
56 | + echo '<tr class="'.$trclass.'" >'; |
|
57 | + echo '<td class="linkedcol-element tdoverflowmax100">'.$langs->trans("ManufacturingOrder"); |
|
58 | 58 | if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) { |
59 | - print '<a class="objectlinked_importbtn" href="' . $objectlink->getNomUrl(0, '', 0, 1) . '&action=selectlines" data-element="' . $objectlink->element . '" data-id="' . $objectlink->id . '" > <i class="fa fa-indent"></i> </a'; |
|
59 | + print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; |
|
60 | 60 | } |
61 | 61 | echo '</td>'; |
62 | - echo '<td class="linkedcol-name nowraponall" >' . $objectlink->getNomUrl(1) . '</td>'; |
|
62 | + echo '<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).'</td>'; |
|
63 | 63 | |
64 | 64 | echo '<td class="linkedcol-ref center">'; |
65 | 65 | // $result = $product_static->fetch($objectlink->fk_product); |
66 | 66 | print '</td>'; |
67 | - echo '<td class="linkedcol-date center">' . dol_print_date($objectlink->date_creation, 'day') . '</td>'; |
|
67 | + echo '<td class="linkedcol-date center">'.dol_print_date($objectlink->date_creation, 'day').'</td>'; |
|
68 | 68 | echo '<td class="linkedcol-amount right">-</td>'; |
69 | - echo '<td class="linkedcol-statut right">' . $objectlink->getLibStatut(3) . '</td>'; |
|
69 | + echo '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>'; |
|
70 | 70 | echo '<td class="linkedcol-action right">'; |
71 | 71 | |
72 | 72 | // we want to make the link via element_element for delete action |
73 | - $sql = " Select rowid from " . MAIN_DB_PREFIX . "element_element"; |
|
74 | - $sql .= " WHERE fk_source = " . (int) $object->id . " and fk_target = '" . dol_escape_htmltag($key) . "'"; |
|
73 | + $sql = " Select rowid from ".MAIN_DB_PREFIX."element_element"; |
|
74 | + $sql .= " WHERE fk_source = ".(int) $object->id." and fk_target = '".dol_escape_htmltag($key)."'"; |
|
75 | 75 | |
76 | 76 | $resql = $db->query($sql); |
77 | 77 | $k = 0; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $obj = $db->fetch_object($resql); |
80 | 80 | if ($obj->rowid && $obj->rowid > 0) $k = $obj->rowid; |
81 | 81 | } |
82 | - echo '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=dellink&token=' . newToken() . '&dellinkid=' . $k . '">' . img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink') . '</a>'; |
|
82 | + echo '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&token='.newToken().'&dellinkid='.$k.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a>'; |
|
83 | 83 | echo '</td>'; |
84 | 84 | echo "</tr>\n"; |
85 | 85 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $search_date_order_endday = GETPOST('search_date_order_endday', 'int'); |
65 | 65 | $search_date_order_endmonth = GETPOST('search_date_order_endmonth', 'int'); |
66 | 66 | $search_date_order_endyear = GETPOST('search_date_order_endyear', 'int'); |
67 | -$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
67 | +$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver |
|
68 | 68 | $search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear); |
69 | 69 | |
70 | 70 | $search_date_delivery_startday = GETPOST('search_date_delivery_startday', 'int'); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int'); |
74 | 74 | $search_date_delivery_endmonth = GETPOST('search_date_delivery_endmonth', 'int'); |
75 | 75 | $search_date_delivery_endyear = GETPOST('search_date_delivery_endyear', 'int'); |
76 | -$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
76 | +$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver |
|
77 | 77 | $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear); |
78 | 78 | |
79 | 79 | $search_date_valid_startday = GETPOST('search_date_valid_startday', 'int'); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $search_date_valid_endday = GETPOST('search_date_valid_endday', 'int'); |
83 | 83 | $search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int'); |
84 | 84 | $search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int'); |
85 | -$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
85 | +$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver |
|
86 | 86 | $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear); |
87 | 87 | |
88 | 88 | $search_date_approve_startday = GETPOST('search_date_approve_startday', 'int'); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $search_date_approve_endday = GETPOST('search_date_approve_endday', 'int'); |
92 | 92 | $search_date_approve_endmonth = GETPOST('search_date_approve_endmonth', 'int'); |
93 | 93 | $search_date_approve_endyear = GETPOST('search_date_approve_endyear', 'int'); |
94 | -$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
94 | +$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver |
|
95 | 95 | $search_date_approve_end = dol_mktime(23, 59, 59, $search_date_approve_endmonth, $search_date_approve_endday, $search_date_approve_endyear); |
96 | 96 | |
97 | 97 | $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | |
371 | 371 | $db->begin(); |
372 | 372 | |
373 | - $default_ref_supplier=dol_print_date(dol_now(), '%Y%m%d%H%M%S'); |
|
373 | + $default_ref_supplier = dol_print_date(dol_now(), '%Y%m%d%H%M%S'); |
|
374 | 374 | |
375 | 375 | foreach ($orders as $id_order) { |
376 | 376 | $cmd = new CommandeFournisseur($db); |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | $objecttmp->fk_project = $cmd->fk_project; |
390 | 390 | $objecttmp->multicurrency_code = $cmd->multicurrency_code; |
391 | 391 | $objecttmp->ref_supplier = !empty($cmd->ref_supplier) ? $cmd->ref_supplier : $default_ref_supplier; |
392 | - $default_ref_supplier+=1; |
|
392 | + $default_ref_supplier += 1; |
|
393 | 393 | |
394 | 394 | $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); |
395 | 395 | if (empty($datefacture)) { |
@@ -885,9 +885,9 @@ discard block |
||
885 | 885 | if ($search_user > 0) { |
886 | 886 | $sql .= " AND EXISTS ("; |
887 | 887 | $sql .= " SELECT ec.rowid "; |
888 | - $sql .= " FROM " . MAIN_DB_PREFIX . "element_contact as ec"; |
|
889 | - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact"; |
|
890 | - $sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = " . ((int) $search_user); |
|
888 | + $sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec"; |
|
889 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact"; |
|
890 | + $sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = ".((int) $search_user); |
|
891 | 891 | $sql .= " AND tc.element = 'order_supplier' AND tc.source = 'internal'"; |
892 | 892 | $sql .= ")"; |
893 | 893 | } |
@@ -931,7 +931,7 @@ discard block |
||
931 | 931 | if ($searchCategoryProductOperator == 0) { |
932 | 932 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commande_fournisseurdet as cd WHERE cd.fk_commande = cf.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
933 | 933 | } else { |
934 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
934 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
935 | 935 | } |
936 | 936 | } |
937 | 937 | } |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | |
1204 | 1204 | $topicmail = "SendOrderRef"; |
1205 | 1205 | $modelmail = "order_supplier_send"; |
1206 | - $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
1206 | + $objecttmp = new CommandeFournisseur($db); // in case $object is not the good object |
|
1207 | 1207 | $trackid = 'sord'.$object->id; |
1208 | 1208 | include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; |
1209 | 1209 |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $maxfilesizearray = getMaxFileSizeArray(); |
180 | 180 | $maxmin = $maxfilesizearray['maxmin']; |
181 | 181 | if ($maxmin > 0) { |
182 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
182 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
183 | 183 | } |
184 | 184 | $texte .= ' <input type="file" name="uploadfile">'; |
185 | 185 | $texte .= '<input type="hidden" value="RECEPTION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); |
274 | 274 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
275 | 275 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
276 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
276 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
277 | 277 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
278 | 278 | // Get extension (ods or odt) |
279 | 279 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -282,11 +282,11 @@ discard block |
||
282 | 282 | if ($format == '1') { |
283 | 283 | $format = '%Y%m%d%H%M%S'; |
284 | 284 | } |
285 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
285 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
286 | 286 | } else { |
287 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
287 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
288 | 288 | } |
289 | - $file = $dir . '/' . $filename; |
|
289 | + $file = $dir.'/'.$filename; |
|
290 | 290 | //print "newdir=".$dir; |
291 | 291 | //print "newfile=".$newfile; |
292 | 292 | //print "file=".$file; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | dol_mkdir($conf->reception->dir_temp); |
296 | 296 | if (!is_writable($conf->reception->dir_temp)) { |
297 | 297 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->reception->dir_temp); |
298 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
298 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
299 | 299 | return -1; |
300 | 300 | } |
301 | 301 |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $maxfilesizearray = getMaxFileSizeArray(); |
187 | 187 | $maxmin = $maxfilesizearray['maxmin']; |
188 | 188 | if ($maxmin > 0) { |
189 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
189 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
190 | 190 | } |
191 | 191 | $texte .= ' <input type="file" name="uploadfile">'; |
192 | 192 | $texte .= '<input type="hidden" value="EXPEDITION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); |
281 | 281 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
282 | 282 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
283 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
283 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
284 | 284 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
285 | 285 | // Get extension (ods or odt) |
286 | 286 | $newfileformat = substr($newfile, strrpos($newfile, '.') + 1); |
@@ -289,11 +289,11 @@ discard block |
||
289 | 289 | if ($format == '1') { |
290 | 290 | $format = '%Y%m%d%H%M%S'; |
291 | 291 | } |
292 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
292 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
293 | 293 | } else { |
294 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
294 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
295 | 295 | } |
296 | - $file = $dir . '/' . $filename; |
|
296 | + $file = $dir.'/'.$filename; |
|
297 | 297 | //print "newdir=".$dir; |
298 | 298 | //print "newfile=".$newfile; |
299 | 299 | //print "file=".$file; |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | dol_mkdir($conf->expedition->dir_temp); |
303 | 303 | if (!is_writable($conf->expedition->dir_temp)) { |
304 | 304 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->expedition->dir_temp); |
305 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
305 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
306 | 306 | return -1; |
307 | 307 | } |
308 | 308 |