@@ -916,7 +916,7 @@ |
||
916 | 916 | /** |
917 | 917 | * @var array $suffix2numAsked map HTTP query parameter suffixes (like '1_0') to line indices so that |
918 | 918 | * extrafields from HTTP query can be assigned to the correct dispatch line |
919 | - */ |
|
919 | + */ |
|
920 | 920 | $suffix2numAsked = array(); |
921 | 921 | $dispatchLines = array(); |
922 | 922 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $line_id = GETPOST('lineid', 'int') ?GETPOST('lineid', 'int') : ''; |
87 | 87 | $facid = GETPOST('facid', 'int'); |
88 | 88 | |
89 | -$action = GETPOST('action', 'alpha'); |
|
89 | +$action = GETPOST('action', 'alpha'); |
|
90 | 90 | //Select mail models is same action as presend |
91 | 91 | if (GETPOST('modelselected')) { |
92 | 92 | $action = 'presend'; |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | |
342 | 342 | // Loop lines to calculate $totalqty |
343 | 343 | for ($i = 1; $i <= $num; $i++) { |
344 | - $idl = "idl".$i; // id line source |
|
344 | + $idl = "idl".$i; // id line source |
|
345 | 345 | |
346 | 346 | //$sub_qty = array(); |
347 | 347 | //$subtotalqty = 0; |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | //$j = 0; |
350 | 350 | //$batch = "batchl".$i."_0"; |
351 | 351 | //$stockLocation = "ent1".$i."_0"; |
352 | - $qty = "qtyl".$i; // qty |
|
352 | + $qty = "qtyl".$i; // qty |
|
353 | 353 | |
354 | 354 | //reception line for product with no batch management and no multiple stock location |
355 | 355 | if (GETPOST($qty, 'alpha') > 0) { |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | |
364 | 364 | if ($totalqty > 0) { // There is at least one thing to ship |
365 | 365 | for ($i = 1; $i <= $num; $i++) { |
366 | - $idl = "idl".$i; // id line source |
|
366 | + $idl = "idl".$i; // id line source |
|
367 | 367 | $lineToTest = ''; |
368 | 368 | $lineId = GETPOST($idl, 'int'); |
369 | 369 | foreach ($objectsrc->lines as $linesrc) { |
@@ -970,35 +970,35 @@ discard block |
||
970 | 970 | $reg = array(); |
971 | 971 | if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) { |
972 | 972 | $numAsked++; |
973 | - $paramSuffix = $reg[1] . '_' . $reg[2]; |
|
973 | + $paramSuffix = $reg[1].'_'.$reg[2]; |
|
974 | 974 | $suffix2numAsked[$paramSuffix] = $numAsked; |
975 | 975 | |
976 | 976 | // $numline=$reg[2] + 1; // line of product |
977 | 977 | $numline = $numAsked; |
978 | 978 | |
979 | - $prod = "product_" . $paramSuffix; |
|
980 | - $qty = "qty_" . $paramSuffix; |
|
981 | - $ent = "entrepot_" . $paramSuffix; |
|
982 | - $pu = "pu_" . $paramSuffix; // This is unit price including discount |
|
983 | - $fk_commandefourndet = "fk_commandefourndet_" . $paramSuffix; |
|
979 | + $prod = "product_".$paramSuffix; |
|
980 | + $qty = "qty_".$paramSuffix; |
|
981 | + $ent = "entrepot_".$paramSuffix; |
|
982 | + $pu = "pu_".$paramSuffix; // This is unit price including discount |
|
983 | + $fk_commandefourndet = "fk_commandefourndet_".$paramSuffix; |
|
984 | 984 | $dispatchLines[$numAsked] = array('paramSuffix'=>$paramSuffix, 'prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int')); |
985 | 985 | } |
986 | 986 | |
987 | 987 | // with batch module enabled and product with lot/serial |
988 | 988 | if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) { |
989 | 989 | $numAsked++; |
990 | - $paramSuffix = $reg[1] . '_' . $reg[2]; |
|
990 | + $paramSuffix = $reg[1].'_'.$reg[2]; |
|
991 | 991 | $suffix2numAsked[$paramSuffix] = $numAsked; |
992 | 992 | |
993 | 993 | // eat-by date dispatch |
994 | 994 | // $numline=$reg[2] + 1; // line of product |
995 | 995 | $numline = $numAsked; |
996 | 996 | |
997 | - $prod = 'product_batch_' . $paramSuffix; |
|
998 | - $qty = 'qty_' . $paramSuffix; |
|
999 | - $ent = 'entrepot_' . $paramSuffix; |
|
1000 | - $pu = 'pu_' . $paramSuffix; |
|
1001 | - $lot = 'lot_number_' . $paramSuffix; |
|
997 | + $prod = 'product_batch_'.$paramSuffix; |
|
998 | + $qty = 'qty_'.$paramSuffix; |
|
999 | + $ent = 'entrepot_'.$paramSuffix; |
|
1000 | + $pu = 'pu_'.$paramSuffix; |
|
1001 | + $lot = 'lot_number_'.$paramSuffix; |
|
1002 | 1002 | $dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo_'.$paramSuffix.'month', 'int'), GETPOST('dluo_'.$paramSuffix.'day', 'int'), GETPOST('dluo_'.$paramSuffix.'year', 'int')); |
1003 | 1003 | $dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$paramSuffix.'month', 'int'), GETPOST('dlc_'.$paramSuffix.'day', 'int'), GETPOST('dlc_'.$paramSuffix.'year', 'int')); |
1004 | 1004 | $fk_commandefourndet = 'fk_commandefourndet_'.$paramSuffix; |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | // Note that if an extrafield with the same name exists in the origin supplier order line, the value |
1033 | 1033 | // from the HTTP query will be ignored |
1034 | 1034 | foreach ($suffix2numAsked as $suffix => $n) { |
1035 | - $dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_' . $suffix, ''); |
|
1035 | + $dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_'.$suffix, ''); |
|
1036 | 1036 | } |
1037 | 1037 | |
1038 | 1038 | print '<script type="text/javascript"> |
@@ -1094,7 +1094,7 @@ discard block |
||
1094 | 1094 | // $objectsrc->lines contains the line of the purchase order |
1095 | 1095 | // $dispatchLines is list of lines with dispatching detail (with product, qty and warehouse). One purchase order line may have n of this dispatch lines. |
1096 | 1096 | |
1097 | - $arrayofpurchaselinealreadyoutput= array(); |
|
1097 | + $arrayofpurchaselinealreadyoutput = array(); |
|
1098 | 1098 | |
1099 | 1099 | // $_POST contains fk_commandefourndet_X_Y where Y is num of product line and X is number of splitted line |
1100 | 1100 | $indiceAsked = 1; |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | |
1136 | 1136 | print '<input type="hidden" name="productl'.$indiceAsked.'" value="'.$line->fk_product.'">'; |
1137 | 1137 | |
1138 | - if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1138 | + if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1139 | 1139 | print '<input type="hidden" name="productid'.$indiceAsked.'" value="'.$line->fk_product.'">'; |
1140 | 1140 | |
1141 | 1141 | // Show product and description |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | print '</td>'; |
1158 | 1158 | } else { |
1159 | 1159 | print "<td>"; |
1160 | - if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1160 | + if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1161 | 1161 | if ($type == 1) { |
1162 | 1162 | $text = img_object($langs->trans('Service'), 'service'); |
1163 | 1163 | } else { |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | |
1187 | 1187 | // Qty in source purchase order line |
1188 | 1188 | print '<td class="center">'; |
1189 | - if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1189 | + if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1190 | 1190 | print $line->qty; |
1191 | 1191 | } |
1192 | 1192 | print '<input type="hidden" name="fk_commandefournisseurdet'.$indiceAsked.'" value="'.$line->id.'">'; |
@@ -1198,7 +1198,7 @@ discard block |
||
1198 | 1198 | // Qty already received |
1199 | 1199 | print '<td class="center">'; |
1200 | 1200 | $quantityDelivered = $objectsrc->receptions[$line->id]; |
1201 | - if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1201 | + if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) { // Add test to avoid to show qty twice |
|
1202 | 1202 | print $quantityDelivered; |
1203 | 1203 | } |
1204 | 1204 | print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">'; |
@@ -2023,7 +2023,7 @@ discard block |
||
2023 | 2023 | $detail = $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $batchinfo); |
2024 | 2024 | } |
2025 | 2025 | } |
2026 | - print $detail . '</td>'; |
|
2026 | + print $detail.'</td>'; |
|
2027 | 2027 | } else { |
2028 | 2028 | print '<td></td>'; |
2029 | 2029 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | if ($idbankfordirectdebit > 0) { |
245 | 245 | $tmpbankfordirectdebit = new Account($this->db); |
246 | 246 | $tmpbankfordirectdebit->fetch($idbankfordirectdebit); |
247 | - $ics = $tmpbankfordirectdebit->ics; // ICS for direct debit |
|
247 | + $ics = $tmpbankfordirectdebit->ics; // ICS for direct debit |
|
248 | 248 | } |
249 | 249 | if (empty($ics) && !empty($conf->global->PRELEVEMENT_ICS)) { |
250 | 250 | $ics = $conf->global->PRELEVEMENT_ICS; |
@@ -313,9 +313,9 @@ discard block |
||
313 | 313 | |
314 | 314 | $address = '______________________________________________'; |
315 | 315 | if ($thirdparty->id > 0) { |
316 | - $tmpaddresswithoutcountry = $thirdparty->getFullAddress(); // we test on address without country |
|
316 | + $tmpaddresswithoutcountry = $thirdparty->getFullAddress(); // we test on address without country |
|
317 | 317 | if ($tmpaddresswithoutcountry) { |
318 | - $address = $thirdparty->getFullAddress(1); // full address |
|
318 | + $address = $thirdparty->getFullAddress(1); // full address |
|
319 | 319 | } |
320 | 320 | } |
321 | 321 | $posY = $pdf->GetY(); |
@@ -294,20 +294,20 @@ |
||
294 | 294 | $nexY = $pdf->GetY(); |
295 | 295 | } |
296 | 296 | if ($object->length) { |
297 | - $texttoshow = $langs->trans("Length") . ' x ' . $langs->trans("Width") . ' x ' . $langs->trans("Height") . ': ' . ($object->length != '' ? $object->length : '?') . ' x ' . ($object->width != '' ? $object->width : '?') . ' x ' . ($object->height != '' ? $object->height : '?'); |
|
298 | - $texttoshow .= ' ' . measuringUnitString(0, "size", $object->length_units); |
|
297 | + $texttoshow = $langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").': '.($object->length != '' ? $object->length : '?').' x '.($object->width != '' ? $object->width : '?').' x '.($object->height != '' ? $object->height : '?'); |
|
298 | + $texttoshow .= ' '.measuringUnitString(0, "size", $object->length_units); |
|
299 | 299 | $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); |
300 | 300 | $nexY = $pdf->GetY(); |
301 | 301 | } |
302 | 302 | if ($object->surface) { |
303 | - $texttoshow = $langs->trans("Surface") . ': ' . dol_htmlentitiesbr($object->surface); |
|
304 | - $texttoshow .= ' ' . measuringUnitString(0, "surface", $object->surface_units); |
|
303 | + $texttoshow = $langs->trans("Surface").': '.dol_htmlentitiesbr($object->surface); |
|
304 | + $texttoshow .= ' '.measuringUnitString(0, "surface", $object->surface_units); |
|
305 | 305 | $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); |
306 | 306 | $nexY = $pdf->GetY(); |
307 | 307 | } |
308 | 308 | if ($object->volume) { |
309 | - $texttoshow = $langs->trans("Volume") . ': ' . dol_htmlentitiesbr($object->volume); |
|
310 | - $texttoshow .= ' ' . measuringUnitString(0, "volume", $object->volume_units); |
|
309 | + $texttoshow = $langs->trans("Volume").': '.dol_htmlentitiesbr($object->volume); |
|
310 | + $texttoshow .= ' '.measuringUnitString(0, "volume", $object->volume_units); |
|
311 | 311 | $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $texttoshow, 0, 1); |
312 | 312 | $nexY = $pdf->GetY(); |
313 | 313 | } |
@@ -714,7 +714,9 @@ |
||
714 | 714 | global $conf, $langs, $hookmanager; |
715 | 715 | |
716 | 716 | $ltrdirection = 'L'; |
717 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
717 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
718 | + $ltrdirection = 'R'; |
|
719 | + } |
|
718 | 720 | |
719 | 721 | // Load traductions files required by page |
720 | 722 | $outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders")); |
@@ -459,8 +459,12 @@ discard block |
||
459 | 459 | |
460 | 460 | |
461 | 461 | $creator_info = $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); |
462 | - if ($tmpuser->email) $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
463 | - if ($tmpuser->office_phone) $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
462 | + if ($tmpuser->email) { |
|
463 | + $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
464 | + } |
|
465 | + if ($tmpuser->office_phone) { |
|
466 | + $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
467 | + } |
|
464 | 468 | |
465 | 469 | $notetoshow = dol_concatdesc($notetoshow, $creator_info); |
466 | 470 | } |
@@ -1439,7 +1443,9 @@ discard block |
||
1439 | 1443 | global $conf, $langs; |
1440 | 1444 | |
1441 | 1445 | $ltrdirection = 'L'; |
1442 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
1446 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
1447 | + $ltrdirection = 'R'; |
|
1448 | + } |
|
1443 | 1449 | |
1444 | 1450 | // Load traductions files required by page |
1445 | 1451 | $outputlangs->loadLangs(array("main", "propal", "companies", "bills")); |
@@ -908,7 +908,7 @@ discard block |
||
908 | 908 | $pdf->SetXY($this->marge_gauche, $posy); |
909 | 909 | $titre = $outputlangs->transnoentities("DateDeliveryPlanned").':'; |
910 | 910 | $pdf->MultiCell(80, 4, $titre, 0, 'L'); |
911 | - $pdf->SetFont('', '', $default_font_size -$diffsizetitle); |
|
911 | + $pdf->SetFont('', '', $default_font_size - $diffsizetitle); |
|
912 | 912 | $pdf->SetXY($posxval, $posy); |
913 | 913 | $dlp = dol_print_date($object->delivery_date, $displaydate, false, $outputlangs, true); |
914 | 914 | $pdf->MultiCell(80, 4, $dlp, 0, 'L'); |
@@ -1663,7 +1663,7 @@ discard block |
||
1663 | 1663 | |
1664 | 1664 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
1665 | 1665 | |
1666 | - $mode = 'target'; |
|
1666 | + $mode = 'target'; |
|
1667 | 1667 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
1668 | 1668 | |
1669 | 1669 | // Show recipient |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | $h = 0; |
38 | 38 | $head = array(); |
39 | 39 | |
40 | - $withProjectUrl=''; |
|
41 | - if ($with_project>0) { |
|
40 | + $withProjectUrl = ''; |
|
41 | + if ($with_project > 0) { |
|
42 | 42 | $withProjectUrl = "&withproject=1"; |
43 | 43 | } |
44 | 44 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $head[$h][2] = 'conferenceorbooth'; |
132 | 132 | // Enable caching of conf or booth count attendees |
133 | 133 | $nbAttendees = 0; |
134 | - $nbConferenceOrBooth= 0; |
|
134 | + $nbConferenceOrBooth = 0; |
|
135 | 135 | require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
136 | 136 | $cachekey = 'count_conferenceorbooth_project_'.$object->id; |
137 | 137 | $dataretrieved = dol_getcache($cachekey); |
@@ -139,14 +139,14 @@ discard block |
||
139 | 139 | $nbAttendees = $dataretrieved; |
140 | 140 | } else { |
141 | 141 | require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; |
142 | - $conforbooth=new ConferenceOrBooth($db); |
|
142 | + $conforbooth = new ConferenceOrBooth($db); |
|
143 | 143 | $result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id)); |
144 | - if (!is_array($result) && $result<0) { |
|
144 | + if (!is_array($result) && $result < 0) { |
|
145 | 145 | setEventMessages($conforbooth->error, $conforbooth->errors, 'errors'); |
146 | 146 | } else { |
147 | 147 | $nbConferenceOrBooth = count($result); |
148 | 148 | } |
149 | - dol_setcache($cachekey, $nbConferenceOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
149 | + dol_setcache($cachekey, $nbConferenceOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
150 | 150 | } |
151 | 151 | if ($nbConferenceOrBooth > 0) { |
152 | 152 | $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbConferenceOrBooth.'</span>'; |
@@ -165,14 +165,14 @@ discard block |
||
165 | 165 | $nbAttendees = $dataretrieved; |
166 | 166 | } else { |
167 | 167 | require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; |
168 | - $attendees=new ConferenceOrBoothAttendee($db); |
|
168 | + $attendees = new ConferenceOrBoothAttendee($db); |
|
169 | 169 | $result = $attendees->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id)); |
170 | - if (!is_array($result) && $result<0) { |
|
170 | + if (!is_array($result) && $result < 0) { |
|
171 | 171 | setEventMessages($attendees->error, $attendees->errors, 'errors'); |
172 | 172 | } else { |
173 | 173 | $nbAttendees = count($result); |
174 | 174 | } |
175 | - dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
175 | + dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
176 | 176 | } |
177 | 177 | if ($nbAttendees > 0) { |
178 | 178 | $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbAttendees.'</span>'; |
@@ -856,7 +856,9 @@ |
||
856 | 856 | |
857 | 857 | $statusType = 'status'.$status; |
858 | 858 | //if ($status == self::STATUS_DISABLED) $statusType = 'status6'; |
859 | - if ($status == self::STATUS_ENABLED) $statusType = 'status4'; |
|
859 | + if ($status == self::STATUS_ENABLED) { |
|
860 | + $statusType = 'status4'; |
|
861 | + } |
|
860 | 862 | |
861 | 863 | return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); |
862 | 864 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | /** |
98 | 98 | * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
99 | 99 | */ |
100 | - public $fields=array( |
|
100 | + public $fields = array( |
|
101 | 101 | 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), |
102 | 102 | 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>1, 'noteditable'=>'0', 'default'=>'', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"), |
103 | 103 | 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'showoncombobox'=>'2',), |
@@ -110,14 +110,14 @@ discard block |
||
110 | 110 | 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), |
111 | 111 | 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>512, 'notnull'=>-1, 'visible'=>-2,), |
112 | 112 | 'nb_operators_required' => array('type'=>'integer', 'label'=>'NbOperatorsRequired', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1,), |
113 | - 'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMOperatorEstimatedHelp','label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'), |
|
113 | + 'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMOperatorEstimatedHelp', 'label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'), |
|
114 | 114 | 'thm_machine_estimated' => array('type'=>'double', 'help'=>'THMMachineEstimatedHelp', 'label'=>'THMMachineEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'), |
115 | 115 | 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>1, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Disabled', '1'=>'Enabled'),), |
116 | 116 | ); |
117 | 117 | public $rowid; |
118 | 118 | public $ref; |
119 | 119 | public $label; |
120 | - public $type; // HUMAN, MACHINE, ... |
|
120 | + public $type; // HUMAN, MACHINE, ... |
|
121 | 121 | |
122 | 122 | public $date_creation; |
123 | 123 | public $tms; |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | // Usergroups |
457 | 457 | $groups = GETPOST('groups', 'array:int'); |
458 | 458 | WorkstationUserGroup::deleteAllGroupsOfWorkstation($this->id); |
459 | - $this->usergroups=array(); |
|
459 | + $this->usergroups = array(); |
|
460 | 460 | |
461 | 461 | foreach ($groups as $id_group) { |
462 | 462 | $ws_usergroup = new WorkstationUserGroup($this->db); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | // Resources |
470 | 470 | $resources = GETPOST('resources', 'array:int'); |
471 | 471 | WorkstationResource::deleteAllResourcesOfWorkstation($this->id); |
472 | - $this->resources=array(); |
|
472 | + $this->resources = array(); |
|
473 | 473 | if (!empty($resources)) { |
474 | 474 | foreach ($resources as $id_resource) { |
475 | 475 | $ws_resource = new WorkstationResource($this->db); |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $label = $langs->trans("ShowWorkstation"); |
637 | 637 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
638 | 638 | } |
639 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
639 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
640 | 640 | $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; |
641 | 641 | } else { |
642 | 642 | $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function getExample() |
78 | 78 | { |
79 | - return $this->prefix.'0-0501-0001'; // TC0-0501-0001 |
|
79 | + return $this->prefix.'0-0501-0001'; // TC0-0501-0001 |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -92,10 +92,10 @@ discard block |
||
92 | 92 | $pryymm = ''; |
93 | 93 | $max = ''; |
94 | 94 | |
95 | - $pos_source = 0; // POS source = Terminal ID |
|
95 | + $pos_source = 0; // POS source = Terminal ID |
|
96 | 96 | |
97 | 97 | // First, we get the max value |
98 | - $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
98 | + $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
99 | 99 | |
100 | 100 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; |
101 | 101 | $sql .= " FROM ".MAIN_DB_PREFIX."facture"; |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | { |
136 | 136 | global $db; |
137 | 137 | |
138 | - $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
138 | + $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
139 | 139 | |
140 | 140 | // First, we get the max value |
141 | - $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
141 | + $posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM- |
|
142 | 142 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL |
143 | 143 | $sql .= " FROM ".MAIN_DB_PREFIX."facture"; |
144 | 144 | $sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source."-____-%")."'"; |
@@ -105,7 +105,7 @@ |
||
105 | 105 | $match = preg_grep('/('.preg_quote($htmlname, '/').'[0-9]+)/', array_keys($_GET)); |
106 | 106 | sort($match); |
107 | 107 | |
108 | - $id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123 |
|
108 | + $id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123 |
|
109 | 109 | |
110 | 110 | // When used from jQuery, the search term is added as GET param "term". |
111 | 111 | $searchkey = (($id && GETPOST($id, 'alpha')) ? GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ?GETPOST($htmlname, 'alpha') : '')); |
@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // Get parameters |
55 | -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
55 | +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
56 | 56 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
57 | 57 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
58 | 58 | $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |