@@ -550,7 +550,7 @@ |
||
550 | 550 | $langs->load($reg[1]); |
551 | 551 | } |
552 | 552 | |
553 | - $labeltoshow = preg_replace('/:.*$/', '', $object->label); |
|
553 | + $labeltoshow = preg_replace('/:.*$/', '', $object->label); |
|
554 | 554 | |
555 | 555 | $morehtmlref = '<div class="refidno">'; |
556 | 556 | $morehtmlref .= $langs->trans($labeltoshow); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | print '<tr class="oddeven value">'; |
279 | 279 | // Param |
280 | 280 | print '<td>'; |
281 | -print img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'); |
|
281 | +print img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'); |
|
282 | 282 | print '</td>'; |
283 | 283 | // Value |
284 | 284 | print '<td class="right">'; // Do not force class=right, or it align also the content of the select box |
@@ -288,13 +288,13 @@ discard block |
||
288 | 288 | |
289 | 289 | if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') != '-1') { |
290 | 290 | print '<tr class="oddeven">'; |
291 | - print '<td>' . img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnCustomerDeposit") . '</td>'; |
|
291 | + print '<td>'.img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("UseAuxiliaryAccountOnCustomerDeposit").'</td>'; |
|
292 | 292 | if (getDolGlobalInt('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) { |
293 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=0">'; |
|
293 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=0">'; |
|
294 | 294 | print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); |
295 | 295 | print '</a></td>'; |
296 | 296 | } else { |
297 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=1">'; |
|
297 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=1">'; |
|
298 | 298 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
299 | 299 | print '</a></td>'; |
300 | 300 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | print '<tr class="oddeven value">'; |
306 | 306 | // Param |
307 | 307 | print '<td>'; |
308 | -print img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'); |
|
308 | +print img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT'); |
|
309 | 309 | print '</td>'; |
310 | 310 | // Value |
311 | 311 | print '<td class="right">'; // Do not force class=right, or it align also the content of the select box |
@@ -315,13 +315,13 @@ discard block |
||
315 | 315 | |
316 | 316 | if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') != '-1') { |
317 | 317 | print '<tr class="oddeven">'; |
318 | - print '<td>' . img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnSupplierDeposit") . '</td>'; |
|
318 | + print '<td>'.img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans("UseAuxiliaryAccountOnSupplierDeposit").'</td>'; |
|
319 | 319 | if (getDolGlobalInt('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) { |
320 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=0">'; |
|
320 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=0">'; |
|
321 | 321 | print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); |
322 | 322 | print '</a></td>'; |
323 | 323 | } else { |
324 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=1">'; |
|
324 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=1">'; |
|
325 | 325 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
326 | 326 | print '</a></td>'; |
327 | 327 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $disablejs = 0; |
70 | 70 | $disablehead = 0; |
71 | 71 | |
72 | -$head='<link rel="stylesheet" href="css/pos.css.php">'; |
|
72 | +$head = '<link rel="stylesheet" href="css/pos.css.php">'; |
|
73 | 73 | if (getDolGlobalInt('TAKEPOS_COLOR_THEME') == 1) { |
74 | 74 | $head .= '<link rel="stylesheet" href="css/colorful.css">'; |
75 | 75 | } |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | |
678 | 678 | <?php |
679 | 679 | // Add code from hooks |
680 | -$parameters=array(); |
|
680 | +$parameters = array(); |
|
681 | 681 | $hookmanager->executeHooks('completePayment', $parameters, $invoice); |
682 | 682 | print $hookmanager->resPrint; |
683 | 683 | ?> |
@@ -161,21 +161,21 @@ |
||
161 | 161 | if (isModEnabled('societe')) { |
162 | 162 | print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnContactActive").'</td><td>'; |
163 | 163 | print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR)); |
164 | - print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnContactActiveExample") . '</span></td></tr>'; |
|
164 | + print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnContactActiveExample").'</span></td></tr>'; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | // Synchro member active |
168 | 168 | if (isModEnabled('adherent')) { |
169 | - print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberActive") . '</td><td>'; |
|
169 | + print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnMemberActive").'</td><td>'; |
|
170 | 170 | print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2); |
171 | - print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberActiveExample") . '</span></td></tr>'; |
|
171 | + print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberActiveExample").'</span></td></tr>'; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | // Synchro member type active |
175 | 175 | if (isModEnabled('adherent')) { |
176 | - print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberTypeActive") . '</td><td>'; |
|
176 | + print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnMemberTypeActive").'</td><td>'; |
|
177 | 177 | print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2); |
178 | - print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberTypeActiveExample") . '</span></td></tr>'; |
|
178 | + print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberTypeActiveExample").'</span></td></tr>'; |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | // Fields from hook |
@@ -348,15 +348,15 @@ discard block |
||
348 | 348 | print '</td><td>'; |
349 | 349 | // SuperAdministrator access only |
350 | 350 | if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
351 | - print '<input class="flat minwidth300" id="MAIN_MAIL_SMTP_SERVER_EMAILING" name="MAIN_MAIL_SMTP_SERVER_EMAILING" size="18" value="' . $mainserver . '">'; |
|
352 | - print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" name="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" value="' . $mainserver . '">'; |
|
353 | - print '<span id="smtp_server_mess" class="opacitymedium">' . $langs->trans("SeeLocalSendMailSetup") . '</span>'; |
|
354 | - print ' <span class="opacitymedium smtp_method">' . $langs->trans("SeeLinkToOnlineDocumentation") . '</span>'; |
|
351 | + print '<input class="flat minwidth300" id="MAIN_MAIL_SMTP_SERVER_EMAILING" name="MAIN_MAIL_SMTP_SERVER_EMAILING" size="18" value="'.$mainserver.'">'; |
|
352 | + print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" name="MAIN_MAIL_SMTP_SERVER_EMAILING_sav" value="'.$mainserver.'">'; |
|
353 | + print '<span id="smtp_server_mess" class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>'; |
|
354 | + print ' <span class="opacitymedium smtp_method">'.$langs->trans("SeeLinkToOnlineDocumentation").'</span>'; |
|
355 | 355 | } else { |
356 | 356 | $text = !empty($mainserver) ? $mainserver : $smtpserver; |
357 | 357 | $htmltext = $langs->trans("ContactSuperAdminForChange"); |
358 | 358 | print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); |
359 | - print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_EMAILING" name="MAIN_MAIL_SMTP_SERVER_EMAILING" value="' . $mainserver . '">'; |
|
359 | + print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_EMAILING" name="MAIN_MAIL_SMTP_SERVER_EMAILING" value="'.$mainserver.'">'; |
|
360 | 360 | } |
361 | 361 | print '</td>'; |
362 | 362 | } |
@@ -380,14 +380,14 @@ discard block |
||
380 | 380 | print '</td><td>'; |
381 | 381 | // SuperAdministrator access only |
382 | 382 | if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
383 | - print '<input class="flat" id="MAIN_MAIL_SMTP_PORT_EMAILING" name="MAIN_MAIL_SMTP_PORT_EMAILING" size="3" value="' . $mainport . '">'; |
|
384 | - print '<input type="hidden" id="MAIN_MAIL_SMTP_PORT_EMAILING_sav" name="MAIN_MAIL_SMTP_PORT_EMAILING_sav" value="' . $mainport . '">'; |
|
385 | - print '<span id="smtp_port_mess" class="opacitymedium">' . $langs->trans("SeeLocalSendMailSetup") . '</span>'; |
|
383 | + print '<input class="flat" id="MAIN_MAIL_SMTP_PORT_EMAILING" name="MAIN_MAIL_SMTP_PORT_EMAILING" size="3" value="'.$mainport.'">'; |
|
384 | + print '<input type="hidden" id="MAIN_MAIL_SMTP_PORT_EMAILING_sav" name="MAIN_MAIL_SMTP_PORT_EMAILING_sav" value="'.$mainport.'">'; |
|
385 | + print '<span id="smtp_port_mess" class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>'; |
|
386 | 386 | } else { |
387 | 387 | $text = (!empty($mainport) ? $mainport : $smtpport); |
388 | 388 | $htmltext = $langs->trans("ContactSuperAdminForChange"); |
389 | 389 | print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); |
390 | - print '<input type="hidden" id="MAIN_MAIL_SMTP_PORT_EMAILING" name="MAIN_MAIL_SMTP_PORT_EMAILING" value="' . $mainport . '">'; |
|
390 | + print '<input type="hidden" id="MAIN_MAIL_SMTP_PORT_EMAILING" name="MAIN_MAIL_SMTP_PORT_EMAILING" value="'.$mainport.'">'; |
|
391 | 391 | } |
392 | 392 | } |
393 | 393 | print '</td></tr>'; |
@@ -395,14 +395,14 @@ discard block |
||
395 | 395 | // ID |
396 | 396 | if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { |
397 | 397 | $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : ''); |
398 | - print '<tr class="drag drop oddeven hideifdefault"><td>' . $langs->trans("MAIN_MAIL_SMTPS_ID") . '</td><td>'; |
|
398 | + print '<tr class="drag drop oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'; |
|
399 | 399 | // SuperAdministrator access only |
400 | 400 | if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
401 | - print '<input class="flat" name="MAIN_MAIL_SMTPS_ID_EMAILING" size="32" value="' . $mainstmpid . '">'; |
|
401 | + print '<input class="flat" name="MAIN_MAIL_SMTPS_ID_EMAILING" size="32" value="'.$mainstmpid.'">'; |
|
402 | 402 | } else { |
403 | 403 | $htmltext = $langs->trans("ContactSuperAdminForChange"); |
404 | 404 | print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING, $htmltext, 1, 'superadmin'); |
405 | - print '<input type="hidden" name="MAIN_MAIL_SMTPS_ID_EMAILING" value="' . $mainstmpid . '">'; |
|
405 | + print '<input type="hidden" name="MAIN_MAIL_SMTPS_ID_EMAILING" value="'.$mainstmpid.'">'; |
|
406 | 406 | } |
407 | 407 | print '</td></tr>'; |
408 | 408 | } |
@@ -428,14 +428,14 @@ discard block |
||
428 | 428 | // PW |
429 | 429 | if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) { |
430 | 430 | $mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_PW_EMAILING : ''); |
431 | - print '<tr class="drag drop oddeven smtp_pw hideifdefault"><td>' . $langs->trans("MAIN_MAIL_SMTPS_PW") . '</td><td>'; |
|
431 | + print '<tr class="drag drop oddeven smtp_pw hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>'; |
|
432 | 432 | // SuperAdministrator access only |
433 | 433 | if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
434 | - print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW_EMAILING" size="32" value="' . $mainsmtppw . '">'; |
|
434 | + print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW_EMAILING" size="32" value="'.$mainsmtppw.'">'; |
|
435 | 435 | } else { |
436 | 436 | $htmltext = $langs->trans("ContactSuperAdminForChange"); |
437 | 437 | print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING, $htmltext, 1, 'superadmin'); |
438 | - print '<input type="hidden" name="MAIN_MAIL_SMTPS_PW_EMAILING" value="' . $mainsmtppw . '">'; |
|
438 | + print '<input type="hidden" name="MAIN_MAIL_SMTPS_PW_EMAILING" value="'.$mainsmtppw.'">'; |
|
439 | 439 | } |
440 | 440 | print '</td></tr>'; |
441 | 441 | } |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | // AUTH method |
553 | 553 | if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { |
554 | 554 | $authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN'); |
555 | - $text = ($authtype === "LOGIN") ? $langs->trans("UsePassword") : ($authtype === "XOAUTH2" ? $langs->trans("UseOauth") : '') ; |
|
555 | + $text = ($authtype === "LOGIN") ? $langs->trans("UsePassword") : ($authtype === "XOAUTH2" ? $langs->trans("UseOauth") : ''); |
|
556 | 556 | print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>'.$text.'</td></tr>'; |
557 | 557 | } |
558 | 558 | |
@@ -641,16 +641,16 @@ discard block |
||
641 | 641 | if (!empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default') { |
642 | 642 | if ($conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'mail' || !$linuxlike) { |
643 | 643 | if (function_exists('fsockopen') && $port && $server) { |
644 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=testconnect">' . $langs->trans("DoTestServerAvailability") . '</a>'; |
|
644 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect">'.$langs->trans("DoTestServerAvailability").'</a>'; |
|
645 | 645 | } |
646 | 646 | } else { |
647 | - print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("FeatureNotAvailableOnLinux") . '">' . $langs->trans("DoTestServerAvailability") . '</a>'; |
|
647 | + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("FeatureNotAvailableOnLinux").'">'.$langs->trans("DoTestServerAvailability").'</a>'; |
|
648 | 648 | } |
649 | 649 | |
650 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=test&mode=init">' . $langs->trans("DoTestSend") . '</a>'; |
|
650 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=test&mode=init">'.$langs->trans("DoTestSend").'</a>'; |
|
651 | 651 | |
652 | 652 | if (isModEnabled('fckeditor')) { |
653 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=testhtml&mode=init">' . $langs->trans("DoTestSendHTML") . '</a>'; |
|
653 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testhtml&mode=init">'.$langs->trans("DoTestSendHTML").'</a>'; |
|
654 | 654 | } |
655 | 655 | } |
656 | 656 |
@@ -520,7 +520,7 @@ |
||
520 | 520 | // AUTH method |
521 | 521 | if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) { |
522 | 522 | $authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET', 'LOGIN'); |
523 | - $text = ($authtype === "LOGIN") ? $langs->trans("UsePassword") : ($authtype === "XOAUTH2" ? $langs->trans("UseOauth") : '') ; |
|
523 | + $text = ($authtype === "LOGIN") ? $langs->trans("UsePassword") : ($authtype === "XOAUTH2" ? $langs->trans("UseOauth") : ''); |
|
524 | 524 | print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>'.$text.'</td></tr>'; |
525 | 525 | } |
526 | 526 |
@@ -100,14 +100,14 @@ |
||
100 | 100 | |
101 | 101 | // Param |
102 | 102 | $label = $langs->trans($key); |
103 | - print '<td><label for="' . $key . '">' . $label . '</label></td>'; |
|
103 | + print '<td><label for="'.$key.'">'.$label.'</label></td>'; |
|
104 | 104 | |
105 | 105 | // Value |
106 | 106 | print '<td>'; |
107 | 107 | if (isModEnabled('accounting')) { |
108 | 108 | print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1); |
109 | 109 | } else { |
110 | - print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . getDolGlobalString($key) . '">'; |
|
110 | + print '<input type="text" size="20" id="'.$key.'" name="'.$key.'" value="'.getDolGlobalString($key).'">'; |
|
111 | 111 | } |
112 | 112 | print '</td></tr>'; |
113 | 113 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | accessforbidden(); |
74 | 74 | } |
75 | 75 | |
76 | -$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0); |
|
76 | +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
|
77 | 77 | $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); |
78 | 78 | |
79 | 79 | $permissiontoread = $user->rights->eventorganization->read; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | if ($user->socid > 0) { |
88 | 88 | accessforbidden(); |
89 | 89 | } |
90 | -$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0); |
|
90 | +$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
|
91 | 91 | $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); |
92 | 92 | |
93 | 93 | if (!$permissiontoread) { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09')); |
112 | 112 | |
113 | 113 | if ($result >= 0) { |
114 | - header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject)?'&withproject=1':'')); |
|
114 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject) ? '&withproject=1' : '')); |
|
115 | 115 | exit; |
116 | 116 | } else { |
117 | 117 | if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $result = $object->delete_contact($lineid); |
130 | 130 | |
131 | 131 | if ($result >= 0) { |
132 | - header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject)?'&withproject=1':'')); |
|
132 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject) ? '&withproject=1' : '')); |
|
133 | 133 | exit; |
134 | 134 | } else { |
135 | 135 | dol_print_error($db); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | if (!empty($projectstatic->socid)) { |
166 | 166 | $projectstatic->fetch_thirdparty(); |
167 | 167 | } |
168 | -$withProjectUrl=''; |
|
168 | +$withProjectUrl = ''; |
|
169 | 169 | $object->project = clone $projectstatic; |
170 | 170 | |
171 | 171 | if (!empty($withproject)) { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
105 | 105 | */ |
106 | - public $fields=array( |
|
106 | + public $fields = array( |
|
107 | 107 | 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"), |
108 | 108 | 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>'1', 'position'=>1, 'default'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"), |
109 | 109 | 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"), |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | */ |
352 | 352 | public function fetchLines() |
353 | 353 | { |
354 | - require_once DOL_DOCUMENT_ROOT . '/product/stock/stocktransfer/class/stocktransferline.class.php'; |
|
354 | + require_once DOL_DOCUMENT_ROOT.'/product/stock/stocktransfer/class/stocktransferline.class.php'; |
|
355 | 355 | $this->lines = array(); |
356 | 356 | |
357 | 357 | $result = $this->fetchLinesCommon(); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | if (empty($this->lines)) $this->fetchLines(); |
388 | 388 | if (!empty($this->lines)) { |
389 | - foreach ($this->lines as $l) $total_pmp+= ($l->pmp * $l->qty); |
|
389 | + foreach ($this->lines as $l) $total_pmp += ($l->pmp * $l->qty); |
|
390 | 390 | } |
391 | 391 | |
392 | 392 | return $total_pmp; |