@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - if (!$memberfound && GETPOST("morphy") == 'mor' && GETPOSTISSET("societe") ) { |
|
| 252 | + if (!$memberfound && GETPOST("morphy") == 'mor' && GETPOSTISSET("societe")) { |
|
| 253 | 253 | $sql = "SELECT a.rowid as id"; |
| 254 | 254 | $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; |
| 255 | 255 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s"; |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | $ok = false; |
| 379 | 379 | if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_MEMBER') && is_object($captchaobj)) { |
| 380 | 380 | if (method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) { |
| 381 | - $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 381 | + $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 382 | 382 | } else { |
| 383 | 383 | print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()'; |
| 384 | 384 | } |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | $to = $adh->makeSubstitution(getDolGlobalString('MAIN_INFO_SOCIETE_MAIL')); |
| 531 | 531 | $from = getDolGlobalString('ADHERENT_MAIL_FROM', $conf->email_from); |
| 532 | 532 | $mailfile = new CMailFile( |
| 533 | - '['.$appli.'] ' . getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'), |
|
| 533 | + '['.$appli.'] '.getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'), |
|
| 534 | 534 | $to, |
| 535 | 535 | $from, |
| 536 | 536 | $adh->makeSubstitution(getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL')), |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | } |
| 719 | 719 | } else { |
| 720 | 720 | $adht->fetch(getDolGlobalInt('MEMBER_NEWFORM_FORCETYPE')); |
| 721 | - print '<input type="hidden" id="typeid" name="typeid" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">'; |
|
| 721 | + print '<input type="hidden" id="typeid" name="typeid" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">'; |
|
| 722 | 722 | } |
| 723 | 723 | print '</td></tr>'."\n"; |
| 724 | 724 | |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | "mor" => $langs->trans("Moral"), |
| 730 | 730 | ]; |
| 731 | 731 | $checkednature = GETPOST("morphy", 'alpha'); |
| 732 | - $listetype_natures = $adht->morphyByType(1); // Load the array of morphy per type |
|
| 732 | + $listetype_natures = $adht->morphyByType(1); // Load the array of morphy per type |
|
| 733 | 733 | $listetype_natures_json = json_encode($listetype_natures); |
| 734 | 734 | |
| 735 | 735 | if (!getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY')) { |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | print '</td></tr>'."\n"; |
| 822 | 822 | } else { |
| 823 | 823 | //print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY]; |
| 824 | - print '<input type="hidden" id="morphy" name="morphy" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">'; |
|
| 824 | + print '<input type="hidden" id="morphy" name="morphy" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">'; |
|
| 825 | 825 | } |
| 826 | 826 | |
| 827 | 827 | // Company // TODO : optional hide |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | } |
| 919 | 919 | |
| 920 | 920 | // Other attributes |
| 921 | - $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 921 | + $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 922 | 922 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
| 923 | 923 | |
| 924 | 924 | // Comments |
@@ -979,9 +979,9 @@ discard block |
||
| 979 | 979 | $adht = new AdherentType($db); |
| 980 | 980 | $adht->fetch($typeid); |
| 981 | 981 | $caneditamount = $adht->caneditamount; |
| 982 | - $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 982 | + $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 983 | 983 | $amountbytype_json = json_encode($amountbytype); |
| 984 | - $caneditamountbytype = $adht->caneditamountByType(1); // Load the array of caneditamount per type |
|
| 984 | + $caneditamountbytype = $adht->caneditamountByType(1); // Load the array of caneditamount per type |
|
| 985 | 985 | $caneditamountbytype_json = json_encode($caneditamountbytype); |
| 986 | 986 | |
| 987 | 987 | |
@@ -1005,7 +1005,7 @@ discard block |
||
| 1005 | 1005 | |
| 1006 | 1006 | print '<tr><td>'.$langs->trans("Subscription"); |
| 1007 | 1007 | if (getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO')) { |
| 1008 | - print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1008 | + print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1009 | 1009 | } |
| 1010 | 1010 | print '</td><td class="nowrap">'; |
| 1011 | 1011 | |
@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_MEMBER') && is_object($captchaobj)) { |
| 1067 | 1067 | print '<tr><td class="titlefield"><label><span class="fieldrequired">'.$langs->trans("SecurityCode").'</span></label></td><td><br>'; |
| 1068 | 1068 | if (method_exists($captchaobj, 'getCaptchaCodeForForm')) { |
| 1069 | - print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1069 | + print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1070 | 1070 | } else { |
| 1071 | 1071 | print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method getCaptchaCodeForForm()'; |
| 1072 | 1072 | } |
@@ -1134,10 +1134,10 @@ discard block |
||
| 1134 | 1134 | |
| 1135 | 1135 | $i = 0; |
| 1136 | 1136 | while ($i < $num) { |
| 1137 | - $objp = $db->fetch_object($result); // Load the member type and information on it |
|
| 1137 | + $objp = $db->fetch_object($result); // Load the member type and information on it |
|
| 1138 | 1138 | |
| 1139 | 1139 | $caneditamount = $objp->caneditamount; |
| 1140 | - $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 1140 | + $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 1141 | 1141 | |
| 1142 | 1142 | print '<tr class="oddeven">'; |
| 1143 | 1143 | // Label |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $ok = false; |
| 284 | 284 | if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_TICKET') && is_object($captchaobj)) { |
| 285 | 285 | if (method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) { |
| 286 | - $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 286 | + $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 287 | 287 | } else { |
| 288 | 288 | print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()'; |
| 289 | 289 | } |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | |
| 460 | 460 | $sendto = GETPOST('email', 'alpha'); |
| 461 | 461 | |
| 462 | - $from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>'; |
|
| 462 | + $from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>'; |
|
| 463 | 463 | $replyto = $from; |
| 464 | 464 | $sendtocc = ''; |
| 465 | 465 | $deliveryreceipt = 0; |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | $message_admin .= '<p>'.$langs->trans('Message').' : <br>'.$object->message.'</p>'; |
| 505 | 505 | $message_admin .= '<p><a href="'.dol_buildpath('/ticket/card.php', 2).'?track_id='.$object->track_id.'" rel="nofollow noopener">'.$langs->trans('SeeThisTicketIntomanagementInterface').'</a></p>'; |
| 506 | 506 | |
| 507 | - $from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' <' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>'; |
|
| 507 | + $from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>'; |
|
| 508 | 508 | $replyto = $from; |
| 509 | 509 | |
| 510 | 510 | $old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO'); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | $ok = false; |
| 225 | 225 | if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_DONATION') && is_object($captchaobj)) { |
| 226 | 226 | if (method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) { |
| 227 | - $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 227 | + $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 228 | 228 | } else { |
| 229 | 229 | print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()'; |
| 230 | 230 | } |
@@ -249,10 +249,10 @@ discard block |
||
| 249 | 249 | if (!$error) { |
| 250 | 250 | $donation = new Don($db); |
| 251 | 251 | |
| 252 | - $donation->amount = (float) GETPOST('amount'); |
|
| 252 | + $donation->amount = (float) GETPOST('amount'); |
|
| 253 | 253 | $donation->status = Don::STATUS_DRAFT; |
| 254 | 254 | $donation->public = $public; |
| 255 | - $donation->date = dol_now(); |
|
| 255 | + $donation->date = dol_now(); |
|
| 256 | 256 | $donation->firstname = GETPOST('firstname'); |
| 257 | 257 | $donation->lastname = GETPOST('lastname'); |
| 258 | 258 | $donation->company = GETPOST('societe'); |
@@ -435,8 +435,8 @@ discard block |
||
| 435 | 435 | // Add a specific style or table head for the project row |
| 436 | 436 | if ((isModEnabled('project') || isModEnabled('eventorganization')) && !empty($projectTitle)) { |
| 437 | 437 | print '<tr>'; |
| 438 | - print '<td class="project-label">' . $langs->trans("project") . '</td>'; |
|
| 439 | - print '<td class="project-value">' . dol_escape_htmltag($projectTitle) . '</td>'; |
|
| 438 | + print '<td class="project-label">'.$langs->trans("project").'</td>'; |
|
| 439 | + print '<td class="project-value">'.dol_escape_htmltag($projectTitle).'</td>'; |
|
| 440 | 440 | print '</tr>'; |
| 441 | 441 | } |
| 442 | 442 | |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | // Other attributes |
| 527 | - $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 527 | + $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 528 | 528 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
| 529 | 529 | |
| 530 | 530 | print '<tr id="trseparator"><td colspan="2"><hr></td></tr>'; |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_DONATION') && is_object($captchaobj)) { |
| 565 | 565 | print '<tr><td class="titlefield"><label><span class="fieldrequired">'.$langs->trans("SecurityCode").'</span></label></td><td><br>'; |
| 566 | 566 | if (method_exists($captchaobj, 'getCaptchaCodeForForm')) { |
| 567 | - print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 567 | + print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 568 | 568 | } else { |
| 569 | 569 | print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method getCaptchaCodeForForm()'; |
| 570 | 570 | } |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | $objecttmp->date = $datefacture; |
| 297 | - $objecttmp->origin_type = 'shipping'; |
|
| 297 | + $objecttmp->origin_type = 'shipping'; |
|
| 298 | 298 | $objecttmp->origin_id = (int) $id_sending; |
| 299 | 299 | |
| 300 | 300 | $objecttmp->array_options = $expd->array_options; // Copy extrafields |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | $desc = ($lines[$i]->desc ? $lines[$i]->desc : ''); |
| 362 | 362 | // If we build one invoice for several sendings, we must put the ref of sending on the invoice line |
| 363 | 363 | if (!empty($createbills_onebythird)) { |
| 364 | - $desc = dol_concatdesc($desc, $langs->trans("Order").': '.$expdCmdSrc->ref. ' - '. $langs->trans("Shipment").': '.$expd->ref.($expd->date_shipping ? ' - '.dol_print_date($expd->date_shipping, 'day') : '')); |
|
| 364 | + $desc = dol_concatdesc($desc, $langs->trans("Order").': '.$expdCmdSrc->ref.' - '.$langs->trans("Shipment").': '.$expd->ref.($expd->date_shipping ? ' - '.dol_print_date($expd->date_shipping, 'day') : '')); |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | if ($lines[$i]->subprice < 0 && !getDolGlobalString('INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN')) { |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | if ($searchCategoryCustomerOperator == 0) { |
| 824 | 824 | $searchCategoryCustomerSqlList[] = " EXISTS (SELECT cs.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as cs WHERE s.rowid = cs.fk_soc AND cs.fk_categorie = ".((int) $searchCategoryCustomer).")"; |
| 825 | 825 | } else { |
| 826 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); |
|
| 826 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer); |
|
| 827 | 827 | } |
| 828 | 828 | } |
| 829 | 829 | } |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | if ($searchCategoryProductOperator == 0) { |
| 854 | 854 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_elementdet = cd.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
| 855 | 855 | } else { |
| 856 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
| 856 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
| 857 | 857 | } |
| 858 | 858 | } |
| 859 | 859 | } |
@@ -1194,7 +1194,7 @@ discard block |
||
| 1194 | 1194 | } |
| 1195 | 1195 | |
| 1196 | 1196 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 1197 | -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // @phan-suppress-current-line PhanTypeMismatchArgument |
|
| 1197 | +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // @phan-suppress-current-line PhanTypeMismatchArgument |
|
| 1198 | 1198 | if ($massactionbutton) { |
| 1199 | 1199 | $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); // This also change content of $arrayfields |
| 1200 | 1200 | } |
@@ -47,29 +47,29 @@ discard block |
||
| 47 | 47 | * @var User $user |
| 48 | 48 | */ |
| 49 | 49 | |
| 50 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 51 | -require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; |
|
| 52 | -require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 53 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/product.lib.php'; |
|
| 54 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/sendings.lib.php'; |
|
| 55 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; |
|
| 56 | -require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 57 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
| 58 | -require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; |
|
| 59 | -require_once DOL_DOCUMENT_ROOT . '/product/stock/class/productlot.class.php'; |
|
| 60 | -require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; |
|
| 50 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 51 | +require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; |
|
| 52 | +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 53 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; |
|
| 54 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; |
|
| 55 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; |
|
| 56 | +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 57 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
| 58 | +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; |
|
| 59 | +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; |
|
| 60 | +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; |
|
| 61 | 61 | if (isModEnabled("product") || isModEnabled("service")) { |
| 62 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 62 | + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 63 | 63 | } |
| 64 | 64 | if (isModEnabled("propal")) { |
| 65 | - require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
| 65 | + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
| 66 | 66 | } |
| 67 | 67 | if (isModEnabled('productbatch')) { |
| 68 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productbatch.class.php'; |
|
| 68 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; |
|
| 69 | 69 | } |
| 70 | 70 | if (isModEnabled('project')) { |
| 71 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 72 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 71 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 72 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // Load translation files required by the page |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $extrafields->fetch_name_optionals_label($objectorder->table_element_line); |
| 115 | 115 | |
| 116 | 116 | // Load object. Make an object->fetch |
| 117 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 117 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 118 | 118 | |
| 119 | 119 | // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context |
| 120 | 120 | $hookmanager->initHooks(array('expeditioncard', 'globalcard')); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $permissiontoeditextra = dol_eval($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')]); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | -$upload_dir = $conf->expedition->dir_output . '/sending'; |
|
| 147 | +$upload_dir = $conf->expedition->dir_output.'/sending'; |
|
| 148 | 148 | |
| 149 | 149 | $editColspan = 0; |
| 150 | 150 | $objectsrc = null; |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | if ($cancel) { |
| 167 | 167 | if ($origin_id > 0) { |
| 168 | 168 | if ($origin == 'commande') { |
| 169 | - header("Location: " . DOL_URL_ROOT . '/expedition/shipment.php?id=' . ((int) $origin_id)); |
|
| 169 | + header("Location: ".DOL_URL_ROOT.'/expedition/shipment.php?id='.((int) $origin_id)); |
|
| 170 | 170 | exit; |
| 171 | 171 | } |
| 172 | 172 | } else { |
@@ -175,10 +175,10 @@ discard block |
||
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 178 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 179 | 179 | |
| 180 | 180 | // Actions to build doc |
| 181 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
| 181 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
| 182 | 182 | |
| 183 | 183 | // Back to draft |
| 184 | 184 | if ($action == 'setdraft' && $permissiontoadd) { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | if ($result < 0) { |
| 188 | 188 | setEventMessages($object->error, $object->errors, 'errors'); |
| 189 | 189 | } else { |
| 190 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 190 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 191 | 191 | exit; |
| 192 | 192 | } |
| 193 | 193 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | if ($result < 0) { |
| 199 | 199 | setEventMessages($object->error, $object->errors, 'errors'); |
| 200 | 200 | } else { |
| 201 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 201 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 202 | 202 | exit; |
| 203 | 203 | } |
| 204 | 204 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | setEventMessages($object->error, $object->errors, 'errors'); |
| 220 | 220 | $action = 'editref_customer'; |
| 221 | 221 | } else { |
| 222 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 222 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 223 | 223 | exit; |
| 224 | 224 | } |
| 225 | 225 | } |
@@ -296,16 +296,16 @@ discard block |
||
| 296 | 296 | $product_batch_used = array(); |
| 297 | 297 | |
| 298 | 298 | for ($i = 0; $i < $num; $i++) { |
| 299 | - $idl = "idl" . $i; |
|
| 299 | + $idl = "idl".$i; |
|
| 300 | 300 | |
| 301 | 301 | $sub_qty = array(); |
| 302 | 302 | $subtotalqty = 0; |
| 303 | 303 | |
| 304 | 304 | $j = 0; |
| 305 | 305 | |
| 306 | - $batch = "batchl" . $i . "_0"; |
|
| 307 | - $stockLocation = "ent1" . $i . "_0"; |
|
| 308 | - $qty = "qtyl" . $i; |
|
| 306 | + $batch = "batchl".$i."_0"; |
|
| 307 | + $stockLocation = "ent1".$i."_0"; |
|
| 308 | + $qty = "qtyl".$i; |
|
| 309 | 309 | |
| 310 | 310 | $is_batch_or_serial = 0; |
| 311 | 311 | if (!empty($objectsrc->lines[$i]->fk_product)) { |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | if (isModEnabled('productbatch') && $objectsrc->lines[$i]->product_tobatch) { |
| 321 | 321 | if (GETPOSTISSET($batch)) { |
| 322 | 322 | //shipment line with batch-enable product |
| 323 | - $qty .= '_' . $j; |
|
| 323 | + $qty .= '_'.$j; |
|
| 324 | 324 | while (GETPOSTISSET($batch)) { |
| 325 | 325 | // save line of detail into sub_qty |
| 326 | 326 | $sub_qty[$j]['q'] = price2num(GETPOST($qty, 'alpha'), 'MS'); // the qty we want to move for this stock record |
@@ -339,8 +339,8 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | $j++; |
| 342 | - $batch = "batchl" . $i . "_" . $j; |
|
| 343 | - $qty = "qtyl" . $i . '_' . $j; |
|
| 342 | + $batch = "batchl".$i."_".$j; |
|
| 343 | + $qty = "qtyl".$i.'_'.$j; |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | $batch_line[$i]['detail'] = $sub_qty; // array of details |
@@ -354,13 +354,13 @@ discard block |
||
| 354 | 354 | // We try to set an amount |
| 355 | 355 | // Case we don't use the list of available qty for each warehouse/lot |
| 356 | 356 | // GUI does not allow this yet |
| 357 | - setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse") . ' (' . $langs->trans("Line") . ' ' . GETPOSTINT($idl) . ')', null, 'errors'); |
|
| 357 | + setEventMessages($langs->trans("StockIsRequiredToChooseWhichLotToUse").' ('.$langs->trans("Line").' '.GETPOSTINT($idl).')', null, 'errors'); |
|
| 358 | 358 | $error++; |
| 359 | 359 | } |
| 360 | 360 | } |
| 361 | 361 | } elseif (GETPOSTISSET($stockLocation)) { |
| 362 | 362 | //shipment line from multiple stock locations |
| 363 | - $qty .= '_' . $j; |
|
| 363 | + $qty .= '_'.$j; |
|
| 364 | 364 | while (GETPOSTISSET($stockLocation)) { |
| 365 | 365 | // save sub line of warehouse |
| 366 | 366 | $stockLine[$i][$j]['qty'] = price2num(GETPOST($qty, 'alpha'), 'MS'); |
@@ -371,8 +371,8 @@ discard block |
||
| 371 | 371 | $subtotalqty += price2num(GETPOST($qty, 'alpha'), 'MS'); |
| 372 | 372 | |
| 373 | 373 | $j++; |
| 374 | - $stockLocation = "ent1" . $i . "_" . $j; |
|
| 375 | - $qty = "qtyl" . $i . '_' . $j; |
|
| 374 | + $stockLocation = "ent1".$i."_".$j; |
|
| 375 | + $qty = "qtyl".$i.'_'.$j; |
|
| 376 | 376 | } |
| 377 | 377 | } else { |
| 378 | 378 | //shipment line for product with no batch management and no multiple stock location |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | if (isset($extrafields->attributes[$object->table_element_line]['label']) && is_array($extrafields->attributes[$object->table_element_line]['label'])) { |
| 396 | 396 | // Get extra fields |
| 397 | 397 | foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) { |
| 398 | - unset($_POST["options_" . $key]); |
|
| 398 | + unset($_POST["options_".$key]); |
|
| 399 | 399 | } |
| 400 | 400 | } |
| 401 | 401 | } |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | if (($totalqty > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) && !$error) { // There is at least one thing to ship and no error |
| 404 | 404 | $selected_subtotal_lines = GETPOST('subtotal_toselect', 'array:int'); |
| 405 | 405 | for ($i = 0; $i < $num; $i++) { |
| 406 | - $qty = "qtyl" . $i; |
|
| 406 | + $qty = "qtyl".$i; |
|
| 407 | 407 | |
| 408 | 408 | if (!isset($batch_line[$i])) { |
| 409 | 409 | // not batch mode |
@@ -421,8 +421,8 @@ discard block |
||
| 421 | 421 | } |
| 422 | 422 | } else { |
| 423 | 423 | if (GETPOSTFLOAT($qty) > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
| 424 | - $ent = "entl" . $i; |
|
| 425 | - $idl = "idl" . $i; |
|
| 424 | + $ent = "entl".$i; |
|
| 425 | + $idl = "idl".$i; |
|
| 426 | 426 | $entrepot_id = is_numeric(GETPOSTINT($ent)) ? GETPOSTINT($ent) : GETPOSTINT('entrepot_id'); |
| 427 | 427 | if ($entrepot_id < 0) { |
| 428 | 428 | $entrepot_id = ''; |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | } elseif (!$error) { |
| 476 | 476 | $labelfieldmissing = $langs->transnoentitiesnoconv("QtyToShip"); |
| 477 | 477 | if (isModEnabled('stock')) { |
| 478 | - $labelfieldmissing .= '/' . $langs->transnoentitiesnoconv("Warehouse"); |
|
| 478 | + $labelfieldmissing .= '/'.$langs->transnoentitiesnoconv("Warehouse"); |
|
| 479 | 479 | } |
| 480 | 480 | setEventMessages($langs->trans("ErrorFieldRequired", $labelfieldmissing), null, 'errors'); |
| 481 | 481 | $error++; |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | $line->extraparams = $objectsrc_line->extraparams; |
| 492 | 492 | $line->setExtraParameters(); |
| 493 | 493 | } |
| 494 | - header("Location: card.php?id=" . $object->id); |
|
| 494 | + header("Location: card.php?id=".$object->id); |
|
| 495 | 495 | exit; |
| 496 | 496 | } else { |
| 497 | 497 | $db->rollback(); |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | if ($result > 0) { |
| 507 | 507 | $db->commit(); |
| 508 | 508 | |
| 509 | - header("Location: " . DOL_URL_ROOT . '/delivery/card.php?action=create_delivery&token=' . newToken() . '&id=' . $result); |
|
| 509 | + header("Location: ".DOL_URL_ROOT.'/delivery/card.php?action=create_delivery&token='.newToken().'&id='.$result); |
|
| 510 | 510 | exit; |
| 511 | 511 | } else { |
| 512 | 512 | $db->rollback(); |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); |
| 560 | 560 | $result = $object->delete($user, 0, (bool) $also_update_stock); |
| 561 | 561 | if ($result > 0) { |
| 562 | - header("Location: " . DOL_URL_ROOT . '/expedition/index.php'); |
|
| 562 | + header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); |
|
| 563 | 563 | exit; |
| 564 | 564 | } else { |
| 565 | 565 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 599 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 600 | 600 | exit; |
| 601 | 601 | } else { |
| 602 | 602 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | } elseif ($action == 'confirm_sign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) { |
| 605 | 605 | $result = $object->setSignedStatus($user, GETPOSTINT('signed_status'), 0, 'SHIPPING_MODIFY'); |
| 606 | 606 | if ($result >= 0) { |
| 607 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 607 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 608 | 608 | exit; |
| 609 | 609 | } else { |
| 610 | 610 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | } elseif ($action == 'confirm_unsign' && $confirm == 'yes' && $user->hasRight('expedition', 'creer')) { |
| 613 | 613 | $result = $object->setSignedStatus($user, Expedition::$SIGNED_STATUSES['STATUS_NO_SIGNATURE'], 0, 'SHIPPING_MODIFY'); |
| 614 | 614 | if ($result >= 0) { |
| 615 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 615 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 616 | 616 | exit; |
| 617 | 617 | } else { |
| 618 | 618 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | $datedelivery = dol_mktime(GETPOSTINT('liv_hour'), GETPOSTINT('liv_min'), 0, GETPOSTINT('liv_month'), GETPOSTINT('liv_day'), GETPOSTINT('liv_year')); |
| 622 | 622 | |
| 623 | 623 | $object->fetch($id); |
| 624 | - $result = $object->setDeliveryDate($user, $datedelivery); // Set the planned delivery date |
|
| 624 | + $result = $object->setDeliveryDate($user, $datedelivery); // Set the planned delivery date |
|
| 625 | 625 | if ($result < 0) { |
| 626 | 626 | setEventMessages($object->error, $object->errors, 'errors'); |
| 627 | 627 | } |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | } |
| 663 | 663 | |
| 664 | 664 | if ($object->update($user) >= 0) { |
| 665 | - header("Location: card.php?id=" . $object->id); |
|
| 665 | + header("Location: card.php?id=".$object->id); |
|
| 666 | 666 | exit; |
| 667 | 667 | } |
| 668 | 668 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | $object->fetch($id); |
| 672 | 672 | $result = $object->setBilled(); |
| 673 | 673 | if ($result >= 0) { |
| 674 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 674 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 675 | 675 | exit(); |
| 676 | 676 | } |
| 677 | 677 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -679,7 +679,7 @@ discard block |
||
| 679 | 679 | $object->fetch($id); |
| 680 | 680 | $result = $object->setClosed(); |
| 681 | 681 | if ($result >= 0) { |
| 682 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 682 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 683 | 683 | exit(); |
| 684 | 684 | } |
| 685 | 685 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -713,7 +713,7 @@ discard block |
||
| 713 | 713 | } |
| 714 | 714 | |
| 715 | 715 | if (!$error) { |
| 716 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 716 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 717 | 717 | exit(); |
| 718 | 718 | } else { |
| 719 | 719 | setEventMessages($line->error, $line->errors, 'errors'); |
@@ -737,7 +737,7 @@ discard block |
||
| 737 | 737 | // Unset extrafield POST Data |
| 738 | 738 | if (is_array($extrafields->attributes[$object->table_element_line]['label'])) { |
| 739 | 739 | foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) { |
| 740 | - unset($_POST["options_" . $key]); |
|
| 740 | + unset($_POST["options_".$key]); |
|
| 741 | 741 | } |
| 742 | 742 | } |
| 743 | 743 | $line->fk_product = $lines[$i]->fk_product; |
@@ -745,8 +745,8 @@ discard block |
||
| 745 | 745 | // line with lot |
| 746 | 746 | foreach ($lines[$i]->detail_batch as $detail_batch) { |
| 747 | 747 | $lotStock = new Productbatch($db); |
| 748 | - $batch = "batchl" . $detail_batch->fk_expeditiondet . "_" . $detail_batch->fk_origin_stock; |
|
| 749 | - $qty = "qtyl" . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id; |
|
| 748 | + $batch = "batchl".$detail_batch->fk_expeditiondet."_".$detail_batch->fk_origin_stock; |
|
| 749 | + $qty = "qtyl".$detail_batch->fk_expeditiondet.'_'.$detail_batch->id; |
|
| 750 | 750 | $batch_id = GETPOSTINT($batch); |
| 751 | 751 | $batch_qty = GETPOSTFLOAT($qty); |
| 752 | 752 | if (!empty($batch_id)) { |
@@ -782,8 +782,8 @@ discard block |
||
| 782 | 782 | } |
| 783 | 783 | // add new batch |
| 784 | 784 | $lotStock = new Productbatch($db); |
| 785 | - $batch = "batchl" . $line_id . "_0"; |
|
| 786 | - $qty = "qtyl" . $line_id . "_0"; |
|
| 785 | + $batch = "batchl".$line_id."_0"; |
|
| 786 | + $qty = "qtyl".$line_id."_0"; |
|
| 787 | 787 | $batch_id = GETPOSTINT($batch); |
| 788 | 788 | $batch_qty = GETPOSTFLOAT($qty); |
| 789 | 789 | $lineIdToAddLot = 0; |
@@ -846,8 +846,8 @@ discard block |
||
| 846 | 846 | // line without lot |
| 847 | 847 | if ($lines[$i]->entrepot_id == 0) { |
| 848 | 848 | // single warehouse shipment line or line in several warehouses context but with warehouse not defined |
| 849 | - $stockLocation = "entl" . $line_id; |
|
| 850 | - $qty = "qtyl" . $line_id; |
|
| 849 | + $stockLocation = "entl".$line_id; |
|
| 850 | + $qty = "qtyl".$line_id; |
|
| 851 | 851 | $line->id = $line_id; |
| 852 | 852 | $line->entrepot_id = GETPOSTINT((string) $stockLocation); |
| 853 | 853 | $line->qty = GETPOSTFLOAT($qty); |
@@ -859,8 +859,8 @@ discard block |
||
| 859 | 859 | unset($_POST[$qty]); |
| 860 | 860 | } elseif ($lines[$i]->entrepot_id > 0) { |
| 861 | 861 | // single warehouse shipment line |
| 862 | - $stockLocation = "entl" . $line_id; |
|
| 863 | - $qty = "qtyl" . $line_id; |
|
| 862 | + $stockLocation = "entl".$line_id; |
|
| 863 | + $qty = "qtyl".$line_id; |
|
| 864 | 864 | $line->id = $line_id; |
| 865 | 865 | $line->entrepot_id = GETPOSTINT($stockLocation); |
| 866 | 866 | $line->qty = GETPOSTFLOAT($qty); |
@@ -874,8 +874,8 @@ discard block |
||
| 874 | 874 | // multi warehouse shipment lines |
| 875 | 875 | foreach ($lines[$i]->details_entrepot as $detail_entrepot) { |
| 876 | 876 | if (!$error) { |
| 877 | - $stockLocation = "entl" . $detail_entrepot->line_id; |
|
| 878 | - $qty = "qtyl" . $detail_entrepot->line_id; |
|
| 877 | + $stockLocation = "entl".$detail_entrepot->line_id; |
|
| 878 | + $qty = "qtyl".$detail_entrepot->line_id; |
|
| 879 | 879 | $warehouse = GETPOSTINT($stockLocation); |
| 880 | 880 | if (!empty($warehouse)) { |
| 881 | 881 | $line->id = $detail_entrepot->line_id; |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | } |
| 894 | 894 | } |
| 895 | 895 | } elseif (!isModEnabled('stock') && !isModEnabled('productbatch')) { // both product batch and stock are not activated. |
| 896 | - $qty = "qtyl" . $line_id; |
|
| 896 | + $qty = "qtyl".$line_id; |
|
| 897 | 897 | $line->id = $line_id; |
| 898 | 898 | $line->qty = GETPOSTFLOAT($qty); |
| 899 | 899 | $line->entrepot_id = 0; |
@@ -907,7 +907,7 @@ discard block |
||
| 907 | 907 | } |
| 908 | 908 | } else { |
| 909 | 909 | // Product no predefined |
| 910 | - $qty = "qtyl" . $line_id; |
|
| 910 | + $qty = "qtyl".$line_id; |
|
| 911 | 911 | $line->id = $line_id; |
| 912 | 912 | $line->qty = GETPOSTFLOAT($qty); |
| 913 | 913 | $line->entrepot_id = 0; |
@@ -950,11 +950,11 @@ discard block |
||
| 950 | 950 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 951 | 951 | } |
| 952 | 952 | } else { |
| 953 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited |
|
| 953 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited |
|
| 954 | 954 | exit(); |
| 955 | 955 | } |
| 956 | 956 | } elseif ($action == 'updateline' && $permissiontoadd && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) { |
| 957 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited |
|
| 957 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited |
|
| 958 | 958 | exit(); |
| 959 | 959 | } elseif ($action == 'confirm_sign' && $confirm == 'yes' && $permissiontoadd) { |
| 960 | 960 | $result = $object->setSignedStatus($user, GETPOSTINT('signed_status'), 0, 'SHIPPING_MODIFY'); |
@@ -976,7 +976,7 @@ discard block |
||
| 976 | 976 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 977 | 977 | } |
| 978 | 978 | |
| 979 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 979 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 980 | 980 | exit; |
| 981 | 981 | } else { |
| 982 | 982 | $mesg = $object->error; |
@@ -1001,14 +1001,14 @@ discard block |
||
| 1001 | 1001 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 1002 | 1002 | } |
| 1003 | 1003 | |
| 1004 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 1004 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 1005 | 1005 | exit; |
| 1006 | 1006 | } else { |
| 1007 | 1007 | $mesg = $object->error; |
| 1008 | 1008 | } |
| 1009 | 1009 | } |
| 1010 | 1010 | |
| 1011 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
| 1011 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
| 1012 | 1012 | |
| 1013 | 1013 | // Actions to send emails |
| 1014 | 1014 | if (empty($id)) { |
@@ -1018,8 +1018,8 @@ discard block |
||
| 1018 | 1018 | $paramname = 'id'; |
| 1019 | 1019 | $autocopy = 'MAIN_MAIL_AUTOCOPY_SHIPMENT_TO'; |
| 1020 | 1020 | $mode = 'emailfromshipment'; |
| 1021 | - $trackid = 'shi' . $object->id; |
|
| 1022 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
| 1021 | + $trackid = 'shi'.$object->id; |
|
| 1022 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
| 1023 | 1023 | } |
| 1024 | 1024 | |
| 1025 | 1025 | |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | * View |
| 1028 | 1028 | */ |
| 1029 | 1029 | |
| 1030 | -$title = $object->ref . ' - ' . $langs->trans("Shipment"); |
|
| 1030 | +$title = $object->ref.' - '.$langs->trans("Shipment"); |
|
| 1031 | 1031 | if ($action == 'create2') { |
| 1032 | 1032 | $title = $langs->trans("CreateShipment"); |
| 1033 | 1033 | } |
@@ -1055,7 +1055,7 @@ discard block |
||
| 1055 | 1055 | if ($action == 'create2') { |
| 1056 | 1056 | print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly'); |
| 1057 | 1057 | |
| 1058 | - print '<br>' . $langs->trans("ShipmentCreationIsDoneFromOrder"); |
|
| 1058 | + print '<br>'.$langs->trans("ShipmentCreationIsDoneFromOrder"); |
|
| 1059 | 1059 | $action = ''; |
| 1060 | 1060 | $id = ''; |
| 1061 | 1061 | $ref = ''; |
@@ -1084,13 +1084,13 @@ discard block |
||
| 1084 | 1084 | $entrepot = new Entrepot($db); |
| 1085 | 1085 | } |
| 1086 | 1086 | |
| 1087 | - print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
| 1088 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 1087 | + print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
| 1088 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 1089 | 1089 | print '<input type="hidden" name="action" value="add">'; |
| 1090 | - print '<input type="hidden" name="origin" value="' . $origin . '">'; |
|
| 1091 | - print '<input type="hidden" name="origin_id" value="' . $object->id . '">'; |
|
| 1090 | + print '<input type="hidden" name="origin" value="'.$origin.'">'; |
|
| 1091 | + print '<input type="hidden" name="origin_id" value="'.$object->id.'">'; |
|
| 1092 | 1092 | if (GETPOSTINT('entrepot_id')) { |
| 1093 | - print '<input type="hidden" name="entrepot_id" value="' . GETPOSTINT('entrepot_id') . '">'; |
|
| 1093 | + print '<input type="hidden" name="entrepot_id" value="'.GETPOSTINT('entrepot_id').'">'; |
|
| 1094 | 1094 | } |
| 1095 | 1095 | |
| 1096 | 1096 | print dol_get_fiche_head([]); |
@@ -1120,13 +1120,13 @@ discard block |
||
| 1120 | 1120 | print $langs->trans('RefCustomer'); |
| 1121 | 1121 | } |
| 1122 | 1122 | print '</td><td colspan="3">'; |
| 1123 | - print '<input type="text" name="ref_customer" value="' . $object->ref_client . '" />'; |
|
| 1123 | + print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />'; |
|
| 1124 | 1124 | print '</td>'; |
| 1125 | 1125 | print '</tr>'; |
| 1126 | 1126 | |
| 1127 | 1127 | // Tiers |
| 1128 | - print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Company') . '</td>'; |
|
| 1129 | - print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>'; |
|
| 1128 | + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Company').'</td>'; |
|
| 1129 | + print '<td colspan="3">'.$soc->getNomUrl(1).'</td>'; |
|
| 1130 | 1130 | print '</tr>'; |
| 1131 | 1131 | |
| 1132 | 1132 | // Project |
@@ -1141,16 +1141,16 @@ discard block |
||
| 1141 | 1141 | |
| 1142 | 1142 | $langs->load("projects"); |
| 1143 | 1143 | print '<tr>'; |
| 1144 | - print '<td>' . $langs->trans("Project") . '</td><td colspan="2">'; |
|
| 1144 | + print '<td>'.$langs->trans("Project").'</td><td colspan="2">'; |
|
| 1145 | 1145 | print img_picto('', 'project', 'class="pictofixedwidth"'); |
| 1146 | 1146 | print $formproject->select_projects($soc->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'widthcentpercentminusxx'); |
| 1147 | - print ' <a class="paddingleft" href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $soc->id) . '"><span class="fa fa-plus-circle valignmiddle"></span></a>'; |
|
| 1147 | + print ' <a class="paddingleft" href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle"></span></a>'; |
|
| 1148 | 1148 | print '</td>'; |
| 1149 | 1149 | print '</tr>'; |
| 1150 | 1150 | } |
| 1151 | 1151 | |
| 1152 | 1152 | // Date delivery planned |
| 1153 | - print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>'; |
|
| 1153 | + print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>'; |
|
| 1154 | 1154 | print '<td colspan="3">'; |
| 1155 | 1155 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 1156 | 1156 | $date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date); // $date_delivery comes from GETPOST |
@@ -1159,7 +1159,7 @@ discard block |
||
| 1159 | 1159 | print '</tr>'; |
| 1160 | 1160 | |
| 1161 | 1161 | // Date shipment (sending) |
| 1162 | - print '<tr><td>' . $langs->trans("DateShipping") . '</td>'; |
|
| 1162 | + print '<tr><td>'.$langs->trans("DateShipping").'</td>'; |
|
| 1163 | 1163 | print '<td colspan="3">'; |
| 1164 | 1164 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 1165 | 1165 | //$date_shipping = ($date_shipping ? $date_shipping : $object->date_shipping); // $date_shipping comes from GETPOST |
@@ -1168,7 +1168,7 @@ discard block |
||
| 1168 | 1168 | print '</tr>'; |
| 1169 | 1169 | |
| 1170 | 1170 | // Note Public |
| 1171 | - print '<tr><td>' . $langs->trans("NotePublic") . '</td>'; |
|
| 1171 | + print '<tr><td>'.$langs->trans("NotePublic").'</td>'; |
|
| 1172 | 1172 | print '<td colspan="3">'; |
| 1173 | 1173 | $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%'); |
| 1174 | 1174 | print $doleditor->Create(1); |
@@ -1176,7 +1176,7 @@ discard block |
||
| 1176 | 1176 | |
| 1177 | 1177 | // Note Private |
| 1178 | 1178 | if ($object->note_private && !$user->socid) { |
| 1179 | - print '<tr><td>' . $langs->trans("NotePrivate") . '</td>'; |
|
| 1179 | + print '<tr><td>'.$langs->trans("NotePrivate").'</td>'; |
|
| 1180 | 1180 | print '<td colspan="3">'; |
| 1181 | 1181 | $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%'); |
| 1182 | 1182 | print $doleditor->Create(1); |
@@ -1188,19 +1188,19 @@ discard block |
||
| 1188 | 1188 | print $langs->trans("Weight"); |
| 1189 | 1189 | print '</td><td colspan="3">'; |
| 1190 | 1190 | print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"'); |
| 1191 | - print '<input name="weight" size="4" value="' . GETPOSTINT('weight') . '"> '; |
|
| 1191 | + print '<input name="weight" size="4" value="'.GETPOSTINT('weight').'"> '; |
|
| 1192 | 1192 | $text = $formproduct->selectMeasuringUnits("weight_units", "weight", (string) GETPOSTINT('weight_units'), 0, 2); |
| 1193 | 1193 | $htmltext = $langs->trans("KeepEmptyForAutoCalculation"); |
| 1194 | 1194 | print $form->textwithpicto($text, $htmltext); |
| 1195 | 1195 | print '</td></tr>'; |
| 1196 | 1196 | // Dim |
| 1197 | 1197 | print '<tr><td>'; |
| 1198 | - print $langs->trans("Width") . ' x ' . $langs->trans("Height") . ' x ' . $langs->trans("Depth"); |
|
| 1198 | + print $langs->trans("Width").' x '.$langs->trans("Height").' x '.$langs->trans("Depth"); |
|
| 1199 | 1199 | print ' </td><td colspan="3">'; |
| 1200 | 1200 | print img_picto('', 'fa-ruler', 'class="pictofixedwidth"'); |
| 1201 | - print '<input name="sizeW" size="4" value="' . GETPOSTINT('sizeW') . '">'; |
|
| 1202 | - print ' x <input name="sizeH" size="4" value="' . GETPOSTINT('sizeH') . '">'; |
|
| 1203 | - print ' x <input name="sizeS" size="4" value="' . GETPOSTINT('sizeS') . '">'; |
|
| 1201 | + print '<input name="sizeW" size="4" value="'.GETPOSTINT('sizeW').'">'; |
|
| 1202 | + print ' x <input name="sizeH" size="4" value="'.GETPOSTINT('sizeH').'">'; |
|
| 1203 | + print ' x <input name="sizeS" size="4" value="'.GETPOSTINT('sizeS').'">'; |
|
| 1204 | 1204 | print ' '; |
| 1205 | 1205 | $text = $formproduct->selectMeasuringUnits("size_units", "size", (string) GETPOSTINT('size_units'), 0, 2); |
| 1206 | 1206 | $htmltext = $langs->trans("KeepEmptyForAutoCalculation"); |
@@ -1208,7 +1208,7 @@ discard block |
||
| 1208 | 1208 | print '</td></tr>'; |
| 1209 | 1209 | |
| 1210 | 1210 | // Delivery method |
| 1211 | - print "<tr><td>" . $langs->trans("DeliveryMethod") . "</td>"; |
|
| 1211 | + print "<tr><td>".$langs->trans("DeliveryMethod")."</td>"; |
|
| 1212 | 1212 | print '<td colspan="3">'; |
| 1213 | 1213 | $expe->fetch_delivery_methods(); |
| 1214 | 1214 | print img_picto('', 'dolly', 'class="pictofixedwidth"'); |
@@ -1219,16 +1219,16 @@ discard block |
||
| 1219 | 1219 | print "</td></tr>\n"; |
| 1220 | 1220 | |
| 1221 | 1221 | // Tracking number |
| 1222 | - print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>"; |
|
| 1222 | + print "<tr><td>".$langs->trans("TrackingNumber")."</td>"; |
|
| 1223 | 1223 | print '<td colspan="3">'; |
| 1224 | 1224 | print img_picto('', 'barcode', 'class="pictofixedwidth"'); |
| 1225 | - print '<input name="tracking_number" size="20" value="' . GETPOST('tracking_number', 'alpha') . '">'; |
|
| 1225 | + print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number', 'alpha').'">'; |
|
| 1226 | 1226 | print "</td></tr>\n"; |
| 1227 | 1227 | |
| 1228 | 1228 | // Incoterms |
| 1229 | 1229 | if (isModEnabled('incoterm')) { |
| 1230 | 1230 | print '<tr>'; |
| 1231 | - print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1) . '</label></td>'; |
|
| 1231 | + print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>'; |
|
| 1232 | 1232 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
| 1233 | 1233 | print img_picto('', 'incoterm', 'class="pictofixedwidth"'); |
| 1234 | 1234 | print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); |
@@ -1236,10 +1236,10 @@ discard block |
||
| 1236 | 1236 | } |
| 1237 | 1237 | |
| 1238 | 1238 | // Document model |
| 1239 | - include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; |
|
| 1239 | + include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; |
|
| 1240 | 1240 | $list = ModelePdfExpedition::liste_modeles($db); |
| 1241 | 1241 | if (is_countable($list) && count($list) > 1) { |
| 1242 | - print "<tr><td>" . $langs->trans("DefaultModel") . "</td>"; |
|
| 1242 | + print "<tr><td>".$langs->trans("DefaultModel")."</td>"; |
|
| 1243 | 1243 | print '<td colspan="3">'; |
| 1244 | 1244 | print img_picto('', 'pdf', 'class="pictofixedwidth"'); |
| 1245 | 1245 | print $form->selectarray('model', $list, getDolGlobalString('EXPEDITION_ADDON_PDF'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx'); |
@@ -1248,7 +1248,7 @@ discard block |
||
| 1248 | 1248 | |
| 1249 | 1249 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
| 1250 | 1250 | // $objectsrc is Commande|Facture |
| 1251 | - $objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc. |
|
| 1251 | + $objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc. |
|
| 1252 | 1252 | $object = $expe; |
| 1253 | 1253 | // Propagate extrafieldsvalue from source object to shipment object |
| 1254 | 1254 | if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && !empty($extrafields->attributes[$object->table_element]['label'])) { |
@@ -1275,22 +1275,22 @@ discard block |
||
| 1275 | 1275 | |
| 1276 | 1276 | $numAsked = count($object->lines); |
| 1277 | 1277 | |
| 1278 | - print '<script type="text/javascript">' . "\n"; |
|
| 1279 | - print 'jQuery(document).ready(function() {' . "\n"; |
|
| 1278 | + print '<script type="text/javascript">'."\n"; |
|
| 1279 | + print 'jQuery(document).ready(function() {'."\n"; |
|
| 1280 | 1280 | print 'jQuery("#autofill").click(function() {'; |
| 1281 | 1281 | $i = 0; |
| 1282 | 1282 | while ($i < $numAsked) { |
| 1283 | - print 'jQuery("#qtyl' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n"; |
|
| 1283 | + print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; |
|
| 1284 | 1284 | if (isModEnabled('productbatch')) { |
| 1285 | - print 'jQuery("#qtyl' . $i . '_' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n"; |
|
| 1285 | + print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; |
|
| 1286 | 1286 | } |
| 1287 | 1287 | $i++; |
| 1288 | 1288 | } |
| 1289 | - print 'return false; });' . "\n"; |
|
| 1290 | - print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);' . "\n"; |
|
| 1291 | - print 'return false; });' . "\n"; |
|
| 1292 | - print '});' . "\n"; |
|
| 1293 | - print '</script>' . "\n"; |
|
| 1289 | + print 'return false; });'."\n"; |
|
| 1290 | + print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);'."\n"; |
|
| 1291 | + print 'return false; });'."\n"; |
|
| 1292 | + print '});'."\n"; |
|
| 1293 | + print '</script>'."\n"; |
|
| 1294 | 1294 | |
| 1295 | 1295 | print '<br>'; |
| 1296 | 1296 | |
@@ -1324,26 +1324,26 @@ discard block |
||
| 1324 | 1324 | } |
| 1325 | 1325 | print $langs->trans("Description"); |
| 1326 | 1326 | print '</td>'; |
| 1327 | - print '<td class="center">' . $langs->trans("QtyOrdered") . '</td>'; |
|
| 1328 | - print '<td class="center">' . $langs->trans("QtyShipped") . '</td>'; |
|
| 1329 | - print '<td class="center">' . $langs->trans("QtyToShip"); |
|
| 1327 | + print '<td class="center">'.$langs->trans("QtyOrdered").'</td>'; |
|
| 1328 | + print '<td class="center">'.$langs->trans("QtyShipped").'</td>'; |
|
| 1329 | + print '<td class="center">'.$langs->trans("QtyToShip"); |
|
| 1330 | 1330 | if (!isModEnabled('productbatch')) { |
| 1331 | - print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"') . '</a>'; |
|
| 1331 | + print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"').'</a>'; |
|
| 1332 | 1332 | print ' / '; |
| 1333 | 1333 | } else { |
| 1334 | 1334 | print '<br>'; |
| 1335 | 1335 | } |
| 1336 | - print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Reset"), 'eraser') . '</span>'; |
|
| 1336 | + print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Reset"), 'eraser').'</span>'; |
|
| 1337 | 1337 | print '</td>'; |
| 1338 | 1338 | if (isModEnabled('stock')) { |
| 1339 | 1339 | if (!isModEnabled('productbatch')) { |
| 1340 | - print '<td class="left">' . $langs->trans("Warehouse") . ' (' . $langs->trans("Stock") . ')</td>'; |
|
| 1340 | + print '<td class="left">'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')</td>'; |
|
| 1341 | 1341 | } else { |
| 1342 | - print '<td class="left">' . $langs->trans("Warehouse") . ' / ' . $langs->trans("Batch") . ' (' . $langs->trans("Stock") . ')</td>'; |
|
| 1342 | + print '<td class="left">'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')</td>'; |
|
| 1343 | 1343 | } |
| 1344 | 1344 | } |
| 1345 | 1345 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1346 | - print '<td class="left">' . $langs->trans('StockEntryDate') . '</td>'; |
|
| 1346 | + print '<td class="left">'.$langs->trans('StockEntryDate').'</td>'; |
|
| 1347 | 1347 | } |
| 1348 | 1348 | print "</tr>\n"; |
| 1349 | 1349 | } |
@@ -1380,8 +1380,8 @@ discard block |
||
| 1380 | 1380 | $type = 1; |
| 1381 | 1381 | } |
| 1382 | 1382 | |
| 1383 | - print '<!-- line for order line ' . $line->id . ' -->' . "\n"; |
|
| 1384 | - print '<tr class="oddeven" id="row-' . $line->id . '">' . "\n"; |
|
| 1383 | + print '<!-- line for order line '.$line->id.' -->'."\n"; |
|
| 1384 | + print '<tr class="oddeven" id="row-'.$line->id.'">'."\n"; |
|
| 1385 | 1385 | |
| 1386 | 1386 | $qtyProdCom = $line->qty; |
| 1387 | 1387 | $productChildrenNb = 0; |
@@ -1402,7 +1402,7 @@ discard block |
||
| 1402 | 1402 | //var_dump($product->stock_warehouse[1]); |
| 1403 | 1403 | |
| 1404 | 1404 | print '<td>'; |
| 1405 | - print '<a name="' . $line->id . '"></a>'; // ancre pour retourner sur la ligne |
|
| 1405 | + print '<a name="'.$line->id.'"></a>'; // ancre pour retourner sur la ligne |
|
| 1406 | 1406 | |
| 1407 | 1407 | // Show product and description |
| 1408 | 1408 | $product_static->type = $line->fk_product_type; |
@@ -1415,7 +1415,7 @@ discard block |
||
| 1415 | 1415 | $showdescinproductdesc = getDolGlobalString('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE'); |
| 1416 | 1416 | |
| 1417 | 1417 | $text = $product_static->getNomUrl(1); |
| 1418 | - $text .= ' - ' . (!empty($line->label) ? $line->label : $line->product_label); |
|
| 1418 | + $text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label); |
|
| 1419 | 1419 | $description = ($showdescinproductdesc ? '' : dol_htmlentitiesbr($line->desc)); |
| 1420 | 1420 | $description .= empty($product->stockable_product) ? $langs->trans('StockDisabled') : $langs->trans('StockEnabled'); |
| 1421 | 1421 | print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i); |
@@ -1425,7 +1425,7 @@ discard block |
||
| 1425 | 1425 | |
| 1426 | 1426 | // Add description in form |
| 1427 | 1427 | if ($showdescinproductdesc) { |
| 1428 | - print ($line->desc && $line->desc != $line->product_label) ? '<br>' . dol_htmlentitiesbr($line->desc) : ''; |
|
| 1428 | + print ($line->desc && $line->desc != $line->product_label) ? '<br>'.dol_htmlentitiesbr($line->desc) : ''; |
|
| 1429 | 1429 | } |
| 1430 | 1430 | |
| 1431 | 1431 | print '</td>'; |
@@ -1438,10 +1438,10 @@ discard block |
||
| 1438 | 1438 | } |
| 1439 | 1439 | |
| 1440 | 1440 | if (!empty($line->label)) { |
| 1441 | - $text .= ' <strong>' . $line->label . '</strong>'; |
|
| 1441 | + $text .= ' <strong>'.$line->label.'</strong>'; |
|
| 1442 | 1442 | print $form->textwithtooltip($text, $line->desc, 3, 0, '', (string) $i); |
| 1443 | 1443 | } else { |
| 1444 | - print $text . ' ' . nl2br($line->desc); |
|
| 1444 | + print $text.' '.nl2br($line->desc); |
|
| 1445 | 1445 | } |
| 1446 | 1446 | |
| 1447 | 1447 | // Show range |
@@ -1456,16 +1456,16 @@ discard block |
||
| 1456 | 1456 | } |
| 1457 | 1457 | |
| 1458 | 1458 | // Qty |
| 1459 | - print '<td class="center">' . $line->qty; |
|
| 1460 | - print '<input name="qtyasked' . $indiceAsked . '" id="qtyasked' . $indiceAsked . '" type="hidden" value="' . $line->qty . '">'; |
|
| 1461 | - print '' . $unit_order . '</td>'; |
|
| 1459 | + print '<td class="center">'.$line->qty; |
|
| 1460 | + print '<input name="qtyasked'.$indiceAsked.'" id="qtyasked'.$indiceAsked.'" type="hidden" value="'.$line->qty.'">'; |
|
| 1461 | + print ''.$unit_order.'</td>'; |
|
| 1462 | 1462 | |
| 1463 | 1463 | // Qty already shipped |
| 1464 | 1464 | print '<td class="center">'; |
| 1465 | 1465 | $quantityDelivered = isset($object->expeditions[$line->id]) ? $object->expeditions[$line->id] : ''; |
| 1466 | 1466 | print $quantityDelivered; |
| 1467 | - print '<input name="qtydelivered' . $indiceAsked . '" id="qtydelivered' . $indiceAsked . '" type="hidden" value="' . $quantityDelivered . '">'; |
|
| 1468 | - print '' . $unit_order . '</td>'; |
|
| 1467 | + print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">'; |
|
| 1468 | + print ''.$unit_order.'</td>'; |
|
| 1469 | 1469 | |
| 1470 | 1470 | // Qty to ship |
| 1471 | 1471 | $quantityAsked = $line->qty; |
@@ -1496,19 +1496,19 @@ discard block |
||
| 1496 | 1496 | // Quantity to send |
| 1497 | 1497 | print '<td class="center">'; |
| 1498 | 1498 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES'))) { |
| 1499 | - if (GETPOSTINT('qtyl' . $indiceAsked)) { |
|
| 1500 | - $deliverableQty = GETPOSTINT('qtyl' . $indiceAsked); |
|
| 1499 | + if (GETPOSTINT('qtyl'.$indiceAsked)) { |
|
| 1500 | + $deliverableQty = GETPOSTINT('qtyl'.$indiceAsked); |
|
| 1501 | 1501 | } |
| 1502 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1502 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1503 | 1503 | $qtylValue = $deliverableQty; |
| 1504 | 1504 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1505 | 1505 | $qtylValue = ''; |
| 1506 | 1506 | } |
| 1507 | - print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" class="qtyl right" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1507 | + print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" class="qtyl right" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1508 | 1508 | } else { |
| 1509 | 1509 | if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
| 1510 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1511 | - print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">'; |
|
| 1510 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1511 | + print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">'; |
|
| 1512 | 1512 | } |
| 1513 | 1513 | |
| 1514 | 1514 | print $langs->trans("NA"); |
@@ -1520,8 +1520,8 @@ discard block |
||
| 1520 | 1520 | print '<td class="left">'; |
| 1521 | 1521 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { // Type of product need stock change ? |
| 1522 | 1522 | // Show warehouse combo list |
| 1523 | - $ent = "entl" . $indiceAsked; |
|
| 1524 | - $idl = "idl" . $indiceAsked; |
|
| 1523 | + $ent = "entl".$indiceAsked; |
|
| 1524 | + $idl = "idl".$indiceAsked; |
|
| 1525 | 1525 | $tmpentrepot_id = is_numeric(GETPOST($ent)) ? GETPOSTINT($ent) : $warehouse_id; |
| 1526 | 1526 | if ($line->fk_product > 0) { |
| 1527 | 1527 | print '<!-- Show warehouse selection -->'; |
@@ -1531,24 +1531,24 @@ discard block |
||
| 1531 | 1531 | $stockMin = 0; |
| 1532 | 1532 | } |
| 1533 | 1533 | if ($productChildrenNb > 0) { |
| 1534 | - print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1534 | + print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1535 | 1535 | } else { |
| 1536 | 1536 | if ($product->stockable_product == Product::ENABLED_STOCK) { |
| 1537 | - print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1537 | + print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
| 1538 | 1538 | } else { |
| 1539 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
| 1539 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
| 1540 | 1540 | } |
| 1541 | 1541 | } |
| 1542 | 1542 | |
| 1543 | 1543 | if ($tmpentrepot_id > 0 && $tmpentrepot_id == $warehouse_id) { |
| 1544 | 1544 | //print $stock.' '.$quantityToBeDelivered; |
| 1545 | 1545 | if ($stock < $quantityToBeDelivered) { |
| 1546 | - print ' ' . img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse |
|
| 1546 | + print ' '.img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse |
|
| 1547 | 1547 | } |
| 1548 | 1548 | } |
| 1549 | 1549 | } |
| 1550 | 1550 | } else { |
| 1551 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span><input name="entl' . $indiceAsked . '" id="entl' . $indiceAsked . '" type="hidden" value="0">'; |
|
| 1551 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span><input name="entl'.$indiceAsked.'" id="entl'.$indiceAsked.'" type="hidden" value="0">'; |
|
| 1552 | 1552 | } |
| 1553 | 1553 | print '</td>'; |
| 1554 | 1554 | } |
@@ -1569,9 +1569,9 @@ discard block |
||
| 1569 | 1569 | $img = img_warning($langs->trans("StockTooLow")); |
| 1570 | 1570 | } |
| 1571 | 1571 | print "<tr class=\"oddeven\"><td> -> |
| 1572 | - <a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . " |
|
| 1573 | - </a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td> </td><td> </td> |
|
| 1574 | - <td class=\"center\">" . $value['stock'] . " " . $img . "</td>"; |
|
| 1572 | + <a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
|
| 1573 | + </a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
|
| 1574 | + <td class=\"center\">" . $value['stock']." ".$img."</td>"; |
|
| 1575 | 1575 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1576 | 1576 | print '<td></td>'; |
| 1577 | 1577 | } //StockEntrydate |
@@ -1601,7 +1601,7 @@ discard block |
||
| 1601 | 1601 | $nbofsuggested++; |
| 1602 | 1602 | } |
| 1603 | 1603 | } |
| 1604 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1604 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1605 | 1605 | if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) { |
| 1606 | 1606 | foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) { // $dbatch is instance of Productbatch |
| 1607 | 1607 | //var_dump($dbatch); |
@@ -1627,7 +1627,7 @@ discard block |
||
| 1627 | 1627 | $deliverableQty = 0; |
| 1628 | 1628 | } |
| 1629 | 1629 | |
| 1630 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
| 1630 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
| 1631 | 1631 | if (GETPOSTISSET($inputName)) { |
| 1632 | 1632 | $deliverableQty = GETPOST($inputName, 'int'); |
| 1633 | 1633 | } |
@@ -1635,37 +1635,37 @@ discard block |
||
| 1635 | 1635 | $tooltipClass = $tooltipTitle = ''; |
| 1636 | 1636 | if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) { |
| 1637 | 1637 | $tooltipClass = ' classfortooltip'; |
| 1638 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1638 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1639 | 1639 | } else { |
| 1640 | 1640 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
| 1641 | 1641 | } |
| 1642 | 1642 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1643 | 1643 | |
| 1644 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>'; |
|
| 1644 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>'; |
|
| 1645 | 1645 | print '<td colspan="3" ></td><td class="center">'; |
| 1646 | 1646 | $qtylValue = $deliverableQty; |
| 1647 | 1647 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1648 | 1648 | $qtylValue = ''; |
| 1649 | 1649 | } |
| 1650 | - print '<input class="qtyl ' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1650 | + print '<input class="qtyl '.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1651 | 1651 | print '</td>'; |
| 1652 | 1652 | |
| 1653 | 1653 | print '<!-- Show details of lot -->'; |
| 1654 | 1654 | print '<td class="left">'; |
| 1655 | 1655 | |
| 1656 | - print $staticwarehouse->getNomUrl(0) . ' / '; |
|
| 1656 | + print $staticwarehouse->getNomUrl(0).' / '; |
|
| 1657 | 1657 | |
| 1658 | - print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">'; |
|
| 1658 | + print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">'; |
|
| 1659 | 1659 | |
| 1660 | 1660 | $detail = ''; |
| 1661 | - $detail .= $langs->trans("Batch") . ': ' . $dbatch->batch; |
|
| 1661 | + $detail .= $langs->trans("Batch").': '.$dbatch->batch; |
|
| 1662 | 1662 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) { |
| 1663 | - $detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
| 1663 | + $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
| 1664 | 1664 | } |
| 1665 | 1665 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) { |
| 1666 | - $detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
| 1666 | + $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
| 1667 | 1667 | } |
| 1668 | - $detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty; |
|
| 1668 | + $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; |
|
| 1669 | 1669 | $detail .= '<br>'; |
| 1670 | 1670 | print $detail; |
| 1671 | 1671 | |
@@ -1676,18 +1676,18 @@ discard block |
||
| 1676 | 1676 | $subj++; |
| 1677 | 1677 | print '</td>'; |
| 1678 | 1678 | if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1679 | - print '<td>' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; //StockEntrydate |
|
| 1679 | + print '<td>'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; //StockEntrydate |
|
| 1680 | 1680 | } |
| 1681 | 1681 | print '</tr>'; |
| 1682 | 1682 | } |
| 1683 | 1683 | } else { |
| 1684 | 1684 | print '<!-- Case there is no details of lot at all -->'; |
| 1685 | 1685 | print '<tr class="oddeven"><td colspan="3"></td><td class="center">'; |
| 1686 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0" disabled="disabled"> '; |
|
| 1686 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0" disabled="disabled"> '; |
|
| 1687 | 1687 | print '</td>'; |
| 1688 | 1688 | |
| 1689 | 1689 | print '<td class="left">'; |
| 1690 | - print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); |
|
| 1690 | + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); |
|
| 1691 | 1691 | print '</td>'; |
| 1692 | 1692 | if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1693 | 1693 | print '<td></td>'; |
@@ -1703,9 +1703,9 @@ discard block |
||
| 1703 | 1703 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1704 | 1704 | print '<td></td>'; |
| 1705 | 1705 | } //StockEntrydate |
| 1706 | - print '</tr>' . "\n"; // end line and start a new one for each warehouse |
|
| 1706 | + print '</tr>'."\n"; // end line and start a new one for each warehouse |
|
| 1707 | 1707 | |
| 1708 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1708 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1709 | 1709 | $subj = 0; |
| 1710 | 1710 | // Define nb of lines suggested for this order line |
| 1711 | 1711 | $nbofsuggested = 0; |
@@ -1729,8 +1729,8 @@ discard block |
||
| 1729 | 1729 | $deliverableQty = min($quantityToBeDelivered, $stock); |
| 1730 | 1730 | $deliverableQty = max(0, $deliverableQty); |
| 1731 | 1731 | // Quantity to send |
| 1732 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>'; |
|
| 1733 | - print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked=' . $indiceAsked . ') -->'; |
|
| 1732 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>'; |
|
| 1733 | + print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->'; |
|
| 1734 | 1734 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
| 1735 | 1735 | if (isset($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) { |
| 1736 | 1736 | $deliverableQty = min($quantityToBeDelivered, $stock - $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]); |
@@ -1749,14 +1749,14 @@ discard block |
||
| 1749 | 1749 | $tooltipClass = $tooltipTitle = ''; |
| 1750 | 1750 | if (!empty($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) { |
| 1751 | 1751 | $tooltipClass = ' classfortooltip'; |
| 1752 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
|
| 1752 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
|
| 1753 | 1753 | } else { |
| 1754 | 1754 | $alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = 0; |
| 1755 | 1755 | } |
| 1756 | 1756 | |
| 1757 | 1757 | $alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = $deliverableQty + $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
| 1758 | 1758 | |
| 1759 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
| 1759 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
| 1760 | 1760 | if (GETPOSTISSET($inputName)) { |
| 1761 | 1761 | $deliverableQty = GETPOSTINT($inputName); |
| 1762 | 1762 | } |
@@ -1764,11 +1764,11 @@ discard block |
||
| 1764 | 1764 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1765 | 1765 | $qtylValue = ''; |
| 1766 | 1766 | } |
| 1767 | - print '<input class="qtyl' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1768 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_id . '">'; |
|
| 1767 | + print '<input class="qtyl'.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1768 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_id.'">'; |
|
| 1769 | 1769 | } else { |
| 1770 | 1770 | if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
| 1771 | - print '<input name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">'; |
|
| 1771 | + print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">'; |
|
| 1772 | 1772 | } |
| 1773 | 1773 | |
| 1774 | 1774 | print $langs->trans("NA"); |
@@ -1779,16 +1779,16 @@ discard block |
||
| 1779 | 1779 | print '<td class="left">'; |
| 1780 | 1780 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
| 1781 | 1781 | if ($product->stockable_product == Product::ENABLED_STOCK || $productChildrenNb > 0) { |
| 1782 | - print $tmpwarehouseObject->getNomUrl(0) . ' '; |
|
| 1782 | + print $tmpwarehouseObject->getNomUrl(0).' '; |
|
| 1783 | 1783 | if ($productChildrenNb <= 0) { |
| 1784 | 1784 | print '<!-- Show details of stock -->'; |
| 1785 | - print '(' . $stock . ')'; |
|
| 1785 | + print '('.$stock.')'; |
|
| 1786 | 1786 | } |
| 1787 | 1787 | } else { |
| 1788 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
| 1788 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
| 1789 | 1789 | } |
| 1790 | 1790 | } else { |
| 1791 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
| 1791 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
| 1792 | 1792 | } |
| 1793 | 1793 | print '</td>'; |
| 1794 | 1794 | $quantityToBeDelivered -= $deliverableQty; |
@@ -1815,9 +1815,9 @@ discard block |
||
| 1815 | 1815 | } |
| 1816 | 1816 | print '<tr class"oddeven"><td>'; |
| 1817 | 1817 | print " -> |
| 1818 | - <a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . " |
|
| 1819 | - </a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td> </td><td> </td> |
|
| 1820 | - <td class=\"center\">" . $value['stock'] . " " . $img . "</td>"; |
|
| 1818 | + <a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
|
| 1819 | + </a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
|
| 1820 | + <td class=\"center\">" . $value['stock']." ".$img."</td>"; |
|
| 1821 | 1821 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1822 | 1822 | print '<td></td>'; |
| 1823 | 1823 | } //StockEntrydate |
@@ -1834,7 +1834,7 @@ discard block |
||
| 1834 | 1834 | print '</tr>'; // end line and start a new one for lot/serial |
| 1835 | 1835 | |
| 1836 | 1836 | $subj = 0; |
| 1837 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
| 1837 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
| 1838 | 1838 | |
| 1839 | 1839 | $tmpwarehouseObject = new Entrepot($db); |
| 1840 | 1840 | $productlotObject = new Productlot($db); |
@@ -1876,7 +1876,7 @@ discard block |
||
| 1876 | 1876 | $deliverableQty = 0; |
| 1877 | 1877 | } |
| 1878 | 1878 | |
| 1879 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
| 1879 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
| 1880 | 1880 | if (GETPOSTISSET($inputName)) { |
| 1881 | 1881 | $deliverableQty = GETPOSTINT($inputName); |
| 1882 | 1882 | } |
@@ -1884,29 +1884,29 @@ discard block |
||
| 1884 | 1884 | $tooltipClass = $tooltipTitle = ''; |
| 1885 | 1885 | if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) { |
| 1886 | 1886 | $tooltipClass = ' classfortooltip'; |
| 1887 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1887 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
| 1888 | 1888 | } else { |
| 1889 | 1889 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
| 1890 | 1890 | } |
| 1891 | 1891 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
| 1892 | 1892 | |
| 1893 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '><td colspan="3"></td><td class="center">'; |
|
| 1893 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'><td colspan="3"></td><td class="center">'; |
|
| 1894 | 1894 | $qtylValue = $deliverableQty; |
| 1895 | 1895 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
| 1896 | 1896 | $qtylValue = ''; |
| 1897 | 1897 | } |
| 1898 | - print '<input class="qtyl right ' . $tooltipClass . '" title="' . $tooltipTitle . '" name="' . $inputName . '" id="' . $inputName . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
| 1898 | + print '<input class="qtyl right '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
| 1899 | 1899 | print '</td>'; |
| 1900 | 1900 | |
| 1901 | 1901 | print '<td class="left">'; |
| 1902 | 1902 | |
| 1903 | - print $tmpwarehouseObject->getNomUrl(0) . ' / '; |
|
| 1903 | + print $tmpwarehouseObject->getNomUrl(0).' / '; |
|
| 1904 | 1904 | |
| 1905 | 1905 | print '<!-- Show details of lot -->'; |
| 1906 | - print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">'; |
|
| 1906 | + print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">'; |
|
| 1907 | 1907 | |
| 1908 | 1908 | //print '|'.$line->fk_product.'|'.$dbatch->batch.'|<br>'; |
| 1909 | - print $langs->trans("Batch") . ': '; |
|
| 1909 | + print $langs->trans("Batch").': '; |
|
| 1910 | 1910 | $result = $productlotObject->fetch(0, $line->fk_product, $dbatch->batch); |
| 1911 | 1911 | if ($result > 0) { |
| 1912 | 1912 | print $productlotObject->getNomUrl(1); |
@@ -1914,12 +1914,12 @@ discard block |
||
| 1914 | 1914 | print $langs->trans("TableLotIncompleteRunRepairWithParamStandardEqualConfirmed"); |
| 1915 | 1915 | } |
| 1916 | 1916 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) { |
| 1917 | - print ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
| 1917 | + print ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
| 1918 | 1918 | } |
| 1919 | 1919 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) { |
| 1920 | - print ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
| 1920 | + print ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
| 1921 | 1921 | } |
| 1922 | - print ' (' . $dbatch->qty . ')'; |
|
| 1922 | + print ' ('.$dbatch->qty.')'; |
|
| 1923 | 1923 | $quantityToBeDelivered -= $deliverableQty; |
| 1924 | 1924 | if ($quantityToBeDelivered < 0) { |
| 1925 | 1925 | $quantityToBeDelivered = 0; |
@@ -1928,7 +1928,7 @@ discard block |
||
| 1928 | 1928 | $subj++; |
| 1929 | 1929 | print '</td>'; |
| 1930 | 1930 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
| 1931 | - print '<td class="left">' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; |
|
| 1931 | + print '<td class="left">'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; |
|
| 1932 | 1932 | } |
| 1933 | 1933 | print '</tr>'; |
| 1934 | 1934 | } |
@@ -1953,9 +1953,9 @@ discard block |
||
| 1953 | 1953 | if ($product->stockable_product == Product::DISABLED_STOCK) { |
| 1954 | 1954 | $disabled = ''; |
| 1955 | 1955 | } |
| 1956 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0"' . ($disabled ? ' ' . $disabled : '') . '> '; |
|
| 1956 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled ? ' '.$disabled : '').'> '; |
|
| 1957 | 1957 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
| 1958 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
| 1958 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
| 1959 | 1959 | } |
| 1960 | 1960 | } elseif ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
| 1961 | 1961 | $disabled = ''; |
@@ -1965,9 +1965,9 @@ discard block |
||
| 1965 | 1965 | if ($warehouse_selected_id <= 0) { // We did not force a given warehouse, so we won't have no warehouse to change qty. |
| 1966 | 1966 | $disabled = 'disabled="disabled"'; |
| 1967 | 1967 | } |
| 1968 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $quantityToBeDelivered . '"' . ($disabled ? ' ' . $disabled : '') . '> '; |
|
| 1968 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$quantityToBeDelivered.'"'.($disabled ? ' '.$disabled : '').'> '; |
|
| 1969 | 1969 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
| 1970 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
| 1970 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
| 1971 | 1971 | } |
| 1972 | 1972 | } else { |
| 1973 | 1973 | print $langs->trans("NA"); |
@@ -1979,20 +1979,20 @@ discard block |
||
| 1979 | 1979 | if ($warehouse_selected_id > 0) { |
| 1980 | 1980 | $warehouseObject = new Entrepot($db); |
| 1981 | 1981 | $warehouseObject->fetch($warehouse_selected_id); |
| 1982 | - print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); |
|
| 1982 | + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); |
|
| 1983 | 1983 | } else { |
| 1984 | 1984 | if ($line->fk_product) { |
| 1985 | 1985 | if ($product->stockable_product == Product::ENABLED_STOCK) { |
| 1986 | - print img_warning() . ' ' . $langs->trans('StockTooLow'); |
|
| 1986 | + print img_warning().' '.$langs->trans('StockTooLow'); |
|
| 1987 | 1987 | } else { |
| 1988 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
| 1988 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
| 1989 | 1989 | } |
| 1990 | 1990 | } else { |
| 1991 | 1991 | print ''; |
| 1992 | 1992 | } |
| 1993 | 1993 | } |
| 1994 | 1994 | } else { |
| 1995 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
| 1995 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
| 1996 | 1996 | } |
| 1997 | 1997 | print '</td>'; |
| 1998 | 1998 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
@@ -2035,7 +2035,7 @@ discard block |
||
| 2035 | 2035 | dol_print_error($db); |
| 2036 | 2036 | } |
| 2037 | 2037 | } elseif ($object->id > 0) { |
| 2038 | - '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
| 2038 | + '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
| 2039 | 2039 | |
| 2040 | 2040 | // Edit and view mode |
| 2041 | 2041 | |
@@ -2075,7 +2075,7 @@ discard block |
||
| 2075 | 2075 | ); |
| 2076 | 2076 | } |
| 2077 | 2077 | $formconfirm = $form->formconfirm( |
| 2078 | - $_SERVER['PHP_SELF'] . '?id=' . $object->id, |
|
| 2078 | + $_SERVER['PHP_SELF'].'?id='.$object->id, |
|
| 2079 | 2079 | $langs->trans('DeleteSending'), |
| 2080 | 2080 | $langs->trans("ConfirmDeleteSending", $object->ref), |
| 2081 | 2081 | 'confirm_delete', |
@@ -2096,7 +2096,7 @@ discard block |
||
| 2096 | 2096 | $title = "DeleteTitleLine"; |
| 2097 | 2097 | $question = "ConfirmDeleteTitleLine"; |
| 2098 | 2098 | } |
| 2099 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2099 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2100 | 2100 | } |
| 2101 | 2101 | |
| 2102 | 2102 | // Confirm validation |
@@ -2110,13 +2110,13 @@ discard block |
||
| 2110 | 2110 | |
| 2111 | 2111 | $text = $langs->trans("ConfirmValidateSending", $numref); |
| 2112 | 2112 | if (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) { |
| 2113 | - $text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementWillBeRecorded") . '.'; |
|
| 2113 | + $text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementWillBeRecorded").'.'; |
|
| 2114 | 2114 | } elseif (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) { |
| 2115 | - $text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementNotYetRecorded") . '.'; |
|
| 2115 | + $text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementNotYetRecorded").'.'; |
|
| 2116 | 2116 | } |
| 2117 | 2117 | |
| 2118 | 2118 | if (isModEnabled('notification')) { |
| 2119 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2119 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2120 | 2120 | $notify = new Notify($db); |
| 2121 | 2121 | $text .= '<br>'; |
| 2122 | 2122 | $text .= $notify->confirmMessage('SHIPPING_VALIDATE', $object->socid, $object); |
@@ -2127,14 +2127,14 @@ discard block |
||
| 2127 | 2127 | |
| 2128 | 2128 | // Confirm cancellation |
| 2129 | 2129 | if ($action == 'cancel') { |
| 2130 | - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); |
|
| 2130 | + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); |
|
| 2131 | 2131 | } |
| 2132 | 2132 | |
| 2133 | 2133 | // Confirm sign |
| 2134 | 2134 | if ($action == 'sign') { |
| 2135 | 2135 | $text = $langs->trans('ConfirmSignShipping'); |
| 2136 | 2136 | if (isModEnabled('notification')) { |
| 2137 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2137 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2138 | 2138 | $notify = new Notify($db); |
| 2139 | 2139 | $text .= '<br>'; |
| 2140 | 2140 | $text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object); |
@@ -2144,7 +2144,7 @@ discard block |
||
| 2144 | 2144 | 'type' => 'select', |
| 2145 | 2145 | 'name' => 'signed_status', |
| 2146 | 2146 | 'select_show_empty' => 0, |
| 2147 | - 'label' => '<span class="fieldrequired">' . $langs->trans('SignStatus') . '</span>', |
|
| 2147 | + 'label' => '<span class="fieldrequired">'.$langs->trans('SignStatus').'</span>', |
|
| 2148 | 2148 | 'values' => $object->getSignedStatusLocalisedArray() |
| 2149 | 2149 | ]; |
| 2150 | 2150 | $formconfirm = $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id]), $langs->trans('SignShipping'), $text, 'confirm_sign', $formquestion, 0, 1); |
@@ -2154,7 +2154,7 @@ discard block |
||
| 2154 | 2154 | if ($action == 'unsign') { |
| 2155 | 2155 | $text = $langs->trans('ConfirmUnsignShipping'); |
| 2156 | 2156 | if (isModEnabled('notification')) { |
| 2157 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2157 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2158 | 2158 | $notify = new Notify($db); |
| 2159 | 2159 | $text .= '<br>'; |
| 2160 | 2160 | $text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object); |
@@ -2190,13 +2190,13 @@ discard block |
||
| 2190 | 2190 | } |
| 2191 | 2191 | |
| 2192 | 2192 | // Shipment card |
| 2193 | - $linkback = '<a href="' . DOL_URL_ROOT . '/expedition/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 2193 | + $linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 2194 | 2194 | $morehtmlref = '<div class="refidno">'; |
| 2195 | 2195 | // Ref customer shipment |
| 2196 | 2196 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1); |
| 2197 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string' . (isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2197 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2198 | 2198 | // Thirdparty |
| 2199 | - $morehtmlref .= '<br>' . $object->thirdparty->getNomUrl(1); |
|
| 2199 | + $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1); |
|
| 2200 | 2200 | // Project |
| 2201 | 2201 | if (isModEnabled('project')) { |
| 2202 | 2202 | $langs->load("projects"); |
@@ -2204,16 +2204,16 @@ discard block |
||
| 2204 | 2204 | if (0) { // @phpstan-ignore-line Do not change on shipment |
| 2205 | 2205 | $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); |
| 2206 | 2206 | if ($action != 'classify') { |
| 2207 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
| 2207 | + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> '; |
|
| 2208 | 2208 | } |
| 2209 | - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $objectsrc->socid, (string) $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 2209 | + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $objectsrc->socid, (string) $objectsrc->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 2210 | 2210 | } else { |
| 2211 | 2211 | if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { |
| 2212 | 2212 | $proj = new Project($db); |
| 2213 | 2213 | $proj->fetch($objectsrc->fk_project); |
| 2214 | 2214 | $morehtmlref .= $proj->getNomUrl(1); |
| 2215 | 2215 | if ($proj->title) { |
| 2216 | - $morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>'; |
|
| 2216 | + $morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>'; |
|
| 2217 | 2217 | } |
| 2218 | 2218 | } |
| 2219 | 2219 | } |
@@ -2233,7 +2233,7 @@ discard block |
||
| 2233 | 2233 | // Linked documents |
| 2234 | 2234 | if (!empty($typeobject) && $typeobject == 'commande' && $object->origin_object->id && isModEnabled('order')) { |
| 2235 | 2235 | print '<tr><td>'; |
| 2236 | - print $langs->trans("RefOrder") . '</td>'; |
|
| 2236 | + print $langs->trans("RefOrder").'</td>'; |
|
| 2237 | 2237 | print '<td>'; |
| 2238 | 2238 | print $objectsrc->getNomUrl(1, 'commande'); |
| 2239 | 2239 | print "</td>\n"; |
@@ -2241,7 +2241,7 @@ discard block |
||
| 2241 | 2241 | } |
| 2242 | 2242 | if (!empty($typeobject) && $typeobject == 'propal' && $object->origin_object->id && isModEnabled("propal")) { |
| 2243 | 2243 | print '<tr><td>'; |
| 2244 | - print $langs->trans("RefProposal") . '</td>'; |
|
| 2244 | + print $langs->trans("RefProposal").'</td>'; |
|
| 2245 | 2245 | print '<td>'; |
| 2246 | 2246 | print $objectsrc->getNomUrl(1, 'expedition'); |
| 2247 | 2247 | print "</td>\n"; |
@@ -2249,8 +2249,8 @@ discard block |
||
| 2249 | 2249 | } |
| 2250 | 2250 | |
| 2251 | 2251 | // Date creation |
| 2252 | - print '<tr><td class="titlefieldmiddle">' . $langs->trans("DateCreation") . '</td>'; |
|
| 2253 | - print '<td>' . dol_print_date($object->date_creation, "dayhour") . "</td>\n"; |
|
| 2252 | + print '<tr><td class="titlefieldmiddle">'.$langs->trans("DateCreation").'</td>'; |
|
| 2253 | + print '<td>'.dol_print_date($object->date_creation, "dayhour")."</td>\n"; |
|
| 2254 | 2254 | print '</tr>'; |
| 2255 | 2255 | |
| 2256 | 2256 | // Delivery date planned |
@@ -2259,16 +2259,16 @@ discard block |
||
| 2259 | 2259 | print $langs->trans('DateDeliveryPlanned'); |
| 2260 | 2260 | print '</td>'; |
| 2261 | 2261 | if ($action != 'editdate_livraison') { |
| 2262 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdate_livraison&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . '</a></td>'; |
|
| 2262 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'</a></td>'; |
|
| 2263 | 2263 | } |
| 2264 | 2264 | print '</tr></table>'; |
| 2265 | 2265 | print '</td><td>'; |
| 2266 | 2266 | if ($action == 'editdate_livraison') { |
| 2267 | - print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 2268 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2267 | + print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 2268 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2269 | 2269 | print '<input type="hidden" name="action" value="setdate_livraison">'; |
| 2270 | 2270 | print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, 0, "setdate_livraison", 1, 0); |
| 2271 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
| 2271 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
| 2272 | 2272 | print '</form>'; |
| 2273 | 2273 | } else { |
| 2274 | 2274 | print $object->date_delivery ? dol_print_date($object->date_delivery, 'dayhour') : ' '; |
@@ -2282,16 +2282,16 @@ discard block |
||
| 2282 | 2282 | print $langs->trans('DateShipping'); |
| 2283 | 2283 | print '</td>'; |
| 2284 | 2284 | if ($action != 'editdate_shipping') { |
| 2285 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdate_shipping&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetShippingDate'), 1) . '</a></td>'; |
|
| 2285 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate_shipping&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetShippingDate'), 1).'</a></td>'; |
|
| 2286 | 2286 | } |
| 2287 | 2287 | print '</tr></table>'; |
| 2288 | 2288 | print '</td><td>'; |
| 2289 | 2289 | if ($action == 'editdate_shipping') { |
| 2290 | - print '<form name="setdate_shipping" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 2291 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2290 | + print '<form name="setdate_shipping" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 2291 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2292 | 2292 | print '<input type="hidden" name="action" value="setdate_shipping">'; |
| 2293 | 2293 | print $form->selectDate($object->date_shipping ? $object->date_shipping : -1, 'ship_', 1, 1, 0, "setdate_shipping", 1, 0); |
| 2294 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
| 2294 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
| 2295 | 2295 | print '</form>'; |
| 2296 | 2296 | } else { |
| 2297 | 2297 | print $object->date_shipping ? dol_print_date($object->date_shipping, 'dayhour') : ' '; |
@@ -2305,24 +2305,24 @@ discard block |
||
| 2305 | 2305 | print '</td><td>'; |
| 2306 | 2306 | |
| 2307 | 2307 | if ($action == 'edittrueWeight') { |
| 2308 | - print '<form name="settrueweight" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
| 2308 | + print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
| 2309 | 2309 | print '<input name="action" value="settrueWeight" type="hidden">'; |
| 2310 | - print '<input name="id" value="' . $object->id . '" type="hidden">'; |
|
| 2311 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2312 | - print '<input id="trueWeight" name="trueWeight" value="' . $object->trueWeight . '" type="text" class="width50 valignmiddle">'; |
|
| 2310 | + print '<input name="id" value="'.$object->id.'" type="hidden">'; |
|
| 2311 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2312 | + print '<input id="trueWeight" name="trueWeight" value="'.$object->trueWeight.'" type="text" class="width50 valignmiddle">'; |
|
| 2313 | 2313 | print $formproduct->selectMeasuringUnits("weight_units", "weight", (string) $object->weight_units, 0, 2, 'maxwidth125 valignmiddle'); |
| 2314 | - print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="' . $langs->trans("Modify") . '" type="submit">'; |
|
| 2315 | - print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">'; |
|
| 2314 | + print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="'.$langs->trans("Modify").'" type="submit">'; |
|
| 2315 | + print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">'; |
|
| 2316 | 2316 | print '</form>'; |
| 2317 | 2317 | } else { |
| 2318 | 2318 | print $object->trueWeight; |
| 2319 | - print ($object->trueWeight && $object->weight_units != '') ? ' ' . measuringUnitString(0, "weight", $object->weight_units) : ''; |
|
| 2319 | + print ($object->trueWeight && $object->weight_units != '') ? ' '.measuringUnitString(0, "weight", $object->weight_units) : ''; |
|
| 2320 | 2320 | } |
| 2321 | 2321 | |
| 2322 | 2322 | // Calculated |
| 2323 | 2323 | if ($totalWeight > 0) { |
| 2324 | 2324 | if (!empty($object->trueWeight)) { |
| 2325 | - print ' (' . $langs->trans("SumOfProductWeights") . ': '; |
|
| 2325 | + print ' ('.$langs->trans("SumOfProductWeights").': '; |
|
| 2326 | 2326 | } |
| 2327 | 2327 | print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no')); |
| 2328 | 2328 | if (!empty($object->trueWeight)) { |
@@ -2332,34 +2332,34 @@ discard block |
||
| 2332 | 2332 | print '</td></tr>'; |
| 2333 | 2333 | |
| 2334 | 2334 | // Width |
| 2335 | - print '<tr><td>' . $form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2335 | + print '<tr><td>'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2336 | 2336 | print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')); |
| 2337 | - print ($object->trueWidth && $object->width_units != '') ? ' ' . measuringUnitString(0, "size", $object->width_units) : ''; |
|
| 2337 | + print ($object->trueWidth && $object->width_units != '') ? ' '.measuringUnitString(0, "size", $object->width_units) : ''; |
|
| 2338 | 2338 | print '</td></tr>'; |
| 2339 | 2339 | |
| 2340 | 2340 | // Height |
| 2341 | - print '<tr><td>' . $form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2341 | + print '<tr><td>'.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2342 | 2342 | if ($action == 'edittrueHeight') { |
| 2343 | - print '<form name="settrueHeight" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
| 2343 | + print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
| 2344 | 2344 | print '<input name="action" value="settrueHeight" type="hidden">'; |
| 2345 | - print '<input name="id" value="' . $object->id . '" type="hidden">'; |
|
| 2346 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2347 | - print '<input id="trueHeight" name="trueHeight" value="' . $object->trueHeight . '" type="text" class="width50">'; |
|
| 2345 | + print '<input name="id" value="'.$object->id.'" type="hidden">'; |
|
| 2346 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2347 | + print '<input id="trueHeight" name="trueHeight" value="'.$object->trueHeight.'" type="text" class="width50">'; |
|
| 2348 | 2348 | print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2); |
| 2349 | - print ' <input class="button smallpaddingimp" name="modify" value="' . $langs->trans("Modify") . '" type="submit">'; |
|
| 2350 | - print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">'; |
|
| 2349 | + print ' <input class="button smallpaddingimp" name="modify" value="'.$langs->trans("Modify").'" type="submit">'; |
|
| 2350 | + print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">'; |
|
| 2351 | 2351 | print '</form>'; |
| 2352 | 2352 | } else { |
| 2353 | 2353 | print $object->trueHeight; |
| 2354 | - print ($object->trueHeight && $object->height_units != '') ? ' ' . measuringUnitString(0, "size", $object->height_units) : ''; |
|
| 2354 | + print ($object->trueHeight && $object->height_units != '') ? ' '.measuringUnitString(0, "size", $object->height_units) : ''; |
|
| 2355 | 2355 | } |
| 2356 | 2356 | |
| 2357 | 2357 | print '</td></tr>'; |
| 2358 | 2358 | |
| 2359 | 2359 | // Depth |
| 2360 | - print '<tr><td>' . $form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2360 | + print '<tr><td>'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2361 | 2361 | print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')); |
| 2362 | - print ($object->trueDepth && $object->depth_units != '') ? ' ' . measuringUnitString(0, "size", $object->depth_units) : ''; |
|
| 2362 | + print ($object->trueDepth && $object->depth_units != '') ? ' '.measuringUnitString(0, "size", $object->depth_units) : ''; |
|
| 2363 | 2363 | print '</td></tr>'; |
| 2364 | 2364 | |
| 2365 | 2365 | // Volume |
@@ -2378,12 +2378,12 @@ discard block |
||
| 2378 | 2378 | if ($volumeUnit < 50) { |
| 2379 | 2379 | print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no')); |
| 2380 | 2380 | } else { |
| 2381 | - print $calculatedVolume . ' ' . measuringUnitString(0, "volume", $volumeUnit); |
|
| 2381 | + print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); |
|
| 2382 | 2382 | } |
| 2383 | 2383 | } |
| 2384 | 2384 | if ($totalVolume > 0) { |
| 2385 | 2385 | if ($calculatedVolume) { |
| 2386 | - print ' (' . $langs->trans("SumOfProductVolumes") . ': '; |
|
| 2386 | + print ' ('.$langs->trans("SumOfProductVolumes").': '; |
|
| 2387 | 2387 | } |
| 2388 | 2388 | print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no')); |
| 2389 | 2389 | //if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')'; |
@@ -2396,7 +2396,7 @@ discard block |
||
| 2396 | 2396 | |
| 2397 | 2397 | // Other attributes |
| 2398 | 2398 | //$cols = 2; |
| 2399 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 2399 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 2400 | 2400 | |
| 2401 | 2401 | print '</table>'; |
| 2402 | 2402 | |
@@ -2413,33 +2413,33 @@ discard block |
||
| 2413 | 2413 | print '</td>'; |
| 2414 | 2414 | |
| 2415 | 2415 | if ($action != 'editshipping_method_id' && $permissiontoadd) { |
| 2416 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editshipping_method_id&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetSendingMethod'), 1) . '</a></td>'; |
|
| 2416 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshipping_method_id&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).'</a></td>'; |
|
| 2417 | 2417 | } |
| 2418 | 2418 | print '</tr></table>'; |
| 2419 | 2419 | print '</td><td>'; |
| 2420 | 2420 | if ($action == 'editshipping_method_id') { |
| 2421 | - print '<form name="setshipping_method_id" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 2422 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2421 | + print '<form name="setshipping_method_id" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 2422 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2423 | 2423 | print '<input type="hidden" name="action" value="setshipping_method_id">'; |
| 2424 | 2424 | $object->fetch_delivery_methods(); |
| 2425 | 2425 | print $form->selectarray("shipping_method_id", $object->meths, $object->shipping_method_id, 1, 0, 0, "", 1); |
| 2426 | 2426 | if ($user->admin) { |
| 2427 | 2427 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
| 2428 | 2428 | } |
| 2429 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
| 2429 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
| 2430 | 2430 | print '</form>'; |
| 2431 | 2431 | } else { |
| 2432 | 2432 | if ($object->shipping_method_id > 0) { |
| 2433 | 2433 | // Get code using getLabelFromKey |
| 2434 | 2434 | $code = $langs->getLabelFromKey($db, (string) $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); |
| 2435 | - print $langs->trans("SendingMethod" . strtoupper($code)); |
|
| 2435 | + print $langs->trans("SendingMethod".strtoupper($code)); |
|
| 2436 | 2436 | } |
| 2437 | 2437 | } |
| 2438 | 2438 | print '</td>'; |
| 2439 | 2439 | print '</tr>'; |
| 2440 | 2440 | |
| 2441 | 2441 | // Tracking Number |
| 2442 | - print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
| 2442 | + print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
| 2443 | 2443 | print $form->editfieldval("TrackingNumber", 'tracking_number', $object->tracking_url, $object, $user->hasRight('expedition', 'creer'), 'safehtmlstring', $object->tracking_number); |
| 2444 | 2444 | print '</td></tr>'; |
| 2445 | 2445 | |
@@ -2450,7 +2450,7 @@ discard block |
||
| 2450 | 2450 | print $langs->trans('IncotermLabel'); |
| 2451 | 2451 | print '<td><td class="right">'; |
| 2452 | 2452 | if ($permissiontoadd) { |
| 2453 | - print '<a class="editfielda" href="' . DOL_URL_ROOT . '/expedition/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>'; |
|
| 2453 | + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/expedition/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>'; |
|
| 2454 | 2454 | } else { |
| 2455 | 2455 | print ' '; |
| 2456 | 2456 | } |
@@ -2460,7 +2460,7 @@ discard block |
||
| 2460 | 2460 | if ($action != 'editincoterm') { |
| 2461 | 2461 | print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); |
| 2462 | 2462 | } else { |
| 2463 | - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
|
| 2463 | + print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); |
|
| 2464 | 2464 | } |
| 2465 | 2465 | print '</td></tr>'; |
| 2466 | 2466 | } |
@@ -2481,11 +2481,11 @@ discard block |
||
| 2481 | 2481 | // Lines of products |
| 2482 | 2482 | |
| 2483 | 2483 | if ($action == 'editline') { |
| 2484 | - print ' <form name="updateline" id="updateline" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $line_id . '" method="POST"> |
|
| 2485 | - <input type="hidden" name="token" value="' . newToken() . '"> |
|
| 2484 | + print ' <form name="updateline" id="updateline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$line_id.'" method="POST"> |
|
| 2485 | + <input type="hidden" name="token" value="' . newToken().'"> |
|
| 2486 | 2486 | <input type="hidden" name="action" value="updateline"> |
| 2487 | 2487 | <input type="hidden" name="mode" value=""> |
| 2488 | - <input type="hidden" name="id" value="' . $object->id . '"> |
|
| 2488 | + <input type="hidden" name="id" value="' . $object->id.'"> |
|
| 2489 | 2489 | '; |
| 2490 | 2490 | } |
| 2491 | 2491 | print '<br>'; |
@@ -2499,11 +2499,11 @@ discard block |
||
| 2499 | 2499 | print '<td width="5" class="center linecolnum"> </td>'; |
| 2500 | 2500 | } |
| 2501 | 2501 | // Product/Service |
| 2502 | - print '<td class="linecoldescription" >' . $langs->trans("Products") . '</td>'; |
|
| 2502 | + print '<td class="linecoldescription" >'.$langs->trans("Products").'</td>'; |
|
| 2503 | 2503 | // Qty |
| 2504 | - print '<td class="center linecolqty">' . $langs->trans("QtyOrdered") . '</td>'; |
|
| 2504 | + print '<td class="center linecolqty">'.$langs->trans("QtyOrdered").'</td>'; |
|
| 2505 | 2505 | if ($origin_id > 0) { |
| 2506 | - print '<td class="center linecolqtyinothershipments">' . $langs->trans("QtyInOtherShipments") . '</td>'; |
|
| 2506 | + print '<td class="center linecolqtyinothershipments">'.$langs->trans("QtyInOtherShipments").'</td>'; |
|
| 2507 | 2507 | } |
| 2508 | 2508 | if ($action == 'editline') { |
| 2509 | 2509 | $editColspan = 3; |
@@ -2513,35 +2513,35 @@ discard block |
||
| 2513 | 2513 | if (!isModEnabled('productbatch')) { |
| 2514 | 2514 | $editColspan--; |
| 2515 | 2515 | } |
| 2516 | - print '<td class="center linecoleditlineotherinfo" colspan="' . $editColspan . '">'; |
|
| 2516 | + print '<td class="center linecoleditlineotherinfo" colspan="'.$editColspan.'">'; |
|
| 2517 | 2517 | if ($object->status <= 1) { |
| 2518 | 2518 | print $langs->trans("QtyToShip"); |
| 2519 | 2519 | } else { |
| 2520 | 2520 | print $langs->trans("QtyShipped"); |
| 2521 | 2521 | } |
| 2522 | 2522 | if (isModEnabled('stock')) { |
| 2523 | - print ' - ' . $langs->trans("WarehouseSource"); |
|
| 2523 | + print ' - '.$langs->trans("WarehouseSource"); |
|
| 2524 | 2524 | } |
| 2525 | 2525 | if (isModEnabled('productbatch')) { |
| 2526 | - print ' - ' . $langs->trans("Batch"); |
|
| 2526 | + print ' - '.$langs->trans("Batch"); |
|
| 2527 | 2527 | } |
| 2528 | 2528 | print '</td>'; |
| 2529 | 2529 | } else { |
| 2530 | 2530 | if ($object->status <= 1) { |
| 2531 | - print '<td class="center linecolqtytoship">' . $langs->trans("QtyToShip") . '</td>'; |
|
| 2531 | + print '<td class="center linecolqtytoship">'.$langs->trans("QtyToShip").'</td>'; |
|
| 2532 | 2532 | } else { |
| 2533 | - print '<td class="center linecolqtyshipped">' . $langs->trans("QtyShipped") . '</td>'; |
|
| 2533 | + print '<td class="center linecolqtyshipped">'.$langs->trans("QtyShipped").'</td>'; |
|
| 2534 | 2534 | } |
| 2535 | 2535 | if (isModEnabled('stock')) { |
| 2536 | - print '<td class="left linecolwarehousesource">' . $langs->trans("WarehouseSource") . '</td>'; |
|
| 2536 | + print '<td class="left linecolwarehousesource">'.$langs->trans("WarehouseSource").'</td>'; |
|
| 2537 | 2537 | } |
| 2538 | 2538 | |
| 2539 | 2539 | if (isModEnabled('productbatch')) { |
| 2540 | - print '<td class="left linecolbatch">' . $langs->trans("Batch") . '</td>'; |
|
| 2540 | + print '<td class="left linecolbatch">'.$langs->trans("Batch").'</td>'; |
|
| 2541 | 2541 | } |
| 2542 | 2542 | } |
| 2543 | - print '<td class="center linecolweight">' . $langs->trans("CalculatedWeight") . '</td>'; |
|
| 2544 | - print '<td class="center linecolvolume">' . $langs->trans("CalculatedVolume") . '</td>'; |
|
| 2543 | + print '<td class="center linecolweight">'.$langs->trans("CalculatedWeight").'</td>'; |
|
| 2544 | + print '<td class="center linecolvolume">'.$langs->trans("CalculatedVolume").'</td>'; |
|
| 2545 | 2545 | //print '<td class="center">'.$langs->trans("Size").'</td>'; |
| 2546 | 2546 | if ($object->status == 0) { |
| 2547 | 2547 | print '<td class="linecoledit"></td>'; |
@@ -2576,13 +2576,13 @@ discard block |
||
| 2576 | 2576 | //if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received"; |
| 2577 | 2577 | $sql .= ', p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tosell as product_tosell, p.tobuy as product_tobuy, p.tobatch as product_tobatch'; |
| 2578 | 2578 | $sql .= ', p.description as product_desc'; |
| 2579 | - $sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed"; |
|
| 2580 | - $sql .= ", " . MAIN_DB_PREFIX . "expedition as e"; |
|
| 2581 | - $sql .= ", " . MAIN_DB_PREFIX . $origin . "det as obj"; |
|
| 2579 | + $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; |
|
| 2580 | + $sql .= ", ".MAIN_DB_PREFIX."expedition as e"; |
|
| 2581 | + $sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj"; |
|
| 2582 | 2582 | //if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; |
| 2583 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid"; |
|
| 2584 | - $sql .= " WHERE e.entity IN (" . getEntity('expedition') . ")"; |
|
| 2585 | - $sql .= " AND obj.fk_" . $origin . " = " . ((int) $origin_id); |
|
| 2583 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid"; |
|
| 2584 | + $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; |
|
| 2585 | + $sql .= " AND obj.fk_".$origin." = ".((int) $origin_id); |
|
| 2586 | 2586 | $sql .= " AND obj.rowid = ed.fk_elementdet"; |
| 2587 | 2587 | $sql .= " AND ed.fk_expedition = e.rowid"; |
| 2588 | 2588 | //if ($filter) $sql.= $filter; |
@@ -2629,12 +2629,12 @@ discard block |
||
| 2629 | 2629 | } |
| 2630 | 2630 | |
| 2631 | 2631 | if (empty($reshook) && $lines[$i]->product_type != "9") { |
| 2632 | - print '<!-- origin line id = ' . $lines[$i]->origin_line_id . ' -->'; // id of order line |
|
| 2633 | - print '<tr class="oddeven" id="row-' . $lines[$i]->id . '" data-id="' . $lines[$i]->id . '" data-element="' . $lines[$i]->element . '" >'; |
|
| 2632 | + print '<!-- origin line id = '.$lines[$i]->origin_line_id.' -->'; // id of order line |
|
| 2633 | + print '<tr class="oddeven" id="row-'.$lines[$i]->id.'" data-id="'.$lines[$i]->id.'" data-element="'.$lines[$i]->element.'" >'; |
|
| 2634 | 2634 | |
| 2635 | 2635 | // # |
| 2636 | 2636 | if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { |
| 2637 | - print '<td class="center linecolnum">' . ($i + 1) . '</td>'; |
|
| 2637 | + print '<td class="center linecolnum">'.($i + 1).'</td>'; |
|
| 2638 | 2638 | } |
| 2639 | 2639 | |
| 2640 | 2640 | // Predefined product or service |
@@ -2679,12 +2679,12 @@ discard block |
||
| 2679 | 2679 | $product_static->stockable_product = $lines[$i]->stockable_product; |
| 2680 | 2680 | |
| 2681 | 2681 | $text = $product_static->getNomUrl(1); |
| 2682 | - $text .= ' - ' . $label; |
|
| 2682 | + $text .= ' - '.$label; |
|
| 2683 | 2683 | $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($lines[$i]->description)); |
| 2684 | 2684 | print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i); |
| 2685 | 2685 | print_date_range(!empty($lines[$i]->date_start) ? $lines[$i]->date_start : '', !empty($lines[$i]->date_end) ? $lines[$i]->date_end : ''); |
| 2686 | 2686 | if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { |
| 2687 | - print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>' . dol_htmlentitiesbr($lines[$i]->description) : ''; |
|
| 2687 | + print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>'.dol_htmlentitiesbr($lines[$i]->description) : ''; |
|
| 2688 | 2688 | } |
| 2689 | 2689 | print "</td>\n"; |
| 2690 | 2690 | } else { |
@@ -2696,10 +2696,10 @@ discard block |
||
| 2696 | 2696 | } |
| 2697 | 2697 | |
| 2698 | 2698 | if (!empty($lines[$i]->label)) { |
| 2699 | - $text .= ' <strong>' . $lines[$i]->label . '</strong>'; |
|
| 2699 | + $text .= ' <strong>'.$lines[$i]->label.'</strong>'; |
|
| 2700 | 2700 | print $form->textwithtooltip($text, $lines[$i]->description, 3, 0, '', (string) $i); |
| 2701 | 2701 | } else { |
| 2702 | - print $text . ' ' . nl2br($lines[$i]->description); |
|
| 2702 | + print $text.' '.nl2br($lines[$i]->description); |
|
| 2703 | 2703 | } |
| 2704 | 2704 | |
| 2705 | 2705 | print_date_range($lines[$i]->date_start, $lines[$i]->date_end); |
@@ -2712,7 +2712,7 @@ discard block |
||
| 2712 | 2712 | } |
| 2713 | 2713 | |
| 2714 | 2714 | // Qty ordered |
| 2715 | - print '<td class="center linecolqty">' . $lines[$i]->qty_asked . ' ' . $unit_order . '</td>'; |
|
| 2715 | + print '<td class="center linecolqty">'.$lines[$i]->qty_asked.' '.$unit_order.'</td>'; |
|
| 2716 | 2716 | |
| 2717 | 2717 | // Qty in other shipments (with shipment and warehouse used) |
| 2718 | 2718 | if ($origin_id > 0) { |
@@ -2733,8 +2733,8 @@ discard block |
||
| 2733 | 2733 | } |
| 2734 | 2734 | $shipment_static->fetch($shipmentline_var['shipment_id']); |
| 2735 | 2735 | $htmltooltip .= $shipment_static->getNomUrl(1, '', 0, 0, 1); |
| 2736 | - $htmltooltip .= ' - ' . $shipmentline_var['qty_shipped']; |
|
| 2737 | - $htmltooltip .= ' - ' . $langs->trans("DateValidation") . ' : ' . (empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); |
|
| 2736 | + $htmltooltip .= ' - '.$shipmentline_var['qty_shipped']; |
|
| 2737 | + $htmltooltip .= ' - '.$langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); |
|
| 2738 | 2738 | /*if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) { |
| 2739 | 2739 | $warehousestatic->fetch($shipmentline_var['warehouse']); |
| 2740 | 2740 | $htmltext .= '<br>'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); |
@@ -2744,39 +2744,39 @@ discard block |
||
| 2744 | 2744 | $qtyalreadysent += $shipmentline_var['qty_shipped']; |
| 2745 | 2745 | } |
| 2746 | 2746 | if ($j) { |
| 2747 | - $htmltooltip = $langs->trans("QtyInOtherShipments") . '...<br><br>' . $htmltooltip . '<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>'; |
|
| 2747 | + $htmltooltip = $langs->trans("QtyInOtherShipments").'...<br><br>'.$htmltooltip.'<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>'; |
|
| 2748 | 2748 | } |
| 2749 | 2749 | } |
| 2750 | 2750 | } |
| 2751 | - print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip' . $lines[$i]->id); |
|
| 2751 | + print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip'.$lines[$i]->id); |
|
| 2752 | 2752 | print '</td>'; |
| 2753 | 2753 | } |
| 2754 | 2754 | |
| 2755 | 2755 | if ($action == 'editline' && $lines[$i]->id == $line_id) { |
| 2756 | 2756 | // edit mode |
| 2757 | - print '<td colspan="' . $editColspan . '" class="center"><table class="nobordernopadding centpercent">'; |
|
| 2757 | + print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding centpercent">'; |
|
| 2758 | 2758 | if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) { |
| 2759 | 2759 | print '<!-- case edit 1 -->'; |
| 2760 | 2760 | $line = new ExpeditionLigne($db); |
| 2761 | 2761 | foreach ($lines[$i]->detail_batch as $detail_batch) { |
| 2762 | 2762 | print '<tr>'; |
| 2763 | 2763 | // Qty to ship or shipped |
| 2764 | - print '<td><input class="qtyl right" name="qtyl' . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id . '" id="qtyl' . $line_id . '_' . $detail_batch->id . '" type="text" size="4" value="' . $detail_batch->qty . '"></td>'; |
|
| 2764 | + print '<td><input class="qtyl right" name="qtyl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->id.'" id="qtyl'.$line_id.'_'.$detail_batch->id.'" type="text" size="4" value="'.$detail_batch->qty.'"></td>'; |
|
| 2765 | 2765 | // Batch number management |
| 2766 | 2766 | if ($lines[$i]->entrepot_id == 0) { |
| 2767 | 2767 | // only show lot numbers from src warehouse when shipping from multiple warehouses |
| 2768 | 2768 | $line->fetch($detail_batch->fk_expeditiondet); |
| 2769 | 2769 | } |
| 2770 | 2770 | $entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id; |
| 2771 | - print '<td>' . $formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl' . $detail_batch->fk_expeditiondet . '_' . $detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id) . '</td>'; |
|
| 2771 | + print '<td>'.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id).'</td>'; |
|
| 2772 | 2772 | print '</tr>'; |
| 2773 | 2773 | } |
| 2774 | 2774 | // add a 0 qty lot row to be able to add a lot |
| 2775 | 2775 | print '<tr>'; |
| 2776 | 2776 | // Qty to ship or shipped |
| 2777 | - print '<td><input class="qtyl" name="qtyl' . $line_id . '_0" id="qtyl' . $line_id . '_0" type="text" size="4" value="0"></td>'; |
|
| 2777 | + print '<td><input class="qtyl" name="qtyl'.$line_id.'_0" id="qtyl'.$line_id.'_0" type="text" size="4" value="0"></td>'; |
|
| 2778 | 2778 | // Batch number management |
| 2779 | - print '<td>' . $formproduct->selectLotStock('', 'batchl' . $line_id . '_0', '', 1, 0, $lines[$i]->fk_product) . '</td>'; |
|
| 2779 | + print '<td>'.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'</td>'; |
|
| 2780 | 2780 | print '</tr>'; |
| 2781 | 2781 | } elseif (isModEnabled('stock')) { |
| 2782 | 2782 | if ($lines[$i]->fk_product > 0) { |
@@ -2784,13 +2784,13 @@ discard block |
||
| 2784 | 2784 | print '<!-- case edit 2 -->'; |
| 2785 | 2785 | print '<tr>'; |
| 2786 | 2786 | // Qty to ship or shipped |
| 2787 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '">' . $unit_order . '</td>'; |
|
| 2787 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.$unit_order.'</td>'; |
|
| 2788 | 2788 | // Warehouse source |
| 2789 | - print '<td>' . $formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl' . $line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>'; |
|
| 2789 | + print '<td>'.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>'; |
|
| 2790 | 2790 | // Batch number management |
| 2791 | 2791 | print '<td>'; |
| 2792 | 2792 | if (isModEnabled('productbatch')) { |
| 2793 | - print ' - ' . $langs->trans("NA"); |
|
| 2793 | + print ' - '.$langs->trans("NA"); |
|
| 2794 | 2794 | } |
| 2795 | 2795 | print '</td>'; |
| 2796 | 2796 | print '</tr>'; |
@@ -2799,13 +2799,13 @@ discard block |
||
| 2799 | 2799 | foreach ($lines[$i]->details_entrepot as $detail_entrepot) { |
| 2800 | 2800 | print '<tr>'; |
| 2801 | 2801 | // Qty to ship or shipped |
| 2802 | - print '<td><input class="qtyl right" name="qtyl' . $detail_entrepot->line_id . '" id="qtyl' . $detail_entrepot->line_id . '" type="text" size="4" value="' . $detail_entrepot->qty_shipped . '">' . $unit_order . '</td>'; |
|
| 2802 | + print '<td><input class="qtyl right" name="qtyl'.$detail_entrepot->line_id.'" id="qtyl'.$detail_entrepot->line_id.'" type="text" size="4" value="'.$detail_entrepot->qty_shipped.'">'.$unit_order.'</td>'; |
|
| 2803 | 2803 | // Warehouse source |
| 2804 | - print '<td>' . $formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl' . $detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>'; |
|
| 2804 | + print '<td>'.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>'; |
|
| 2805 | 2805 | // Batch number management |
| 2806 | 2806 | print '<td>'; |
| 2807 | 2807 | if (isModEnabled('productbatch')) { |
| 2808 | - print ' - ' . $langs->trans("NA"); |
|
| 2808 | + print ' - '.$langs->trans("NA"); |
|
| 2809 | 2809 | } |
| 2810 | 2810 | print '</td>'; |
| 2811 | 2811 | print '</tr>'; |
@@ -2814,19 +2814,19 @@ discard block |
||
| 2814 | 2814 | print '<!-- case edit 4 -->'; |
| 2815 | 2815 | print '<tr>'; |
| 2816 | 2816 | // Qty to ship or shipped |
| 2817 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>'; |
|
| 2818 | - print '<td><span class="opacitymedium">(' . $langs->trans("Service") . ')</span></td>'; |
|
| 2817 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>'; |
|
| 2818 | + print '<td><span class="opacitymedium">('.$langs->trans("Service").')</span></td>'; |
|
| 2819 | 2819 | print '<td></td>'; |
| 2820 | 2820 | print '</tr>'; |
| 2821 | 2821 | } else { |
| 2822 | 2822 | print '<!-- case edit 5 -->'; |
| 2823 | - print '<tr><td colspan="3">' . $langs->trans("ErrorStockIsNotEnough") . '</td></tr>'; |
|
| 2823 | + print '<tr><td colspan="3">'.$langs->trans("ErrorStockIsNotEnough").'</td></tr>'; |
|
| 2824 | 2824 | } |
| 2825 | 2825 | } else { |
| 2826 | 2826 | print '<!-- case edit 6 -->'; |
| 2827 | 2827 | print '<tr>'; |
| 2828 | 2828 | // Qty to ship or shipped |
| 2829 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '">' . $unit_order . '</td>'; |
|
| 2829 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'">'.$unit_order.'</td>'; |
|
| 2830 | 2830 | // Warehouse source |
| 2831 | 2831 | print '<td></td>'; |
| 2832 | 2832 | // Batch number management |
@@ -2837,7 +2837,7 @@ discard block |
||
| 2837 | 2837 | print '<!-- case edit 7 -->'; |
| 2838 | 2838 | print '<tr>'; |
| 2839 | 2839 | // Qty to ship or shipped |
| 2840 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>'; |
|
| 2840 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>'; |
|
| 2841 | 2841 | // Warehouse source |
| 2842 | 2842 | print '<td></td>'; |
| 2843 | 2843 | // Batch number management |
@@ -2848,13 +2848,13 @@ discard block |
||
| 2848 | 2848 | print '</table></td>'; |
| 2849 | 2849 | } else { |
| 2850 | 2850 | // Qty to ship or shipped |
| 2851 | - print '<td class="linecolqtytoship center">' . $lines[$i]->qty_shipped . ' ' . $unit_order . '</td>'; |
|
| 2851 | + print '<td class="linecolqtytoship center">'.$lines[$i]->qty_shipped.' '.$unit_order.'</td>'; |
|
| 2852 | 2852 | |
| 2853 | 2853 | // Warehouse source |
| 2854 | 2854 | if (isModEnabled('stock')) { |
| 2855 | 2855 | print '<td class="linecolwarehousesource tdoverflowmax200">'; |
| 2856 | 2856 | if ($lines[$i]->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
| 2857 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
| 2857 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
| 2858 | 2858 | } elseif ($lines[$i]->entrepot_id > 0 && $lines[$i]->stockable_product == Product::ENABLED_STOCK) { |
| 2859 | 2859 | $warehouse_id = $lines[$i]->entrepot_id; |
| 2860 | 2860 | if (!isset($conf->cache['warehouse'][$warehouse_id])) { |
@@ -2877,7 +2877,7 @@ discard block |
||
| 2877 | 2877 | } else { |
| 2878 | 2878 | $warehouse = $conf->cache['warehouse'][$warehouse_id]; |
| 2879 | 2879 | } |
| 2880 | - $detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped) . '<br>'; |
|
| 2880 | + $detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped).'<br>'; |
|
| 2881 | 2881 | } |
| 2882 | 2882 | } |
| 2883 | 2883 | print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans("DetailWarehouseNumber"), $detail); |
@@ -2894,7 +2894,7 @@ discard block |
||
| 2894 | 2894 | } else { |
| 2895 | 2895 | $child_product = $conf->cache['product'][$child_product_id]; |
| 2896 | 2896 | } |
| 2897 | - $child_product_label = $child_product->ref . ' ' . $child_product->label; |
|
| 2897 | + $child_product_label = $child_product->ref.' '.$child_product->label; |
|
| 2898 | 2898 | |
| 2899 | 2899 | // get warehouse from cache |
| 2900 | 2900 | if (!isset($conf->cache['warehouse'][$warehouse_id])) { |
@@ -2905,10 +2905,10 @@ discard block |
||
| 2905 | 2905 | $child_warehouse = $conf->cache['warehouse'][$warehouse_id]; |
| 2906 | 2906 | } |
| 2907 | 2907 | |
| 2908 | - $detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')) . '<br>'; |
|
| 2908 | + $detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')).'<br>'; |
|
| 2909 | 2909 | } |
| 2910 | 2910 | } |
| 2911 | - print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans('DetailWarehouseNumber'), $detail); |
|
| 2911 | + print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans('DetailWarehouseNumber'), $detail); |
|
| 2912 | 2912 | } |
| 2913 | 2913 | print '</td>'; |
| 2914 | 2914 | } |
@@ -2921,17 +2921,17 @@ discard block |
||
| 2921 | 2921 | if ($lines[$i]->product_tobatch) { |
| 2922 | 2922 | $detail = ''; |
| 2923 | 2923 | foreach ($lines[$i]->detail_batch as $dbatch) { // $dbatch is instance of ExpeditionLineBatch |
| 2924 | - $detail .= $langs->trans("Batch") . ': ' . $dbatch->batch; |
|
| 2924 | + $detail .= $langs->trans("Batch").': '.$dbatch->batch; |
|
| 2925 | 2925 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) { |
| 2926 | - $detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
| 2926 | + $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
| 2927 | 2927 | } |
| 2928 | 2928 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) { |
| 2929 | - $detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
| 2929 | + $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
| 2930 | 2930 | } |
| 2931 | - $detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty; |
|
| 2931 | + $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; |
|
| 2932 | 2932 | $detail .= '<br>'; |
| 2933 | 2933 | } |
| 2934 | - print $form->textwithtooltip(img_picto('', 'object_barcode') . ' ' . $langs->trans("DetailBatchNumber"), $detail); |
|
| 2934 | + print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $detail); |
|
| 2935 | 2935 | } else { |
| 2936 | 2936 | print $langs->trans("NA"); |
| 2937 | 2937 | } |
@@ -2945,7 +2945,7 @@ discard block |
||
| 2945 | 2945 | // Weight |
| 2946 | 2946 | print '<td class="center linecolweight">'; |
| 2947 | 2947 | if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { |
| 2948 | - print $lines[$i]->weight * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "weight", $lines[$i]->weight_units); |
|
| 2948 | + print $lines[$i]->weight * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units); |
|
| 2949 | 2949 | } else { |
| 2950 | 2950 | print ' '; |
| 2951 | 2951 | } |
@@ -2954,7 +2954,7 @@ discard block |
||
| 2954 | 2954 | // Volume |
| 2955 | 2955 | print '<td class="center linecolvolume">'; |
| 2956 | 2956 | if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { |
| 2957 | - print $lines[$i]->volume * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "volume", $lines[$i]->volume_units); |
|
| 2957 | + print $lines[$i]->volume * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units); |
|
| 2958 | 2958 | } else { |
| 2959 | 2959 | print ' '; |
| 2960 | 2960 | } |
@@ -2965,11 +2965,11 @@ discard block |
||
| 2965 | 2965 | |
| 2966 | 2966 | if ($action == 'editline' && $lines[$i]->id == $line_id) { |
| 2967 | 2967 | print '<td class="center" colspan="2" valign="middle">'; |
| 2968 | - print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="' . $langs->trans("Save") . '"><br>'; |
|
| 2969 | - print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="' . $langs->trans("Cancel") . '"><br>'; |
|
| 2968 | + print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'"><br>'; |
|
| 2969 | + print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"><br>'; |
|
| 2970 | 2970 | print '</td>'; |
| 2971 | 2971 | } elseif ($object->status == Expedition::STATUS_DRAFT) { |
| 2972 | - $edit_url = $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=editline&token=' . newToken() . '&lineid=' . $lines[$i]->id; |
|
| 2972 | + $edit_url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&token='.newToken().'&lineid='.$lines[$i]->id; |
|
| 2973 | 2973 | if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) { |
| 2974 | 2974 | $product_id = $lines[$i]->fk_product; |
| 2975 | 2975 | if (!isset($conf->cache['product'][$product_id])) { |
@@ -2981,16 +2981,16 @@ discard block |
||
| 2981 | 2981 | } |
| 2982 | 2982 | |
| 2983 | 2983 | if ($product->hasFatherOrChild(1)) { |
| 2984 | - $edit_url = dol_buildpath('/expedition/dispatch.php?id=' . $object->id, 1); |
|
| 2984 | + $edit_url = dol_buildpath('/expedition/dispatch.php?id='.$object->id, 1); |
|
| 2985 | 2985 | } |
| 2986 | 2986 | } |
| 2987 | 2987 | |
| 2988 | 2988 | // edit-delete buttons |
| 2989 | 2989 | print '<td class="linecoledit center">'; |
| 2990 | - print '<a class="editfielda reposition" href="' . $edit_url . '">' . img_edit() . '</a>'; |
|
| 2990 | + print '<a class="editfielda reposition" href="'.$edit_url.'">'.img_edit().'</a>'; |
|
| 2991 | 2991 | print '</td>'; |
| 2992 | 2992 | print '<td class="linecoldelete" width="10">'; |
| 2993 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=deleteline&token=' . newToken() . '&lineid=' . $lines[$i]->id . '">' . img_delete() . '</a>'; |
|
| 2993 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$lines[$i]->id.'">'.img_delete().'</a>'; |
|
| 2994 | 2994 | print '</td>'; |
| 2995 | 2995 | |
| 2996 | 2996 | // Display lines extrafields |
@@ -3038,7 +3038,7 @@ discard block |
||
| 3038 | 3038 | // TODO Show also lines ordered but not delivered |
| 3039 | 3039 | |
| 3040 | 3040 | if (empty($num_prod)) { |
| 3041 | - print '<tr><td colspan="8"><span class="opacitymedium">' . $langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")) . '</span></td></tr>'; |
|
| 3041 | + print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")).'</span></td></tr>'; |
|
| 3042 | 3042 | } |
| 3043 | 3043 | |
| 3044 | 3044 | print "</table>\n"; |
@@ -3067,21 +3067,21 @@ discard block |
||
| 3067 | 3067 | if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'creer')) |
| 3068 | 3068 | || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'shipping_advance', 'validate')) |
| 3069 | 3069 | ) { |
| 3070 | - print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=valid&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3070 | + print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, ''); |
|
| 3071 | 3071 | } else { |
| 3072 | - print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'] . '#', '', false); |
|
| 3072 | + print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3073 | 3073 | } |
| 3074 | 3074 | } |
| 3075 | 3075 | |
| 3076 | 3076 | // 0=draft, 1=validated/delivered, 2=closed/delivered |
| 3077 | 3077 | if ($object->status == Expedition::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) { |
| 3078 | 3078 | if ($user->hasRight('expedition', 'creer')) { |
| 3079 | - print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"] . '?action=setdraft&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3079 | + print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=setdraft&token='.newToken().'&id='.$object->id, ''); |
|
| 3080 | 3080 | } |
| 3081 | 3081 | } |
| 3082 | 3082 | if ($object->status == Expedition::STATUS_CLOSED) { |
| 3083 | 3083 | if ($user->hasRight('expedition', 'creer')) { |
| 3084 | - print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"] . '?action=reopen&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3084 | + print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
|
| 3085 | 3085 | } |
| 3086 | 3086 | } |
| 3087 | 3087 | |
@@ -3089,9 +3089,9 @@ discard block |
||
| 3089 | 3089 | if (empty($user->socid)) { |
| 3090 | 3090 | if ($object->status > 0) { |
| 3091 | 3091 | if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('expedition', 'shipping_advance', 'send')) { |
| 3092 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', ''); |
|
| 3092 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
|
| 3093 | 3093 | } else { |
| 3094 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'] . '#', '', false); |
|
| 3094 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3095 | 3095 | } |
| 3096 | 3096 | } |
| 3097 | 3097 | } |
@@ -3099,15 +3099,15 @@ discard block |
||
| 3099 | 3099 | // This is just to generate a delivery receipt when option to do this is on |
| 3100 | 3100 | //var_dump($object->linkedObjectsIds['delivery']); |
| 3101 | 3101 | if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED) && $user->hasRight('expedition', 'delivery', 'creer') && empty($object->linkedObjectsIds['delivery'])) { |
| 3102 | - print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"] . '?action=create_delivery&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3102 | + print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"].'?action=create_delivery&token='.newToken().'&id='.$object->id, ''); |
|
| 3103 | 3103 | } |
| 3104 | 3104 | |
| 3105 | 3105 | // Sign (to set to status "Signed" without using the online signature page) |
| 3106 | 3106 | if ($object->status > Expedition::STATUS_DRAFT) { |
| 3107 | 3107 | if ($object->signed_status != Expedition::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) { |
| 3108 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=sign&token=' . newToken() . '">' . $langs->trans("SignShipping") . '</a></div>'; |
|
| 3108 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=sign&token='.newToken().'">'.$langs->trans("SignShipping").'</a></div>'; |
|
| 3109 | 3109 | } else { |
| 3110 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=unsign&token=' . newToken() . '">' . $langs->trans("UnsignShipping") . '</a></div>'; |
|
| 3110 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=unsign&token='.newToken().'">'.$langs->trans("UnsignShipping").'</a></div>'; |
|
| 3111 | 3111 | } |
| 3112 | 3112 | } |
| 3113 | 3113 | |
@@ -3115,7 +3115,7 @@ discard block |
||
| 3115 | 3115 | if (isModEnabled('invoice') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED)) { |
| 3116 | 3116 | if ($user->hasRight('facture', 'creer')) { |
| 3117 | 3117 | if (getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') { |
| 3118 | - print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT . '/compta/facture/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, ''); |
|
| 3118 | + print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); |
|
| 3119 | 3119 | } |
| 3120 | 3120 | } |
| 3121 | 3121 | } |
@@ -3124,22 +3124,22 @@ discard block |
||
| 3124 | 3124 | if ($object->status == Expedition::STATUS_VALIDATED) { |
| 3125 | 3125 | if ($user->hasRight('expedition', 'creer') && $object->status > 0) { |
| 3126 | 3126 | if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') { |
| 3127 | - print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"] . '?action=classifybilled&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3127 | + print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, ''); |
|
| 3128 | 3128 | } |
| 3129 | - print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"] . '?action=classifyclosed&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3129 | + print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action=classifyclosed&token='.newToken().'&id='.$object->id, ''); |
|
| 3130 | 3130 | } |
| 3131 | 3131 | } |
| 3132 | 3132 | |
| 3133 | 3133 | // Cancel |
| 3134 | 3134 | if ($object->status == Expedition::STATUS_VALIDATED) { |
| 3135 | 3135 | if ($user->hasRight('expedition', 'creer')) { |
| 3136 | - print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"] . '?action=cancel&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', ''); |
|
| 3136 | + print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"].'?action=cancel&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
|
| 3137 | 3137 | } |
| 3138 | 3138 | } |
| 3139 | 3139 | |
| 3140 | 3140 | // Delete |
| 3141 | 3141 | if ($user->hasRight('expedition', 'supprimer')) { |
| 3142 | - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3142 | + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
|
| 3143 | 3143 | } |
| 3144 | 3144 | } |
| 3145 | 3145 | |
@@ -3155,9 +3155,9 @@ discard block |
||
| 3155 | 3155 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 3156 | 3156 | |
| 3157 | 3157 | $objectref = dol_sanitizeFileName($object->ref); |
| 3158 | - $filedir = $conf->expedition->dir_output . "/sending/" . $objectref; |
|
| 3158 | + $filedir = $conf->expedition->dir_output."/sending/".$objectref; |
|
| 3159 | 3159 | |
| 3160 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
| 3160 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
| 3161 | 3161 | |
| 3162 | 3162 | $genallowed = $user->hasRight('expedition', 'lire'); |
| 3163 | 3163 | $delallowed = $user->hasRight('expedition', 'creer'); |
@@ -3178,8 +3178,8 @@ discard block |
||
| 3178 | 3178 | |
| 3179 | 3179 | if ($object->status != Expedition::STATUS_DRAFT && $useonlinesignature) { |
| 3180 | 3180 | print '<br><!-- Link to sign -->'; |
| 3181 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; |
|
| 3182 | - print showOnlineSignatureUrl('expedition', $object->ref, $object) . '<br>'; |
|
| 3181 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
|
| 3182 | + print showOnlineSignatureUrl('expedition', $object->ref, $object).'<br>'; |
|
| 3183 | 3183 | } |
| 3184 | 3184 | |
| 3185 | 3185 | print '</div><div class="fichehalfright">'; |
@@ -3187,13 +3187,13 @@ discard block |
||
| 3187 | 3187 | |
| 3188 | 3188 | |
| 3189 | 3189 | // List of actions on element |
| 3190 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
| 3190 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
| 3191 | 3191 | $formactions = new FormActions($db); |
| 3192 | 3192 | |
| 3193 | 3193 | //button to go to messaging from the events box |
| 3194 | 3194 | $MAXEVENT = 10; |
| 3195 | - $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/expedition/messaging.php?id=' . $object->id); |
|
| 3196 | - $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/expedition/agenda.php?id=' . $object->id); |
|
| 3195 | + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/expedition/messaging.php?id='.$object->id); |
|
| 3196 | + $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/expedition/agenda.php?id='.$object->id); |
|
| 3197 | 3197 | |
| 3198 | 3198 | $somethingshown = $formactions->showactions($object, 'shipping', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); |
| 3199 | 3199 | |
@@ -3213,10 +3213,10 @@ discard block |
||
| 3213 | 3213 | // Presend form |
| 3214 | 3214 | $modelmail = 'shipping_send'; |
| 3215 | 3215 | $defaulttopic = 'SendShippingRef'; |
| 3216 | - $diroutput = $conf->expedition->dir_output . '/sending'; |
|
| 3217 | - $trackid = 'shi' . $object->id; |
|
| 3216 | + $diroutput = $conf->expedition->dir_output.'/sending'; |
|
| 3217 | + $trackid = 'shi'.$object->id; |
|
| 3218 | 3218 | |
| 3219 | - include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php'; |
|
| 3219 | + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
|
| 3220 | 3220 | } |
| 3221 | 3221 | |
| 3222 | 3222 | // End of page |