@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | // Includes |
36 | -require_once DOL_DOCUMENT_ROOT . '/admin/tools/ui/class/documentation.class.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/admin/tools/ui/class/documentation.class.php'; |
|
37 | 37 | |
38 | 38 | // Load documentation translations |
39 | 39 | $langs->load('uxdocumentation'); |
@@ -46,14 +46,14 @@ discard block |
||
46 | 46 | |
47 | 47 | // Set view for menu and breadcrumb |
48 | 48 | // Menu must be set in constructor of documentation class |
49 | -$documentation->view = array('Components','Icons'); |
|
49 | +$documentation->view = array('Components', 'Icons'); |
|
50 | 50 | $form = new Form($db); |
51 | 51 | |
52 | -$mode=GETPOST('mode'); // ex : no-btn |
|
53 | -$displayMode = GETPOST('displayMode') == 'kanban' ? 'kanban' : 'icon-only'; |
|
52 | +$mode = GETPOST('mode'); // ex : no-btn |
|
53 | +$displayMode = GETPOST('displayMode') == 'kanban' ? 'kanban' : 'icon-only'; |
|
54 | 54 | $revertDisplayMode = $displayMode == 'kanban' ? 'icon-only' : 'kanban'; |
55 | 55 | $revertDisplayName = $displayMode == 'kanban' ? $langs->trans('ViewList') : $langs->trans('ViewKanban'); |
56 | -$switchDisplayLink = dol_buildpath($documentation->baseUrl . '/components/icons.php', 1) . '?displayMode=' . $revertDisplayMode; |
|
56 | +$switchDisplayLink = dol_buildpath($documentation->baseUrl.'/components/icons.php', 1).'?displayMode='.$revertDisplayMode; |
|
57 | 57 | $switchDisplayLinkIcon = $displayMode == 'kanban' ? 'fa fa-th' : 'fa fa-th-list'; |
58 | 58 | |
59 | 59 | // Output sidebar |
@@ -85,16 +85,16 @@ discard block |
||
85 | 85 | <?php |
86 | 86 | |
87 | 87 | $iconFileName = 'shims.json'; |
88 | - $iconFilePath = DOL_DOCUMENT_ROOT . '/theme/common/fontawesome-5/metadata'; |
|
88 | + $iconFilePath = DOL_DOCUMENT_ROOT.'/theme/common/fontawesome-5/metadata'; |
|
89 | 89 | |
90 | - $fontAwesomeIconRaw = file_get_contents($iconFilePath. '/' .$iconFileName); |
|
90 | + $fontAwesomeIconRaw = file_get_contents($iconFilePath.'/'.$iconFileName); |
|
91 | 91 | if ($fontAwesomeIconRaw === false) { |
92 | - dol_print_error($db, 'Error missing file '. $iconFilePath . '/' . $iconFileName); |
|
92 | + dol_print_error($db, 'Error missing file '.$iconFilePath.'/'.$iconFileName); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $fontAwesomeIcons = json_decode($fontAwesomeIconRaw); |
96 | 96 | if ($fontAwesomeIcons === null) { |
97 | - dol_print_error($db, 'Error decoding '. $iconFilePath . '/' . $iconFileName); |
|
97 | + dol_print_error($db, 'Error decoding '.$iconFilePath.'/'.$iconFileName); |
|
98 | 98 | } |
99 | 99 | ?> |
100 | 100 | |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | $labelAlt = 'Text on title tag for tooltip'; |
129 | 129 | |
130 | 130 | if ($displayMode == 'kanban') { |
131 | - $iconCode = img_picto($iconName, $iconName); |
|
131 | + $iconCode = img_picto($iconName, $iconName); |
|
132 | 132 | print '<div class="info-box "> |
133 | 133 | <span class="info-box-icon bg-infobox-expensereport"> |
134 | 134 | '.$iconCode.' |
135 | 135 | </span> |
136 | 136 | <div class="info-box-content"> |
137 | - <div class="info-box-title" >'. $iconName .'</div> |
|
137 | + <div class="info-box-title" >'. $iconName.'</div> |
|
138 | 138 | <div class="info-box-lines"> |
139 | 139 | <div class="info-box-line spanoverflow nowrap"> |
140 | 140 | <div class="inline-block nowraponall"> |
@@ -167,16 +167,16 @@ discard block |
||
167 | 167 | <?php |
168 | 168 | |
169 | 169 | $iconFileName = 'shims.json'; |
170 | - $iconFilePath = DOL_DOCUMENT_ROOT . '/theme/common/fontawesome-5/metadata'; |
|
170 | + $iconFilePath = DOL_DOCUMENT_ROOT.'/theme/common/fontawesome-5/metadata'; |
|
171 | 171 | |
172 | - $fontAwesomeIconRaw = file_get_contents($iconFilePath. '/' .$iconFileName); |
|
172 | + $fontAwesomeIconRaw = file_get_contents($iconFilePath.'/'.$iconFileName); |
|
173 | 173 | if ($fontAwesomeIconRaw === false) { |
174 | - dol_print_error($db, 'Error missing file '. $iconFilePath . '/' . $iconFileName); |
|
174 | + dol_print_error($db, 'Error missing file '.$iconFilePath.'/'.$iconFileName); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | $fontAwesomeIcons = json_decode($fontAwesomeIconRaw); |
178 | 178 | if ($fontAwesomeIcons === null) { |
179 | - dol_print_error($db, 'Error decoding '. $iconFilePath . '/' . $iconFileName); |
|
179 | + dol_print_error($db, 'Error decoding '.$iconFilePath.'/'.$iconFileName); |
|
180 | 180 | } |
181 | 181 | ?> |
182 | 182 | |
@@ -206,11 +206,11 @@ discard block |
||
206 | 206 | $alreadyDisplay = []; |
207 | 207 | if ($fontAwesomeIcons && is_array($fontAwesomeIcons)) { |
208 | 208 | foreach ($fontAwesomeIcons as $iconData) { |
209 | - $class= $iconData[1]??'fa'; |
|
209 | + $class = $iconData[1] ?? 'fa'; |
|
210 | 210 | if (!empty($iconData[2])) { |
211 | - $class.= ' fa-'.$iconData[2]; |
|
211 | + $class .= ' fa-'.$iconData[2]; |
|
212 | 212 | } else { |
213 | - $class.= ' fa-'.$iconData[0]; |
|
213 | + $class .= ' fa-'.$iconData[0]; |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | if (in_array($class, $alreadyDisplay)) { |
@@ -218,19 +218,19 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | $alreadyDisplay[] = $class; |
221 | - $iconCode = '<span class="'.$class.'" ></span>'; |
|
221 | + $iconCode = '<span class="'.$class.'" ></span>'; |
|
222 | 222 | |
223 | 223 | if ($displayMode == 'kanban') { |
224 | 224 | print '<div class="info-box "> |
225 | 225 | <span class="info-box-icon bg-infobox-expensereport"> |
226 | - ' . $iconCode . ' |
|
226 | + ' . $iconCode.' |
|
227 | 227 | </span> |
228 | 228 | <div class="info-box-content"> |
229 | - <div class="info-box-title" >' . ($iconData[2] ?? ($iconData[0] ?? '')) . '</div> |
|
229 | + <div class="info-box-title" >' . ($iconData[2] ?? ($iconData[0] ?? '')).'</div> |
|
230 | 230 | <div class="info-box-lines"> |
231 | 231 | <div class="info-box-line spanoverflow nowrap"> |
232 | 232 | <div class="inline-block nowraponall"> |
233 | - <div class="documentation-code"><pre>' . dol_htmlentities($iconCode) . '</pre></div> |
|
233 | + <div class="documentation-code"><pre>' . dol_htmlentities($iconCode).'</pre></div> |
|
234 | 234 | </div> |
235 | 235 | </div> |
236 | 236 | </div><!-- /.info-box-lines --> |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0); |
145 | 145 | $result = $object->cancel($user, 0, (bool) $also_cancel_consumed_and_produced_lines); |
146 | 146 | if ($result > 0) { |
147 | - header("Location: " . DOL_URL_ROOT.'/mrp/mo_card.php?id=' . $object->id); |
|
147 | + header("Location: ".DOL_URL_ROOT.'/mrp/mo_card.php?id='.$object->id); |
|
148 | 148 | exit; |
149 | 149 | } else { |
150 | 150 | $action = ''; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0); |
155 | 155 | $result = $object->delete($user, 0, (bool) $also_cancel_consumed_and_produced_lines); |
156 | 156 | if ($result > 0) { |
157 | - header("Location: " . $backurlforlist); |
|
157 | + header("Location: ".$backurlforlist); |
|
158 | 158 | exit; |
159 | 159 | } else { |
160 | 160 | $action = ''; |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | 'value' => !getDolGlobalString('MO_ALSO_CANCEL_CONSUMED_AND_PRODUCED_LINES_BY_DEFAULT') ? 0 : 1 |
638 | 638 | ), |
639 | 639 | ); |
640 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CancelMo'), $langs->trans('ConfirmCancelMo'), 'confirm_cancel', $formquestion, 0, 1); |
|
640 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CancelMo'), $langs->trans('ConfirmCancelMo'), 'confirm_cancel', $formquestion, 0, 1); |
|
641 | 641 | } |
642 | 642 | |
643 | 643 | // Call Hook formConfirm |
@@ -1001,7 +1001,7 @@ discard block |
||
1001 | 1001 | |
1002 | 1002 | // Lines to consume |
1003 | 1003 | |
1004 | - $bomcostupdated = 0; // We will recalculate the unitary cost to produce a product using the real "products to consume into MO" |
|
1004 | + $bomcostupdated = 0; // We will recalculate the unitary cost to produce a product using the real "products to consume into MO" |
|
1005 | 1005 | |
1006 | 1006 | if (!empty($object->lines)) { |
1007 | 1007 | $nblinetoconsume = 0; |
@@ -1048,15 +1048,15 @@ discard block |
||
1048 | 1048 | } |
1049 | 1049 | |
1050 | 1050 | if ($qtyhourservice && $qtyhourforline) { |
1051 | - $linecost = price2num(($qtyhourforline / $qtyhourservice * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
1052 | - $bomcostupdated += price2num(($qtyhourforline / $qtyhourservice * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
1051 | + $linecost = price2num(($qtyhourforline / $qtyhourservice * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
1052 | + $bomcostupdated += price2num(($qtyhourforline / $qtyhourservice * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
1053 | 1053 | } else { |
1054 | - $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
1055 | - $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
1054 | + $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
1055 | + $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
1056 | 1056 | } |
1057 | 1057 | } else { |
1058 | - $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
1059 | - $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
1058 | + $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
1059 | + $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
1060 | 1060 | } |
1061 | 1061 | } |
1062 | 1062 | |
@@ -1077,23 +1077,23 @@ discard block |
||
1077 | 1077 | $alreadyconsumed += $line2['qty']; |
1078 | 1078 | } |
1079 | 1079 | } |
1080 | - $suffix = '_' . $line->id; |
|
1081 | - print '<!-- Line to dispatch ' . $suffix . ' (line edited) -->' . "\n"; |
|
1080 | + $suffix = '_'.$line->id; |
|
1081 | + print '<!-- Line to dispatch '.$suffix.' (line edited) -->'."\n"; |
|
1082 | 1082 | // hidden fields for js function |
1083 | - print '<input id="qty_ordered' . $suffix . '" type="hidden" value="' . $line->qty . '">'; |
|
1083 | + print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$line->qty.'">'; |
|
1084 | 1084 | // Duration - Time spent |
1085 | - print '<input id="qty_dispatched' . $suffix . '" type="hidden" value="' . $alreadyconsumed . '">'; |
|
1085 | + print '<input id="qty_dispatched'.$suffix.'" type="hidden" value="'.$alreadyconsumed.'">'; |
|
1086 | 1086 | print '<tr>'; |
1087 | - print '<input name="lineid" type="hidden" value="' . $line->id . '">'; |
|
1087 | + print '<input name="lineid" type="hidden" value="'.$line->id.'">'; |
|
1088 | 1088 | |
1089 | 1089 | // Product |
1090 | - print '<td>' . $tmpproduct->getNomUrl(1); |
|
1091 | - print '<br><div class="opacitymedium small tdoverflowmax150" title="' . dol_escape_htmltag($tmpproduct->label) . '">' . $tmpproduct->label . '</span>'; |
|
1090 | + print '<td>'.$tmpproduct->getNomUrl(1); |
|
1091 | + print '<br><div class="opacitymedium small tdoverflowmax150" title="'.dol_escape_htmltag($tmpproduct->label).'">'.$tmpproduct->label.'</span>'; |
|
1092 | 1092 | print '</td>'; |
1093 | 1093 | |
1094 | 1094 | // Qty |
1095 | 1095 | print '<td class="right nowraponall">'; |
1096 | - print '<input class="width40 right" name="qty_lineProduce" value="'. $line->qty.'">'; |
|
1096 | + print '<input class="width40 right" name="qty_lineProduce" value="'.$line->qty.'">'; |
|
1097 | 1097 | print '</td>'; |
1098 | 1098 | |
1099 | 1099 | // Unit |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | |
1112 | 1112 | // Qty consumed |
1113 | 1113 | print '<td class="right">'; |
1114 | - print ' ' . price2num($alreadyconsumed, 'MS'); |
|
1114 | + print ' '.price2num($alreadyconsumed, 'MS'); |
|
1115 | 1115 | print '</td>'; |
1116 | 1116 | |
1117 | 1117 | // Warehouse / Workstation |
@@ -1130,7 +1130,7 @@ discard block |
||
1130 | 1130 | if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { |
1131 | 1131 | print img_warning($langs->trans('StockTooLow')).' '; |
1132 | 1132 | } |
1133 | - print '<span class="left">'. $tmpproduct->stock_reel .' </span>'; |
|
1133 | + print '<span class="left">'.$tmpproduct->stock_reel.' </span>'; |
|
1134 | 1134 | } |
1135 | 1135 | print '</td>'; |
1136 | 1136 | } |
@@ -1141,8 +1141,8 @@ discard block |
||
1141 | 1141 | } |
1142 | 1142 | // Split + SplitAll + Edit line + Delete |
1143 | 1143 | print '<td colspan="'.(3 + ($object->status == Mo::STATUS_DRAFT ? 1 : 0) + ($permissiontodelete ? 1 : 0)).'">'; |
1144 | - print '<input type="submit" class="button buttongen button-add small nominwidth" name="save" value="' . $langs->trans("Save") . '">'; |
|
1145 | - print '<input type="submit" class="button buttongen button-cancel small nominwidth" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
1144 | + print '<input type="submit" class="button buttongen button-add small nominwidth" name="save" value="'.$langs->trans("Save").'">'; |
|
1145 | + print '<input type="submit" class="button buttongen button-cancel small nominwidth" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
1146 | 1146 | print '</td>'; |
1147 | 1147 | |
1148 | 1148 | print '</tr>'; |
@@ -1159,29 +1159,29 @@ discard block |
||
1159 | 1159 | } |
1160 | 1160 | } |
1161 | 1161 | } else { |
1162 | - $suffix = '_' . $line->id; |
|
1163 | - print '<!-- Line to dispatch ' . $suffix . ' -->' . "\n"; |
|
1162 | + $suffix = '_'.$line->id; |
|
1163 | + print '<!-- Line to dispatch '.$suffix.' -->'."\n"; |
|
1164 | 1164 | // hidden fields for js function |
1165 | - print '<input id="qty_ordered' . $suffix . '" type="hidden" value="' . $line->qty . '">'; |
|
1166 | - print '<input id="qty_dispatched' . $suffix . '" type="hidden" value="' . $alreadyconsumed . '">'; |
|
1165 | + print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$line->qty.'">'; |
|
1166 | + print '<input id="qty_dispatched'.$suffix.'" type="hidden" value="'.$alreadyconsumed.'">'; |
|
1167 | 1167 | |
1168 | - print '<tr data-line-id="' . $line->id . '">'; |
|
1168 | + print '<tr data-line-id="'.$line->id.'">'; |
|
1169 | 1169 | |
1170 | 1170 | // Product |
1171 | - print '<td>' . $tmpproduct->getNomUrl(1); |
|
1172 | - print '<br><div class="opacitymedium small tdoverflowmax150" title="' . dol_escape_htmltag($tmpproduct->label) . '">' . $tmpproduct->label . '</div>'; |
|
1171 | + print '<td>'.$tmpproduct->getNomUrl(1); |
|
1172 | + print '<br><div class="opacitymedium small tdoverflowmax150" title="'.dol_escape_htmltag($tmpproduct->label).'">'.$tmpproduct->label.'</div>'; |
|
1173 | 1173 | print '</td>'; |
1174 | 1174 | |
1175 | 1175 | // Qty |
1176 | 1176 | print '<td class="right nowraponall">'; |
1177 | 1177 | $help = ''; |
1178 | 1178 | if ($line->qty_frozen) { |
1179 | - $help = ($help ? '<br>' : '') . '<strong>' . $langs->trans("QuantityFrozen") . '</strong>: ' . yn(1) . ' (' . $langs->trans("QuantityConsumedInvariable") . ')'; |
|
1180 | - print $form->textwithpicto('', $help, -1, 'lock') . ' '; |
|
1179 | + $help = ($help ? '<br>' : '').'<strong>'.$langs->trans("QuantityFrozen").'</strong>: '.yn(1).' ('.$langs->trans("QuantityConsumedInvariable").')'; |
|
1180 | + print $form->textwithpicto('', $help, -1, 'lock').' '; |
|
1181 | 1181 | } |
1182 | 1182 | if ($line->disable_stock_change) { |
1183 | - $help = ($help ? '<br>' : '') . '<strong>' . $langs->trans("DisableStockChange") . '</strong>: ' . yn(1) . ' (' . (($tmpproduct->type == Product::TYPE_SERVICE && !getDolGlobalString('STOCK_SUPPORTS_SERVICES')) ? $langs->trans("NoStockChangeOnServices") : $langs->trans("DisableStockChangeHelp")) . ')'; |
|
1184 | - print $form->textwithpicto('', $help, -1, 'help') . ' '; |
|
1183 | + $help = ($help ? '<br>' : '').'<strong>'.$langs->trans("DisableStockChange").'</strong>: '.yn(1).' ('.(($tmpproduct->type == Product::TYPE_SERVICE && !getDolGlobalString('STOCK_SUPPORTS_SERVICES')) ? $langs->trans("NoStockChangeOnServices") : $langs->trans("DisableStockChangeHelp")).')'; |
|
1184 | + print $form->textwithpicto('', $help, -1, 'help').' '; |
|
1185 | 1185 | } |
1186 | 1186 | print price2num($line->qty, 'MS'); |
1187 | 1187 | print '</td>'; |
@@ -1206,9 +1206,9 @@ discard block |
||
1206 | 1206 | if ($alreadyconsumed) { |
1207 | 1207 | print '<script>'; |
1208 | 1208 | print 'jQuery(document).ready(function() { |
1209 | - jQuery("#expandtoproduce' . $line->id . '").click(function() { |
|
1210 | - console.log("Expand mrp_production line ' . $line->id . '"); |
|
1211 | - jQuery(".expanddetail' . $line->id . '").toggle();'; |
|
1209 | + jQuery("#expandtoproduce' . $line->id.'").click(function() { |
|
1210 | + console.log("Expand mrp_production line ' . $line->id.'"); |
|
1211 | + jQuery(".expanddetail' . $line->id.'").toggle();'; |
|
1212 | 1212 | if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line |
1213 | 1213 | print 'if (jQuery("#tablelines").hasClass("nobottom")) { jQuery("#tablelines").removeClass("nobottom"); } else { jQuery("#tablelines").addClass("nobottom"); }'; |
1214 | 1214 | } |
@@ -1217,9 +1217,9 @@ discard block |
||
1217 | 1217 | });'; |
1218 | 1218 | print '</script>'; |
1219 | 1219 | if (empty($conf->use_javascript_ajax)) { |
1220 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?collapse=' . $collapse . ',' . $line->id . '">'; |
|
1220 | + print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">'; |
|
1221 | 1221 | } |
1222 | - print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce' . $line->id . '"'); |
|
1222 | + print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"'); |
|
1223 | 1223 | if (empty($conf->use_javascript_ajax)) { |
1224 | 1224 | print '</a>'; |
1225 | 1225 | } |
@@ -1228,7 +1228,7 @@ discard block |
||
1228 | 1228 | print '<script>jQuery("#tablelines").removeClass("nobottom");</script>'; |
1229 | 1229 | } |
1230 | 1230 | } |
1231 | - print ' ' . price2num($alreadyconsumed, 'MS'); |
|
1231 | + print ' '.price2num($alreadyconsumed, 'MS'); |
|
1232 | 1232 | print '</td>'; |
1233 | 1233 | |
1234 | 1234 | // Warehouse and/or workstation |
@@ -1236,7 +1236,7 @@ discard block |
||
1236 | 1236 | if ($tmpproduct->isStockManaged()) { |
1237 | 1237 | // When STOCK_CONSUMPTION_FROM_MANUFACTURING_WAREHOUSE is set, we always use the warehouse of the MO, the same than production. |
1238 | 1238 | if (getDolGlobalString('STOCK_CONSUMPTION_FROM_MANUFACTURING_WAREHOUSE') && $tmpwarehouse->id > 0) { |
1239 | - print img_picto('', $tmpwarehouse->picto) . " " . $tmpwarehouse->label; |
|
1239 | + print img_picto('', $tmpwarehouse->picto)." ".$tmpwarehouse->label; |
|
1240 | 1240 | } else { |
1241 | 1241 | if ($line->fk_warehouse > 0) { |
1242 | 1242 | $warehouseline = new Entrepot($db); |
@@ -1257,7 +1257,7 @@ discard block |
||
1257 | 1257 | print '<td class="nowraponall right">'; |
1258 | 1258 | if (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') && $tmpproduct->type != Product::TYPE_SERVICE) { |
1259 | 1259 | if (!$line->disable_stock_change && $tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { |
1260 | - print img_warning($langs->trans('StockTooLow')) . ' '; |
|
1260 | + print img_warning($langs->trans('StockTooLow')).' '; |
|
1261 | 1261 | } |
1262 | 1262 | if (!getDolGlobalString('STOCK_CONSUMPTION_FROM_MANUFACTURING_WAREHOUSE') || empty($tmpwarehouse->id)) { |
1263 | 1263 | print price2num($tmpproduct->stock_reel, 'MS'); // Available |
@@ -1288,9 +1288,9 @@ discard block |
||
1288 | 1288 | |
1289 | 1289 | // Action Edit line |
1290 | 1290 | if ($object->status == Mo::STATUS_DRAFT) { |
1291 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=editline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1291 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=editline&token='.newToken().'&lineid='.((int) $line->id); |
|
1292 | 1292 | print '<td class="center">'; |
1293 | - print '<a class="reposition editfielda" href="' . $href . '">'; |
|
1293 | + print '<a class="reposition editfielda" href="'.$href.'">'; |
|
1294 | 1294 | print img_picto($langs->trans('TooltipEditAndRevertStockMovement'), 'edit'); |
1295 | 1295 | print '</a>'; |
1296 | 1296 | print '</td>'; |
@@ -1298,9 +1298,9 @@ discard block |
||
1298 | 1298 | |
1299 | 1299 | // Action delete line |
1300 | 1300 | if ($permissiontodelete) { |
1301 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=deleteline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1301 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=deleteline&token='.newToken().'&lineid='.((int) $line->id); |
|
1302 | 1302 | print '<td class="center">'; |
1303 | - print '<a class="reposition" href="' . $href . '">'; |
|
1303 | + print '<a class="reposition" href="'.$href.'">'; |
|
1304 | 1304 | print img_picto($langs->trans('TooltipDeleteAndRevertStockMovement'), 'delete'); |
1305 | 1305 | print '</a>'; |
1306 | 1306 | print '</td>'; |
@@ -1379,9 +1379,9 @@ discard block |
||
1379 | 1379 | |
1380 | 1380 | // Action Edit line |
1381 | 1381 | if ($object->status == Mo::STATUS_DRAFT) { |
1382 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=editline&token=' . newToken() . '&lineid=' . ((int) $line2['rowid']); |
|
1382 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=editline&token='.newToken().'&lineid='.((int) $line2['rowid']); |
|
1383 | 1383 | print '<td class="center">'; |
1384 | - print '<a class="reposition" href="' . $href . '">'; |
|
1384 | + print '<a class="reposition" href="'.$href.'">'; |
|
1385 | 1385 | print img_picto($langs->trans('TooltipEditAndRevertStockMovement'), 'edit'); |
1386 | 1386 | print '</a>'; |
1387 | 1387 | print '</td>'; |
@@ -1423,10 +1423,10 @@ discard block |
||
1423 | 1423 | // Qty |
1424 | 1424 | print '<td class="right">'; |
1425 | 1425 | if ((int) $tmpproduct->stockable_product > 0) { |
1426 | - print '<input type="text" class="width50 right" id="qtytoconsume-' . $line->id . '-' . $i . '" name="qty-' . $line->id . '-' . $i . '" value="' . $preselected . '" ' . $disable . '>'; |
|
1426 | + print '<input type="text" class="width50 right" id="qtytoconsume-'.$line->id.'-'.$i.'" name="qty-'.$line->id.'-'.$i.'" value="'.$preselected.'" '.$disable.'>'; |
|
1427 | 1427 | } else { |
1428 | - print '<input type="hidden" id="qtytoconsume-' . $line->id . '-' . $i . '" name="qty-' . $line->id . '-' . $i . '" value="0">'; |
|
1429 | - print '<span class="opacitymedium">' . $langs->trans("StockDisabled") . '</span>'; |
|
1428 | + print '<input type="hidden" id="qtytoconsume-'.$line->id.'-'.$i.'" name="qty-'.$line->id.'-'.$i.'" value="0">'; |
|
1429 | + print '<span class="opacitymedium">'.$langs->trans("StockDisabled").'</span>'; |
|
1430 | 1430 | } |
1431 | 1431 | print '</td>'; |
1432 | 1432 | |
@@ -1453,9 +1453,9 @@ discard block |
||
1453 | 1453 | } |
1454 | 1454 | } else { |
1455 | 1455 | if ((int) $tmpproduct->stockable_product > 0) { |
1456 | - print '<span class="opacitymedium">' . $langs->trans("StockDisabled") . '</span>'; |
|
1456 | + print '<span class="opacitymedium">'.$langs->trans("StockDisabled").'</span>'; |
|
1457 | 1457 | } else { |
1458 | - print '<span class="opacitymedium">' . $langs->trans("NoStockChangeOnServices") . '</span>'; |
|
1458 | + print '<span class="opacitymedium">'.$langs->trans("NoStockChangeOnServices").'</span>'; |
|
1459 | 1459 | } |
1460 | 1460 | } |
1461 | 1461 | print '</td>'; |
@@ -1952,7 +1952,7 @@ discard block |
||
1952 | 1952 | |
1953 | 1953 | $.ajax({ |
1954 | 1954 | type: "POST", |
1955 | - url: "<?php echo DOL_URL_ROOT . '/mrp/ajax/interface.php'; ?>", |
|
1955 | + url: "<?php echo DOL_URL_ROOT.'/mrp/ajax/interface.php'; ?>", |
|
1956 | 1956 | data: { |
1957 | 1957 | action: "updateselectbatchbywarehouse", |
1958 | 1958 | permissiontoproduce: <?php echo $permissiontoproduce ?>, |
@@ -2013,7 +2013,7 @@ discard block |
||
2013 | 2013 | |
2014 | 2014 | $.ajax({ |
2015 | 2015 | type: "POST", |
2016 | - url: "<?php echo DOL_URL_ROOT . '/mrp/ajax/interface.php'; ?>", |
|
2016 | + url: "<?php echo DOL_URL_ROOT.'/mrp/ajax/interface.php'; ?>", |
|
2017 | 2017 | data: { |
2018 | 2018 | action: "updateselectwarehousebybatch", |
2019 | 2019 | permissiontoproduce: <?php echo $permissiontoproduce ?>, |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $formbarcode = null; |
109 | 109 | |
110 | 110 | // Get parameters |
111 | -$id = GETPOSTINT('id'); |
|
111 | +$id = GETPOSTINT('id'); |
|
112 | 112 | if (getDolGlobalString('MAIN_SECURITY_ALLOW_UNSECURED_REF_LABELS')) { |
113 | 113 | $ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'nohtml') : null); |
114 | 114 | } else { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $backtopage = GETPOST('backtopage', 'alpha'); |
121 | 121 | $confirm = GETPOST('confirm', 'alpha'); |
122 | 122 | $socid = GETPOSTINT('socid'); |
123 | -$duration_value = GETPOST('duration_value'); // duration value can be an empty string |
|
123 | +$duration_value = GETPOST('duration_value'); // duration value can be an empty string |
|
124 | 124 | $duration_unit = GETPOST('duration_unit', 'alpha'); |
125 | 125 | |
126 | 126 | $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | |
496 | 496 | // Quick edit for extrafields |
497 | 497 | if ($action == 'update_extras' && $permissiontoeditextra) { |
498 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
498 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
499 | 499 | |
500 | 500 | $attribute_name = GETPOST('attribute', 'aZ09'); |
501 | 501 | |
@@ -549,11 +549,11 @@ discard block |
||
549 | 549 | if (!$error) { |
550 | 550 | $units = GETPOSTINT('units'); |
551 | 551 | |
552 | - $object->entity = $conf->entity; |
|
553 | - $object->ref = (string) $ref; |
|
554 | - $object->label = GETPOST('label', $label_security_check); |
|
555 | - $object->price_base_type = GETPOST('price_base_type', 'aZ09'); |
|
556 | - $object->mandatory_period = empty(GETPOST("mandatoryperiod", 'alpha')) ? 0 : 1; |
|
552 | + $object->entity = $conf->entity; |
|
553 | + $object->ref = (string) $ref; |
|
554 | + $object->label = GETPOST('label', $label_security_check); |
|
555 | + $object->price_base_type = GETPOST('price_base_type', 'aZ09'); |
|
556 | + $object->mandatory_period = empty(GETPOST("mandatoryperiod", 'alpha')) ? 0 : 1; |
|
557 | 557 | if ($object->price_base_type == 'TTC') { |
558 | 558 | $object->price_ttc = GETPOSTFLOAT('price'); |
559 | 559 | } else { |
@@ -641,12 +641,12 @@ discard block |
||
641 | 641 | $object->duration_value = $duration_value; |
642 | 642 | $object->duration_unit = $duration_unit; |
643 | 643 | $object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse'); |
644 | - $object->fk_default_workstation = GETPOSTINT('fk_default_workstation'); |
|
644 | + $object->fk_default_workstation = GETPOSTINT('fk_default_workstation'); |
|
645 | 645 | $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte') ? GETPOST('seuil_stock_alerte') : 0; |
646 | 646 | $object->desiredstock = GETPOST('desiredstock') ? GETPOST('desiredstock') : 0; |
647 | 647 | $object->canvas = GETPOST('canvas'); |
648 | 648 | $object->net_measure = GETPOST('net_measure'); |
649 | - $object->net_measure_units = GETPOST('net_measure_units') === '' ? null : GETPOSTINT('net_measure_units'); // This is not the fk_unit but the power of unit |
|
649 | + $object->net_measure_units = GETPOST('net_measure_units') === '' ? null : GETPOSTINT('net_measure_units'); // This is not the fk_unit but the power of unit |
|
650 | 650 | $object->weight = GETPOST('weight'); |
651 | 651 | $object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit |
652 | 652 | $object->length = GETPOST('size'); |
@@ -789,10 +789,10 @@ discard block |
||
789 | 789 | } else { |
790 | 790 | if ($object->id > 0) { |
791 | 791 | // Need dol_clone methode 1 (same object class) because update product use hasbatch() method on oldcopy |
792 | - $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
792 | + $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
793 | 793 | |
794 | 794 | if (!getDolGlobalString('PRODUCT_GENERATE_REF_AFTER_FORM')) { |
795 | - $object->ref = (string) $ref; |
|
795 | + $object->ref = (string) $ref; |
|
796 | 796 | } |
797 | 797 | $object->label = GETPOST('label', $label_security_check); |
798 | 798 | |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | $object->status_batch = GETPOSTINT('status_batch'); |
815 | 815 | $object->sell_or_eat_by_mandatory = GETPOSTINT('sell_or_eat_by_mandatory'); |
816 | 816 | $object->batch_mask = GETPOST('batch_mask', 'alpha'); |
817 | - $object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse'); |
|
817 | + $object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse'); |
|
818 | 818 | $object->fk_default_workstation = GETPOSTINT('fk_default_workstation'); |
819 | 819 | // removed from update view so GETPOST always empty |
820 | 820 | /* |
@@ -854,8 +854,8 @@ discard block |
||
854 | 854 | } |
855 | 855 | |
856 | 856 | // managed_in_stock |
857 | - $object->stockable_product = (int) GETPOSTISSET('stockable_product'); |
|
858 | - if ($object->status_batch > 0 && $object->stockable_product == 0 && isModEnabled('stock') && isModEnabled('productbatch')) { |
|
857 | + $object->stockable_product = (int) GETPOSTISSET('stockable_product'); |
|
858 | + if ($object->status_batch > 0 && $object->stockable_product == 0 && isModEnabled('stock') && isModEnabled('productbatch')) { |
|
859 | 859 | $object->stockable_product = 1; |
860 | 860 | setEventMessages($langs->trans('ForceBatchesNeedStockManagement'), null, 'warnings'); |
861 | 861 | } |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | $object->accountancy_code_buy_export = $accountancy_code_buy_export; |
922 | 922 | } |
923 | 923 | if ($object->isService()) { |
924 | - $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0 ; |
|
924 | + $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0; |
|
925 | 925 | } |
926 | 926 | |
927 | 927 | |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | $action = ""; |
1056 | 1056 | |
1057 | 1057 | $mesg = $langs->trans("ErrorProductAlreadyExists", $clone->ref); |
1058 | - $mesg .= ' <a href="' . $_SERVER["PHP_SELF"] . '?ref=' . $clone->ref . '">' . $langs->trans("ShowCardHere") . '</a>.'; |
|
1058 | + $mesg .= ' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$clone->ref.'">'.$langs->trans("ShowCardHere").'</a>.'; |
|
1059 | 1059 | setEventMessages($mesg, null, 'errors'); |
1060 | 1060 | } else { |
1061 | 1061 | setEventMessages(empty($clone->error) ? '' : $langs->trans($clone->error), $clone->errors, 'errors'); |
@@ -1070,7 +1070,7 @@ discard block |
||
1070 | 1070 | } else { |
1071 | 1071 | $db->commit(); |
1072 | 1072 | $db->close(); |
1073 | - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); |
|
1073 | + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); |
|
1074 | 1074 | exit; |
1075 | 1075 | } |
1076 | 1076 | } else { |
@@ -2263,9 +2263,9 @@ discard block |
||
2263 | 2263 | if (isModEnabled('productbatch') && $object->hasbatch()) { |
2264 | 2264 | print '<tr><td><input type="hidden" id="stockable_product" name="stockable_product" value="on" /></td><td></td></tr>'; |
2265 | 2265 | } else { |
2266 | - print '<tr><td><label for="stockable_product">' . $langs->trans("StockableProduct") . '</label></td>'; |
|
2266 | + print '<tr><td><label for="stockable_product">'.$langs->trans("StockableProduct").'</label></td>'; |
|
2267 | 2267 | $checked = empty($object->stockable_product) ? "" : "checked"; |
2268 | - print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '. $checked . ' /></td></tr>'; |
|
2268 | + print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '.$checked.' /></td></tr>'; |
|
2269 | 2269 | } |
2270 | 2270 | |
2271 | 2271 | // Default warehouse |
@@ -2325,9 +2325,9 @@ discard block |
||
2325 | 2325 | print '</td></tr>'; |
2326 | 2326 | |
2327 | 2327 | if (isModEnabled('stock') && getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
2328 | - print '<tr><td>' . $langs->trans("StockableProduct") . '</td>'; |
|
2328 | + print '<tr><td>'.$langs->trans("StockableProduct").'</td>'; |
|
2329 | 2329 | $checked = $object->stockable_product == 1 ? "checked" : ""; |
2330 | - print '<td><input type="checkbox" id="stockable_product" name="stockable_product" ' . $checked . ' /></td></tr>'; |
|
2330 | + print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '.$checked.' /></td></tr>'; |
|
2331 | 2331 | } |
2332 | 2332 | } else { |
2333 | 2333 | if (!getDolGlobalString('PRODUCT_DISABLE_NATURE')) { |
@@ -2794,7 +2794,7 @@ discard block |
||
2794 | 2794 | |
2795 | 2795 | // Stockable product / default warehouse |
2796 | 2796 | if (($object->isProduct() || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) { |
2797 | - print '<tr><td>' . $form->textwithpicto($langs->trans("StockableProduct"), $langs->trans('StockableProductDescription')) . '</td>'; |
|
2797 | + print '<tr><td>'.$form->textwithpicto($langs->trans("StockableProduct"), $langs->trans('StockableProductDescription')).'</td>'; |
|
2798 | 2798 | print '<td><input type="checkbox" readonly disabled '.($object->stockable_product == 1 ? 'checked' : '').'></td></tr>'; |
2799 | 2799 | |
2800 | 2800 | if ($object->isStockManaged()) { |
@@ -2851,7 +2851,7 @@ discard block |
||
2851 | 2851 | $result = $measuringUnits->fetchAll('', 'scale', 0, 0, ['t.active' => 1, 't.unit_type' => 'time']); |
2852 | 2852 | if ($result !== -1) { |
2853 | 2853 | foreach ($measuringUnits->records as $record) { |
2854 | - $durations[$record->short_label] = dol_ucfirst($record->label) . $plural; |
|
2854 | + $durations[$record->short_label] = dol_ucfirst($record->label).$plural; |
|
2855 | 2855 | } |
2856 | 2856 | } |
2857 | 2857 | print '<tr><td class="titlefieldmiddle">'.$langs->trans("Duration").'</td><td>'; |
@@ -3092,7 +3092,7 @@ discard block |
||
3092 | 3092 | } |
3093 | 3093 | |
3094 | 3094 | //Send |
3095 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle'); |
|
3095 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); |
|
3096 | 3096 | |
3097 | 3097 | if (!isset($hookmanager->resArray['no_button_copy']) || $hookmanager->resArray['no_button_copy'] != 1) { |
3098 | 3098 | if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) { |
@@ -3274,7 +3274,7 @@ discard block |
||
3274 | 3274 | $modelmail = 'product_send'; |
3275 | 3275 | $defaulttopic = $object->label; |
3276 | 3276 | $diroutput = $conf->product->multidir_output[$object->entity]; |
3277 | - $trackid = 'prod' . $object->id; |
|
3277 | + $trackid = 'prod'.$object->id; |
|
3278 | 3278 | |
3279 | 3279 | include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
3280 | 3280 | } |
@@ -104,6 +104,6 @@ |
||
104 | 104 | foreach ($cate_arbo as $categ) { |
105 | 105 | $response[] = array('id' => $categ['id'], 'label' => $categ['label'], 'fulllabel' => $categ['fulllabel'], 'htmlforoption' => dolPrintHTML($categ['fulllabel']), 'htmlforattribute' => dolPrintHTMLForAttribute($categ['data-html']), 'color' => $categ['color']); |
106 | 106 | } |
107 | - $response =json_encode($response); |
|
107 | + $response = json_encode($response); |
|
108 | 108 | echo $response; |
109 | 109 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->db = $db; |
93 | 93 | $this->name = "vinci"; |
94 | 94 | $this->description = $langs->trans('DocumentModelStandardPDF'); |
95 | - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
95 | + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
96 | 96 | |
97 | 97 | // Page size for A4 format |
98 | 98 | $this->type = 'pdf'; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $this->posxdesc = $this->marge_gauche + 1; // For module retrocompatibility support during PDF transition: TODO remove this at the end |
117 | 117 | |
118 | 118 | if ($mysoc === null) { |
119 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
119 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
120 | 120 | return; |
121 | 121 | } |
122 | 122 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
232 | 232 | // Set path to the background PDF File |
233 | 233 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
234 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
234 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
235 | 235 | $tplidx = $pdf->importPage(1); |
236 | 236 | } |
237 | 237 | |
@@ -243,9 +243,9 @@ discard block |
||
243 | 243 | $pdf->SetSubject($outputlangs->transnoentities("ManufacturingOrder")); |
244 | 244 | $pdf->SetCreator("Dolibarr ".DOL_VERSION); |
245 | 245 | $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); |
246 | - $key_word=$outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ManufacturingOrder"); |
|
246 | + $key_word = $outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ManufacturingOrder"); |
|
247 | 247 | if (isset($object->thirdparty->name) && $object->thirdparty->name !== "") { |
248 | - $key_word.=" ".$outputlangs->convToOutputCharset($object->thirdparty->name); |
|
248 | + $key_word .= " ".$outputlangs->convToOutputCharset($object->thirdparty->name); |
|
249 | 249 | } |
250 | 250 | $pdf->SetKeyWords($key_word); |
251 | 251 | if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) { |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | if ($this->getColumnStatus('desc')) { |
494 | 494 | $pdf->startTransaction(); //description |
495 | 495 | $des = $prod -> description; |
496 | - $descr = $des;//implode("<br>", $des); |
|
496 | + $descr = $des; //implode("<br>", $des); |
|
497 | 497 | |
498 | 498 | $this->printStdColumnContent($pdf, $curY, 'desc', $descr); |
499 | 499 | |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | // Pied de page |
593 | 593 | $this->_pagefoot($pdf, $object, $outputlangs); |
594 | 594 | if (method_exists($pdf, 'AliasNbPages')) { |
595 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
595 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
596 | 596 | } |
597 | 597 | |
598 | 598 | $pdf->Close(); |
@@ -1131,7 +1131,7 @@ discard block |
||
1131 | 1131 | $pdf->SetFont('', 'B', $default_font_size + 3); |
1132 | 1132 | $pdf->SetXY($posx, $posy); |
1133 | 1133 | $pdf->SetTextColor(0, 0, 60); |
1134 | - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("QtyToProduce").": " .$object->qty, '', 'R'); |
|
1134 | + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("QtyToProduce").": ".$object->qty, '', 'R'); |
|
1135 | 1135 | |
1136 | 1136 | |
1137 | 1137 | $pdf->SetTextColor(0, 0, 60); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $optioncss = GETPOST('optioncss', 'alpha'); |
69 | 69 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'projectlist'; |
70 | 70 | $mode = GETPOST('mode', 'alpha'); |
71 | -$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
71 | +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
72 | 72 | |
73 | 73 | $title = $langs->trans("Projects"); |
74 | 74 | |
@@ -159,38 +159,38 @@ discard block |
||
159 | 159 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
160 | 160 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
161 | 161 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
162 | -$search_date_start_start = GETPOSTDATE('search_date_start_start'); // Use tzserver |
|
162 | +$search_date_start_start = GETPOSTDATE('search_date_start_start'); // Use tzserver |
|
163 | 163 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
164 | 164 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
165 | 165 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
166 | -$search_date_start_end = GETPOSTDATE('search_date_start_end', 'end'); // Use tzserver |
|
166 | +$search_date_start_end = GETPOSTDATE('search_date_start_end', 'end'); // Use tzserver |
|
167 | 167 | |
168 | 168 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
169 | 169 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
170 | 170 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
171 | -$search_date_end_start = GETPOSTDATE('search_date_end_start'); // Use tzserver |
|
171 | +$search_date_end_start = GETPOSTDATE('search_date_end_start'); // Use tzserver |
|
172 | 172 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
173 | 173 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
174 | 174 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
175 | -$search_date_end_end = GETPOSTDATE('search_date_end_end', 'end'); ; // Use tzserver |
|
175 | +$search_date_end_end = GETPOSTDATE('search_date_end_end', 'end'); ; // Use tzserver |
|
176 | 176 | |
177 | 177 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
178 | 178 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
179 | 179 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
180 | -$search_date_creation_start = GETPOSTDATE('search_date_creation_start'); // Use tzserver |
|
180 | +$search_date_creation_start = GETPOSTDATE('search_date_creation_start'); // Use tzserver |
|
181 | 181 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
182 | 182 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
183 | 183 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
184 | -$search_date_creation_end = GETPOSTDATE('search_date_creation_end', 'end'); // Use tzserver |
|
184 | +$search_date_creation_end = GETPOSTDATE('search_date_creation_end', 'end'); // Use tzserver |
|
185 | 185 | |
186 | 186 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
187 | 187 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
188 | 188 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
189 | -$search_date_modif_start = GETPOSTDATE('search_date_modif_start'); // Use tzserver |
|
189 | +$search_date_modif_start = GETPOSTDATE('search_date_modif_start'); // Use tzserver |
|
190 | 190 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
191 | 191 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
192 | 192 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
193 | -$search_date_modif_end = GETPOSTDATE('search_date_modif_end', 'end'); // Use tzserver |
|
193 | +$search_date_modif_end = GETPOSTDATE('search_date_modif_end', 'end'); // Use tzserver |
|
194 | 194 | |
195 | 195 | $search_category_array = array(); |
196 | 196 | |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | $sql .= " WHERE active = 1"; |
329 | 329 | //$sql .= " AND cls.code <> 'LOST'"; |
330 | 330 | //$sql .= " AND cls.code <> 'WON'"; |
331 | - $sql .= $db->order('cls.rowid', 'ASC'); // Must use the same order key than the key in $groupby |
|
331 | + $sql .= $db->order('cls.rowid', 'ASC'); // Must use the same order key than the key in $groupby |
|
332 | 332 | $resql = $db->query($sql); |
333 | 333 | if ($resql) { |
334 | 334 | $num = $db->num_rows($resql); |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | } |
342 | 342 | } |
343 | 343 | |
344 | - $groupofcollpasedvalues = array(6,7); // LOST and WON |
|
344 | + $groupofcollpasedvalues = array(6, 7); // LOST and WON |
|
345 | 345 | } |
346 | 346 | //var_dump($groupbyvalues); |
347 | 347 | } |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | if ($searchCategoryProjectOperator == 0) { |
777 | 777 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
778 | 778 | } else { |
779 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
779 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
780 | 780 | } |
781 | 781 | } |
782 | 782 | } |
@@ -985,7 +985,7 @@ discard block |
||
985 | 985 | $param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday)); |
986 | 986 | } |
987 | 987 | if ($search_date_end_end) { |
988 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
988 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
989 | 989 | } |
990 | 990 | if ($search_date_creation_startmonth) { |
991 | 991 | $param .= '&search_date_creation_startmonth='.urlencode((string) ($search_date_creation_startmonth)); |
@@ -1033,7 +1033,7 @@ discard block |
||
1033 | 1033 | $param .= '&search_date_modif_endday='.urlencode((string) ($search_date_modif_endday)); |
1034 | 1034 | } |
1035 | 1035 | if ($search_date_modif_end) { |
1036 | - $param .= '&search_date_modif_end=' . urlencode($search_date_modif_end); |
|
1036 | + $param .= '&search_date_modif_end='.urlencode($search_date_modif_end); |
|
1037 | 1037 | } |
1038 | 1038 | if (!empty($search_category_array)) { |
1039 | 1039 | foreach ($search_category_array as $tmpval) { |
@@ -1268,7 +1268,7 @@ discard block |
||
1268 | 1268 | } |
1269 | 1269 | |
1270 | 1270 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1271 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1271 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1272 | 1272 | $selectedfields = (($mode != 'kanban' && $mode != 'kanbangroupby') ? $htmlofselectarray : ''); |
1273 | 1273 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1274 | 1274 | |
@@ -1738,7 +1738,7 @@ discard block |
||
1738 | 1738 | //var_dump("groupby=$groupby groupbyvalue=$groupbyvalue groupbyfield=$groupbyfield"); |
1739 | 1739 | |
1740 | 1740 | if (is_null($groupbyold)) { |
1741 | - print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
1741 | + print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
1742 | 1742 | } |
1743 | 1743 | // Start kanban column |
1744 | 1744 | if (is_null($obj->$groupbyfield)) { |
@@ -1749,7 +1749,7 @@ discard block |
||
1749 | 1749 | |
1750 | 1750 | if ($groupbyold !== $groupbyvalue) { |
1751 | 1751 | if (!is_null($groupbyold)) { |
1752 | - print '</div>'; // We need a new kanban column - end box-flex-container |
|
1752 | + print '</div>'; // We need a new kanban column - end box-flex-container |
|
1753 | 1753 | } |
1754 | 1754 | foreach ($groupbyvalues as $tmpcursor => $tmpgroupbyvalue) { |
1755 | 1755 | //var_dump("tmpcursor=".$tmpcursor." groupbyold=".$groupbyold." groupbyvalue=".$groupbyvalue); |
@@ -1766,9 +1766,9 @@ discard block |
||
1766 | 1766 | } |
1767 | 1767 | print '" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $tmpcursor).'" data-groupbyfield="'.$groupbyfield.'">'; |
1768 | 1768 | print '<div class="kanbanlabel">'.$langs->trans($tmpgroupbyvalue).'</div>'; |
1769 | - print '</div>'; // Start and end the new column |
|
1769 | + print '</div>'; // Start and end the new column |
|
1770 | 1770 | } |
1771 | - print '<div class="box-flex-container-column kanban column" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $groupbyvalue).'" data-groupbyfield="'.$groupbyfield.'">'; // Start new column |
|
1771 | + print '<div class="box-flex-container-column kanban column" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $groupbyvalue).'" data-groupbyfield="'.$groupbyfield.'">'; // Start new column |
|
1772 | 1772 | print '<div class="kanbanlabel">'.$langs->trans(empty($groupbyvalues[$groupbyvalue]) ? 'Undefined' : $groupbyvalues[$groupbyvalue]).'</div>'; |
1773 | 1773 | } |
1774 | 1774 | $groupbyold = $groupbyvalue; |
@@ -1792,7 +1792,7 @@ discard block |
||
1792 | 1792 | if ($i == ($imaxinloop - 1)) { |
1793 | 1793 | // Close kanban column |
1794 | 1794 | if (!empty($groupby)) { |
1795 | - print '</div>'; // end box-flex-container |
|
1795 | + print '</div>'; // end box-flex-container |
|
1796 | 1796 | foreach ($groupbyvalues as $tmpcursor => $tmpgroupbyvalue) { |
1797 | 1797 | //var_dump("tmpcursor=".$tmpcursor." groupbyold=".$groupbyold." groupbyvalue=".$groupbyvalue); |
1798 | 1798 | if ($tmpcursor <= $groupbyvalue) { |
@@ -1805,11 +1805,11 @@ discard block |
||
1805 | 1805 | } |
1806 | 1806 | print '" data-groupbyid="'.preg_replace('/[^a-z0-9]/', '', $tmpcursor).'" data-groupbyfield="'.$groupbyfield.'">'; |
1807 | 1807 | print '<div class="kanbanlabel">'.$langs->trans(empty($tmpgroupbyvalue) ? 'Undefined' : $tmpgroupbyvalue).'</div>'; |
1808 | - print '</div>'; // Start and end the new column |
|
1808 | + print '</div>'; // Start and end the new column |
|
1809 | 1809 | } |
1810 | - print '</div>'; // end box-flex-container-columns |
|
1810 | + print '</div>'; // end box-flex-container-columns |
|
1811 | 1811 | } else { |
1812 | - print '</div>'; // end box-flex-container |
|
1812 | + print '</div>'; // end box-flex-container |
|
1813 | 1813 | } |
1814 | 1814 | |
1815 | 1815 | print '</td></tr>'; |