@@ -110,7 +110,7 @@ |
||
110 | 110 | $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l"; |
111 | 111 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; |
112 | 112 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
113 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
113 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
114 | 114 | } |
115 | 115 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON l.fk_code_ventilation = aa.rowid"; |
116 | 116 | $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = l.fk_facture"; |
@@ -173,13 +173,13 @@ discard block |
||
173 | 173 | if ($action == 'confirmconvertimgwebp') { |
174 | 174 | $langs->load("ecm"); |
175 | 175 | |
176 | - $section_dir=GETPOST('section_dir', 'alpha'); |
|
177 | - $section=GETPOST('section', 'alpha'); |
|
176 | + $section_dir = GETPOST('section_dir', 'alpha'); |
|
177 | + $section = GETPOST('section', 'alpha'); |
|
178 | 178 | $form = new Form($db); |
179 | - $formquestion['section_dir']=array('type'=>'hidden', 'value'=>$section_dir, 'name'=>'section_dir'); |
|
180 | - $formquestion['section']=array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); |
|
179 | + $formquestion['section_dir'] = array('type'=>'hidden', 'value'=>$section_dir, 'name'=>'section_dir'); |
|
180 | + $formquestion['section'] = array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); |
|
181 | 181 | if ($module == 'medias') { |
182 | - $formquestion['website']=array('type'=>'hidden', 'value'=>$website->ref, 'name'=>'website'); |
|
182 | + $formquestion['website'] = array('type'=>'hidden', 'value'=>$website->ref, 'name'=>'website'); |
|
183 | 183 | } |
184 | 184 | print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('ConfirmImgWebpCreation'), $langs->trans('ConfirmGenerateImgWebp', $object->ref), 'convertimgwebp', $formquestion, "yes", 1); |
185 | 185 | $action = 'file_manager'; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | if (image_format_supported($filepath) == 1) { |
208 | 208 | $filepathnoext = preg_replace("/\.[a-z0-9]+$/i", "", $filepath); |
209 | 209 | |
210 | - if (! dol_is_file($filepathnoext.'.webp')) { // If file does not exists yet |
|
210 | + if (!dol_is_file($filepathnoext.'.webp')) { // If file does not exists yet |
|
211 | 211 | $result = dol_imageResizeOrCrop($filepath, 0, 0, 0, 0, 0, $filepathnoext.'.webp', 90); |
212 | 212 | if (!dol_is_file($result)) { |
213 | 213 | $error++; |
@@ -469,7 +469,7 @@ |
||
469 | 469 | $object->fetch($obj->rowid); |
470 | 470 | $object->id = $obj->rowid; |
471 | 471 | |
472 | - $action = 'anonymize'; // TODO Offer also action "delete" in setup of module |
|
472 | + $action = 'anonymize'; // TODO Offer also action "delete" in setup of module |
|
473 | 473 | |
474 | 474 | if ($action == 'anonymize') { |
475 | 475 | if ($object->isObjectUsed($obj->rowid) == 0) { // If object to clean is used |
@@ -129,11 +129,11 @@ |
||
129 | 129 | unset($object->barcode_type_code); |
130 | 130 | unset($object->barcode_type_label); |
131 | 131 | |
132 | - unset($object->mode_reglement); // We use mode_reglement_id now |
|
133 | - unset($object->cond_reglement); // We use cond_reglement_id now |
|
134 | - unset($object->note); // We use note_public or note_private now |
|
135 | - unset($object->contact); // We use contact_id now |
|
136 | - unset($object->thirdparty); // We use thirdparty_id or fk_soc or socid now |
|
132 | + unset($object->mode_reglement); // We use mode_reglement_id now |
|
133 | + unset($object->cond_reglement); // We use cond_reglement_id now |
|
134 | + unset($object->note); // We use note_public or note_private now |
|
135 | + unset($object->contact); // We use contact_id now |
|
136 | + unset($object->thirdparty); // We use thirdparty_id or fk_soc or socid now |
|
137 | 137 | |
138 | 138 | unset($object->projet); // Should be fk_project |
139 | 139 | unset($object->project); // Should be fk_project |
@@ -193,7 +193,7 @@ |
||
193 | 193 | $facavoir->fetch($facid); |
194 | 194 | $invoicecredits[] = $facavoir->getNomUrl(1); |
195 | 195 | } |
196 | - print ' ('.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits) . ')'; |
|
196 | + print ' ('.$langs->transnoentities("InvoiceHasAvoir").(count($invoicecredits) ? ' ' : '').implode(',', $invoicecredits).')'; |
|
197 | 197 | } |
198 | 198 | /* |
199 | 199 | if ($facidnext > 0) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $backurlforlist = dol_buildpath('/product/stock/productlot_list.php', 1); |
141 | 141 | |
142 | - if ($action == 'seteatby' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
142 | + if ($action == 'seteatby' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
143 | 143 | $newvalue = dol_mktime(12, 0, 0, GETPOST('eatbymonth', 'int'), GETPOST('eatbyday', 'int'), GETPOST('eatbyyear', 'int')); |
144 | 144 | $result = $object->setValueFrom('eatby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
145 | 145 | if ($result < 0) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | } |
152 | 152 | |
153 | - if ($action == 'setsellby' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
153 | + if ($action == 'setsellby' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
154 | 154 | $newvalue = dol_mktime(12, 0, 0, GETPOST('sellbymonth', 'int'), GETPOST('sellbyday', 'int'), GETPOST('sellbyyear', 'int')); |
155 | 155 | $result = $object->setValueFrom('sellby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
156 | 156 | if ($result < 0) { |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | } |
163 | 163 | |
164 | - if ($action == 'seteol_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
164 | + if ($action == 'seteol_date' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
165 | 165 | $newvalue = dol_mktime(12, 0, 0, GETPOST('eol_datemonth', 'int'), GETPOST('eol_dateday', 'int'), GETPOST('eol_dateyear', 'int')); |
166 | 166 | $result = $object->setValueFrom('eol_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
167 | 167 | if ($result < 0) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | } |
174 | 174 | |
175 | - if ($action == 'setmanufacturing_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
175 | + if ($action == 'setmanufacturing_date' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
176 | 176 | $newvalue = dol_mktime(12, 0, 0, GETPOST('manufacturing_datemonth', 'int'), GETPOST('manufacturing_dateday', 'int'), GETPOST('manufacturing_dateyear', 'int')); |
177 | 177 | $result = $object->setValueFrom('manufacturing_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
178 | 178 | if ($result < 0) { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
186 | - if ($action == 'setscrapping_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
186 | + if ($action == 'setscrapping_date' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
187 | 187 | $newvalue = dol_mktime(12, 0, 0, GETPOST('scrapping_datemonth', 'int'), GETPOST('scrapping_dateday', 'int'), GETPOST('scrapping_dateyear', 'int')); |
188 | 188 | $result = $object->setValueFrom('scrapping_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); |
189 | 189 | if ($result < 0) { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | } */ |
207 | 207 | |
208 | - if ($action == 'setqc_frequency' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) { |
|
208 | + if ($action == 'setqc_frequency' && $user->rights->stock->creer && !GETPOST('cancel', 'alpha')) { |
|
209 | 209 | $result = $object->setValueFrom('qc_frequency', GETPOST('qc_frequency'), '', null, 'int', '', $user, 'PRODUCT_MODIFY'); |
210 | 210 | if ($result < 0) { // Prévoir un test de format de durée |
211 | 211 | setEventMessages($object->error, null, 'errors'); |
@@ -335,10 +335,10 @@ |
||
335 | 335 | if (in_array($element, ['context1', 'context2'])) { |
336 | 336 | $datacount = 0; |
337 | 337 | |
338 | - $parameters['head'][$counter][0] = dol_buildpath('/mymodule/mymodule_tab.php', 1) . '?id=' . $id . '&module='.$element; |
|
338 | + $parameters['head'][$counter][0] = dol_buildpath('/mymodule/mymodule_tab.php', 1).'?id='.$id.'&module='.$element; |
|
339 | 339 | $parameters['head'][$counter][1] = $langs->trans('MyModuleTab'); |
340 | 340 | if ($datacount > 0) { |
341 | - $parameters['head'][$counter][1] .= '<span class="badge marginleftonlyshort">' . $datacount . '</span>'; |
|
341 | + $parameters['head'][$counter][1] .= '<span class="badge marginleftonlyshort">'.$datacount.'</span>'; |
|
342 | 342 | } |
343 | 343 | $parameters['head'][$counter][2] = 'mymoduleemails'; |
344 | 344 | $counter++; |
@@ -270,7 +270,7 @@ |
||
270 | 270 | $reponsesadd = str_split($obj->reponses); |
271 | 271 | $lengthresponses = count($reponsesadd); |
272 | 272 | for ($cpt = $lengthresponses; $cpt > $cleinsertion; $cpt--) { |
273 | - $reponsesadd[$cpt] = $reponsesadd[$cpt-1]; |
|
273 | + $reponsesadd[$cpt] = $reponsesadd[$cpt - 1]; |
|
274 | 274 | } |
275 | 275 | $reponsesadd[$cleinsertion] = '0'; |
276 | 276 | $reponsesadd = implode($reponsesadd); |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $this->menu = array(); |
264 | 264 | $r = 0; |
265 | 265 | // Add here entries to declare new menus |
266 | - $this->menu[$r++]=array( |
|
266 | + $this->menu[$r++] = array( |
|
267 | 267 | // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode |
268 | 268 | 'fk_menu'=>'fk_mainmenu=mrp', |
269 | 269 | // This is a Left menu entry |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | 'url'=>'', |
276 | 276 | // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. |
277 | 277 | 'langs'=>'mrp', |
278 | - 'position'=>1100+$r, |
|
278 | + 'position'=>1100 + $r, |
|
279 | 279 | // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. |
280 | 280 | 'enabled'=>'$conf->workstation->enabled', |
281 | 281 | // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | // 0=Menu for internal users, 1=external users, 2=both |
285 | 285 | 'user'=>2, |
286 | 286 | ); |
287 | - $this->menu[$r++]=array( |
|
287 | + $this->menu[$r++] = array( |
|
288 | 288 | // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode |
289 | 289 | 'fk_menu'=>'fk_mainmenu=mrp,fk_leftmenu=workstation_workstation', |
290 | 290 | // This is a Left menu entry |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | 'url'=>'/workstation/workstation_card.php?action=create', |
296 | 296 | // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. |
297 | 297 | 'langs'=>'mrp', |
298 | - 'position'=>1100+$r, |
|
298 | + 'position'=>1100 + $r, |
|
299 | 299 | // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. |
300 | 300 | 'enabled'=>'$conf->workstation->enabled', |
301 | 301 | // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | // 0=Menu for internal users, 1=external users, 2=both |
305 | 305 | 'user'=>2 |
306 | 306 | ); |
307 | - $this->menu[$r++]=array( |
|
307 | + $this->menu[$r++] = array( |
|
308 | 308 | // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode |
309 | 309 | 'fk_menu'=>'fk_mainmenu=mrp,fk_leftmenu=workstation_workstation', |
310 | 310 | // This is a Left menu entry |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | 'url'=>'/workstation/workstation_list.php', |
316 | 316 | // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. |
317 | 317 | 'langs'=>'mrp', |
318 | - 'position'=>1101+$r, |
|
318 | + 'position'=>1101 + $r, |
|
319 | 319 | // Define condition to show or hide menu entry. Use '$conf->workstation->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. |
320 | 320 | 'enabled'=>'$conf->workstation->enabled', |
321 | 321 | // Use 'perms'=>'$user->rights->workstation->level1->level2' if you want your menu with a permission rules |