@@ -353,7 +353,7 @@ |
||
| 353 | 353 | |
| 354 | 354 | $expensereportstatic->id = $obj->rowid; |
| 355 | 355 | $expensereportstatic->ref = $obj->ref; |
| 356 | - $expensereportstatic->statut = $obj->status; // deprecated |
|
| 356 | + $expensereportstatic->statut = $obj->status; // deprecated |
|
| 357 | 357 | $expensereportstatic->status = $obj->status; |
| 358 | 358 | |
| 359 | 359 | $userstatic->id = $obj->uid; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | /* |
| 71 | 71 | * View |
| 72 | 72 | */ |
| 73 | -$title = $langs->trans("Contract") . ' - ' . $langs->trans("Tickets"); |
|
| 73 | +$title = $langs->trans("Contract").' - '.$langs->trans("Tickets"); |
|
| 74 | 74 | $help_url = 'EN:Module_Contracts|FR:Module_Contrat|ES:Contratos_de_servicio'; |
| 75 | 75 | |
| 76 | 76 | llxHeader("", $title, $help_url, '', 0, 0, '', '', '', 'mod-contrat page-card_ticket'); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | dol_get_fiche_head($head, 'ticket', $langs->trans("Contract"), -1, 'contract'); |
| 88 | 88 | |
| 89 | -$linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(! empty($socid) ? '?socid='.$socid : '').'">'; |
|
| 89 | +$linkback = '<a href="'.DOL_URL_ROOT.'/contrat/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'; |
|
| 90 | 90 | $linkback .= $langs->trans("BackToList").'</a>'; |
| 91 | 91 | |
| 92 | 92 | $morehtmlref = ''; |
@@ -145,18 +145,18 @@ discard block |
||
| 145 | 145 | 1 |
| 146 | 146 | ); |
| 147 | 147 | // Thirdparty |
| 148 | -$morehtmlref .= '<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); |
|
| 148 | +$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); |
|
| 149 | 149 | // Project |
| 150 | 150 | if (isModEnabled('project')) { |
| 151 | 151 | require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
| 152 | 152 | |
| 153 | 153 | $langs->load("projects"); |
| 154 | - $morehtmlref .= '<br>'.$langs->trans('Project') . ' : '; |
|
| 155 | - if (! empty($object->fk_project)) { |
|
| 154 | + $morehtmlref .= '<br>'.$langs->trans('Project').' : '; |
|
| 155 | + if (!empty($object->fk_project)) { |
|
| 156 | 156 | $proj = new Project($db); |
| 157 | 157 | $proj->fetch($object->fk_project); |
| 158 | 158 | $morehtmlref .= '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='; |
| 159 | - $morehtmlref .= $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">'; |
|
| 159 | + $morehtmlref .= $object->fk_project.'" title="'.$langs->trans('ShowProject').'">'; |
|
| 160 | 160 | $morehtmlref .= $proj->ref; |
| 161 | 161 | $morehtmlref .= '</a>'; |
| 162 | 162 | } else { |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>'; |
| 391 | 391 | |
| 392 | 392 | // SuperAdministrator access only |
| 393 | - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
|
| 393 | + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
|
| 394 | 394 | print $form->selectarray('MAIN_MAIL_SENDMODE', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail')); |
| 395 | 395 | } else { |
| 396 | 396 | $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE')]; |
@@ -521,11 +521,11 @@ discard block |
||
| 521 | 521 | print '</td><td>'; |
| 522 | 522 | // SuperAdministrator access only |
| 523 | 523 | if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
| 524 | - print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW" size="32" value="' . htmlspecialchars($mainsmtppw, ENT_COMPAT, 'UTF-8') . '" autocomplete="off">'; |
|
| 524 | + print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW" size="32" value="'.htmlspecialchars($mainsmtppw, ENT_COMPAT, 'UTF-8').'" autocomplete="off">'; |
|
| 525 | 525 | } else { |
| 526 | 526 | $htmltext = $langs->trans("ContactSuperAdminForChange"); |
| 527 | 527 | print $form->textwithpicto(getDolGlobalString('MAIN_MAIL_SMTPS_PW'), $htmltext, 1, 'superadmin'); |
| 528 | - print '<input type="hidden" name="MAIN_MAIL_SMTPS_PW" value="' . htmlspecialchars($mainsmtppw, ENT_COMPAT, 'UTF-8') . '">'; |
|
| 528 | + print '<input type="hidden" name="MAIN_MAIL_SMTPS_PW" value="'.htmlspecialchars($mainsmtppw, ENT_COMPAT, 'UTF-8').'">'; |
|
| 529 | 529 | } |
| 530 | 530 | print '</td></tr>'; |
| 531 | 531 | } |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | print '<tr class="oddeven smtp_oauth_service"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>'; |
| 536 | 536 | |
| 537 | 537 | // SuperAdministrator access only |
| 538 | - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
|
| 538 | + if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { |
|
| 539 | 539 | print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')); |
| 540 | 540 | } else { |
| 541 | 541 | $text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE')]; |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | } |
| 545 | 545 | $htmltext = $langs->trans("ContactSuperAdminForChange"); |
| 546 | 546 | print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); |
| 547 | - print '<input type="hidden" name="MAIN_MAIL_SMTPS_OAUTH_SERVICE" value="' . getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'">'; |
|
| 547 | + print '<input type="hidden" name="MAIN_MAIL_SMTPS_OAUTH_SERVICE" value="'.getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE').'">'; |
|
| 548 | 548 | } |
| 549 | 549 | print '</td></tr>'; |
| 550 | 550 | } |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | |
| 758 | 758 | // SMTPS ID |
| 759 | 759 | if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) { |
| 760 | - print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>' . getDolGlobalString('MAIN_MAIL_SMTPS_ID').'</td></tr>'; |
|
| 760 | + print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.getDolGlobalString('MAIN_MAIL_SMTPS_ID').'</td></tr>'; |
|
| 761 | 761 | } |
| 762 | 762 | |
| 763 | 763 | // SMTPS PW |
@@ -920,7 +920,7 @@ discard block |
||
| 920 | 920 | print $langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ? ini_get('sendmail_from') : $langs->transnoentities("Undefined")); |
| 921 | 921 | print ' '.$help; |
| 922 | 922 | print '</td>'; |
| 923 | - print '<td>' . getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); |
|
| 923 | + print '<td>'.getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); |
|
| 924 | 924 | if (!getDolGlobalString('MAIN_MAIL_EMAIL_FROM')) { |
| 925 | 925 | print img_warning($langs->trans("Mandatory")); |
| 926 | 926 | } elseif (!isValidEmail(getDolGlobalString('MAIN_MAIL_EMAIL_FROM'))) { |
@@ -1087,7 +1087,7 @@ discard block |
||
| 1087 | 1087 | if (!empty($tmpresult['content'])) { |
| 1088 | 1088 | $iptoshow = $tmpresult['content']; |
| 1089 | 1089 | } else { |
| 1090 | - $iptoshow = ''; // Failed to get IP |
|
| 1090 | + $iptoshow = ''; // Failed to get IP |
|
| 1091 | 1091 | } |
| 1092 | 1092 | } |
| 1093 | 1093 | $ipstoshow .= ($ipstoshow ? ', ' : '').trim($iptoshow); |
@@ -1200,8 +1200,8 @@ discard block |
||
| 1200 | 1200 | $formmail->withfile = 2; |
| 1201 | 1201 | |
| 1202 | 1202 | // Add editor assistants |
| 1203 | - $formmail->withlayout = 'emailing'; // Note: MAIN_EMAIL_USE_LAYOUT must be set |
|
| 1204 | - $formmail->withaiprompt = ($action == 'testhtml' ? 'html' : 'text'); // Note: Module AI must be enabled |
|
| 1203 | + $formmail->withlayout = 'emailing'; // Note: MAIN_EMAIL_USE_LAYOUT must be set |
|
| 1204 | + $formmail->withaiprompt = ($action == 'testhtml' ? 'html' : 'text'); // Note: Module AI must be enabled |
|
| 1205 | 1205 | |
| 1206 | 1206 | $formmail->withbody = (GETPOSTISSET('message') ? GETPOST('message', 'restricthtml') : ($action == 'testhtml' ? $langs->transnoentities("PredefinedMailTestHtml") : $langs->transnoentities("PredefinedMailTest"))); |
| 1207 | 1207 | $formmail->withbodyreadonly = 0; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $propalstatic->total_ht = $obj->total_ht; |
| 198 | 198 | $propalstatic->total_tva = $obj->total_tva; |
| 199 | 199 | $propalstatic->total_ttc = $obj->total_ttc; |
| 200 | - $propalstatic->statut = $obj->status; // deprecated |
|
| 200 | + $propalstatic->statut = $obj->status; // deprecated |
|
| 201 | 201 | $propalstatic->status = $obj->status; |
| 202 | 202 | |
| 203 | 203 | $companystatic->id = $obj->socid; |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | |
| 587 | 587 | $fichinterstatic->id = $obj->rowid; |
| 588 | 588 | $fichinterstatic->ref = $obj->ref; |
| 589 | - $fichinterstatic->statut = $obj->fk_statut; // deprecated |
|
| 589 | + $fichinterstatic->statut = $obj->fk_statut; // deprecated |
|
| 590 | 590 | $fichinterstatic->status = $obj->fk_statut; |
| 591 | 591 | |
| 592 | 592 | $companystatic->id = $obj->socid; |
@@ -1163,7 +1163,7 @@ discard block |
||
| 1163 | 1163 | |
| 1164 | 1164 | $propalstatic->id = $obj->propalid; |
| 1165 | 1165 | $propalstatic->ref = $obj->ref; |
| 1166 | - $propalstatic->ref_client = $obj->ref_client; // deprecated |
|
| 1166 | + $propalstatic->ref_client = $obj->ref_client; // deprecated |
|
| 1167 | 1167 | $propalstatic->ref_customer = $obj->ref_client; |
| 1168 | 1168 | $propalstatic->total_ht = $obj->total_ht; |
| 1169 | 1169 | $propalstatic->total_tva = $obj->total_tva; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
| 44 | 44 | require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
| 45 | 45 | require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
| 46 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 46 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 47 | 47 | if (isModEnabled('invoice')) { |
| 48 | 48 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
| 49 | 49 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | if ($action == 'update_extras' && $permissiontoeditextra) { |
| 312 | 312 | $object->fetch($id); |
| 313 | 313 | |
| 314 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 314 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 315 | 315 | |
| 316 | 316 | $attribute_name = GETPOST('attribute', 'aZ09'); |
| 317 | 317 | |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | if ($object->accountancy_code_customer_general > 0) { |
| 419 | 419 | print ' - '; |
| 420 | 420 | } |
| 421 | - $accountingAccountByDefault = '<span class="opacitymedium">' . $langs->trans("AccountingAccountByDefaultShort") . ": " . length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER')) . '</span>'; |
|
| 421 | + $accountingAccountByDefault = '<span class="opacitymedium">'.$langs->trans("AccountingAccountByDefaultShort").": ".length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER')).'</span>'; |
|
| 422 | 422 | print $accountingAccountByDefault; |
| 423 | 423 | } |
| 424 | 424 | } |
@@ -926,7 +926,7 @@ discard block |
||
| 926 | 926 | print '<td class="nowraponall">'; |
| 927 | 927 | $propal_static->id = $objp->propalid; |
| 928 | 928 | $propal_static->ref = $objp->ref; |
| 929 | - $propal_static->ref_client = $objp->ref_client; // deprecated |
|
| 929 | + $propal_static->ref_client = $objp->ref_client; // deprecated |
|
| 930 | 930 | $propal_static->ref_customer = $objp->ref_client; |
| 931 | 931 | $propal_static->fk_project = $objp->fk_projet; |
| 932 | 932 | $propal_static->total_ht = $objp->total_ht; |
@@ -1587,7 +1587,7 @@ discard block |
||
| 1587 | 1587 | $facturestatic->total_ht = $objp->total_ht; |
| 1588 | 1588 | $facturestatic->total_tva = $objp->total_tva; |
| 1589 | 1589 | $facturestatic->total_ttc = $objp->total_ttc; |
| 1590 | - $facturestatic->statut = $objp->status; // deprecated |
|
| 1590 | + $facturestatic->statut = $objp->status; // deprecated |
|
| 1591 | 1591 | $facturestatic->status = $objp->status; |
| 1592 | 1592 | $facturestatic->paye = $objp->paye; |
| 1593 | 1593 | $facturestatic->alreadypaid = $objp->am; |
@@ -91,18 +91,18 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | |
| 93 | 93 | $id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('orderid')); |
| 94 | -$ref = GETPOST('ref', 'alpha'); |
|
| 95 | -$socid = GETPOSTINT('socid'); |
|
| 96 | -$action = GETPOST('action', 'aZ09'); |
|
| 97 | -$cancel = GETPOST('cancel', 'alpha'); |
|
| 98 | -$confirm = GETPOST('confirm', 'alpha'); |
|
| 94 | +$ref = GETPOST('ref', 'alpha'); |
|
| 95 | +$socid = GETPOSTINT('socid'); |
|
| 96 | +$action = GETPOST('action', 'aZ09'); |
|
| 97 | +$cancel = GETPOST('cancel', 'alpha'); |
|
| 98 | +$confirm = GETPOST('confirm', 'alpha'); |
|
| 99 | 99 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 100 | 100 | |
| 101 | -$lineid = GETPOSTINT('lineid'); |
|
| 102 | -$contactid = GETPOSTINT('contactid'); |
|
| 103 | -$projectid = GETPOSTINT('projectid'); |
|
| 104 | -$origin = GETPOST('origin', 'alpha'); |
|
| 105 | -$originid = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility |
|
| 101 | +$lineid = GETPOSTINT('lineid'); |
|
| 102 | +$contactid = GETPOSTINT('contactid'); |
|
| 103 | +$projectid = GETPOSTINT('projectid'); |
|
| 104 | +$origin = GETPOST('origin', 'alpha'); |
|
| 105 | +$originid = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility |
|
| 106 | 106 | $rank = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1; |
| 107 | 107 | |
| 108 | 108 | // Type Contact default |
@@ -145,26 +145,26 @@ discard block |
||
| 145 | 145 | $extrafields->fetch_name_optionals_label($object->table_element); |
| 146 | 146 | |
| 147 | 147 | // Load object |
| 148 | -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 148 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 149 | 149 | |
| 150 | 150 | // Permissions / Rights |
| 151 | -$usercanread = $user->hasRight("commande", "lire"); |
|
| 152 | -$usercancreate = $user->hasRight("commande", "creer"); |
|
| 153 | -$usercandelete = $user->hasRight("commande", "supprimer"); |
|
| 151 | +$usercanread = $user->hasRight("commande", "lire"); |
|
| 152 | +$usercancreate = $user->hasRight("commande", "creer"); |
|
| 153 | +$usercandelete = $user->hasRight("commande", "supprimer"); |
|
| 154 | 154 | |
| 155 | 155 | // Advanced permissions |
| 156 | -$usercanclose = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close'))); |
|
| 157 | -$usercanvalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate'))); |
|
| 158 | -$usercancancel = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler'))); |
|
| 159 | -$usercansend = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send')); |
|
| 160 | -$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc')); |
|
| 156 | +$usercanclose = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close'))); |
|
| 157 | +$usercanvalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate'))); |
|
| 158 | +$usercancancel = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler'))); |
|
| 159 | +$usercansend = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send')); |
|
| 160 | +$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc')); |
|
| 161 | 161 | |
| 162 | 162 | $usermustrespectpricemin = ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('produit', 'ignore_price_min_advance')) || !getDolGlobalString('MAIN_USE_ADVANCED_PERMS')); |
| 163 | 163 | $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')); |
| 164 | 164 | |
| 165 | -$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
|
| 166 | -$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 167 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 165 | +$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
|
| 166 | +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 167 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 168 | 168 | $permissiontoeditextra = $usercancreate; |
| 169 | 169 | if (GETPOST('attribute', 'aZ09') && isset($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')])) { |
| 170 | 170 | // For action 'update_extras', is there a specific permission set for the attribute to update |
@@ -215,11 +215,11 @@ discard block |
||
| 215 | 215 | $action = ''; |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | - include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be 'include', not 'include_once' |
|
| 218 | + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be 'include', not 'include_once' |
|
| 219 | 219 | |
| 220 | - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 220 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 221 | 221 | |
| 222 | - include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 222 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 223 | 223 | |
| 224 | 224 | // Action clone object |
| 225 | 225 | if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | if ($prod->price_min > $line->subprice) { |
| 761 | 761 | $price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
| 762 | 762 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
| 763 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
| 763 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
| 764 | 764 | } else { |
| 765 | 765 | setEventMessages($prod->error, $prod->errors, 'errors'); |
| 766 | 766 | } |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | $pu_ht = ''; |
| 807 | 807 | $pu_ttc = ''; |
| 808 | 808 | $pu_ht_devise = ''; |
| 809 | - $pu_ttc_devise = ''; |
|
| 809 | + $pu_ttc_devise = ''; |
|
| 810 | 810 | |
| 811 | 811 | if (GETPOST('price_ht') !== '') { |
| 812 | 812 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
@@ -947,7 +947,7 @@ discard block |
||
| 947 | 947 | $price_base_type = $custprice_line->price_base_type; |
| 948 | 948 | $tva_tx = $custprice_line->tva_tx; |
| 949 | 949 | if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', (string) $tva_tx)) { |
| 950 | - $tva_tx .= ' (' . $custprice_line->default_vat_code . ')'; |
|
| 950 | + $tva_tx .= ' ('.$custprice_line->default_vat_code.')'; |
|
| 951 | 951 | } |
| 952 | 952 | $tva_npr = $custprice_line->recuperableonly; |
| 953 | 953 | if (empty($tva_tx)) { |
@@ -1013,7 +1013,7 @@ discard block |
||
| 1013 | 1013 | $price_base_type = $custprice_line->price_base_type; |
| 1014 | 1014 | $tva_tx = $custprice_line->tva_tx; |
| 1015 | 1015 | if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
| 1016 | - $tva_tx .= ' (' . $custprice_line->default_vat_code . ')'; |
|
| 1016 | + $tva_tx .= ' ('.$custprice_line->default_vat_code.')'; |
|
| 1017 | 1017 | } |
| 1018 | 1018 | $tva_npr = $custprice_line->recuperableonly; |
| 1019 | 1019 | if (empty($tva_tx)) { |
@@ -1192,7 +1192,7 @@ discard block |
||
| 1192 | 1192 | $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); |
| 1193 | 1193 | |
| 1194 | 1194 | // Margin |
| 1195 | - $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOSTINT('fournprice'.$predef) : 0); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1195 | + $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOSTINT('fournprice'.$predef) : 0); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1196 | 1196 | $buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value |
| 1197 | 1197 | |
| 1198 | 1198 | // Prepare a price equivalent for minimum price check |
@@ -1352,7 +1352,7 @@ discard block |
||
| 1352 | 1352 | */ |
| 1353 | 1353 | |
| 1354 | 1354 | // Add buying price |
| 1355 | - $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1355 | + $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1356 | 1356 | $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value |
| 1357 | 1357 | |
| 1358 | 1358 | // Extrafields Lines |
@@ -1541,7 +1541,7 @@ discard block |
||
| 1541 | 1541 | GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms) |
| 1542 | 1542 | && isModEnabled('invoice') && $user->hasRight('facture', 'creer') |
| 1543 | 1543 | ) { |
| 1544 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 1544 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 1545 | 1545 | |
| 1546 | 1546 | $date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear')); |
| 1547 | 1547 | $forceFields = array(); |
@@ -1554,7 +1554,7 @@ discard block |
||
| 1554 | 1554 | |
| 1555 | 1555 | if ($deposit) { |
| 1556 | 1556 | setEventMessage('DepositGenerated'); |
| 1557 | - $locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id; |
|
| 1557 | + $locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id; |
|
| 1558 | 1558 | } else { |
| 1559 | 1559 | $error++; |
| 1560 | 1560 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1562,7 +1562,7 @@ discard block |
||
| 1562 | 1562 | } |
| 1563 | 1563 | |
| 1564 | 1564 | // Define output language |
| 1565 | - if (! $error) { |
|
| 1565 | + if (!$error) { |
|
| 1566 | 1566 | $db->commit(); |
| 1567 | 1567 | |
| 1568 | 1568 | if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) { |
@@ -1590,7 +1590,7 @@ discard block |
||
| 1590 | 1590 | } |
| 1591 | 1591 | |
| 1592 | 1592 | if ($locationTarget) { |
| 1593 | - header('Location: ' . $locationTarget); |
|
| 1593 | + header('Location: '.$locationTarget); |
|
| 1594 | 1594 | exit; |
| 1595 | 1595 | } |
| 1596 | 1596 | } else { |
@@ -1681,7 +1681,7 @@ discard block |
||
| 1681 | 1681 | } |
| 1682 | 1682 | |
| 1683 | 1683 | if ($action == 'update_extras' && $permissiontoeditextra) { |
| 1684 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1684 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1685 | 1685 | |
| 1686 | 1686 | $attribute_name = GETPOST('attribute', 'aZ09'); |
| 1687 | 1687 | |
@@ -1919,7 +1919,7 @@ discard block |
||
| 1919 | 1919 | |
| 1920 | 1920 | $classname = ucfirst($subelement); |
| 1921 | 1921 | $objectsrc = new $classname($db); |
| 1922 | - '@phan-var-force Commande|Propal|Contrat $objectsrc'; // Can possibly be other class but CommonObject is too general |
|
| 1922 | + '@phan-var-force Commande|Propal|Contrat $objectsrc'; // Can possibly be other class but CommonObject is too general |
|
| 1923 | 1923 | $objectsrc->fetch($originid); |
| 1924 | 1924 | if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { |
| 1925 | 1925 | $objectsrc->fetch_lines(); |
@@ -2016,7 +2016,7 @@ discard block |
||
| 2016 | 2016 | print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
| 2017 | 2017 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 2018 | 2018 | print '<input type="hidden" name="action" value="add">'; |
| 2019 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2019 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2020 | 2020 | print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">'; |
| 2021 | 2021 | print '<input type="hidden" name="origin" value="'.$origin.'">'; |
| 2022 | 2022 | print '<input type="hidden" name="originid" value="'.$originid.'">'; |
@@ -2198,7 +2198,7 @@ discard block |
||
| 2198 | 2198 | // Other attributes |
| 2199 | 2199 | $parameters = array(); |
| 2200 | 2200 | if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { |
| 2201 | - $parameters['objectsrc'] = $objectsrc; |
|
| 2201 | + $parameters['objectsrc'] = $objectsrc; |
|
| 2202 | 2202 | } |
| 2203 | 2203 | $parameters['socid'] = $socid; |
| 2204 | 2204 | |
@@ -2424,7 +2424,7 @@ discard block |
||
| 2424 | 2424 | $nbMandated = 0; |
| 2425 | 2425 | foreach ($object->lines as $line) { |
| 2426 | 2426 | $res = $line->fetch_product(); |
| 2427 | - if ($res > 0) { |
|
| 2427 | + if ($res > 0) { |
|
| 2428 | 2428 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
| 2429 | 2429 | $nbMandated++; |
| 2430 | 2430 | break; |
@@ -2448,7 +2448,7 @@ discard block |
||
| 2448 | 2448 | $deposit_percent_from_payment_terms = (float) getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); |
| 2449 | 2449 | |
| 2450 | 2450 | if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) { |
| 2451 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 2451 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 2452 | 2452 | |
| 2453 | 2453 | $object->fetchObjectLinked(); |
| 2454 | 2454 | |
@@ -2661,7 +2661,7 @@ discard block |
||
| 2661 | 2661 | $morehtmlref = '<div class="refidno">'; |
| 2662 | 2662 | // Ref customer |
| 2663 | 2663 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string', '', 0, 1); |
| 2664 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2664 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2665 | 2665 | // Thirdparty |
| 2666 | 2666 | $morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer'); |
| 2667 | 2667 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { |
@@ -2981,36 +2981,36 @@ discard block |
||
| 2981 | 2981 | |
| 2982 | 2982 | $alert = ''; |
| 2983 | 2983 | if (getDolGlobalString('ORDER_MANAGE_MIN_AMOUNT') && $object->total_ht < $object->thirdparty->order_min_amount) { |
| 2984 | - $alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount)); |
|
| 2984 | + $alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount)); |
|
| 2985 | 2985 | } |
| 2986 | 2986 | |
| 2987 | 2987 | print '<tr>'; |
| 2988 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 2989 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2988 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 2989 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2990 | 2990 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 2991 | 2991 | // Multicurrency Amount HT |
| 2992 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 2992 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 2993 | 2993 | } |
| 2994 | 2994 | print '</tr>'; |
| 2995 | 2995 | |
| 2996 | 2996 | print '<tr>'; |
| 2997 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 2998 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 2997 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 2998 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 2999 | 2999 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3000 | 3000 | // Multicurrency Amount VAT |
| 3001 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3001 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3002 | 3002 | } |
| 3003 | 3003 | print '</tr>'; |
| 3004 | 3004 | |
| 3005 | 3005 | // Amount Local Taxes |
| 3006 | 3006 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 3007 | 3007 | print '<tr>'; |
| 3008 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 3009 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3008 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 3009 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3010 | 3010 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3011 | 3011 | $object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
| 3012 | 3012 | |
| 3013 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3013 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3014 | 3014 | } |
| 3015 | 3015 | print '</tr>'; |
| 3016 | 3016 | } |
@@ -3018,22 +3018,22 @@ discard block |
||
| 3018 | 3018 | // Amount Local Taxes |
| 3019 | 3019 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 3020 | 3020 | print '<tr>'; |
| 3021 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 3022 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3021 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 3022 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3023 | 3023 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3024 | 3024 | $object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
| 3025 | 3025 | |
| 3026 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3026 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3027 | 3027 | } |
| 3028 | 3028 | print '</tr>'; |
| 3029 | 3029 | } |
| 3030 | 3030 | |
| 3031 | 3031 | print '<tr>'; |
| 3032 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 3033 | - print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3032 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 3033 | + print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>'; |
|
| 3034 | 3034 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3035 | 3035 | // Multicurrency Amount TTC |
| 3036 | - print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3036 | + print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3037 | 3037 | } |
| 3038 | 3038 | print '</tr>'."\n"; |
| 3039 | 3039 | |
@@ -3150,7 +3150,7 @@ discard block |
||
| 3150 | 3150 | if ($usercansend) { |
| 3151 | 3151 | print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
| 3152 | 3152 | } else { |
| 3153 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 3153 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3154 | 3154 | } |
| 3155 | 3155 | } |
| 3156 | 3156 | } |
@@ -3178,7 +3178,7 @@ discard block |
||
| 3178 | 3178 | 'enabled' => (isModEnabled("supplier_order") && $object->status > Commande::STATUS_DRAFT), |
| 3179 | 3179 | 'perm' => $usercancreatepurchaseorder, |
| 3180 | 3180 | 'label' => 'AddPurchaseOrder', |
| 3181 | - 'url' => '/fourn/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) |
|
| 3181 | + 'url' => '/fourn/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id) |
|
| 3182 | 3182 | ); |
| 3183 | 3183 | } |
| 3184 | 3184 | |
@@ -3195,7 +3195,7 @@ discard block |
||
| 3195 | 3195 | 'enabled' => (isModEnabled("intervention") && $object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0), |
| 3196 | 3196 | 'perm' => ($user->hasRight('ficheinter', 'creer') == 1), |
| 3197 | 3197 | 'label' => 'AddIntervention', |
| 3198 | - 'url' => '/fichinter/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, |
|
| 3198 | + 'url' => '/fichinter/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, |
|
| 3199 | 3199 | ); |
| 3200 | 3200 | } |
| 3201 | 3201 | |
@@ -3217,7 +3217,7 @@ discard block |
||
| 3217 | 3217 | 'enabled' => (isModEnabled("contract") && ($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS || $object->status == Commande::STATUS_CLOSED)), |
| 3218 | 3218 | 'perm' => ($user->hasRight('contrat', 'creer') == 1), |
| 3219 | 3219 | 'label' => 'AddContract', |
| 3220 | - 'url' => '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, |
|
| 3220 | + 'url' => '/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, |
|
| 3221 | 3221 | ); |
| 3222 | 3222 | /*if (isModEnabled('contrat') && ($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS || $object->status == Commande::STATUS_CLOSED)) { |
| 3223 | 3223 | $langs->load("contracts"); |
@@ -3241,7 +3241,7 @@ discard block |
||
| 3241 | 3241 | 'enabled' => (isModEnabled("shipping") && ($object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), |
| 3242 | 3242 | 'perm' => $user->hasRight('expedition', 'creer'), |
| 3243 | 3243 | 'label' => 'CreateShipment', |
| 3244 | - 'url' => '/expedition/shipment.php?id=' . $object->id |
|
| 3244 | + 'url' => '/expedition/shipment.php?id='.$object->id |
|
| 3245 | 3245 | ); |
| 3246 | 3246 | } else { |
| 3247 | 3247 | //c$langs->load("errors"); |
@@ -3251,7 +3251,7 @@ discard block |
||
| 3251 | 3251 | 'enabled' => (isModEnabled("shipping") && ($object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), |
| 3252 | 3252 | 'perm' => 0, |
| 3253 | 3253 | 'label' => 'CreateShipment', |
| 3254 | - 'url' => '/expedition/shipment.php?id=' . $object->id |
|
| 3254 | + 'url' => '/expedition/shipment.php?id='.$object->id |
|
| 3255 | 3255 | ); |
| 3256 | 3256 | } |
| 3257 | 3257 | } |
@@ -3263,7 +3263,7 @@ discard block |
||
| 3263 | 3263 | 'enabled' => (isModEnabled('invoice') && $object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0), |
| 3264 | 3264 | 'perm' => ($user->hasRight('facture', 'creer') && !getDolGlobalInt('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')), |
| 3265 | 3265 | 'label' => 'CreateBill', |
| 3266 | - 'url' => '/compta/facture/card.php?action=create&token=' . newToken() . '&origin=' . urlencode($object->element) . '&originid=' . $object->id . '&socid=' . $object->socid |
|
| 3266 | + 'url' => '/compta/facture/card.php?action=create&token='.newToken().'&origin='.urlencode($object->element).'&originid='.$object->id.'&socid='.$object->socid |
|
| 3267 | 3267 | ); |
| 3268 | 3268 | /* |
| 3269 | 3269 | if (isModEnabled('facture') && $object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) { |
@@ -3315,7 +3315,7 @@ discard block |
||
| 3315 | 3315 | if ($numshipping == 0) { |
| 3316 | 3316 | print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
| 3317 | 3317 | } else { |
| 3318 | - print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false); |
|
| 3318 | + print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3319 | 3319 | } |
| 3320 | 3320 | } |
| 3321 | 3321 | } |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | /** |
| 389 | 389 | * Shipment on process |
| 390 | 390 | */ |
| 391 | - const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated |
|
| 391 | + const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated |
|
| 392 | 392 | |
| 393 | 393 | /** |
| 394 | 394 | * For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead. |
@@ -404,12 +404,12 @@ discard block |
||
| 404 | 404 | /* |
| 405 | 405 | * No signature |
| 406 | 406 | */ |
| 407 | - const STATUS_NO_SIGNATURE = 0; |
|
| 407 | + const STATUS_NO_SIGNATURE = 0; |
|
| 408 | 408 | |
| 409 | 409 | /* |
| 410 | 410 | * Signed by sender |
| 411 | 411 | */ |
| 412 | - const STATUS_SIGNED_SENDER = 1; |
|
| 412 | + const STATUS_SIGNED_SENDER = 1; |
|
| 413 | 413 | |
| 414 | 414 | /* |
| 415 | 415 | * Signed by receiver |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | /* |
| 420 | 420 | * Signed by all |
| 421 | 421 | */ |
| 422 | - const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) |
|
| 422 | + const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) |
|
| 423 | 423 | |
| 424 | 424 | |
| 425 | 425 | /** |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | if (getDolGlobalString('COMMANDE_ADDON')) { |
| 453 | 453 | $mybool = false; |
| 454 | 454 | |
| 455 | - $file = getDolGlobalString('COMMANDE_ADDON') . ".php"; |
|
| 455 | + $file = getDolGlobalString('COMMANDE_ADDON').".php"; |
|
| 456 | 456 | $classname = getDolGlobalString('COMMANDE_ADDON'); |
| 457 | 457 | |
| 458 | 458 | // Include file with class |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | // Set new ref and current status |
| 639 | 639 | if (!$error) { |
| 640 | 640 | $this->ref = $num; |
| 641 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 641 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 642 | 642 | $this->status = self::STATUS_VALIDATED; |
| 643 | 643 | } |
| 644 | 644 | |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | } |
| 725 | 725 | |
| 726 | 726 | if (!$error) { |
| 727 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 727 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 728 | 728 | $this->status = self::STATUS_DRAFT; |
| 729 | 729 | $this->db->commit(); |
| 730 | 730 | return 1; |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | } |
| 782 | 782 | |
| 783 | 783 | if (!$error) { |
| 784 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 784 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
| 785 | 785 | $this->status = self::STATUS_VALIDATED; |
| 786 | 786 | $this->billed = 0; |
| 787 | 787 | |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | } |
| 838 | 838 | |
| 839 | 839 | if (!$error) { |
| 840 | - $this->statut = self::STATUS_CLOSED; // deprecated |
|
| 840 | + $this->statut = self::STATUS_CLOSED; // deprecated |
|
| 841 | 841 | $this->status = self::STATUS_CLOSED; |
| 842 | 842 | |
| 843 | 843 | $this->db->commit(); |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | } |
| 928 | 928 | |
| 929 | 929 | if (!$error) { |
| 930 | - $this->statut = self::STATUS_CANCELED; // deprecated |
|
| 930 | + $this->statut = self::STATUS_CANCELED; // deprecated |
|
| 931 | 931 | $this->status = self::STATUS_CANCELED; |
| 932 | 932 | $this->db->commit(); |
| 933 | 933 | return 1; |
@@ -1282,7 +1282,7 @@ discard block |
||
| 1282 | 1282 | if ($objsoc->fetch($socid) > 0) { |
| 1283 | 1283 | $this->socid = $objsoc->id; |
| 1284 | 1284 | $this->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); |
| 1285 | - $this->deposit_percent = (!empty($objsoc->deposit_percent) ? $objsoc->deposit_percent : 0); |
|
| 1285 | + $this->deposit_percent = (!empty($objsoc->deposit_percent) ? $objsoc->deposit_percent : 0); |
|
| 1286 | 1286 | $this->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); |
| 1287 | 1287 | $this->fk_project = 0; |
| 1288 | 1288 | $this->fk_delivery_address = 0; |
@@ -1293,7 +1293,7 @@ discard block |
||
| 1293 | 1293 | |
| 1294 | 1294 | $this->id = 0; |
| 1295 | 1295 | $this->ref = ''; |
| 1296 | - $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 1296 | + $this->statut = self::STATUS_DRAFT; // deprecated |
|
| 1297 | 1297 | $this->status = self::STATUS_DRAFT; |
| 1298 | 1298 | |
| 1299 | 1299 | // Clear fields |
@@ -1374,8 +1374,8 @@ discard block |
||
| 1374 | 1374 | { |
| 1375 | 1375 | global $conf, $hookmanager; |
| 1376 | 1376 | |
| 1377 | - require_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
| 1378 | - require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
| 1377 | + require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
| 1378 | + require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
| 1379 | 1379 | |
| 1380 | 1380 | $error = 0; |
| 1381 | 1381 | |
@@ -1407,7 +1407,7 @@ discard block |
||
| 1407 | 1407 | $line->fk_parent_line = $object->lines[$i]->fk_parent_line; |
| 1408 | 1408 | $line->fk_unit = $object->lines[$i]->fk_unit; |
| 1409 | 1409 | |
| 1410 | - $line->date_start = $object->lines[$i]->date_start; |
|
| 1410 | + $line->date_start = $object->lines[$i]->date_start; |
|
| 1411 | 1411 | $line->date_end = $object->lines[$i]->date_end; |
| 1412 | 1412 | |
| 1413 | 1413 | $line->fk_fournprice = $object->lines[$i]->fk_fournprice; |
@@ -1789,7 +1789,7 @@ discard block |
||
| 1789 | 1789 | $this->line->date_end = $date_end; |
| 1790 | 1790 | |
| 1791 | 1791 | $this->line->fk_fournprice = $fk_fournprice; |
| 1792 | - $this->line->pa_ht = $pa_ht; // Can be '' when not defined or 0 if defined to 0 or a price value |
|
| 1792 | + $this->line->pa_ht = $pa_ht; // Can be '' when not defined or 0 if defined to 0 or a price value |
|
| 1793 | 1793 | |
| 1794 | 1794 | // Multicurrency |
| 1795 | 1795 | $this->line->fk_multicurrency = $this->fk_multicurrency; |
@@ -2014,7 +2014,7 @@ discard block |
||
| 2014 | 2014 | $this->fk_project = $obj->fk_project; |
| 2015 | 2015 | $this->project = null; // Clear if another value was already set by fetch_projet |
| 2016 | 2016 | |
| 2017 | - $this->statut = $obj->status; // deprecated |
|
| 2017 | + $this->statut = $obj->status; // deprecated |
|
| 2018 | 2018 | $this->status = $obj->status; |
| 2019 | 2019 | |
| 2020 | 2020 | $this->user_author_id = $obj->fk_user_author; |
@@ -2264,7 +2264,7 @@ discard block |
||
| 2264 | 2264 | $line->weight_units = $objp->weight_units; |
| 2265 | 2265 | $line->volume = $objp->volume; |
| 2266 | 2266 | $line->volume_units = $objp->volume_units; |
| 2267 | - $line->packaging = $objp->packaging; |
|
| 2267 | + $line->packaging = $objp->packaging; |
|
| 2268 | 2268 | |
| 2269 | 2269 | $line->date_start = $this->db->jdate($objp->date_start); |
| 2270 | 2270 | $line->date_end = $this->db->jdate($objp->date_end); |
@@ -3624,15 +3624,15 @@ discard block |
||
| 3624 | 3624 | //$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0"; |
| 3625 | 3625 | if ($mode == 'toship') { |
| 3626 | 3626 | // An order to ship is an open order (validated or in progress) |
| 3627 | - $sql .= " AND c.fk_statut IN (" . self::STATUS_VALIDATED . "," . self::STATUS_SHIPMENTONPROCESS . ")"; |
|
| 3627 | + $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.")"; |
|
| 3628 | 3628 | } |
| 3629 | 3629 | if ($mode == 'tobill') { |
| 3630 | 3630 | // An order to bill is an order not already billed |
| 3631 | - $sql .= " AND c.fk_statut IN (" . self::STATUS_VALIDATED . "," . self::STATUS_SHIPMENTONPROCESS . ", " . self::STATUS_CLOSED . ") AND c.facture = 0"; |
|
| 3631 | + $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.", ".self::STATUS_CLOSED.") AND c.facture = 0"; |
|
| 3632 | 3632 | } |
| 3633 | 3633 | if ($mode == 'shippedtobill') { |
| 3634 | 3634 | // An order shipped and to bill is a delivered order not already billed |
| 3635 | - $sql .= " AND c.fk_statut IN (" . self::STATUS_CLOSED . ") AND c.facture = 0"; |
|
| 3635 | + $sql .= " AND c.fk_statut IN (".self::STATUS_CLOSED.") AND c.facture = 0"; |
|
| 3636 | 3636 | } |
| 3637 | 3637 | if ($user->socid) { |
| 3638 | 3638 | $sql .= " AND c.fk_soc = ".((int) $user->socid); |
@@ -3961,7 +3961,7 @@ discard block |
||
| 3961 | 3961 | } |
| 3962 | 3962 | |
| 3963 | 3963 | global $action; |
| 3964 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 3964 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 3965 | 3965 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
| 3966 | 3966 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 3967 | 3967 | if ($reshook > 0) { |
@@ -4069,7 +4069,7 @@ discard block |
||
| 4069 | 4069 | $this->status = $this::STATUS_DRAFT; |
| 4070 | 4070 | |
| 4071 | 4071 | // Lines |
| 4072 | - $nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000) |
|
| 4072 | + $nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000) |
|
| 4073 | 4073 | $xnbp = 0; |
| 4074 | 4074 | |
| 4075 | 4075 | while ($xnbp < $nbp) { |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $datec = $this->db->jdate($objp->datec); |
| 112 | 112 | $datem = $this->db->jdate($objp->datem); |
| 113 | 113 | |
| 114 | - $ficheinterstatic->statut = $objp->status; // deprecated |
|
| 114 | + $ficheinterstatic->statut = $objp->status; // deprecated |
|
| 115 | 115 | $ficheinterstatic->status = $objp->status; |
| 116 | 116 | $ficheinterstatic->id = $objp->rowid; |
| 117 | 117 | $ficheinterstatic->ref = $objp->ref; |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | $supplierorderstatic->id = $objp->rowid; |
| 117 | 117 | $supplierorderstatic->ref = $objp->ref; |
| 118 | 118 | $supplierorderstatic->delivery_date = $delivery_date; |
| 119 | - $supplierorderstatic->statut = $objp->status; // deprecated |
|
| 119 | + $supplierorderstatic->statut = $objp->status; // deprecated |
|
| 120 | 120 | $supplierorderstatic->status = $objp->status; |
| 121 | 121 | |
| 122 | 122 | $thirdpartystatic->id = $objp->socid; |