@@ -328,7 +328,7 @@ |
||
328 | 328 | |
329 | 329 | foreach ($arrayofvat[$key] as $k => $mt) { |
330 | 330 | if ($mt) { |
331 | - $accountingaccount->fetch($k, null, true); // TODO Use a cache for label |
|
331 | + $accountingaccount->fetch($k, null, true); // TODO Use a cache for label |
|
332 | 332 | $account_label = $accountingaccount->label; |
333 | 333 | |
334 | 334 | // get compte id and label |
@@ -182,7 +182,7 @@ |
||
182 | 182 | |
183 | 183 | $filetoread = realpath(dol_osencode($file)); // Chemin canonique absolu de l'image |
184 | 184 | |
185 | - $infoImg = getimagesize($filetoread); // Get data about src image |
|
185 | + $infoImg = getimagesize($filetoread); // Get data about src image |
|
186 | 186 | $imgWidth = $infoImg[0]; // Largeur de l'image |
187 | 187 | $imgHeight = $infoImg[1]; // Hauteur de l'image |
188 | 188 |
@@ -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) { |
@@ -167,7 +167,7 @@ |
||
167 | 167 | $facavoir->fetch($facid); |
168 | 168 | $invoicecredits[] = $facavoir->getNomUrl(1); |
169 | 169 | } |
170 | - print ' ('.$langs->transnoentities("InvoiceHasAvoir") . implode(',', $invoicecredits) . ')'; |
|
170 | + print ' ('.$langs->transnoentities("InvoiceHasAvoir").implode(',', $invoicecredits).')'; |
|
171 | 171 | } |
172 | 172 | if ($facidnext > 0) { |
173 | 173 | $facthatreplace = new FactureFournisseur($db); |
@@ -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++; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | 'u.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), |
135 | 135 | ); |
136 | 136 | // Extra fields |
137 | -include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
137 | +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
138 | 138 | |
139 | 139 | $object->fields = dol_sort_array($object->fields, 'position'); |
140 | 140 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | break; // Should not happen |
830 | 830 | } |
831 | 831 | |
832 | - if (empty($obj->country_code)) $obj->country_code = ''; // TODO Add join in select with country table to get country_code |
|
832 | + if (empty($obj->country_code)) $obj->country_code = ''; // TODO Add join in select with country table to get country_code |
|
833 | 833 | |
834 | 834 | // Store properties in $object |
835 | 835 | $object->setVarsFromFetchObj($obj); |