@@ -33,12 +33,12 @@ |
||
33 | 33 | /** |
34 | 34 | * @var string Id to identify managed objects |
35 | 35 | */ |
36 | - public $element = 'undefined'; // Will be defined into constructor |
|
36 | + public $element = 'undefined'; // Will be defined into constructor |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var string Name of table without prefix where object is stored |
40 | 40 | */ |
41 | - public $table_element = 'undefined'; // Will be defined into constructor |
|
41 | + public $table_element = 'undefined'; // Will be defined into constructor |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @var CtyperesourceLine[] Lines |
@@ -507,7 +507,7 @@ |
||
507 | 507 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
508 | 508 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
509 | 509 | } |
510 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
510 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
511 | 511 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
512 | 512 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; |
513 | 513 | $totalarray['nbfield']++; |
@@ -335,7 +335,7 @@ |
||
335 | 335 | print '<tr class="oddeven" height="24">'; |
336 | 336 | print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>'; |
337 | 337 | print '<td class="right">'.$val['nb'].'</td>'; |
338 | - print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']): "0").'%</td>'; |
|
338 | + print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']) : "0").'%</td>'; |
|
339 | 339 | print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>'; |
340 | 340 | print '<td class="right opacitylow" style="'.((!isset($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['total_diff']) ? round($val['total_diff']) : "0").'%</td>'; |
341 | 341 | print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>'; |
@@ -494,7 +494,7 @@ |
||
494 | 494 | if ($key === 'date_prevue_depart' && $object->lead_time_for_warning > 0 && $object->$key > 0) { |
495 | 495 | $date_prevue_depart = $object->$key; |
496 | 496 | $date_prevue_depart_plus_delai = $date_prevue_depart; |
497 | - if ($object->lead_time_for_warning > 0) $date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart) . ' + '.$object->lead_time_for_warning.' day'); |
|
497 | + if ($object->lead_time_for_warning > 0) $date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart).' + '.$object->lead_time_for_warning.' day'); |
|
498 | 498 | if ($date_prevue_depart_plus_delai < strtotime(date('Y-m-d'))) print img_warning($langs->trans('Alert').' - '.$langs->trans('Late')); |
499 | 499 | } |
500 | 500 | } |
@@ -455,17 +455,17 @@ |
||
455 | 455 | // Rôles |
456 | 456 | $resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STDEST" AND element = "StockTransfer" AND source = "internal"'); |
457 | 457 | $res = $this->db->fetch_object($resql); |
458 | - $nextid=$this->getNextId(); |
|
458 | + $nextid = $this->getNextId(); |
|
459 | 459 | if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "internal", "STRESP", "Responsable du transfert de stocks", 1, NULL, 0)'); |
460 | 460 | |
461 | 461 | $resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STFROM" AND element = "StockTransfer" AND source = "external"'); |
462 | 462 | $res = $this->db->fetch_object($resql); |
463 | - $nextid=$this->getNextId(); |
|
463 | + $nextid = $this->getNextId(); |
|
464 | 464 | if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STFROM", "Contact expéditeur transfert de stocks", 1, NULL, 0)'); |
465 | 465 | |
466 | 466 | $resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STDEST" AND element = "StockTransfer" AND source = "external"'); |
467 | 467 | $res = $this->db->fetch_object($resql); |
468 | - $nextid=$this->getNextId(); |
|
468 | + $nextid = $this->getNextId(); |
|
469 | 469 | if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STDEST", "Contact destinataire transfert de stocks", 1, NULL, 0)'); |
470 | 470 | |
471 | 471 | return $this->_init($sql, $options); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * \ingroup stocktransfer |
24 | 24 | * \brief File of class to manage StockTransfer numbering rules standard |
25 | 25 | */ |
26 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/stocktransfer/modules_stocktransfer.php'; |
|
26 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/stocktransfer/modules_stocktransfer.php'; |
|
27 | 27 | |
28 | 28 | |
29 | 29 | /** |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * \brief File containing class for advanced numbering model of StockTransfer |
28 | 28 | */ |
29 | 29 | |
30 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/stocktransfer/modules_stocktransfer.php'; |
|
30 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/stocktransfer/modules_stocktransfer.php'; |
|
31 | 31 | |
32 | 32 | |
33 | 33 | /** |
@@ -434,7 +434,7 @@ |
||
434 | 434 | $invoicecredits[] = $facavoir->getNomUrl(1); |
435 | 435 | } |
436 | 436 | print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir"); |
437 | - print ' '. (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits); |
|
437 | + print ' '.(count($invoicecredits) ? ' ' : '').implode(',', $invoicecredits); |
|
438 | 438 | print '</span>'; |
439 | 439 | } |
440 | 440 | /* |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | $month_current = dol_print_date(dol_now(), '%m'); |
100 | 100 | $year_start = $year; |
101 | 101 | } |
102 | -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
103 | -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
102 | +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
103 | +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
104 | 104 | // Quarter |
105 | 105 | if (empty($date_start) || empty($date_end)) { // We define date_start and date_end |
106 | 106 | $q = GETPOST("q", "int") ?GETPOST("q", "int") : 0; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $headerparams = array_merge($commonparams, $headerparams); |
180 | 180 | $tableparams = array_merge($commonparams, $tableparams); |
181 | 181 | |
182 | -$paramslink=""; |
|
182 | +$paramslink = ""; |
|
183 | 183 | foreach ($allparams as $key => $value) { |
184 | 184 | $paramslink .= '&'.$key.'='.$value; |
185 | 185 | } |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | $modecompta = "RECETTES-DEPENSES"; |
204 | 204 | } |
205 | 205 | |
206 | -$exportlink=""; |
|
207 | -$namelink=""; |
|
206 | +$exportlink = ""; |
|
207 | +$namelink = ""; |
|
208 | 208 | |
209 | 209 | // Show report header |
210 | 210 | if ($modecompta == "CREANCES-DETTES") { |