@@ -1169,7 +1169,7 @@ discard block |
||
1169 | 1169 | $list[$tab->elementtype][$tab->name]['computed'] = $tab->fieldcomputed; |
1170 | 1170 | $list[$tab->elementtype][$tab->name]['unique'] = $tab->fieldunique; |
1171 | 1171 | $list[$tab->elementtype][$tab->name]['required'] = $tab->fieldrequired; |
1172 | - $list[$tab->elementtype][$tab->name]['param'] = ($tab->param ? jsonOrUnserialize($tab->param) : ''); // This may be a string encoded with serialise() or json_encode() |
|
1172 | + $list[$tab->elementtype][$tab->name]['param'] = ($tab->param ? jsonOrUnserialize($tab->param) : ''); // This may be a string encoded with serialise() or json_encode() |
|
1173 | 1173 | $list[$tab->elementtype][$tab->name]['pos'] = $tab->pos; |
1174 | 1174 | $list[$tab->elementtype][$tab->name]['alwayseditable'] = $tab->alwayseditable; |
1175 | 1175 | $list[$tab->elementtype][$tab->name]['perms'] = $tab->perms; |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | $num = $this->db->num_rows($result); |
1806 | 1806 | $min = min($num, ($limit <= 0 ? $num : $limit)); |
1807 | 1807 | for ($i = 0; $i < $min; $i++) { |
1808 | - $type =$this->db->fetch_object($result); |
|
1808 | + $type = $this->db->fetch_object($result); |
|
1809 | 1809 | $this->translateLabel($type, $lang, 'TicketTypeShort', array('ticket')); |
1810 | 1810 | $list[] = $type; |
1811 | 1811 | } |
@@ -1868,7 +1868,7 @@ discard block |
||
1868 | 1868 | $num = $this->db->num_rows($result); |
1869 | 1869 | $min = min($num, ($limit <= 0 ? $num : $limit)); |
1870 | 1870 | for ($i = 0; $i < $min; $i++) { |
1871 | - $type =$this->db->fetch_object($result); |
|
1871 | + $type = $this->db->fetch_object($result); |
|
1872 | 1872 | $list[] = $type; |
1873 | 1873 | } |
1874 | 1874 | } else { |
@@ -2101,13 +2101,13 @@ discard block |
||
2101 | 2101 | throw new RestException(500, $langs->trans('XmlNotFound').': /install/'.$xmlshortfile); |
2102 | 2102 | } |
2103 | 2103 | } else { |
2104 | - $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into filecheck.php. |
|
2104 | + $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into filecheck.php. |
|
2105 | 2105 | |
2106 | 2106 | // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) |
2107 | 2107 | if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') { |
2108 | 2108 | $xmlfile = $xmlarray['content']; |
2109 | 2109 | //print "xmlfilestart".$xmlfile."endxmlfile"; |
2110 | - $xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET); |
|
2110 | + $xml = simplexml_load_string($xmlfile, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NONET); |
|
2111 | 2111 | } else { |
2112 | 2112 | $errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].(($xmlarray['http_code'] == 400 && $xmlarray['content']) ? ' '.$xmlarray['content'] : '').' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg']; |
2113 | 2113 | throw new RestException(500, $errormsg); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | // Put here all includes required by your class file |
26 | -require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; |
|
26 | +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Class for WebPortalOrder |
@@ -171,11 +171,11 @@ discard block |
||
171 | 171 | if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { |
172 | 172 | return ['optimize' => $langs->trans("WebPortalOrder")]; |
173 | 173 | } |
174 | - $datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalOrder") . '</u>'; |
|
174 | + $datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("WebPortalOrder").'</u>'; |
|
175 | 175 | if (isset($this->status)) { |
176 | - $datas['picto'] .= ' ' . $this->getLibStatut(5); |
|
176 | + $datas['picto'] .= ' '.$this->getLibStatut(5); |
|
177 | 177 | } |
178 | - $datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; |
|
178 | + $datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; |
|
179 | 179 | |
180 | 180 | return $datas; |
181 | 181 | } |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $dataparams = ''; |
221 | 221 | if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) { |
222 | 222 | $classfortooltip = 'classforajaxtooltip'; |
223 | - $dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"'; |
|
223 | + $dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"'; |
|
224 | 224 | $label = ''; |
225 | 225 | } else { |
226 | 226 | $label = implode($this->getTooltipContentArray($params)); |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | |
229 | 229 | $linkclose = ''; |
230 | 230 | |
231 | - $linkstart = '<a href="' . $url . '"'; |
|
232 | - $linkstart .= $linkclose . '>'; |
|
231 | + $linkstart = '<a href="'.$url.'"'; |
|
232 | + $linkstart .= $linkclose.'>'; |
|
233 | 233 | $linkend = '</a>'; |
234 | 234 | |
235 | 235 | if ($option === 'nolink') { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $result .= $linkend; |
248 | 248 | |
249 | 249 | global $action; |
250 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
250 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
251 | 251 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
252 | 252 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
253 | 253 | if ($reshook > 0) { |
@@ -277,17 +277,17 @@ discard block |
||
277 | 277 | $return .= img_picto('', 'order'); |
278 | 278 | $return .= '</div>'; |
279 | 279 | $return .= '<div class="info-box-content">'; |
280 | - $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . (method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref) . '</span>'; |
|
281 | - $return .= '<input id="cb' . $this->id . '" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="' . $this->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
280 | + $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>'; |
|
281 | + $return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
282 | 282 | |
283 | 283 | if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) { |
284 | - $return .= '<br><div class="info-box-ref tdoverflowmax150">' . $this->thirdparty->getNomUrl(1) . '</div>'; |
|
284 | + $return .= '<br><div class="info-box-ref tdoverflowmax150">'.$this->thirdparty->getNomUrl(1).'</div>'; |
|
285 | 285 | } |
286 | 286 | if (property_exists($this, 'total_ht')) { |
287 | - $return .= '<div class="info-box-ref amount">' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . ' ' . $langs->trans('HT') . '</div>'; |
|
287 | + $return .= '<div class="info-box-ref amount">'.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency).' '.$langs->trans('HT').'</div>'; |
|
288 | 288 | } |
289 | 289 | if (method_exists($this, 'getLibStatut')) { |
290 | - $return .= '<div class="info-box-status margintoponly">' . $this->getLibStatut(5) . '</div>'; |
|
290 | + $return .= '<div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>'; |
|
291 | 291 | } |
292 | 292 | $return .= '</div>'; |
293 | 293 | $return .= '</div>'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | // Put here all includes required by your class file |
26 | -require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; |
|
26 | +require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Class for WebPortalMember |
@@ -226,11 +226,11 @@ discard block |
||
226 | 226 | if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { |
227 | 227 | return ['optimize' => $langs->trans("WebPortalMember")]; |
228 | 228 | } |
229 | - $datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalMember") . '</u>'; |
|
229 | + $datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("WebPortalMember").'</u>'; |
|
230 | 230 | if (isset($this->status)) { |
231 | - $datas['picto'] .= ' ' . $this->getLibStatut(5); |
|
231 | + $datas['picto'] .= ' '.$this->getLibStatut(5); |
|
232 | 232 | } |
233 | - $datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; |
|
233 | + $datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; |
|
234 | 234 | |
235 | 235 | return $datas; |
236 | 236 | } |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | ]; |
272 | 272 | if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) { |
273 | 273 | $classfortooltip = 'classforajaxtooltip'; |
274 | - $dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"'; |
|
274 | + $dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"'; |
|
275 | 275 | $label = ''; |
276 | 276 | } else { |
277 | 277 | $label = implode($this->getTooltipContentArray($params)); |
@@ -294,19 +294,19 @@ discard block |
||
294 | 294 | // } |
295 | 295 | //} |
296 | 296 | |
297 | - $linkstart .= '<a href="' . $url . '"'; |
|
297 | + $linkstart .= '<a href="'.$url.'"'; |
|
298 | 298 | $linkclose = ""; |
299 | 299 | if (empty($notooltip)) { |
300 | 300 | if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { |
301 | 301 | $langs->load("users"); |
302 | 302 | $label = $langs->trans("ShowUser"); |
303 | - $linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"'; |
|
303 | + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
|
304 | 304 | } |
305 | - $linkclose .= ($label ? ' title="' . dol_escape_htmltag($label, 1) . '"' : ' title="tocomplete"'); |
|
306 | - $linkclose .= $dataparams . ' class="' . $classfortooltip . ($morecss ? ' ' . $morecss : '') . '"'; |
|
305 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
306 | + $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; |
|
307 | 307 | } |
308 | 308 | |
309 | - $linkstart .= $linkclose . '>'; |
|
309 | + $linkstart .= $linkclose.'>'; |
|
310 | 310 | $linkend = '</a>'; |
311 | 311 | |
312 | 312 | if ($option === 'nolink') { |
@@ -325,19 +325,19 @@ discard block |
||
325 | 325 | } |
326 | 326 | // Only picto |
327 | 327 | if ($withpictoimg > 0) { |
328 | - $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '">' . img_object('', 'user', $paddafterimage . ' ' . ($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1) . '</span>'; |
|
328 | + $picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1).'</span>'; |
|
329 | 329 | } else { |
330 | 330 | // Picto must be a photo |
331 | - $picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '"' . ($paddafterimage ? ' ' . $paddafterimage : '') . '>'; |
|
332 | - $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto' . (($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1); |
|
331 | + $picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>'; |
|
332 | + $picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.(($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1); |
|
333 | 333 | $picto .= '</span>'; |
334 | 334 | } |
335 | 335 | $result .= $picto; |
336 | 336 | } |
337 | 337 | if (($withpictoimg > -2 && $withpictoimg != 2) || $withpictoimg == -4) { |
338 | 338 | if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { |
339 | - $result .= '<span class="nopadding valignmiddle' . ((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled') . |
|
340 | - ($morecss ? ' usertext' . $morecss : '') . '">'; |
|
339 | + $result .= '<span class="nopadding valignmiddle'.((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled'). |
|
340 | + ($morecss ? ' usertext'.$morecss : '').'">'; |
|
341 | 341 | } |
342 | 342 | if ($mode == 'login') { |
343 | 343 | $result .= dol_trunc($this->login, $maxlen); |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | // } |
367 | 367 | //} |
368 | 368 | global $action; |
369 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
369 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
370 | 370 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
371 | 371 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
372 | 372 | if ($reshook > 0) { |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | $outdone = 0; |
427 | 427 | $coords = $this->getFullAddress(1, ', ', getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT')); |
428 | 428 | if ($coords) { |
429 | - $address = dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', '); |
|
429 | + $address = dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); |
|
430 | 430 | if ($address) { |
431 | 431 | $out .= $address; |
432 | 432 | $outdone++; |
@@ -441,13 +441,13 @@ discard block |
||
441 | 441 | |
442 | 442 | if (is_array($arrayoflangcode) && count($arrayoflangcode)) { |
443 | 443 | if (!is_object($extralanguages)) { |
444 | - include_once DOL_DOCUMENT_ROOT . '/core/class/extralanguages.class.php'; |
|
444 | + include_once DOL_DOCUMENT_ROOT.'/core/class/extralanguages.class.php'; |
|
445 | 445 | $extralanguages = new ExtraLanguages($this->db); |
446 | 446 | } |
447 | 447 | $extralanguages->fetch_name_extralanguages($elementforaltlanguage); |
448 | 448 | |
449 | 449 | if (!empty($extralanguages->attributes[$elementforaltlanguage]['address']) || !empty($extralanguages->attributes[$elementforaltlanguage]['town'])) { |
450 | - $out .= "<!-- alternatelanguage for '" . $elementforaltlanguage . "' set to fields '" . join(',', $extralanguages->attributes[$elementforaltlanguage]) . "' -->\n"; |
|
450 | + $out .= "<!-- alternatelanguage for '".$elementforaltlanguage."' set to fields '".join(',', $extralanguages->attributes[$elementforaltlanguage])."' -->\n"; |
|
451 | 451 | $this->fetchValuesForExtraLanguages(); |
452 | 452 | if (!is_object($form)) { |
453 | 453 | $form = new Form($this->db); |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | $s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"'); |
459 | 459 | // This also call dol_format_address() |
460 | 460 | $coords = $this->getFullAddress(1, ', ', $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT, $extralangcode); |
461 | - $htmltext .= $s . dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', '); |
|
461 | + $htmltext .= $s.dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); |
|
462 | 462 | } |
463 | 463 | $out .= $form->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft'); |
464 | 464 | } |
@@ -469,15 +469,15 @@ discard block |
||
469 | 469 | if (!in_array($this->country_code, $countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) |
470 | 470 | && empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) { |
471 | 471 | if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) { |
472 | - $out .= ($outdone ? ' - ' : '') . $this->region . ' - ' . $this->state; |
|
472 | + $out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state; |
|
473 | 473 | } else { |
474 | - $out .= ($outdone ? ' - ' : '') . $this->state; |
|
474 | + $out .= ($outdone ? ' - ' : '').$this->state; |
|
475 | 475 | } |
476 | 476 | $outdone++; |
477 | 477 | } |
478 | 478 | |
479 | 479 | if ($outdone) { |
480 | - $out = '<div class="address inline-block">' . $out . '</div>'; |
|
480 | + $out = '<div class="address inline-block">'.$out.'</div>'; |
|
481 | 481 | } |
482 | 482 | |
483 | 483 | if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | // Put here all includes required by your class file |
26 | -require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
26 | +require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Class for WebPortalPropal |
@@ -171,11 +171,11 @@ discard block |
||
171 | 171 | if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { |
172 | 172 | return ['optimize' => $langs->trans("WebPortalPropal")]; |
173 | 173 | } |
174 | - $datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalPropal") . '</u>'; |
|
174 | + $datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("WebPortalPropal").'</u>'; |
|
175 | 175 | if (isset($this->status)) { |
176 | - $datas['picto'] .= ' ' . $this->getLibStatut(5); |
|
176 | + $datas['picto'] .= ' '.$this->getLibStatut(5); |
|
177 | 177 | } |
178 | - $datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; |
|
178 | + $datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; |
|
179 | 179 | |
180 | 180 | return $datas; |
181 | 181 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $dataparams = ''; |
211 | 211 | if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) { |
212 | 212 | $classfortooltip = 'classforajaxtooltip'; |
213 | - $dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"'; |
|
213 | + $dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"'; |
|
214 | 214 | $label = ''; |
215 | 215 | } else { |
216 | 216 | $label = implode($this->getTooltipContentArray($params)); |
@@ -221,8 +221,8 @@ discard block |
||
221 | 221 | |
222 | 222 | $linkclose = ''; |
223 | 223 | |
224 | - $linkstart = '<a href="' . $url . '"'; |
|
225 | - $linkstart .= $linkclose . '>'; |
|
224 | + $linkstart = '<a href="'.$url.'"'; |
|
225 | + $linkstart .= $linkclose.'>'; |
|
226 | 226 | $linkend = '</a>'; |
227 | 227 | |
228 | 228 | if ($option === 'nolink') { |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | $result .= $linkstart; |
234 | 234 | if ($withpicto) { |
235 | - $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams . ' class="' . (($withpicto != 2) ? 'paddingright ' : '') . $classfortooltip . '"'), 0, 0, $notooltip ? 0 : 1); |
|
235 | + $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1); |
|
236 | 236 | } |
237 | 237 | if ($withpicto != 2) { |
238 | 238 | $result .= $this->ref; |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | $result .= $linkend; |
241 | 241 | |
242 | 242 | global $action; |
243 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
243 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
244 | 244 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
245 | 245 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
246 | 246 | if ($reshook > 0) { |
@@ -270,19 +270,19 @@ discard block |
||
270 | 270 | $return .= img_picto('', $this->picto); |
271 | 271 | $return .= '</span>'; |
272 | 272 | $return .= '<div class="info-box-content">'; |
273 | - $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . (method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref) . '</span>'; |
|
273 | + $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>'; |
|
274 | 274 | if ($selected >= 0) { |
275 | - $return .= '<input id="cb' . $this->id . '" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="' . $this->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
275 | + $return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
276 | 276 | } |
277 | 277 | if (property_exists($this, 'label')) { |
278 | - $return .= ' <div class="inline-block opacitymedium valignmiddle tdoverflowmax100">' . $this->label . '</div>'; |
|
278 | + $return .= ' <div class="inline-block opacitymedium valignmiddle tdoverflowmax100">'.$this->label.'</div>'; |
|
279 | 279 | } |
280 | 280 | if (property_exists($this, 'amount')) { |
281 | 281 | $return .= '<br>'; |
282 | - $return .= '<span class="info-box-label amount">' . price($this->amount, 0, $langs, 1, -1, -1, $conf->currency) . '</span>'; |
|
282 | + $return .= '<span class="info-box-label amount">'.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span>'; |
|
283 | 283 | } |
284 | 284 | if (method_exists($this, 'getLibStatut')) { |
285 | - $return .= '<br><div class="info-box-status margintoponly">' . $this->getLibStatut(3) . '</div>'; |
|
285 | + $return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(3).'</div>'; |
|
286 | 286 | } |
287 | 287 | $return .= '</div>'; |
288 | 288 | $return .= '</div>'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | // Put here all includes required by your class file |
26 | -require_once DOL_DOCUMENT_ROOT . '/partnership/class/partnership.class.php'; |
|
26 | +require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Class for WebPortalPartnership |
@@ -204,11 +204,11 @@ discard block |
||
204 | 204 | if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) { |
205 | 205 | return ['optimize' => $langs->trans("WebPortalPartnership")]; |
206 | 206 | } |
207 | - $datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalPartnership") . '</u>'; |
|
207 | + $datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("WebPortalPartnership").'</u>'; |
|
208 | 208 | if (isset($this->status)) { |
209 | - $datas['picto'] .= ' ' . $this->getLibStatut(5); |
|
209 | + $datas['picto'] .= ' '.$this->getLibStatut(5); |
|
210 | 210 | } |
211 | - $datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; |
|
211 | + $datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref; |
|
212 | 212 | |
213 | 213 | return $datas; |
214 | 214 | } |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $dataparams = ''; |
244 | 244 | if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) { |
245 | 245 | $classfortooltip = 'classforajaxtooltip'; |
246 | - $dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"'; |
|
246 | + $dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"'; |
|
247 | 247 | $label = ''; |
248 | 248 | } else { |
249 | 249 | $label = implode($this->getTooltipContentArray($params)); |
@@ -267,20 +267,20 @@ discard block |
||
267 | 267 | if (empty($notooltip)) { |
268 | 268 | if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { |
269 | 269 | $label = $langs->trans("ShowPartnership"); |
270 | - $linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"'; |
|
270 | + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
|
271 | 271 | } |
272 | - $linkclose .= ($label ? ' title="' . dol_escape_htmltag($label, 1) . '"' : ' title="tocomplete"'); |
|
273 | - $linkclose .= $dataparams . ' class="' . $classfortooltip . ($morecss ? ' ' . $morecss : '') . '"'; |
|
272 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
273 | + $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; |
|
274 | 274 | } else { |
275 | - $linkclose = ($morecss ? ' class="' . $morecss . '"' : ''); |
|
275 | + $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | if ($option == 'nolink') { |
279 | 279 | $linkstart = '<span'; |
280 | 280 | } else { |
281 | - $linkstart = '<a href="' . $url . '"'; |
|
281 | + $linkstart = '<a href="'.$url.'"'; |
|
282 | 282 | } |
283 | - $linkstart .= $linkclose . '>'; |
|
283 | + $linkstart .= $linkclose.'>'; |
|
284 | 284 | if ($option == 'nolink') { |
285 | 285 | $linkend = '</span>'; |
286 | 286 | } else { |
@@ -291,29 +291,29 @@ discard block |
||
291 | 291 | |
292 | 292 | if (empty($this->showphoto_on_popup)) { |
293 | 293 | if ($withpicto) { |
294 | - $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams . ' class="' . (($withpicto != 2) ? 'paddingright ' : '') . $classfortooltip . '"'), 0, 0, $notooltip ? 0 : 1); |
|
294 | + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1); |
|
295 | 295 | } |
296 | 296 | } else { |
297 | 297 | if ($withpicto) { |
298 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
|
298 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
299 | 299 | |
300 | 300 | list($class, $module) = explode('@', $this->picto); |
301 | - $upload_dir = $conf->$module->multidir_output[$conf->entity] . "/$class/" . dol_sanitizeFileName($this->ref); |
|
301 | + $upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref); |
|
302 | 302 | $filearray = dol_dir_list($upload_dir, "files"); |
303 | 303 | $filename = $filearray[0]['name']; |
304 | 304 | if (!empty($filename)) { |
305 | 305 | $pospoint = strpos($filearray[0]['name'], '.'); |
306 | 306 | |
307 | - $pathtophoto = $class . '/' . $this->ref . '/thumbs/' . substr($filename, 0, $pospoint) . '_mini' . substr($filename, $pospoint); |
|
308 | - if (!getDolGlobalString(strtoupper($module . '_' . $class) . '_FORMATLISTPHOTOSASUSERS')) { |
|
309 | - $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo' . $module . '" alt="No photo" border="0" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $module . '&entity=' . $conf->entity . '&file=' . urlencode($pathtophoto) . '"></div></div>'; |
|
307 | + $pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint); |
|
308 | + if (!getDolGlobalString(strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS')) { |
|
309 | + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.'" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div></div>'; |
|
310 | 310 | } else { |
311 | - $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $module . '&entity=' . $conf->entity . '&file=' . urlencode($pathtophoto) . '"></div>'; |
|
311 | + $result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div>'; |
|
312 | 312 | } |
313 | 313 | |
314 | 314 | $result .= '</div>'; |
315 | 315 | } else { |
316 | - $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="' . (($withpicto != 2) ? 'paddingright ' : '') . 'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); |
|
316 | + $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); |
|
317 | 317 | } |
318 | 318 | } |
319 | 319 | } |
@@ -177,8 +177,8 @@ discard block |
||
177 | 177 | // Paiement |
178 | 178 | public $user_paid_infos; |
179 | 179 | |
180 | - public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject) |
|
181 | - public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject) |
|
180 | + public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject) |
|
181 | + public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject) |
|
182 | 182 | |
183 | 183 | public $labelStatus = array(); |
184 | 184 | public $labelStatusShort = array(); |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | $this->total_tva = 0; |
289 | 289 | $this->total_localtax1 = 0; |
290 | 290 | $this->total_localtax2 = 0; |
291 | - $this->localtax1 = 0; // For backward compatibility |
|
292 | - $this->localtax2 = 0; // For backward compatibility |
|
291 | + $this->localtax1 = 0; // For backward compatibility |
|
292 | + $this->localtax2 = 0; // For backward compatibility |
|
293 | 293 | $this->modepaymentid = 0; |
294 | 294 | |
295 | 295 | // List of language codes for status |
@@ -648,8 +648,8 @@ discard block |
||
648 | 648 | $this->total_ht = $obj->total_ht; |
649 | 649 | $this->total_tva = $obj->total_tva; |
650 | 650 | $this->total_ttc = $obj->total_ttc; |
651 | - $this->localtax1 = $obj->total_localtax1; // For backward compatibility |
|
652 | - $this->localtax2 = $obj->total_localtax2; // For backward compatibility |
|
651 | + $this->localtax1 = $obj->total_localtax1; // For backward compatibility |
|
652 | + $this->localtax2 = $obj->total_localtax2; // For backward compatibility |
|
653 | 653 | $this->total_localtax1 = $obj->total_localtax1; |
654 | 654 | $this->total_localtax2 = $obj->total_localtax2; |
655 | 655 | |
@@ -1115,7 +1115,7 @@ discard block |
||
1115 | 1115 | |
1116 | 1116 | $deplig->rule_warning_message = $objp->rule_warning_message; |
1117 | 1117 | |
1118 | - $deplig->rang = $objp->rang; |
|
1118 | + $deplig->rang = $objp->rang; |
|
1119 | 1119 | |
1120 | 1120 | $this->lines[$i] = $deplig; |
1121 | 1121 | |
@@ -1663,7 +1663,7 @@ discard block |
||
1663 | 1663 | if (getDolGlobalString('EXPENSEREPORT_ADDON')) { |
1664 | 1664 | $mybool = false; |
1665 | 1665 | |
1666 | - $file = getDolGlobalString('EXPENSEREPORT_ADDON') . ".php"; |
|
1666 | + $file = getDolGlobalString('EXPENSEREPORT_ADDON').".php"; |
|
1667 | 1667 | $classname = getDolGlobalString('EXPENSEREPORT_ADDON'); |
1668 | 1668 | |
1669 | 1669 | // Include file with class |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | $result .= $linkend; |
1819 | 1819 | |
1820 | 1820 | global $action; |
1821 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
1821 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
1822 | 1822 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
1823 | 1823 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
1824 | 1824 | if ($reshook > 0) { |
@@ -1911,8 +1911,8 @@ discard block |
||
1911 | 1911 | $this->line = new ExpenseReportLine($this->db); |
1912 | 1912 | |
1913 | 1913 | // We don't know seller and buyer for expense reports |
1914 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
1915 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
1914 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
1915 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
1916 | 1916 | $buyer = new Societe($this->db); |
1917 | 1917 | |
1918 | 1918 | $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller); |
@@ -1994,8 +1994,8 @@ discard block |
||
1994 | 1994 | |
1995 | 1995 | // We don't know seller and buyer for expense reports |
1996 | 1996 | if (!is_object($seller)) { |
1997 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
1998 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
1997 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
1998 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
1999 | 1999 | } |
2000 | 2000 | |
2001 | 2001 | $expensereportrule = new ExpenseReportRule($db); |
@@ -2079,8 +2079,8 @@ discard block |
||
2079 | 2079 | |
2080 | 2080 | // We don't know seller and buyer for expense reports |
2081 | 2081 | if (!is_object($seller)) { |
2082 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2083 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
2082 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2083 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
2084 | 2084 | } |
2085 | 2085 | |
2086 | 2086 | $expenseik = new ExpenseReportIk($this->db); |
@@ -2174,10 +2174,10 @@ discard block |
||
2174 | 2174 | $type = 0; // TODO What if type is service ? |
2175 | 2175 | |
2176 | 2176 | // We don't know seller and buyer for expense reports |
2177 | - $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2178 | - $seller->tva_assuj = 1; // Most seller uses vat |
|
2179 | - $seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2180 | - $seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2177 | + $seller = $mysoc; // We use same than current company (expense report are often done in same country) |
|
2178 | + $seller->tva_assuj = 1; // Most seller uses vat |
|
2179 | + $seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2180 | + $seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company |
|
2181 | 2181 | $buyer = new Societe($this->db); |
2182 | 2182 | |
2183 | 2183 | $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller); |
@@ -2293,7 +2293,7 @@ discard block |
||
2293 | 2293 | */ |
2294 | 2294 | public function deleteLine($rowid, $fuser = '', $notrigger = 0) |
2295 | 2295 | { |
2296 | - $error=0; |
|
2296 | + $error = 0; |
|
2297 | 2297 | |
2298 | 2298 | $this->db->begin(); |
2299 | 2299 | |
@@ -2720,10 +2720,10 @@ discard block |
||
2720 | 2720 | $sql = " SELECT count(n.qty) as cumul FROM ".MAIN_DB_PREFIX."expensereport_det n"; |
2721 | 2721 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport e ON e.rowid = n.fk_expensereport"; |
2722 | 2722 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_fees tf ON tf.id = n.fk_c_type_fees"; |
2723 | - $sql.= " WHERE e.fk_user_author = ".(int) $this->fk_user_author; |
|
2724 | - $sql.= " AND YEAR(n.date) = ".(int) $arrayDate['year']; |
|
2725 | - $sql.= " AND tf.code = 'EX_KME' "; |
|
2726 | - $sql.= " AND e.fk_statut = ".(int) ExpenseReport::STATUS_VALIDATED; |
|
2723 | + $sql .= " WHERE e.fk_user_author = ".(int) $this->fk_user_author; |
|
2724 | + $sql .= " AND YEAR(n.date) = ".(int) $arrayDate['year']; |
|
2725 | + $sql .= " AND tf.code = 'EX_KME' "; |
|
2726 | + $sql .= " AND e.fk_statut = ".(int) ExpenseReport::STATUS_VALIDATED; |
|
2727 | 2727 | |
2728 | 2728 | $resql = $this->db->query($sql); |
2729 | 2729 | |
@@ -2747,7 +2747,7 @@ discard block |
||
2747 | 2747 | |
2748 | 2748 | for ($i = 0; $i < $num; $i++) { |
2749 | 2749 | if ($i < ($num - 1)) { |
2750 | - if ($qty > $ranges[$i]->range_ik && $qty < $ranges[$i+1]->range_ik) { |
|
2750 | + if ($qty > $ranges[$i]->range_ik && $qty < $ranges[$i + 1]->range_ik) { |
|
2751 | 2751 | $coef = $ranges[$i]->coef; |
2752 | 2752 | $offset = $ranges[$i]->ikoffset; |
2753 | 2753 | } |
@@ -3114,7 +3114,7 @@ discard block |
||
3114 | 3114 | } elseif ($mode == 'mon' || $mode == 'EX_MON') { |
3115 | 3115 | $sql .= " AND DATE_FORMAT(d.date, '%Y-%m') = '".dol_print_date($this->date, '%Y-%m')."'"; // @todo DATE_FORMAT is forbidden |
3116 | 3116 | } elseif ($mode == 'year' || $mode == 'EX_YEA') { |
3117 | - $sql .= " AND DATE_FORMAT(d.date, '%Y') = '".dol_print_date($this->date, '%Y')."'"; // @todo DATE_FORMAT is forbidden |
|
3117 | + $sql .= " AND DATE_FORMAT(d.date, '%Y') = '".dol_print_date($this->date, '%Y')."'"; // @todo DATE_FORMAT is forbidden |
|
3118 | 3118 | } |
3119 | 3119 | |
3120 | 3120 | dol_syslog('ExpenseReportLine::getExpAmount'); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0); |
134 | 134 | $result = $object->cancel($user, 0, $also_cancel_consumed_and_produced_lines); |
135 | 135 | if ($result > 0) { |
136 | - header("Location: " . DOL_URL_ROOT.'/mrp/mo_card.php?id=' . $object->id); |
|
136 | + header("Location: ".DOL_URL_ROOT.'/mrp/mo_card.php?id='.$object->id); |
|
137 | 137 | exit; |
138 | 138 | } else { |
139 | 139 | $action = ''; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0); |
144 | 144 | $result = $object->delete($user, 0, $also_cancel_consumed_and_produced_lines); |
145 | 145 | if ($result > 0) { |
146 | - header("Location: " . $backurlforlist); |
|
146 | + header("Location: ".$backurlforlist); |
|
147 | 147 | exit; |
148 | 148 | } else { |
149 | 149 | $action = ''; |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | 'value' => !getDolGlobalString('MO_ALSO_CANCEL_CONSUMED_AND_PRODUCED_LINES_BY_DEFAULT') ? 0 : 1 |
604 | 604 | ), |
605 | 605 | ); |
606 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CancelMo'), $langs->trans('ConfirmCancelMo'), 'confirm_cancel', $formquestion, 0, 1); |
|
606 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CancelMo'), $langs->trans('ConfirmCancelMo'), 'confirm_cancel', $formquestion, 0, 1); |
|
607 | 607 | } |
608 | 608 | |
609 | 609 | // Call Hook formConfirm |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | print '<td class="right">'.$langs->trans("Qty").'</td>'; |
842 | 842 | // Unit |
843 | 843 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
844 | - print '<td class="right">' . $langs->trans("Unit") . '</td>'; |
|
844 | + print '<td class="right">'.$langs->trans("Unit").'</td>'; |
|
845 | 845 | } |
846 | 846 | // Cost price |
847 | 847 | if ($permissiontoupdatecost && getDolGlobalString('MRP_SHOW_COST_FOR_CONSUMPTION')) { |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | |
959 | 959 | // Lines to consume |
960 | 960 | |
961 | - $bomcostupdated = 0; // We will recalculate the unitary cost to produce a product using the real "products to consume into MO" |
|
961 | + $bomcostupdated = 0; // We will recalculate the unitary cost to produce a product using the real "products to consume into MO" |
|
962 | 962 | |
963 | 963 | if (!empty($object->lines)) { |
964 | 964 | $nblinetoconsume = 0; |
@@ -989,8 +989,8 @@ discard block |
||
989 | 989 | $costprice = 0; |
990 | 990 | } |
991 | 991 | } |
992 | - $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
993 | - $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
992 | + $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
993 | + $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
994 | 994 | } |
995 | 995 | |
996 | 996 | $bomcostupdated = price2num($bomcostupdated, 'MU'); |
@@ -1010,23 +1010,23 @@ discard block |
||
1010 | 1010 | $alreadyconsumed += $line2['qty']; |
1011 | 1011 | } |
1012 | 1012 | } |
1013 | - $suffix = '_' . $line->id; |
|
1014 | - print '<!-- Line to dispatch ' . $suffix . ' -->' . "\n"; |
|
1013 | + $suffix = '_'.$line->id; |
|
1014 | + print '<!-- Line to dispatch '.$suffix.' -->'."\n"; |
|
1015 | 1015 | // hidden fields for js function |
1016 | - print '<input id="qty_ordered' . $suffix . '" type="hidden" value="' . $line->qty . '">'; |
|
1016 | + print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$line->qty.'">'; |
|
1017 | 1017 | // Duration - Time spent |
1018 | - print '<input id="qty_dispatched' . $suffix . '" type="hidden" value="' . $alreadyconsumed . '">'; |
|
1018 | + print '<input id="qty_dispatched'.$suffix.'" type="hidden" value="'.$alreadyconsumed.'">'; |
|
1019 | 1019 | print '<tr>'; |
1020 | - print '<input name="lineid" type="hidden" value="' . $line->id . '">'; |
|
1020 | + print '<input name="lineid" type="hidden" value="'.$line->id.'">'; |
|
1021 | 1021 | |
1022 | 1022 | // Product |
1023 | - print '<td>' . $tmpproduct->getNomUrl(1); |
|
1024 | - print '<br><div class="opacitymedium small tdoverflowmax150" title="' . dol_escape_htmltag($tmpproduct->label) . '">' . $tmpproduct->label . '</span>'; |
|
1023 | + print '<td>'.$tmpproduct->getNomUrl(1); |
|
1024 | + print '<br><div class="opacitymedium small tdoverflowmax150" title="'.dol_escape_htmltag($tmpproduct->label).'">'.$tmpproduct->label.'</span>'; |
|
1025 | 1025 | print '</td>'; |
1026 | 1026 | |
1027 | 1027 | // Qty |
1028 | 1028 | print '<td class="right nowraponall">'; |
1029 | - print '<input class="width40" name="qty_lineProduce" value="'. $line->qty.'">'; |
|
1029 | + print '<input class="width40" name="qty_lineProduce" value="'.$line->qty.'">'; |
|
1030 | 1030 | print '</td>'; |
1031 | 1031 | // Unit |
1032 | 1032 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | } |
1037 | 1037 | // Qty consumed |
1038 | 1038 | print '<td class="right">'; |
1039 | - print ' ' . price2num($alreadyconsumed, 'MS'); |
|
1039 | + print ' '.price2num($alreadyconsumed, 'MS'); |
|
1040 | 1040 | print '</td>'; |
1041 | 1041 | // Entrepot |
1042 | 1042 | print '<td class="right">'; |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { |
1048 | 1048 | print img_warning($langs->trans('StockTooLow')).' '; |
1049 | 1049 | } |
1050 | - print '<span class="left">'. $tmpproduct->stock_reel .' </span>'; |
|
1050 | + print '<span class="left">'.$tmpproduct->stock_reel.' </span>'; |
|
1051 | 1051 | } |
1052 | 1052 | print '</td>'; |
1053 | 1053 | |
@@ -1059,8 +1059,8 @@ discard block |
||
1059 | 1059 | |
1060 | 1060 | // Action delete line |
1061 | 1061 | print '<td colspan="2">'; |
1062 | - print '<input type="submit" class="button buttongen button-add small nominwidth" name="save" value="' . $langs->trans("Save") . '">'; |
|
1063 | - print '<input type="submit" class="button buttongen button-cancel small nominwidth" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
1062 | + print '<input type="submit" class="button buttongen button-add small nominwidth" name="save" value="'.$langs->trans("Save").'">'; |
|
1063 | + print '<input type="submit" class="button buttongen button-cancel small nominwidth" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
1064 | 1064 | print '</td>'; |
1065 | 1065 | |
1066 | 1066 | // Action delete line |
@@ -1081,28 +1081,28 @@ discard block |
||
1081 | 1081 | } |
1082 | 1082 | } |
1083 | 1083 | } else { |
1084 | - $suffix = '_' . $line->id; |
|
1085 | - print '<!-- Line to dispatch ' . $suffix . ' -->' . "\n"; |
|
1084 | + $suffix = '_'.$line->id; |
|
1085 | + print '<!-- Line to dispatch '.$suffix.' -->'."\n"; |
|
1086 | 1086 | // hidden fields for js function |
1087 | - print '<input id="qty_ordered' . $suffix . '" type="hidden" value="' . $line->qty . '">'; |
|
1088 | - print '<input id="qty_dispatched' . $suffix . '" type="hidden" value="' . $alreadyconsumed . '">'; |
|
1087 | + print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$line->qty.'">'; |
|
1088 | + print '<input id="qty_dispatched'.$suffix.'" type="hidden" value="'.$alreadyconsumed.'">'; |
|
1089 | 1089 | |
1090 | - print '<tr data-line-id="' . $line->id . '">'; |
|
1090 | + print '<tr data-line-id="'.$line->id.'">'; |
|
1091 | 1091 | // Product |
1092 | - print '<td>' . $tmpproduct->getNomUrl(1); |
|
1093 | - print '<br><div class="opacitymedium small tdoverflowmax150" title="' . dol_escape_htmltag($tmpproduct->label) . '">' . $tmpproduct->label . '</div>'; |
|
1092 | + print '<td>'.$tmpproduct->getNomUrl(1); |
|
1093 | + print '<br><div class="opacitymedium small tdoverflowmax150" title="'.dol_escape_htmltag($tmpproduct->label).'">'.$tmpproduct->label.'</div>'; |
|
1094 | 1094 | print '</td>'; |
1095 | 1095 | // Qty |
1096 | 1096 | print '<td class="right nowraponall">'; |
1097 | 1097 | $help = ''; |
1098 | 1098 | $picto = 'help'; |
1099 | 1099 | if ($line->qty_frozen) { |
1100 | - $help = ($help ? '<br>' : '') . '<strong>' . $langs->trans("QuantityFrozen") . '</strong>: ' . yn(1) . ' (' . $langs->trans("QuantityConsumedInvariable") . ')'; |
|
1101 | - print $form->textwithpicto('', $help, -1, 'lock') . ' '; |
|
1100 | + $help = ($help ? '<br>' : '').'<strong>'.$langs->trans("QuantityFrozen").'</strong>: '.yn(1).' ('.$langs->trans("QuantityConsumedInvariable").')'; |
|
1101 | + print $form->textwithpicto('', $help, -1, 'lock').' '; |
|
1102 | 1102 | } |
1103 | 1103 | if ($line->disable_stock_change) { |
1104 | - $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")) . ')'; |
|
1105 | - print $form->textwithpicto('', $help, -1, 'help') . ' '; |
|
1104 | + $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")).')'; |
|
1105 | + print $form->textwithpicto('', $help, -1, 'help').' '; |
|
1106 | 1106 | } |
1107 | 1107 | print price2num($line->qty, 'MS'); |
1108 | 1108 | print '</td>'; |
@@ -1123,9 +1123,9 @@ discard block |
||
1123 | 1123 | if ($alreadyconsumed) { |
1124 | 1124 | print '<script>'; |
1125 | 1125 | print 'jQuery(document).ready(function() { |
1126 | - jQuery("#expandtoproduce' . $line->id . '").click(function() { |
|
1127 | - console.log("Expand mrp_production line ' . $line->id . '"); |
|
1128 | - jQuery(".expanddetail' . $line->id . '").toggle();'; |
|
1126 | + jQuery("#expandtoproduce' . $line->id.'").click(function() { |
|
1127 | + console.log("Expand mrp_production line ' . $line->id.'"); |
|
1128 | + jQuery(".expanddetail' . $line->id.'").toggle();'; |
|
1129 | 1129 | if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line |
1130 | 1130 | print 'if (jQuery("#tablelines").hasClass("nobottom")) { jQuery("#tablelines").removeClass("nobottom"); } else { jQuery("#tablelines").addClass("nobottom"); }'; |
1131 | 1131 | } |
@@ -1134,9 +1134,9 @@ discard block |
||
1134 | 1134 | });'; |
1135 | 1135 | print '</script>'; |
1136 | 1136 | if (empty($conf->use_javascript_ajax)) { |
1137 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?collapse=' . $collapse . ',' . $line->id . '">'; |
|
1137 | + print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">'; |
|
1138 | 1138 | } |
1139 | - print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce' . $line->id . '"'); |
|
1139 | + print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"'); |
|
1140 | 1140 | if (empty($conf->use_javascript_ajax)) { |
1141 | 1141 | print '</a>'; |
1142 | 1142 | } |
@@ -1145,12 +1145,12 @@ discard block |
||
1145 | 1145 | print '<script>jQuery("#tablelines").removeClass("nobottom");</script>'; |
1146 | 1146 | } |
1147 | 1147 | } |
1148 | - print ' ' . price2num($alreadyconsumed, 'MS'); |
|
1148 | + print ' '.price2num($alreadyconsumed, 'MS'); |
|
1149 | 1149 | print '</td>'; |
1150 | 1150 | // Warehouse and/or workstation |
1151 | 1151 | print '<td>'; |
1152 | 1152 | if (getDolGlobalString('STOCK_CONSUMPTION_FROM_MANUFACTURING_WAREHOUSE') && $tmpwarehouse->id > 0) { |
1153 | - print img_picto('', $tmpwarehouse->picto) . " " . $tmpwarehouse->label; |
|
1153 | + print img_picto('', $tmpwarehouse->picto)." ".$tmpwarehouse->label; |
|
1154 | 1154 | } |
1155 | 1155 | if (isModEnabled('workstation') && $line->fk_default_workstation > 0) { |
1156 | 1156 | $tmpworkstation = new Workstation($db); |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | print '<td class="nowraponall right">'; |
1164 | 1164 | if (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') && $tmpproduct->type != Product::TYPE_SERVICE) { |
1165 | 1165 | if (!$line->disable_stock_change && $tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { |
1166 | - print img_warning($langs->trans('StockTooLow')) . ' '; |
|
1166 | + print img_warning($langs->trans('StockTooLow')).' '; |
|
1167 | 1167 | } |
1168 | 1168 | if (!getDolGlobalString('STOCK_CONSUMPTION_FROM_MANUFACTURING_WAREHOUSE') || empty($tmpwarehouse->id)) { |
1169 | 1169 | print price2num($tmpproduct->stock_reel, 'MS'); // Available |
@@ -1193,9 +1193,9 @@ discard block |
||
1193 | 1193 | |
1194 | 1194 | // Action Edit line |
1195 | 1195 | if ($object->status == Mo::STATUS_DRAFT) { |
1196 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=editline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1196 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=editline&token='.newToken().'&lineid='.((int) $line->id); |
|
1197 | 1197 | print '<td class="center">'; |
1198 | - print '<a class="reposition" href="' . $href . '">'; |
|
1198 | + print '<a class="reposition" href="'.$href.'">'; |
|
1199 | 1199 | print img_picto($langs->trans('TooltipEditAndRevertStockMovement'), 'edit'); |
1200 | 1200 | print '</a>'; |
1201 | 1201 | print '</td>'; |
@@ -1203,9 +1203,9 @@ discard block |
||
1203 | 1203 | |
1204 | 1204 | // Action delete line |
1205 | 1205 | if ($permissiontodelete) { |
1206 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=deleteline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1206 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=deleteline&token='.newToken().'&lineid='.((int) $line->id); |
|
1207 | 1207 | print '<td class="center">'; |
1208 | - print '<a class="reposition" href="' . $href . '">'; |
|
1208 | + print '<a class="reposition" href="'.$href.'">'; |
|
1209 | 1209 | print img_picto($langs->trans('TooltipDeleteAndRevertStockMovement'), 'delete'); |
1210 | 1210 | print '</a>'; |
1211 | 1211 | print '</td>'; |
@@ -1278,9 +1278,9 @@ discard block |
||
1278 | 1278 | |
1279 | 1279 | // Action Edit line |
1280 | 1280 | if ($object->status == Mo::STATUS_DRAFT) { |
1281 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=editline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1281 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=editline&token='.newToken().'&lineid='.((int) $line->id); |
|
1282 | 1282 | print '<td class="center">'; |
1283 | - print '<a class="reposition" href="' . $href . '">'; |
|
1283 | + print '<a class="reposition" href="'.$href.'">'; |
|
1284 | 1284 | print img_picto($langs->trans('TooltipEditAndRevertStockMovement'), 'edit'); |
1285 | 1285 | print '</a>'; |
1286 | 1286 | print '</td>'; |
@@ -1320,7 +1320,7 @@ discard block |
||
1320 | 1320 | print '<input type="hidden" name="product-'.$line->id.'-'.$i.'" value="'.$line->fk_product.'">'; |
1321 | 1321 | |
1322 | 1322 | // Qty |
1323 | - print '<td class="right"><input type="text" class="width50 right" id="qtytoconsume-' . $line->id . '-' . $i . '" name="qty-' . $line->id . '-' . $i . '" value="' . $preselected . '" ' . $disable . '></td>'; |
|
1323 | + print '<td class="right"><input type="text" class="width50 right" id="qtytoconsume-'.$line->id.'-'.$i.'" name="qty-'.$line->id.'-'.$i.'" value="'.$preselected.'" '.$disable.'></td>'; |
|
1324 | 1324 | |
1325 | 1325 | // Unit |
1326 | 1326 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
@@ -1834,7 +1834,7 @@ discard block |
||
1834 | 1834 | |
1835 | 1835 | $.ajax({ |
1836 | 1836 | type: "POST", |
1837 | - url: "<?php echo DOL_URL_ROOT . '/mrp/ajax/interface.php'; ?>", |
|
1837 | + url: "<?php echo DOL_URL_ROOT.'/mrp/ajax/interface.php'; ?>", |
|
1838 | 1838 | data: { |
1839 | 1839 | action: "updateselectbatchbywarehouse", |
1840 | 1840 | permissiontoproduce: <?php echo $permissiontoproduce ?>, |
@@ -1895,7 +1895,7 @@ discard block |
||
1895 | 1895 | |
1896 | 1896 | $.ajax({ |
1897 | 1897 | type: "POST", |
1898 | - url: "<?php echo DOL_URL_ROOT . '/mrp/ajax/interface.php'; ?>", |
|
1898 | + url: "<?php echo DOL_URL_ROOT.'/mrp/ajax/interface.php'; ?>", |
|
1899 | 1899 | data: { |
1900 | 1900 | action: "updateselectwarehousebybatch", |
1901 | 1901 | permissiontoproduce: <?php echo $permissiontoproduce ?>, |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | $this->mode_reglement_id = 0; |
472 | 472 | } |
473 | 473 | $this->status = self::STATUS_DRAFT; |
474 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
474 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
475 | 475 | |
476 | 476 | if (!empty($this->multicurrency_code)) { |
477 | 477 | // Multicurrency (test on $this->multicurrency_tx because we should take the default rate of multicurrency_code only if not using original rate) |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | if (!empty($_facrec->frequency)) { // Invoice are created on same thirdparty than template when there is a recurrence, but not necessarily when there is no recurrence. |
538 | 538 | $this->socid = $_facrec->socid; |
539 | 539 | } |
540 | - $this->entity = $_facrec->entity; // Invoice created in same entity than template |
|
540 | + $this->entity = $_facrec->entity; // Invoice created in same entity than template |
|
541 | 541 | |
542 | 542 | // Fields coming from GUI. |
543 | 543 | // @TODO Value of template should be used as default value on the form on the GUI, and we should here always use the value from GUI |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | $this->mode_reglement_id = 0; |
577 | 577 | } |
578 | 578 | $this->status = self::STATUS_DRAFT; |
579 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
579 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
580 | 580 | |
581 | 581 | $this->linked_objects = $_facrec->linkedObjectsIds; |
582 | 582 | // We do not add link to template invoice or next invoice will be linked to all generated invoices |
@@ -820,8 +820,8 @@ discard block |
||
820 | 820 | |
821 | 821 | // Complete vat rate with code |
822 | 822 | $vatrate = $newinvoiceline->tva_tx; |
823 | - if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) { |
|
824 | - $vatrate.=' ('.$newinvoiceline->vat_src_code.')'; |
|
823 | + if ($newinvoiceline->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) { |
|
824 | + $vatrate .= ' ('.$newinvoiceline->vat_src_code.')'; |
|
825 | 825 | } |
826 | 826 | |
827 | 827 | $newinvoiceline->fk_parent_line = $fk_parent_line; |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | $buyprice, |
1053 | 1053 | $_facrec->lines[$i]->label, |
1054 | 1054 | empty($_facrec->lines[$i]->array_options) ? null : $_facrec->lines[$i]->array_options, |
1055 | - 100, // situation percent is undefined on recurring invoice lines |
|
1055 | + 100, // situation percent is undefined on recurring invoice lines |
|
1056 | 1056 | '', |
1057 | 1057 | $_facrec->lines[$i]->fk_unit, |
1058 | 1058 | $_facrec->lines[$i]->multicurrency_subprice, |
@@ -1148,7 +1148,7 @@ discard block |
||
1148 | 1148 | |
1149 | 1149 | $facture->fk_facture_source = $this->fk_facture_source; |
1150 | 1150 | $facture->type = $this->type; |
1151 | - $facture->subtype = $this->subtype; |
|
1151 | + $facture->subtype = $this->subtype; |
|
1152 | 1152 | $facture->socid = $this->socid; |
1153 | 1153 | $facture->date = $this->date; |
1154 | 1154 | $facture->date_pointoftax = $this->date_pointoftax; |
@@ -1164,7 +1164,7 @@ discard block |
||
1164 | 1164 | |
1165 | 1165 | $facture->origin = $this->origin; |
1166 | 1166 | $facture->origin_id = $this->origin_id; |
1167 | - $facture->fk_account = $this->fk_account; |
|
1167 | + $facture->fk_account = $this->fk_account; |
|
1168 | 1168 | |
1169 | 1169 | $facture->lines = $this->lines; // Array of lines of invoice |
1170 | 1170 | $facture->situation_counter = $this->situation_counter; |
@@ -1635,7 +1635,7 @@ discard block |
||
1635 | 1635 | { |
1636 | 1636 | global $conf, $langs, $hookmanager, $action; |
1637 | 1637 | |
1638 | - if (! in_array($origin->element, array('propal', 'commande'))) { |
|
1638 | + if (!in_array($origin->element, array('propal', 'commande'))) { |
|
1639 | 1639 | $origin->error = 'ErrorCanOnlyAutomaticallyGenerateADepositFromProposalOrOrder'; |
1640 | 1640 | return null; |
1641 | 1641 | } |
@@ -1645,7 +1645,7 @@ discard block |
||
1645 | 1645 | return null; |
1646 | 1646 | } |
1647 | 1647 | |
1648 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
1648 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
1649 | 1649 | |
1650 | 1650 | if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) { |
1651 | 1651 | $origin->error = 'ErrorDateIsInFuture'; |
@@ -1689,7 +1689,7 @@ discard block |
||
1689 | 1689 | $deposit->pos_source = $origin->pos_source; |
1690 | 1690 | $deposit->model_pdf = 'crabe'; |
1691 | 1691 | |
1692 | - $modelByTypeConfName = 'FACTURE_ADDON_PDF_' . $deposit->type; |
|
1692 | + $modelByTypeConfName = 'FACTURE_ADDON_PDF_'.$deposit->type; |
|
1693 | 1693 | |
1694 | 1694 | if (getDolGlobalString($modelByTypeConfName)) { |
1695 | 1695 | $deposit->model_pdf = getDolGlobalString($modelByTypeConfName); |
@@ -1744,10 +1744,10 @@ discard block |
||
1744 | 1744 | continue; |
1745 | 1745 | } |
1746 | 1746 | $TTotalByTva[$line->tva_tx] += $line->total_ttc; |
1747 | - $descriptions[$line->tva_tx] .= '<li>' . (!empty($line->product_ref) ? $line->product_ref . ' - ' : ''); |
|
1748 | - $descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label . ' - ' : ''); |
|
1749 | - $descriptions[$line->tva_tx] .= $langs->trans('Qty') . ' : ' . $line->qty; |
|
1750 | - $descriptions[$line->tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($line->total_ht) . '</li>'; |
|
1747 | + $descriptions[$line->tva_tx] .= '<li>'.(!empty($line->product_ref) ? $line->product_ref.' - ' : ''); |
|
1748 | + $descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label.' - ' : ''); |
|
1749 | + $descriptions[$line->tva_tx] .= $langs->trans('Qty').' : '.$line->qty; |
|
1750 | + $descriptions[$line->tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($line->total_ht).'</li>'; |
|
1751 | 1751 | } |
1752 | 1752 | |
1753 | 1753 | foreach ($TTotalByTva as $tva => &$total) { |
@@ -1771,10 +1771,10 @@ discard block |
||
1771 | 1771 | $totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ? |
1772 | 1772 | $tva_tx = $lines[$i]->tva_tx; |
1773 | 1773 | $amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $origin->deposit_percent) / 100; |
1774 | - $descriptions[$tva_tx] .= '<li>' . (!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref . ' - ' : ''); |
|
1775 | - $descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label . ' - ' : ''); |
|
1776 | - $descriptions[$tva_tx] .= $langs->trans('Qty') . ' : ' . $lines[$i]->qty; |
|
1777 | - $descriptions[$tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($lines[$i]->total_ht) . '</li>'; |
|
1774 | + $descriptions[$tva_tx] .= '<li>'.(!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref.' - ' : ''); |
|
1775 | + $descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label.' - ' : ''); |
|
1776 | + $descriptions[$tva_tx] .= $langs->trans('Qty').' : '.$lines[$i]->qty; |
|
1777 | + $descriptions[$tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($lines[$i]->total_ht).'</li>'; |
|
1778 | 1778 | } |
1779 | 1779 | |
1780 | 1780 | if ($totalamount == 0) { |
@@ -1789,11 +1789,11 @@ discard block |
||
1789 | 1789 | continue; |
1790 | 1790 | } |
1791 | 1791 | |
1792 | - $descline = '(DEPOSIT) ('. $origin->deposit_percent .'%) - '.$origin->ref; |
|
1792 | + $descline = '(DEPOSIT) ('.$origin->deposit_percent.'%) - '.$origin->ref; |
|
1793 | 1793 | |
1794 | 1794 | // Hidden conf |
1795 | 1795 | if (getDolGlobalString('INVOICE_DEPOSIT_VARIABLE_MODE_DETAIL_LINES_IN_DESCRIPTION') && !empty($descriptions[$tva])) { |
1796 | - $descline .= '<ul>' . $descriptions[$tva] . '</ul>'; |
|
1796 | + $descline .= '<ul>'.$descriptions[$tva].'</ul>'; |
|
1797 | 1797 | } |
1798 | 1798 | |
1799 | 1799 | $addlineResult = $deposit->addline( |
@@ -2166,9 +2166,9 @@ discard block |
||
2166 | 2166 | $this->id = $obj->rowid; |
2167 | 2167 | $this->entity = $obj->entity; |
2168 | 2168 | |
2169 | - $this->ref = $obj->ref; |
|
2170 | - $this->ref_client = $obj->ref_client; |
|
2171 | - $this->ref_customer = $obj->ref_client; |
|
2169 | + $this->ref = $obj->ref; |
|
2170 | + $this->ref_client = $obj->ref_client; |
|
2171 | + $this->ref_customer = $obj->ref_client; |
|
2172 | 2172 | $this->ref_ext = $obj->ref_ext; |
2173 | 2173 | $this->type = $obj->type; |
2174 | 2174 | $this->subtype = $obj->subtype; |
@@ -2194,7 +2194,7 @@ discard block |
||
2194 | 2194 | $this->fk_project = $obj->fk_project; |
2195 | 2195 | $this->project = null; // Clear if another value was already set by fetch_projet |
2196 | 2196 | |
2197 | - $this->statut = $obj->status; // deprecated |
|
2197 | + $this->statut = $obj->status; // deprecated |
|
2198 | 2198 | $this->status = $obj->status; |
2199 | 2199 | |
2200 | 2200 | $this->date_lim_reglement = $this->db->jdate($obj->dlr); |
@@ -2210,7 +2210,7 @@ discard block |
||
2210 | 2210 | $this->fk_fac_rec_source = $obj->fk_fac_rec_source; |
2211 | 2211 | $this->note = $obj->note_private; // deprecated |
2212 | 2212 | $this->note_private = $obj->note_private; |
2213 | - $this->note_public = $obj->note_public; |
|
2213 | + $this->note_public = $obj->note_public; |
|
2214 | 2214 | $this->user_creation_id = $obj->fk_user_author; |
2215 | 2215 | $this->user_validation_id = $obj->fk_user_valid; |
2216 | 2216 | $this->user_modification_id = $obj->fk_user_modif; |
@@ -2324,7 +2324,7 @@ discard block |
||
2324 | 2324 | $line->ref = $objp->product_ref; // Ref product |
2325 | 2325 | $line->product_ref = $objp->product_ref; // Ref product |
2326 | 2326 | $line->libelle = $objp->product_label; // deprecated |
2327 | - $line->product_label = $objp->product_label; // Label product |
|
2327 | + $line->product_label = $objp->product_label; // Label product |
|
2328 | 2328 | $line->product_barcode = $objp->product_barcode; // Barcode number product |
2329 | 2329 | $line->product_desc = $objp->product_desc; // Description product |
2330 | 2330 | $line->fk_product_type = $objp->fk_product_type; // Type of product |
@@ -2623,7 +2623,7 @@ discard block |
||
2623 | 2623 | $facligne->rang = 1; |
2624 | 2624 | $linecount = count($this->lines); |
2625 | 2625 | for ($ii = 1; $ii <= $linecount; $ii++) { |
2626 | - $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1); |
|
2626 | + $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); |
|
2627 | 2627 | } |
2628 | 2628 | } |
2629 | 2629 | |
@@ -3200,10 +3200,10 @@ discard block |
||
3200 | 3200 | if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'creer')) |
3201 | 3201 | || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'invoice_advance', 'validate'))) { |
3202 | 3202 | $this->error = 'Permission denied'; |
3203 | - dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS=' . getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR); |
|
3203 | + dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS='.getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR); |
|
3204 | 3204 | return -1; |
3205 | 3205 | } |
3206 | - if ((preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) && // empty should not happened, but when it occurs, the test save life |
|
3206 | + if ((preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) && // empty should not happened, but when it occurs, the test save life |
|
3207 | 3207 | getDolGlobalString('FAC_FORCE_DATE_VALIDATION') // If option enabled, we force invoice date |
3208 | 3208 | ) { |
3209 | 3209 | $this->date = dol_now(); |
@@ -3557,7 +3557,7 @@ discard block |
||
3557 | 3557 | // Set new ref and define current status |
3558 | 3558 | if (!$error) { |
3559 | 3559 | $this->ref = $num; |
3560 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
3560 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
3561 | 3561 | $this->status = self::STATUS_VALIDATED; |
3562 | 3562 | $this->date_validation = $now; |
3563 | 3563 | $i = 0; |
@@ -3702,7 +3702,7 @@ discard block |
||
3702 | 3702 | |
3703 | 3703 | if ($error == 0) { |
3704 | 3704 | $old_statut = $this->status; |
3705 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
3705 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
3706 | 3706 | $this->status = self::STATUS_DRAFT; |
3707 | 3707 | |
3708 | 3708 | // Call trigger |
@@ -4033,7 +4033,7 @@ discard block |
||
4033 | 4033 | return -2; |
4034 | 4034 | } |
4035 | 4035 | } else { |
4036 | - $this->errors[]='status of invoice must be Draft to allow use of ->addline()'; |
|
4036 | + $this->errors[] = 'status of invoice must be Draft to allow use of ->addline()'; |
|
4037 | 4037 | dol_syslog(get_class($this)."::addline status of invoice must be Draft to allow use of ->addline()", LOG_ERR); |
4038 | 4038 | return -3; |
4039 | 4039 | } |
@@ -4599,7 +4599,7 @@ discard block |
||
4599 | 4599 | } |
4600 | 4600 | |
4601 | 4601 | if (!empty($addon)) { |
4602 | - dol_syslog("Call getNextNumRef with ".$addonConstName." = " . getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG); |
|
4602 | + dol_syslog("Call getNextNumRef with ".$addonConstName." = ".getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG); |
|
4603 | 4603 | |
4604 | 4604 | $mybool = false; |
4605 | 4605 | |
@@ -5671,14 +5671,14 @@ discard block |
||
5671 | 5671 | if (!empty($paymentmode) && $paymentmode != 'all') { |
5672 | 5672 | $sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp"; |
5673 | 5673 | } |
5674 | - $sql .= " WHERE f.paye = 0"; // Only unpaid |
|
5675 | - $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status |
|
5674 | + $sql .= " WHERE f.paye = 0"; // Only unpaid |
|
5675 | + $sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status |
|
5676 | 5676 | if ($datetouse == 'invoicedate') { |
5677 | 5677 | $sql .= " AND f.datef = '".$this->db->idate($tmpidate, 'gmt')."'"; |
5678 | 5678 | } else { |
5679 | 5679 | $sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'"; |
5680 | 5680 | } |
5681 | - $sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing) |
|
5681 | + $sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing) |
|
5682 | 5682 | if (!empty($paymentmode) && $paymentmode != 'all') { |
5683 | 5683 | $sql .= " AND f.fk_mode_reglement = cp.id AND cp.code = '".$this->db->escape($paymentmode)."'"; |
5684 | 5684 | } |
@@ -5896,7 +5896,7 @@ discard block |
||
5896 | 5896 | $actioncomm->create($user); |
5897 | 5897 | } |
5898 | 5898 | |
5899 | - $this->db->commit(); // We always commit |
|
5899 | + $this->db->commit(); // We always commit |
|
5900 | 5900 | } |
5901 | 5901 | |
5902 | 5902 | if ($errormesg) { |
@@ -5938,7 +5938,7 @@ discard block |
||
5938 | 5938 | // get date of last validated invoices of same type |
5939 | 5939 | $sql = "SELECT datef"; |
5940 | 5940 | $sql .= " FROM ".MAIN_DB_PREFIX."facture"; |
5941 | - $sql .= " WHERE type = " . (int) $this->type ; |
|
5941 | + $sql .= " WHERE type = ".(int) $this->type; |
|
5942 | 5942 | $sql .= " AND date_valid IS NOT NULL"; |
5943 | 5943 | $sql .= " AND entity IN (".getEntity('invoice').")"; |
5944 | 5944 | $sql .= " ORDER BY datef DESC LIMIT 1"; |
@@ -6143,7 +6143,7 @@ discard block |
||
6143 | 6143 | $objp = $this->db->fetch_object($result); |
6144 | 6144 | |
6145 | 6145 | if (!$objp) { |
6146 | - $this->error = 'InvoiceLine with id '. $rowid .' not found sql='.$sql; |
|
6146 | + $this->error = 'InvoiceLine with id '.$rowid.' not found sql='.$sql; |
|
6147 | 6147 | return 0; |
6148 | 6148 | } |
6149 | 6149 |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | global $conf, $langs; |
297 | 297 | |
298 | 298 | $error = 0; |
299 | - $way = $this->getWay(); // 'dolibarr' to use amount, 'customer' to use foreign multicurrency amount |
|
299 | + $way = $this->getWay(); // 'dolibarr' to use amount, 'customer' to use foreign multicurrency amount |
|
300 | 300 | |
301 | 301 | $now = dol_now(); |
302 | 302 | |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $this->error = $hookmanager->error; |
455 | 455 | $error++; |
456 | 456 | } elseif ($reshook == 0) { |
457 | - dol_syslog("Remain to pay for invoice " . $facid . " not null. We do nothing more."); |
|
457 | + dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); |
|
458 | 458 | } |
459 | 459 | // } else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more."); |
460 | 460 | } else { |
@@ -737,8 +737,8 @@ discard block |
||
737 | 737 | |
738 | 738 | // if dolibarr currency != bank currency then we received an amount in customer currency (currently I don't manage the case : my currency is USD, the customer currency is EUR and he paid me in GBP. Seems no sense for me) |
739 | 739 | if (isModEnabled('multicurrency') && $conf->currency != $acc->currency_code) { |
740 | - $totalamount = $this->multicurrency_amount; // We will insert into llx_bank.amount in foreign currency |
|
741 | - $totalamount_main_currency = $this->amount; // We will also save the amount in main currency into column llx_bank.amount_main_currency |
|
740 | + $totalamount = $this->multicurrency_amount; // We will insert into llx_bank.amount in foreign currency |
|
741 | + $totalamount_main_currency = $this->amount; // We will also save the amount in main currency into column llx_bank.amount_main_currency |
|
742 | 742 | } |
743 | 743 | |
744 | 744 | if ($mode == 'payment_supplier') { |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | |
849 | 849 | // Add link to the Direct Debit if invoice refused ('InvoiceRefused') in bank_url |
850 | 850 | if (!$error && $label == '(InvoiceRefused)') { |
851 | - $result=$acc->add_url_line( |
|
851 | + $result = $acc->add_url_line( |
|
852 | 852 | $bank_line_id, |
853 | 853 | $this->id_prelevement, |
854 | 854 | DOL_URL_ROOT.'/compta/prelevement/card.php?id=', |
@@ -1172,7 +1172,7 @@ discard block |
||
1172 | 1172 | if (getDolGlobalString('PAYMENT_ADDON')) { |
1173 | 1173 | $mybool = false; |
1174 | 1174 | |
1175 | - $file = getDolGlobalString('PAYMENT_ADDON') . ".php"; |
|
1175 | + $file = getDolGlobalString('PAYMENT_ADDON').".php"; |
|
1176 | 1176 | $classname = getDolGlobalString('PAYMENT_ADDON'); |
1177 | 1177 | |
1178 | 1178 | // Include file with class |
@@ -1189,8 +1189,8 @@ discard block |
||
1189 | 1189 | |
1190 | 1190 | // For compatibility |
1191 | 1191 | if (!$mybool) { |
1192 | - $file = getDolGlobalString('PAYMENT_ADDON') . ".php"; |
|
1193 | - $classname = "mod_payment_" . getDolGlobalString('PAYMENT_ADDON'); |
|
1192 | + $file = getDolGlobalString('PAYMENT_ADDON').".php"; |
|
1193 | + $classname = "mod_payment_".getDolGlobalString('PAYMENT_ADDON'); |
|
1194 | 1194 | $classname = preg_replace('/\-.*$/', '', $classname); |
1195 | 1195 | // Include file with class |
1196 | 1196 | foreach ($conf->file->dol_document_root as $dirroot) { |
@@ -1350,7 +1350,7 @@ discard block |
||
1350 | 1350 | } |
1351 | 1351 | $result .= $linkend; |
1352 | 1352 | global $action; |
1353 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
1353 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
1354 | 1354 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
1355 | 1355 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
1356 | 1356 | if ($reshook > 0) { |