@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | if (!empty($conf->mycompany->multidir_output[$object->entity ?? $conf->entity])) { |
259 | 259 | $logodir = $conf->mycompany->multidir_output[$object->entity ?? $conf->entity]; |
260 | 260 | } |
261 | - $pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
261 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
262 | 262 | $tplidx = $pdf->importPage(1); |
263 | 263 | } |
264 | 264 | |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | // Pagefoot |
579 | 579 | $this->_pagefoot($pdf, $object, $outputlangs); |
580 | 580 | if (method_exists($pdf, 'AliasNbPages')) { |
581 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
581 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
582 | 582 | } |
583 | 583 | |
584 | 584 | $pdf->Close(); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * \brief File of class to generate document from standard template |
34 | 34 | */ |
35 | 35 | |
36 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/asset/modules_asset.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/asset/modules_asset.php'; |
|
37 | 37 | require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
38 | 38 | require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
39 | 39 | require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $this->situationinvoice = false; |
133 | 133 | |
134 | 134 | if ($mysoc === null) { |
135 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
135 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
136 | 136 | return; |
137 | 137 | } |
138 | 138 | // Get source company |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | if (!empty($conf->mycompany->multidir_output[$object->entity ?? $conf->entity])) { |
243 | 243 | $logodir = $conf->mycompany->multidir_output[$object->entity ?? $conf->entity]; |
244 | 244 | } |
245 | - $pagecount = $pdf->setSourceFile($logodir .'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
245 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
246 | 246 | $tplidx = $pdf->importPage(1); |
247 | 247 | } |
248 | 248 | |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | // Pagefoot |
684 | 684 | $this->_pagefoot($pdf, $object, $outputlangs); |
685 | 685 | if (method_exists($pdf, 'AliasNbPages')) { |
686 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
686 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
687 | 687 | } |
688 | 688 | |
689 | 689 | $pdf->Close(); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $this->posxdesc = $this->marge_gauche + 1; |
125 | 125 | |
126 | 126 | if ($mysoc === null) { |
127 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
127 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
128 | 128 | return; |
129 | 129 | } |
130 | 130 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | } |
193 | 193 | |
194 | 194 | if ($dir === null) { |
195 | - dol_syslog(get_class($this).'::'.__METHOD__."Target directory should not be null.". getCallerInfoString(), LOG_ERR); |
|
195 | + dol_syslog(get_class($this).'::'.__METHOD__."Target directory should not be null.".getCallerInfoString(), LOG_ERR); |
|
196 | 196 | $this->error = $langs->transnoentities("ErrorCanNotCreateDir", "Null dir"); |
197 | 197 | return 0; |
198 | 198 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | if (!empty($conf->mycompany->multidir_output[$object->entity ?? $conf->entity])) { |
242 | 242 | $logodir = $conf->mycompany->multidir_output[$object->entity ?? $conf->entity]; |
243 | 243 | } |
244 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
244 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
245 | 245 | $tplidx = $pdf->importPage(1); |
246 | 246 | } |
247 | 247 | |
@@ -367,10 +367,10 @@ discard block |
||
367 | 367 | $desc = dol_htmlentitiesbr($objectligne->desc, 1); // Desc (not empty for free lines) |
368 | 368 | $txt = ''; |
369 | 369 | if (!getDolGlobalString('CONTRACT_HIDE_QTY_ON_PDF')) { |
370 | - $txt .= $outputlangs->transnoentities("Quantity") . ' : <strong>' . $objectligne->qty . '</strong>'; |
|
370 | + $txt .= $outputlangs->transnoentities("Quantity").' : <strong>'.$objectligne->qty.'</strong>'; |
|
371 | 371 | } |
372 | 372 | if (!getDolGlobalString('CONTRACT_HIDE_PRICE_ON_PDF')) { |
373 | - $txt .= ' - ' . $outputlangs->transnoentities("UnitPrice") . ' : <strong>' . price($objectligne->subprice) . '</strong>'; |
|
373 | + $txt .= ' - '.$outputlangs->transnoentities("UnitPrice").' : <strong>'.price($objectligne->subprice).'</strong>'; |
|
374 | 374 | } |
375 | 375 | if (!getDolGlobalString('CONTRACT_HIDE_PLANNED_DATE_ON_PDF')) { |
376 | 376 | $txt .= '<br>'; |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | |
488 | 488 | $this->_pagefoot($pdf, $object, $outputlangs); |
489 | 489 | if (method_exists($pdf, 'AliasNbPages')) { |
490 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
490 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | $pdf->Close(); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $h = 0; |
49 | 49 | $head = array(); |
50 | 50 | |
51 | - $head[$h][0] = DOL_URL_ROOT . '/societe/card.php?socid=' . $object->id; |
|
51 | + $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id; |
|
52 | 52 | $head[$h][1] = $langs->trans("ThirdParty"); |
53 | 53 | $head[$h][2] = 'card'; |
54 | 54 | $h++; |
@@ -58,21 +58,21 @@ discard block |
||
58 | 58 | //$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); |
59 | 59 | $nbContact = 0; |
60 | 60 | // Enable caching of thirdrparty count Contacts |
61 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php'; |
|
62 | - $cachekey = 'count_contacts_thirdparty_' . $object->id; |
|
61 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
|
62 | + $cachekey = 'count_contacts_thirdparty_'.$object->id; |
|
63 | 63 | $dataretrieved = dol_getcache($cachekey); |
64 | 64 | |
65 | 65 | if (!is_null($dataretrieved)) { |
66 | 66 | $nbContact = $dataretrieved; |
67 | 67 | } else { |
68 | 68 | $sql = "SELECT COUNT(p.rowid) as nb"; |
69 | - $sql .= " FROM " . MAIN_DB_PREFIX . "socpeople as p"; |
|
69 | + $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; |
|
70 | 70 | // Add table from hooks |
71 | 71 | $parameters = array('contacttab' => true); |
72 | 72 | $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook |
73 | 73 | $sql .= $hookmanager->resPrint; |
74 | - $sql .= " WHERE p.fk_soc = " . ((int) $object->id); |
|
75 | - $sql .= " AND p.entity IN (" . getEntity($object->element) . ")"; |
|
74 | + $sql .= " WHERE p.fk_soc = ".((int) $object->id); |
|
75 | + $sql .= " AND p.entity IN (".getEntity($object->element).")"; |
|
76 | 76 | // Add where from hooks |
77 | 77 | $parameters = array('contacttab' => true); |
78 | 78 | $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -83,31 +83,31 @@ discard block |
||
83 | 83 | $nbContact = $obj->nb; |
84 | 84 | } |
85 | 85 | |
86 | - dol_setcache($cachekey, $nbContact, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
86 | + dol_setcache($cachekey, $nbContact, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
87 | 87 | } |
88 | 88 | |
89 | - $head[$h][0] = DOL_URL_ROOT . '/societe/contact.php?socid=' . $object->id; |
|
89 | + $head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id; |
|
90 | 90 | $head[$h][1] = $langs->trans('ContactsAddresses'); |
91 | 91 | if ($nbContact > 0) { |
92 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbContact . '</span>'; |
|
92 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>'; |
|
93 | 93 | } |
94 | 94 | $head[$h][2] = 'contact'; |
95 | 95 | $h++; |
96 | 96 | } |
97 | 97 | if (getDolGlobalString('MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES')) { |
98 | 98 | // Some features may be unstable with this option, like permissions rules, import contact, ... |
99 | - $head[$h][0] = DOL_URL_ROOT . '/societe/societecontact.php?socid=' . $object->id; |
|
99 | + $head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id; |
|
100 | 100 | $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); |
101 | 101 | $head[$h][1] = $langs->trans("ContactsAddressesExt"); |
102 | 102 | if ($nbContact > 0) { |
103 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbContact . '</span>'; |
|
103 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>'; |
|
104 | 104 | } |
105 | 105 | $head[$h][2] = 'contactext'; |
106 | 106 | $h++; |
107 | 107 | } |
108 | 108 | |
109 | 109 | if ($object->client == 1 || $object->client == 2 || $object->client == 3) { |
110 | - $head[$h][0] = DOL_URL_ROOT . '/comm/card.php?socid=' . $object->id; |
|
110 | + $head[$h][0] = DOL_URL_ROOT.'/comm/card.php?socid='.$object->id; |
|
111 | 111 | $head[$h][1] = ''; |
112 | 112 | if (!getDolGlobalString('SOCIETE_DISABLE_PROSPECTS') && ($object->client == 2 || $object->client == 3)) { |
113 | 113 | $head[$h][1] .= $langs->trans("Prospect"); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { |
125 | 125 | $langs->load("products"); |
126 | 126 | // price |
127 | - $head[$h][0] = DOL_URL_ROOT . '/societe/price.php?socid=' . $object->id; |
|
127 | + $head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id; |
|
128 | 128 | $head[$h][1] = $langs->trans("CustomerPrices"); |
129 | 129 | $head[$h][2] = 'price'; |
130 | 130 | $h++; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $supplier_module_enabled = 1; |
136 | 136 | } |
137 | 137 | if ($supplier_module_enabled == 1 && $object->fournisseur && $user->hasRight('fournisseur', 'lire')) { |
138 | - $head[$h][0] = DOL_URL_ROOT . '/fourn/card.php?socid=' . $object->id; |
|
138 | + $head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id; |
|
139 | 139 | $head[$h][1] = $langs->trans("Supplier"); |
140 | 140 | $head[$h][2] = 'supplier'; |
141 | 141 | $h++; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $mode = 'customer'; |
155 | 155 | } |
156 | 156 | |
157 | - $head[$h][0] = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?socid=' . $object->id . '&mode=' . $mode . '&type=sub&search_accountancy_code_start=' . $subledger_start_account . '&search_accountancy_code_end=' . $subledger_end_account; |
|
157 | + $head[$h][0] = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?socid='.$object->id.'&mode='.$mode.'&type=sub&search_accountancy_code_start='.$subledger_start_account.'&search_accountancy_code_end='.$subledger_end_account; |
|
158 | 158 | $head[$h][1] = $langs->trans("Accounting"); |
159 | 159 | $head[$h][2] = 'accounting'; |
160 | 160 | $h++; |
@@ -163,17 +163,17 @@ discard block |
||
163 | 163 | if (isModEnabled('project') && ($user->hasRight('projet', 'lire'))) { |
164 | 164 | $nbProject = 0; |
165 | 165 | // Enable caching of thirdrparty count projects |
166 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php'; |
|
167 | - $cachekey = 'count_projects_thirdparty_' . $object->id; |
|
166 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
|
167 | + $cachekey = 'count_projects_thirdparty_'.$object->id; |
|
168 | 168 | $dataretrieved = dol_getcache($cachekey); |
169 | 169 | |
170 | 170 | if (!is_null($dataretrieved)) { |
171 | 171 | $nbProject = $dataretrieved; |
172 | 172 | } else { |
173 | 173 | $sql = "SELECT COUNT(n.rowid) as nb"; |
174 | - $sql .= " FROM " . MAIN_DB_PREFIX . "projet as n"; |
|
175 | - $sql .= " WHERE fk_soc = " . ((int) $object->id); |
|
176 | - $sql .= " AND entity IN (" . getEntity('project') . ")"; |
|
174 | + $sql .= " FROM ".MAIN_DB_PREFIX."projet as n"; |
|
175 | + $sql .= " WHERE fk_soc = ".((int) $object->id); |
|
176 | + $sql .= " AND entity IN (".getEntity('project').")"; |
|
177 | 177 | $resql = $db->query($sql); |
178 | 178 | if ($resql) { |
179 | 179 | $obj = $db->fetch_object($resql); |
@@ -181,12 +181,12 @@ discard block |
||
181 | 181 | } else { |
182 | 182 | dol_print_error($db); |
183 | 183 | } |
184 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
184 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
185 | 185 | } |
186 | - $head[$h][0] = DOL_URL_ROOT . '/societe/project.php?socid=' . $object->id; |
|
186 | + $head[$h][0] = DOL_URL_ROOT.'/societe/project.php?socid='.$object->id; |
|
187 | 187 | $head[$h][1] = $langs->trans("Projects"); |
188 | 188 | if ($nbProject > 0) { |
189 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbProject . '</span>'; |
|
189 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbProject.'</span>'; |
|
190 | 190 | } |
191 | 191 | $head[$h][2] = 'project'; |
192 | 192 | $h++; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | // Tab to link resources |
196 | 196 | if (isModEnabled('resource') && getDolGlobalString('RESOURCE_ON_THIRDPARTIES')) { |
197 | - $head[$h][0] = DOL_URL_ROOT . '/resource/element_resource.php?element=societe&element_id=' . $object->id; |
|
197 | + $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=societe&element_id='.$object->id; |
|
198 | 198 | $head[$h][1] = $langs->trans("Resources"); |
199 | 199 | $head[$h][2] = 'resources'; |
200 | 200 | $h++; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | if ((isModEnabled('order') || isModEnabled('propal') || isModEnabled('invoice') || isModEnabled('intervention') || isModEnabled("supplier_proposal") || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) |
205 | 205 | && !getDolGlobalString('THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB') |
206 | 206 | ) { |
207 | - $head[$h][0] = DOL_URL_ROOT . '/societe/consumption.php?socid=' . $object->id; |
|
207 | + $head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id; |
|
208 | 208 | $head[$h][1] = $langs->trans("Referers"); |
209 | 209 | $head[$h][2] = 'consumption'; |
210 | 210 | $h++; |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $servicestatus = 1; |
225 | 225 | } |
226 | 226 | |
227 | - include_once DOL_DOCUMENT_ROOT . '/societe/class/societeaccount.class.php'; |
|
227 | + include_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; |
|
228 | 228 | $societeaccount = new SocieteAccount($db); |
229 | 229 | $stripecu = $societeaccount->getCustomerAccount($object->id, 'stripe', $servicestatus); // Get thirdparty cu_... |
230 | 230 | if ($stripecu) { |
@@ -233,12 +233,12 @@ discard block |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | $sql = "SELECT COUNT(n.rowid) as nb"; |
236 | - $sql .= " FROM " . MAIN_DB_PREFIX . "societe_rib as n"; |
|
237 | - $sql .= " WHERE n.fk_soc = " . ((int) $object->id); |
|
236 | + $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as n"; |
|
237 | + $sql .= " WHERE n.fk_soc = ".((int) $object->id); |
|
238 | 238 | if (!isModEnabled('stripe')) { |
239 | 239 | $sql .= " AND n.stripe_card_ref IS NULL"; |
240 | 240 | } else { |
241 | - $sql .= " AND (n.stripe_card_ref IS NULL OR (n.stripe_card_ref IS NOT NULL AND n.status = " . ((int) $servicestatus) . "))"; |
|
241 | + $sql .= " AND (n.stripe_card_ref IS NULL OR (n.stripe_card_ref IS NOT NULL AND n.status = ".((int) $servicestatus)."))"; |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | $resql = $db->query($sql); |
@@ -251,12 +251,12 @@ discard block |
||
251 | 251 | |
252 | 252 | //if (isModEnabled('stripe') && $nbBankAccount > 0) $nbBankAccount = '...'; // No way to know exact number |
253 | 253 | |
254 | - $head[$h][0] = DOL_URL_ROOT . '/societe/paymentmodes.php?socid=' . urlencode((string) ($object->id)); |
|
254 | + $head[$h][0] = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.urlencode((string) ($object->id)); |
|
255 | 255 | $head[$h][1] = $title; |
256 | 256 | if ($foundonexternalonlinesystem) { |
257 | 257 | $head[$h][1] .= '<span class="badge marginleftonlyshort">...</span>'; |
258 | 258 | } elseif ($nbBankAccount > 0) { |
259 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbBankAccount . '</span>'; |
|
259 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbBankAccount.'</span>'; |
|
260 | 260 | } |
261 | 261 | $head[$h][2] = 'rib'; |
262 | 262 | $h++; |
@@ -271,15 +271,15 @@ discard block |
||
271 | 271 | $site_filter_list[] = 'dolibarr_portal'; |
272 | 272 | } |
273 | 273 | |
274 | - $head[$h][0] = DOL_URL_ROOT . '/societe/website.php?id=' . urlencode((string) ($object->id)); |
|
274 | + $head[$h][0] = DOL_URL_ROOT.'/societe/website.php?id='.urlencode((string) ($object->id)); |
|
275 | 275 | $head[$h][1] = $langs->trans("WebSiteAccounts"); |
276 | 276 | $nbNote = 0; |
277 | 277 | $sql = "SELECT COUNT(n.rowid) as nb"; |
278 | - $sql .= " FROM " . MAIN_DB_PREFIX . "societe_account as n"; |
|
279 | - $sql .= " WHERE fk_soc = " . ((int) $object->id); |
|
280 | - $sql .= " AND entity IN (" . getEntity('thirdpartyaccount') . ")"; |
|
278 | + $sql .= " FROM ".MAIN_DB_PREFIX."societe_account as n"; |
|
279 | + $sql .= " WHERE fk_soc = ".((int) $object->id); |
|
280 | + $sql .= " AND entity IN (".getEntity('thirdpartyaccount').")"; |
|
281 | 281 | if (!empty($site_filter_list)) { |
282 | - $sql .= " AND n.site IN (" . $db->sanitize("'" . implode("','", $site_filter_list) . "'", 1) . ")"; |
|
282 | + $sql .= " AND n.site IN (".$db->sanitize("'".implode("','", $site_filter_list)."'", 1).")"; |
|
283 | 283 | } |
284 | 284 | $resql = $db->query($sql); |
285 | 285 | if ($resql) { |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | dol_print_error($db); |
290 | 290 | } |
291 | 291 | if ($nbNote > 0) { |
292 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbNote . '</span>'; |
|
292 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; |
|
293 | 293 | } |
294 | 294 | $head[$h][2] = 'website'; |
295 | 295 | $h++; |
@@ -299,13 +299,13 @@ discard block |
||
299 | 299 | if ($user->hasRight('partnership', 'read')) { |
300 | 300 | $langs->load("partnership"); |
301 | 301 | $nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0; |
302 | - $head[$h][0] = DOL_URL_ROOT . '/partnership/partnership_list.php?socid=' . $object->id; |
|
302 | + $head[$h][0] = DOL_URL_ROOT.'/partnership/partnership_list.php?socid='.$object->id; |
|
303 | 303 | $head[$h][1] = $langs->trans("Partnerships"); |
304 | 304 | $nbNote = 0; |
305 | 305 | $sql = "SELECT COUNT(n.rowid) as nb"; |
306 | - $sql .= " FROM " . MAIN_DB_PREFIX . "partnership as n"; |
|
307 | - $sql .= " WHERE fk_soc = " . ((int) $object->id); |
|
308 | - $sql .= " AND entity IN (" . getEntity('partnership') . ")"; |
|
306 | + $sql .= " FROM ".MAIN_DB_PREFIX."partnership as n"; |
|
307 | + $sql .= " WHERE fk_soc = ".((int) $object->id); |
|
308 | + $sql .= " AND entity IN (".getEntity('partnership').")"; |
|
309 | 309 | $resql = $db->query($sql); |
310 | 310 | if ($resql) { |
311 | 311 | $obj = $db->fetch_object($resql); |
@@ -314,11 +314,11 @@ discard block |
||
314 | 314 | dol_print_error($db); |
315 | 315 | } |
316 | 316 | if ($nbNote > 0) { |
317 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbNote . '</span>'; |
|
317 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; |
|
318 | 318 | } |
319 | 319 | $head[$h][2] = 'partnerships'; |
320 | 320 | if ($nbPartnership > 0) { |
321 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbPartnership . '</span>'; |
|
321 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbPartnership.'</span>'; |
|
322 | 322 | } |
323 | 323 | $h++; |
324 | 324 | } |
@@ -329,16 +329,16 @@ discard block |
||
329 | 329 | //$langs->load('ticket'); |
330 | 330 | $nbTicket = 0; |
331 | 331 | // Enable caching of thirdparty count notifications |
332 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php'; |
|
333 | - $cachekey = 'count_ticket_thirdparty_' . $object->id; |
|
332 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
|
333 | + $cachekey = 'count_ticket_thirdparty_'.$object->id; |
|
334 | 334 | $nbticketretreived = dol_getcache($cachekey); |
335 | 335 | if (!is_null($nbticketretreived)) { |
336 | 336 | $nbTicket = $nbticketretreived; |
337 | 337 | } else { |
338 | 338 | // List of notifications enabled for contacts of the third party |
339 | 339 | $sql = "SELECT COUNT(t.rowid) as nb"; |
340 | - $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; |
|
341 | - $sql .= " WHERE t.fk_soc = " . ((int) $object->id); |
|
340 | + $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t"; |
|
341 | + $sql .= " WHERE t.fk_soc = ".((int) $object->id); |
|
342 | 342 | $resql = $db->query($sql); |
343 | 343 | if ($resql) { |
344 | 344 | $obj = $db->fetch_object($resql); |
@@ -346,13 +346,13 @@ discard block |
||
346 | 346 | } else { |
347 | 347 | dol_print_error($db); |
348 | 348 | } |
349 | - dol_setcache($cachekey, $nbTicket, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
349 | + dol_setcache($cachekey, $nbTicket, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
350 | 350 | } |
351 | 351 | |
352 | - $head[$h][0] = DOL_URL_ROOT . '/ticket/list.php?socid=' . urlencode((string) ($object->id)); |
|
352 | + $head[$h][0] = DOL_URL_ROOT.'/ticket/list.php?socid='.urlencode((string) ($object->id)); |
|
353 | 353 | $head[$h][1] = $langs->trans("Tickets"); |
354 | 354 | if ($nbTicket > 0) { |
355 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbTicket . '</span>'; |
|
355 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbTicket.'</span>'; |
|
356 | 356 | } |
357 | 357 | $head[$h][2] = 'ticket'; |
358 | 358 | $h++; |
@@ -371,20 +371,20 @@ discard block |
||
371 | 371 | $langs->load('mails'); |
372 | 372 | $nbNotif = 0; |
373 | 373 | // Enable caching of thirdparty count notifications |
374 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php'; |
|
375 | - $cachekey = 'count_notifications_thirdparty_' . $object->id; |
|
374 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
|
375 | + $cachekey = 'count_notifications_thirdparty_'.$object->id; |
|
376 | 376 | $dataretrieved = dol_getcache($cachekey); |
377 | 377 | if (!is_null($dataretrieved)) { |
378 | 378 | $nbNotif = $dataretrieved; |
379 | 379 | } else { |
380 | 380 | // List of notifications enabled for contacts of the third party |
381 | 381 | $sql = "SELECT COUNT(n.rowid) as nb"; |
382 | - $sql .= " FROM " . MAIN_DB_PREFIX . "c_action_trigger as a,"; |
|
383 | - $sql .= " " . MAIN_DB_PREFIX . "notify_def as n,"; |
|
384 | - $sql .= " " . MAIN_DB_PREFIX . "socpeople as c"; |
|
382 | + $sql .= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,"; |
|
383 | + $sql .= " ".MAIN_DB_PREFIX."notify_def as n,"; |
|
384 | + $sql .= " ".MAIN_DB_PREFIX."socpeople as c"; |
|
385 | 385 | $sql .= " WHERE a.rowid = n.fk_action"; |
386 | 386 | $sql .= " AND c.rowid = n.fk_contact"; |
387 | - $sql .= " AND c.fk_soc = " . ((int) $object->id); |
|
387 | + $sql .= " AND c.fk_soc = ".((int) $object->id); |
|
388 | 388 | $resql = $db->query($sql); |
389 | 389 | if ($resql) { |
390 | 390 | $obj = $db->fetch_object($resql); |
@@ -392,13 +392,13 @@ discard block |
||
392 | 392 | } else { |
393 | 393 | dol_print_error($db); |
394 | 394 | } |
395 | - dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
395 | + dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
396 | 396 | } |
397 | 397 | |
398 | - $head[$h][0] = DOL_URL_ROOT . '/societe/notify/card.php?socid=' . urlencode((string) ($object->id)); |
|
398 | + $head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.urlencode((string) ($object->id)); |
|
399 | 399 | $head[$h][1] = $langs->trans("Notifications"); |
400 | 400 | if ($nbNotif > 0) { |
401 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbNotif . '</span>'; |
|
401 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNotif.'</span>'; |
|
402 | 402 | } |
403 | 403 | $head[$h][2] = 'notify'; |
404 | 404 | $h++; |
@@ -412,10 +412,10 @@ discard block |
||
412 | 412 | if (!empty($object->note_public)) { |
413 | 413 | $nbNote++; |
414 | 414 | } |
415 | - $head[$h][0] = DOL_URL_ROOT . '/societe/note.php?id=' . urlencode((string) ($object->id)); |
|
415 | + $head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.urlencode((string) ($object->id)); |
|
416 | 416 | $head[$h][1] = $langs->trans("Notes"); |
417 | 417 | if ($nbNote > 0) { |
418 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbNote . '</span>'; |
|
418 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>'; |
|
419 | 419 | } |
420 | 420 | $head[$h][2] = 'note'; |
421 | 421 | $h++; |
@@ -423,59 +423,59 @@ discard block |
||
423 | 423 | // Attached files and Links |
424 | 424 | $totalAttached = 0; |
425 | 425 | // Enable caching of thirdrparty count attached files and links |
426 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php'; |
|
427 | - $cachekey = 'count_attached_thirdparty_' . $object->id; |
|
426 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
|
427 | + $cachekey = 'count_attached_thirdparty_'.$object->id; |
|
428 | 428 | $dataretrieved = dol_getcache($cachekey); |
429 | 429 | if (!is_null($dataretrieved)) { |
430 | 430 | $totalAttached = $dataretrieved; |
431 | 431 | } else { |
432 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
|
433 | - require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; |
|
434 | - $upload_dir = $conf->societe->multidir_output[$object->entity ?? $conf->entity] . "/" . $object->id; |
|
432 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
433 | + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; |
|
434 | + $upload_dir = $conf->societe->multidir_output[$object->entity ?? $conf->entity]."/".$object->id; |
|
435 | 435 | $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); |
436 | 436 | $nbLinks = Link::count($db, $object->element, $object->id); |
437 | 437 | $totalAttached = $nbFiles + $nbLinks; |
438 | - dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
438 | + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
439 | 439 | } |
440 | 440 | |
441 | - $head[$h][0] = DOL_URL_ROOT . '/societe/document.php?socid=' . $object->id; |
|
441 | + $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; |
|
442 | 442 | $head[$h][1] = $langs->trans("Documents"); |
443 | 443 | if (($totalAttached) > 0) { |
444 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . ($totalAttached) . '</span>'; |
|
444 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($totalAttached).'</span>'; |
|
445 | 445 | } |
446 | 446 | $head[$h][2] = 'document'; |
447 | 447 | $h++; |
448 | 448 | } |
449 | 449 | |
450 | - $head[$h][0] = DOL_URL_ROOT . '/societe/messaging.php?socid=' . $object->id; |
|
450 | + $head[$h][0] = DOL_URL_ROOT.'/societe/messaging.php?socid='.$object->id; |
|
451 | 451 | $head[$h][1] = $langs->trans("Events"); |
452 | 452 | if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { |
453 | 453 | $nbEvent = 0; |
454 | 454 | // Enable caching of thirdparty count actioncomm |
455 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php'; |
|
456 | - $cachekey = 'count_events_thirdparty_' . $object->id; |
|
455 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; |
|
456 | + $cachekey = 'count_events_thirdparty_'.$object->id; |
|
457 | 457 | $dataretrieved = dol_getcache($cachekey); |
458 | 458 | if (!is_null($dataretrieved)) { |
459 | 459 | $nbEvent = $dataretrieved; |
460 | 460 | } else { |
461 | 461 | $sql = "SELECT COUNT(id) as nb"; |
462 | - $sql .= " FROM " . MAIN_DB_PREFIX . "actioncomm"; |
|
463 | - $sql .= " WHERE fk_soc = " . ((int) $object->id); |
|
464 | - $sql .= " AND entity IN (" . getEntity('agenda') . ")"; |
|
462 | + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm"; |
|
463 | + $sql .= " WHERE fk_soc = ".((int) $object->id); |
|
464 | + $sql .= " AND entity IN (".getEntity('agenda').")"; |
|
465 | 465 | $resql = $db->query($sql); |
466 | 466 | if ($resql) { |
467 | 467 | $obj = $db->fetch_object($resql); |
468 | 468 | $nbEvent = $obj->nb; |
469 | 469 | } else { |
470 | - dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR); |
|
470 | + dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR); |
|
471 | 471 | } |
472 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
472 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
473 | 473 | } |
474 | 474 | |
475 | 475 | $head[$h][1] .= '/'; |
476 | 476 | $head[$h][1] .= $langs->trans("Agenda"); |
477 | 477 | if ($nbEvent > 0) { |
478 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbEvent . '</span>'; |
|
478 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbEvent.'</span>'; |
|
479 | 479 | } |
480 | 480 | } |
481 | 481 | $head[$h][2] = 'agenda'; |
@@ -505,12 +505,12 @@ discard block |
||
505 | 505 | $h = 0; |
506 | 506 | $head = array(); |
507 | 507 | |
508 | - $head[$h][0] = DOL_URL_ROOT . '/societe/card.php?socid=' . $object->id; |
|
508 | + $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id; |
|
509 | 509 | $head[$h][1] = $langs->trans("ThirdParty"); |
510 | 510 | $head[$h][2] = 'company'; |
511 | 511 | $h++; |
512 | 512 | |
513 | - $head[$h][0] = 'commerciaux.php?socid=' . $object->id; |
|
513 | + $head[$h][0] = 'commerciaux.php?socid='.$object->id; |
|
514 | 514 | $head[$h][1] = $langs->trans("SalesRepresentative"); |
515 | 515 | $head[$h][2] = 'salesrepresentative'; |
516 | 516 | $h++; |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | $h = 0; |
537 | 537 | $head = array(); |
538 | 538 | |
539 | - $head[$h][0] = DOL_URL_ROOT . '/societe/admin/societe.php'; |
|
539 | + $head[$h][0] = DOL_URL_ROOT.'/societe/admin/societe.php'; |
|
540 | 540 | $head[$h][1] = $langs->trans("Miscellaneous"); |
541 | 541 | $head[$h][2] = 'general'; |
542 | 542 | $h++; |
@@ -547,20 +547,20 @@ discard block |
||
547 | 547 | // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab |
548 | 548 | complete_head_from_modules($conf, $langs, null, $head, $h, 'company_admin'); |
549 | 549 | |
550 | - $head[$h][0] = DOL_URL_ROOT . '/societe/admin/societe_extrafields.php'; |
|
550 | + $head[$h][0] = DOL_URL_ROOT.'/societe/admin/societe_extrafields.php'; |
|
551 | 551 | $head[$h][1] = $langs->trans("ExtraFieldsThirdParties"); |
552 | 552 | $nbExtrafields = $extrafields->attributes['societe']['count']; |
553 | 553 | if ($nbExtrafields > 0) { |
554 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbExtrafields . '</span>'; |
|
554 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>'; |
|
555 | 555 | } |
556 | 556 | $head[$h][2] = 'attributes'; |
557 | 557 | $h++; |
558 | 558 | |
559 | - $head[$h][0] = DOL_URL_ROOT . '/societe/admin/contact_extrafields.php'; |
|
559 | + $head[$h][0] = DOL_URL_ROOT.'/societe/admin/contact_extrafields.php'; |
|
560 | 560 | $head[$h][1] = $langs->trans("ExtraFieldsContacts"); |
561 | 561 | $nbExtrafields = $extrafields->attributes['socpeople']['count']; |
562 | 562 | if ($nbExtrafields > 0) { |
563 | - $head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbExtrafields . '</span>'; |
|
563 | + $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>'; |
|
564 | 564 | } |
565 | 565 | $head[$h][2] = 'attributes_contacts'; |
566 | 566 | $h++; |
@@ -608,13 +608,13 @@ discard block |
||
608 | 608 | $outputlangs = $langs; |
609 | 609 | } |
610 | 610 | |
611 | - $sql = "SELECT rowid, code, label FROM " . MAIN_DB_PREFIX . "c_country"; |
|
611 | + $sql = "SELECT rowid, code, label FROM ".MAIN_DB_PREFIX."c_country"; |
|
612 | 612 | if (is_numeric($searchkey)) { |
613 | - $sql .= " WHERE rowid = " . ((int) $searchkey); |
|
613 | + $sql .= " WHERE rowid = ".((int) $searchkey); |
|
614 | 614 | } elseif (!empty($searchkey)) { |
615 | - $sql .= " WHERE code = '" . $db->escape($searchkey) . "'"; |
|
615 | + $sql .= " WHERE code = '".$db->escape($searchkey)."'"; |
|
616 | 616 | } else { |
617 | - $sql .= " WHERE label = '" . $db->escape($searchlabel) . "'"; |
|
617 | + $sql .= " WHERE label = '".$db->escape($searchlabel)."'"; |
|
618 | 618 | } |
619 | 619 | |
620 | 620 | $resql = $dbtouse->query($sql); |
@@ -625,9 +625,9 @@ discard block |
||
625 | 625 | if (is_object($outputlangs)) { |
626 | 626 | $outputlangs->load("dict"); |
627 | 627 | if ($entconv) { |
628 | - $label = ($obj->code && ($outputlangs->trans("Country" . $obj->code) != "Country" . $obj->code)) ? $outputlangs->trans("Country" . $obj->code) : $label; |
|
628 | + $label = ($obj->code && ($outputlangs->trans("Country".$obj->code) != "Country".$obj->code)) ? $outputlangs->trans("Country".$obj->code) : $label; |
|
629 | 629 | } else { |
630 | - $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("Country" . $obj->code) != "Country" . $obj->code)) ? $outputlangs->transnoentitiesnoconv("Country" . $obj->code) : $label; |
|
630 | + $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code)) ? $outputlangs->transnoentitiesnoconv("Country".$obj->code) : $label; |
|
631 | 631 | } |
632 | 632 | } |
633 | 633 | if ($withcode == '1') { |
@@ -676,8 +676,8 @@ discard block |
||
676 | 676 | } |
677 | 677 | |
678 | 678 | $sql = "SELECT d.rowid as id, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.code_region as region_code, r.nom as region_name FROM"; |
679 | - $sql .= " " . MAIN_DB_PREFIX . "c_departements as d, " . MAIN_DB_PREFIX . "c_regions as r," . MAIN_DB_PREFIX . "c_country as c"; |
|
680 | - $sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid and d.rowid=" . ((int) $id); |
|
679 | + $sql .= " ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c"; |
|
680 | + $sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid and d.rowid=".((int) $id); |
|
681 | 681 | $sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1"; |
682 | 682 | $sql .= " ORDER BY c.code, d.code_departement"; |
683 | 683 | |
@@ -690,21 +690,21 @@ discard block |
||
690 | 690 | if (is_object($outputlangs)) { |
691 | 691 | $outputlangs->load("dict"); |
692 | 692 | if ($entconv) { |
693 | - $label = ($obj->code && ($outputlangs->trans("State" . $obj->code) != "State" . $obj->code)) ? $outputlangs->trans("State" . $obj->code) : $label; |
|
693 | + $label = ($obj->code && ($outputlangs->trans("State".$obj->code) != "State".$obj->code)) ? $outputlangs->trans("State".$obj->code) : $label; |
|
694 | 694 | } else { |
695 | - $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("State" . $obj->code) != "State" . $obj->code)) ? $outputlangs->transnoentitiesnoconv("State" . $obj->code) : $label; |
|
695 | + $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("State".$obj->code) != "State".$obj->code)) ? $outputlangs->transnoentitiesnoconv("State".$obj->code) : $label; |
|
696 | 696 | } |
697 | 697 | } |
698 | 698 | |
699 | 699 | if ($withcode == 1) { |
700 | 700 | if ($withregion == 1) { |
701 | - return $label = $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
701 | + return $label = $obj->region_name.' - '.$obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
702 | 702 | } else { |
703 | - return $label = $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
703 | + return $label = $obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
704 | 704 | } |
705 | 705 | } elseif ($withcode == 2) { |
706 | 706 | if ($withregion == 1) { |
707 | - return $label = $obj->region_name . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
707 | + return $label = $obj->region_name.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
708 | 708 | } else { |
709 | 709 | return $label = ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
710 | 710 | } |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | } |
717 | 717 | } else { |
718 | 718 | if ($withregion == 1) { |
719 | - return $label = $obj->region_name . ' - ' . $label; |
|
719 | + return $label = $obj->region_name.' - '.$label; |
|
720 | 720 | } else { |
721 | 721 | return $label; |
722 | 722 | } |
@@ -750,13 +750,13 @@ discard block |
||
750 | 750 | $outputlangs->load("dict"); |
751 | 751 | |
752 | 752 | // If there is a translation, we can send immediately the label |
753 | - if ($outputlangs->trans("Currency" . $code_iso) != "Currency" . $code_iso) { |
|
754 | - return ($withcode ? $code_iso . ' - ' : '') . $outputlangs->trans("Currency" . $code_iso); |
|
753 | + if ($outputlangs->trans("Currency".$code_iso) != "Currency".$code_iso) { |
|
754 | + return ($withcode ? $code_iso.' - ' : '').$outputlangs->trans("Currency".$code_iso); |
|
755 | 755 | } |
756 | 756 | |
757 | 757 | // If no translation, we read table to get label by default |
758 | - $sql = "SELECT label FROM " . MAIN_DB_PREFIX . "c_currencies"; |
|
759 | - $sql .= " WHERE code_iso='" . $db->escape($code_iso) . "'"; |
|
758 | + $sql = "SELECT label FROM ".MAIN_DB_PREFIX."c_currencies"; |
|
759 | + $sql .= " WHERE code_iso='".$db->escape($code_iso)."'"; |
|
760 | 760 | |
761 | 761 | $resql = $db->query($sql); |
762 | 762 | if ($resql) { |
@@ -792,12 +792,12 @@ discard block |
||
792 | 792 | return ''; |
793 | 793 | } |
794 | 794 | |
795 | - if (!empty($conf->cache["legalform_" . $langs->defaultlang . '_' . $code])) { |
|
796 | - return $conf->cache["legalform_" . $langs->defaultlang . '_' . $code]; |
|
795 | + if (!empty($conf->cache["legalform_".$langs->defaultlang.'_'.$code])) { |
|
796 | + return $conf->cache["legalform_".$langs->defaultlang.'_'.$code]; |
|
797 | 797 | } |
798 | 798 | |
799 | - $sql = "SELECT libelle as label FROM " . MAIN_DB_PREFIX . "c_forme_juridique"; |
|
800 | - $sql .= " WHERE code = '" . $db->escape($code) . "'"; |
|
799 | + $sql = "SELECT libelle as label FROM ".MAIN_DB_PREFIX."c_forme_juridique"; |
|
800 | + $sql .= " WHERE code = '".$db->escape($code)."'"; |
|
801 | 801 | |
802 | 802 | dol_syslog("Company.lib::getFormeJuridiqueLabel", LOG_DEBUG); |
803 | 803 | |
@@ -809,14 +809,14 @@ discard block |
||
809 | 809 | |
810 | 810 | $label = ($obj->label != '-' ? $obj->label : ''); |
811 | 811 | |
812 | - $conf->cache["legalform_" . $langs->defaultlang . '_' . $code] = $label; |
|
812 | + $conf->cache["legalform_".$langs->defaultlang.'_'.$code] = $label; |
|
813 | 813 | |
814 | 814 | return $langs->trans($label); |
815 | 815 | } else { |
816 | 816 | return $langs->trans("NotDefined"); |
817 | 817 | } |
818 | 818 | } else { |
819 | - return 'Error ' . $db->lasterror(); |
|
819 | + return 'Error '.$db->lasterror(); |
|
820 | 820 | } |
821 | 821 | } |
822 | 822 | |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | // Use of cache to reduce number of database requests |
839 | 839 | $country_code_in_EEC = $conf->cache['country_code_in_EEC']; |
840 | 840 | } else { |
841 | - $sql = "SELECT cc.code FROM " . MAIN_DB_PREFIX . "c_country as cc"; |
|
841 | + $sql = "SELECT cc.code FROM ".MAIN_DB_PREFIX."c_country as cc"; |
|
842 | 842 | $sql .= " WHERE cc.eec = 1"; |
843 | 843 | |
844 | 844 | $resql = $db->query($sql); |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | return false; |
871 | 871 | } |
872 | 872 | |
873 | - $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
873 | + $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
874 | 874 | |
875 | 875 | //print "dd".$object->country_code; |
876 | 876 | return in_array($object->country_code, $country_code_in_EEC); |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | // Use of cache to reduce number of database requests |
894 | 894 | $country_code_in_SEPA = $conf->cache['country_code_in_SEPA']; |
895 | 895 | } else { |
896 | - $sql = "SELECT cc.code FROM " . MAIN_DB_PREFIX . "c_country as cc"; |
|
896 | + $sql = "SELECT cc.code FROM ".MAIN_DB_PREFIX."c_country as cc"; |
|
897 | 897 | $sql .= " WHERE cc.sepa = 1"; |
898 | 898 | |
899 | 899 | $resql = $db->query($sql); |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | return false; |
926 | 926 | } |
927 | 927 | |
928 | - $country_code_in_SEPA = getCountriesInSEPA(); // This make a database call but there is a cache done into $conf->cache['country_code_in_SEPA'] |
|
928 | + $country_code_in_SEPA = getCountriesInSEPA(); // This make a database call but there is a cache done into $conf->cache['country_code_in_SEPA'] |
|
929 | 929 | |
930 | 930 | //print "dd".$object->country_code; |
931 | 931 | return in_array($object->country_code, $country_code_in_SEPA); |
@@ -955,21 +955,21 @@ discard block |
||
955 | 955 | |
956 | 956 | $newcardbutton = ''; |
957 | 957 | if (isModEnabled('project') && $user->hasRight('projet', 'creer') && empty($nocreatelink)) { |
958 | - $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT . '/projet/card.php?socid=' . $object->id . '&action=create&backtopage=' . urlencode($backtopage)); |
|
958 | + $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); |
|
959 | 959 | } |
960 | 960 | |
961 | 961 | print "\n"; |
962 | - print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"), $newcardbutton . $morehtmlright, ''); |
|
962 | + print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"), $newcardbutton.$morehtmlright, ''); |
|
963 | 963 | |
964 | - print '<div class="div-table-responsive">' . "\n"; |
|
964 | + print '<div class="div-table-responsive">'."\n"; |
|
965 | 965 | print '<table class="noborder centpercent">'; |
966 | 966 | |
967 | 967 | $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_modification, p.budget_amount"; |
968 | 968 | $sql .= ", cls.code as opp_status_code"; |
969 | - $sql .= " FROM " . MAIN_DB_PREFIX . "projet as p"; |
|
970 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_lead_status as cls on p.fk_opp_status = cls.rowid"; |
|
971 | - $sql .= " WHERE p.fk_soc = " . ((int) $object->id); |
|
972 | - $sql .= " AND p.entity IN (" . getEntity('project') . ")"; |
|
969 | + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; |
|
970 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; |
|
971 | + $sql .= " WHERE p.fk_soc = ".((int) $object->id); |
|
972 | + $sql .= " AND p.entity IN (".getEntity('project').")"; |
|
973 | 973 | $sql .= " ORDER BY p.dateo DESC"; |
974 | 974 | |
975 | 975 | $result = $db->query($sql); |
@@ -983,14 +983,14 @@ discard block |
||
983 | 983 | print $selectedfields; |
984 | 984 | print '</td>'; |
985 | 985 | } |
986 | - print '<td>' . $langs->trans("Ref") . '</td>'; |
|
987 | - print '<td>' . $langs->trans("Name") . '</td>'; |
|
988 | - print '<td class="center">' . $langs->trans("DateStart") . '</td>'; |
|
989 | - print '<td class="center">' . $langs->trans("DateEnd") . '</td>'; |
|
990 | - print '<td class="right">' . $langs->trans("OpportunityAmountShort") . '</td>'; |
|
991 | - print '<td class="center">' . $langs->trans("OpportunityStatusShort") . '</td>'; |
|
992 | - print '<td class="right">' . $langs->trans("OpportunityProbabilityShort") . '</td>'; |
|
993 | - print '<td class="right">' . $langs->trans("Status") . '</td>'; |
|
986 | + print '<td>'.$langs->trans("Ref").'</td>'; |
|
987 | + print '<td>'.$langs->trans("Name").'</td>'; |
|
988 | + print '<td class="center">'.$langs->trans("DateStart").'</td>'; |
|
989 | + print '<td class="center">'.$langs->trans("DateEnd").'</td>'; |
|
990 | + print '<td class="right">'.$langs->trans("OpportunityAmountShort").'</td>'; |
|
991 | + print '<td class="center">'.$langs->trans("OpportunityStatusShort").'</td>'; |
|
992 | + print '<td class="right">'.$langs->trans("OpportunityProbabilityShort").'</td>'; |
|
993 | + print '<td class="right">'.$langs->trans("Status").'</td>'; |
|
994 | 994 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
995 | 995 | print '<td class="center">'; |
996 | 996 | $selectedfields = (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
@@ -1000,7 +1000,7 @@ discard block |
||
1000 | 1000 | print '</tr>'; |
1001 | 1001 | |
1002 | 1002 | if ($num > 0) { |
1003 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
1003 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
1004 | 1004 | |
1005 | 1005 | $projecttmp = new Project($db); |
1006 | 1006 | |
@@ -1023,41 +1023,41 @@ discard block |
||
1023 | 1023 | if (in_array($obj->id, $arrayofselected)) { |
1024 | 1024 | $selected = 1; |
1025 | 1025 | } |
1026 | - print '<input id="cb' . $obj->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $obj->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
1026 | + print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
1027 | 1027 | } |
1028 | 1028 | print '</td>'; |
1029 | 1029 | } |
1030 | 1030 | // Ref |
1031 | 1031 | print '<td class="nowraponall">'; |
1032 | - print $projecttmp->getNomUrl(1, '', 0, '', '-', 0, 1, '', 'project:' . $_SERVER["PHP_SELF"] . '?socid=__SOCID__'); |
|
1032 | + print $projecttmp->getNomUrl(1, '', 0, '', '-', 0, 1, '', 'project:'.$_SERVER["PHP_SELF"].'?socid=__SOCID__'); |
|
1033 | 1033 | print '</td>'; |
1034 | 1034 | |
1035 | 1035 | // Label |
1036 | - print '<td class="tdoverflowmax200" title="' . dol_escape_htmltag($obj->title) . '">' . dol_escape_htmltag($obj->title) . '</td>'; |
|
1036 | + print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->title).'">'.dol_escape_htmltag($obj->title).'</td>'; |
|
1037 | 1037 | // Date start |
1038 | - print '<td class="center">' . dol_print_date($db->jdate($obj->do), "day") . '</td>'; |
|
1038 | + print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>'; |
|
1039 | 1039 | // Date end |
1040 | - print '<td class="center">' . dol_print_date($db->jdate($obj->de), "day") . '</td>'; |
|
1040 | + print '<td class="center">'.dol_print_date($db->jdate($obj->de), "day").'</td>'; |
|
1041 | 1041 | // Opp amount |
1042 | 1042 | print '<td class="right">'; |
1043 | 1043 | if ($obj->opp_status_code) { |
1044 | - print '<span class="amount">' . price($obj->opp_amount, 1, '', 1, -1, -1, '') . '</span>'; |
|
1044 | + print '<span class="amount">'.price($obj->opp_amount, 1, '', 1, -1, -1, '').'</span>'; |
|
1045 | 1045 | } |
1046 | 1046 | print '</td>'; |
1047 | 1047 | // Opp status |
1048 | 1048 | print '<td class="center">'; |
1049 | 1049 | if ($obj->opp_status_code) { |
1050 | - print $langs->trans("OppStatus" . $obj->opp_status_code); |
|
1050 | + print $langs->trans("OppStatus".$obj->opp_status_code); |
|
1051 | 1051 | } |
1052 | 1052 | print '</td>'; |
1053 | 1053 | // Opp percent |
1054 | 1054 | print '<td class="right">'; |
1055 | 1055 | if ($obj->opp_percent) { |
1056 | - print price($obj->opp_percent, 1, '', 1, 0) . '%'; |
|
1056 | + print price($obj->opp_percent, 1, '', 1, 0).'%'; |
|
1057 | 1057 | } |
1058 | 1058 | print '</td>'; |
1059 | 1059 | // Status |
1060 | - print '<td class="right">' . $projecttmp->getLibStatut(5) . '</td>'; |
|
1060 | + print '<td class="right">'.$projecttmp->getLibStatut(5).'</td>'; |
|
1061 | 1061 | |
1062 | 1062 | // Action column |
1063 | 1063 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -1067,7 +1067,7 @@ discard block |
||
1067 | 1067 | if (in_array($obj->id, $arrayofselected)) { |
1068 | 1068 | $selected = 1; |
1069 | 1069 | } |
1070 | - print '<input id="cb' . $obj->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $obj->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
1070 | + print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
1071 | 1071 | } |
1072 | 1072 | print '</td>'; |
1073 | 1073 | } |
@@ -1076,7 +1076,7 @@ discard block |
||
1076 | 1076 | $i++; |
1077 | 1077 | } |
1078 | 1078 | } else { |
1079 | - print '<tr class="oddeven"><td colspan="9"><span class="opacitymedium">' . $langs->trans("None") . '</span></td></tr>'; |
|
1079 | + print '<tr class="oddeven"><td colspan="9"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>'; |
|
1080 | 1080 | } |
1081 | 1081 | $db->free($result); |
1082 | 1082 | } else { |
@@ -1089,18 +1089,18 @@ discard block |
||
1089 | 1089 | print load_fiche_titre($langs->trans("ProjectsLinkedToThisThirdParty"), '', ''); |
1090 | 1090 | |
1091 | 1091 | |
1092 | - print '<div class="div-table-responsive">' . "\n"; |
|
1092 | + print '<div class="div-table-responsive">'."\n"; |
|
1093 | 1093 | print '<table class="noborder centpercent">'; |
1094 | 1094 | |
1095 | 1095 | $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount"; |
1096 | 1096 | $sql .= ", cls.code as opp_status_code"; |
1097 | - $sql .= " FROM " . MAIN_DB_PREFIX . "projet as p"; |
|
1098 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_lead_status as cls on p.fk_opp_status = cls.rowid"; |
|
1099 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "element_contact as ec on p.rowid = ec.element_id"; |
|
1100 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "socpeople as sc on ec.fk_socpeople = sc.rowid"; |
|
1101 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_contact as tc on ec.fk_c_type_contact = tc.rowid"; |
|
1102 | - $sql .= " WHERE sc.fk_soc = " . ((int) $object->id); |
|
1103 | - $sql .= " AND p.entity IN (" . getEntity('project') . ")"; |
|
1097 | + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; |
|
1098 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; |
|
1099 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec on p.rowid = ec.element_id"; |
|
1100 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sc on ec.fk_socpeople = sc.rowid"; |
|
1101 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc on ec.fk_c_type_contact = tc.rowid"; |
|
1102 | + $sql .= " WHERE sc.fk_soc = ".((int) $object->id); |
|
1103 | + $sql .= " AND p.entity IN (".getEntity('project').")"; |
|
1104 | 1104 | $sql .= " AND tc.element = 'project' AND tc.source = 'external'"; |
1105 | 1105 | $sql .= " ORDER BY p.dateo DESC"; |
1106 | 1106 | |
@@ -1109,18 +1109,18 @@ discard block |
||
1109 | 1109 | $num = $db->num_rows($result); |
1110 | 1110 | |
1111 | 1111 | print '<tr class="liste_titre">'; |
1112 | - print '<td>' . $langs->trans("Ref") . '</td>'; |
|
1113 | - print '<td>' . $langs->trans("Name") . '</td>'; |
|
1114 | - print '<td class="center">' . $langs->trans("DateStart") . '</td>'; |
|
1115 | - print '<td class="center">' . $langs->trans("DateEnd") . '</td>'; |
|
1116 | - print '<td class="right">' . $langs->trans("OpportunityAmountShort") . '</td>'; |
|
1117 | - print '<td class="center">' . $langs->trans("OpportunityStatusShort") . '</td>'; |
|
1118 | - print '<td class="right">' . $langs->trans("OpportunityProbabilityShort") . '</td>'; |
|
1119 | - print '<td class="right">' . $langs->trans("Status") . '</td>'; |
|
1112 | + print '<td>'.$langs->trans("Ref").'</td>'; |
|
1113 | + print '<td>'.$langs->trans("Name").'</td>'; |
|
1114 | + print '<td class="center">'.$langs->trans("DateStart").'</td>'; |
|
1115 | + print '<td class="center">'.$langs->trans("DateEnd").'</td>'; |
|
1116 | + print '<td class="right">'.$langs->trans("OpportunityAmountShort").'</td>'; |
|
1117 | + print '<td class="center">'.$langs->trans("OpportunityStatusShort").'</td>'; |
|
1118 | + print '<td class="right">'.$langs->trans("OpportunityProbabilityShort").'</td>'; |
|
1119 | + print '<td class="right">'.$langs->trans("Status").'</td>'; |
|
1120 | 1120 | print '</tr>'; |
1121 | 1121 | |
1122 | 1122 | if ($num > 0) { |
1123 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
1123 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
1124 | 1124 | |
1125 | 1125 | $projecttmp = new Project($db); |
1126 | 1126 | |
@@ -1138,42 +1138,42 @@ discard block |
||
1138 | 1138 | |
1139 | 1139 | // Ref |
1140 | 1140 | print '<td class="nowraponall">'; |
1141 | - print $projecttmp->getNomUrl(1, '', 0, '', '-', 0, 1, '', 'project:' . $_SERVER["PHP_SELF"] . '?socid=__SOCID__'); |
|
1141 | + print $projecttmp->getNomUrl(1, '', 0, '', '-', 0, 1, '', 'project:'.$_SERVER["PHP_SELF"].'?socid=__SOCID__'); |
|
1142 | 1142 | print '</td>'; |
1143 | 1143 | |
1144 | 1144 | // Label |
1145 | - print '<td class="tdoverflowmax200" title="' . dol_escape_htmltag($obj->title) . '">' . dol_escape_htmltag($obj->title) . '</td>'; |
|
1145 | + print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->title).'">'.dol_escape_htmltag($obj->title).'</td>'; |
|
1146 | 1146 | // Date start |
1147 | - print '<td class="center">' . dol_print_date($db->jdate($obj->do), "day") . '</td>'; |
|
1147 | + print '<td class="center">'.dol_print_date($db->jdate($obj->do), "day").'</td>'; |
|
1148 | 1148 | // Date end |
1149 | - print '<td class="center">' . dol_print_date($db->jdate($obj->de), "day") . '</td>'; |
|
1149 | + print '<td class="center">'.dol_print_date($db->jdate($obj->de), "day").'</td>'; |
|
1150 | 1150 | // Opp amount |
1151 | 1151 | print '<td class="right">'; |
1152 | 1152 | if ($obj->opp_status_code) { |
1153 | - print '<span class="amount">' . price($obj->opp_amount, 1, '', 1, -1, -1, '') . '</span>'; |
|
1153 | + print '<span class="amount">'.price($obj->opp_amount, 1, '', 1, -1, -1, '').'</span>'; |
|
1154 | 1154 | } |
1155 | 1155 | print '</td>'; |
1156 | 1156 | // Opp status |
1157 | 1157 | print '<td class="center">'; |
1158 | 1158 | if ($obj->opp_status_code) { |
1159 | - print $langs->trans("OppStatus" . $obj->opp_status_code); |
|
1159 | + print $langs->trans("OppStatus".$obj->opp_status_code); |
|
1160 | 1160 | } |
1161 | 1161 | print '</td>'; |
1162 | 1162 | // Opp percent |
1163 | 1163 | print '<td class="right">'; |
1164 | 1164 | if ($obj->opp_percent) { |
1165 | - print price($obj->opp_percent, 1, '', 1, 0) . '%'; |
|
1165 | + print price($obj->opp_percent, 1, '', 1, 0).'%'; |
|
1166 | 1166 | } |
1167 | 1167 | print '</td>'; |
1168 | 1168 | // Status |
1169 | - print '<td class="right">' . $projecttmp->getLibStatut(5) . '</td>'; |
|
1169 | + print '<td class="right">'.$projecttmp->getLibStatut(5).'</td>'; |
|
1170 | 1170 | |
1171 | 1171 | print '</tr>'; |
1172 | 1172 | } |
1173 | 1173 | $i++; |
1174 | 1174 | } |
1175 | 1175 | } else { |
1176 | - print '<tr class="oddeven"><td colspan="8"><span class="opacitymedium">' . $langs->trans("None") . '</span></td></tr>'; |
|
1176 | + print '<tr class="oddeven"><td colspan="8"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>'; |
|
1177 | 1177 | } |
1178 | 1178 | $db->free($result); |
1179 | 1179 | } else { |
@@ -1211,7 +1211,7 @@ discard block |
||
1211 | 1211 | global $user, $conf, $extrafields, $hookmanager; |
1212 | 1212 | global $contextpage; |
1213 | 1213 | |
1214 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
1214 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
1215 | 1215 | $formcompany = new FormCompany($db); |
1216 | 1216 | $form = new Form($db); |
1217 | 1217 | |
@@ -1296,7 +1296,7 @@ discard block |
||
1296 | 1296 | 't.rowid' => array('label' => "TechnicalID", 'checked' => (getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') ? '1' : '0'), 'enabled' => (getDolGlobalString('MAIN_SHOW_TECHNICAL_ID') ? '1' : '0'), 'position' => 1), |
1297 | 1297 | 't.name' => array('label' => "Name", 'checked' => '1', 'position' => 10), |
1298 | 1298 | 't.poste' => array('label' => "PostOrFunction", 'checked' => '1', 'position' => 20), |
1299 | - 't.address' => array('label' => (empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address") . ' / ' . $langs->trans("Phone") . ' / ' . $langs->trans("Email") : $langs->trans("Address")), 'checked' => '1', 'position' => 30), |
|
1299 | + 't.address' => array('label' => (empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked' => '1', 'position' => 30), |
|
1300 | 1300 | 't.note_private' => array('label' => 'NotePrivate', 'checked' => '0', 'position' => 35), |
1301 | 1301 | 'sc.role' => array('label' => "ContactByDefaultFor", 'checked' => '1', 'position' => 40), |
1302 | 1302 | 't.birthday' => array('label' => "Birthday", 'checked' => '0', 'position' => 45), |
@@ -1307,12 +1307,12 @@ discard block |
||
1307 | 1307 | $extrafieldsobjectkey = $contactstatic->table_element; |
1308 | 1308 | $extrafieldsobjectprefix = 'ef.'; |
1309 | 1309 | $extrafieldspositionoffset = 1000; |
1310 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
1310 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
1311 | 1311 | |
1312 | 1312 | // Initialize array of search criteria |
1313 | 1313 | $search = array(); |
1314 | 1314 | foreach ($arrayfields as $key => $val) { |
1315 | - $queryName = 'search_' . substr($key, 2); |
|
1315 | + $queryName = 'search_'.substr($key, 2); |
|
1316 | 1316 | if (GETPOST($queryName, 'alpha')) { |
1317 | 1317 | $search[substr($key, 2)] = GETPOST($queryName, 'alpha'); |
1318 | 1318 | } |
@@ -1347,7 +1347,7 @@ discard block |
||
1347 | 1347 | if (empty($reshook)) { |
1348 | 1348 | if ($user->hasRight('societe', 'contact', 'creer')) { |
1349 | 1349 | $addcontact = (getDolGlobalString('SOCIETE_ADDRESSES_MANAGEMENT') ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); |
1350 | - $newcardbutton .= dolGetButtonTitle($addcontact, '', 'fa fa-plus-circle', DOL_URL_ROOT . '/contact/card.php?socid=' . $object->id . '&action=create&backtopage=' . urlencode($backtopage)); |
|
1350 | + $newcardbutton .= dolGetButtonTitle($addcontact, '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); |
|
1351 | 1351 | } |
1352 | 1352 | } else { |
1353 | 1353 | $newcardbutton = $hookmanager->resPrint; |
@@ -1358,75 +1358,75 @@ discard block |
||
1358 | 1358 | $title = (getDolGlobalString('SOCIETE_ADDRESSES_MANAGEMENT') ? $langs->trans("ContactsForCompany") : $langs->trans("ContactsAddressesForCompany")); |
1359 | 1359 | print load_fiche_titre($title, $newcardbutton, 'contact'); |
1360 | 1360 | |
1361 | - print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '" name="formfilter">'; |
|
1362 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
1361 | + print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">'; |
|
1362 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
1363 | 1363 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
1364 | - print '<input type="hidden" name="socid" value="' . $object->id . '">'; |
|
1365 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
1366 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
1367 | - print '<input type="hidden" name="page" value="' . $page . '">'; |
|
1364 | + print '<input type="hidden" name="socid" value="'.$object->id.'">'; |
|
1365 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
1366 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
1367 | + print '<input type="hidden" name="page" value="'.$page.'">'; |
|
1368 | 1368 | |
1369 | 1369 | $arrayofmassactions = array(); |
1370 | 1370 | $mode = 'view'; |
1371 | 1371 | |
1372 | 1372 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1373 | - $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1373 | + $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1374 | 1374 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1375 | 1375 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1376 | 1376 | |
1377 | 1377 | print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table |
1378 | - print "\n" . '<table class="tagtable liste noborder">' . "\n"; |
|
1378 | + print "\n".'<table class="tagtable liste noborder">'."\n"; |
|
1379 | 1379 | |
1380 | - $param = "socid=" . urlencode((string) ($object->id)); |
|
1380 | + $param = "socid=".urlencode((string) ($object->id)); |
|
1381 | 1381 | if ($search_rowid != '') { |
1382 | - $param .= '&search_rowid=' . urlencode((string) ($search_rowid)); |
|
1382 | + $param .= '&search_rowid='.urlencode((string) ($search_rowid)); |
|
1383 | 1383 | } |
1384 | 1384 | if ($search_status != '') { |
1385 | - $param .= '&search_status=' . urlencode((string) ($search_status)); |
|
1385 | + $param .= '&search_status='.urlencode((string) ($search_status)); |
|
1386 | 1386 | } |
1387 | 1387 | if (count($search_roles) > 0) { |
1388 | 1388 | $param .= implode('&search_roles[]=', $search_roles); |
1389 | 1389 | } |
1390 | 1390 | if ($search_name != '') { |
1391 | - $param .= '&search_name=' . urlencode($search_name); |
|
1391 | + $param .= '&search_name='.urlencode($search_name); |
|
1392 | 1392 | } |
1393 | 1393 | if ($search_poste != '') { |
1394 | - $param .= '&search_poste=' . urlencode($search_poste); |
|
1394 | + $param .= '&search_poste='.urlencode($search_poste); |
|
1395 | 1395 | } |
1396 | 1396 | if ($search_address != '') { |
1397 | - $param .= '&search_address=' . urlencode($search_address); |
|
1397 | + $param .= '&search_address='.urlencode($search_address); |
|
1398 | 1398 | } |
1399 | 1399 | if ($search_note_private != '') { |
1400 | - $param .= '&search_note_private=' . urlencode($search_note_private); |
|
1400 | + $param .= '&search_note_private='.urlencode($search_note_private); |
|
1401 | 1401 | } |
1402 | 1402 | if ($search_birthday_dtstart != '') { |
1403 | - $param .= '&search_birthday_dtstart=' . urlencode((string) $search_birthday_dtstart); |
|
1403 | + $param .= '&search_birthday_dtstart='.urlencode((string) $search_birthday_dtstart); |
|
1404 | 1404 | } |
1405 | 1405 | if ($search_birthday_dtend != '') { |
1406 | - $param .= '&search_birthday_dtend=' . urlencode((string) $search_birthday_dtend); |
|
1406 | + $param .= '&search_birthday_dtend='.urlencode((string) $search_birthday_dtend); |
|
1407 | 1407 | } |
1408 | 1408 | if ($optioncss != '') { |
1409 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
1409 | + $param .= '&optioncss='.urlencode($optioncss); |
|
1410 | 1410 | } |
1411 | 1411 | |
1412 | 1412 | // Add $param from extra fields |
1413 | 1413 | $extrafieldsobjectkey = $contactstatic->table_element; |
1414 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_param.tpl.php'; |
|
1414 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
|
1415 | 1415 | |
1416 | 1416 | $sql = "SELECT t.rowid, t.entity, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste,"; |
1417 | 1417 | $sql .= " t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo, t.fk_soc,"; |
1418 | 1418 | $sql .= " t.civility as civility_id, t.address, t.zip, t.town, t.birthday,"; |
1419 | 1419 | $sql .= " t.note_private"; |
1420 | - $sql .= " FROM " . MAIN_DB_PREFIX . "socpeople as t"; |
|
1421 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "socpeople_extrafields as ef on (t.rowid = ef.fk_object)"; |
|
1422 | - $sql .= " WHERE t.fk_soc = " . ((int) $object->id); |
|
1423 | - $sql .= " AND t.entity IN (" . getEntity('socpeople') . ")"; |
|
1424 | - $sql .= " AND ((t.fk_user_creat = " . ((int) $user->id) . " AND t.priv = 1) OR t.priv = 0)"; |
|
1420 | + $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; |
|
1421 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)"; |
|
1422 | + $sql .= " WHERE t.fk_soc = ".((int) $object->id); |
|
1423 | + $sql .= " AND t.entity IN (".getEntity('socpeople').")"; |
|
1424 | + $sql .= " AND ((t.fk_user_creat = ".((int) $user->id)." AND t.priv = 1) OR t.priv = 0)"; |
|
1425 | 1425 | if ($search_rowid) { |
1426 | 1426 | $sql .= natural_search('t.rowid', $search_rowid); |
1427 | 1427 | } |
1428 | 1428 | if ($search_status != '' && $search_status != '-1') { |
1429 | - $sql .= " AND t.statut = " . ((int) $search_status); |
|
1429 | + $sql .= " AND t.statut = ".((int) $search_status); |
|
1430 | 1430 | } |
1431 | 1431 | if ($search_name) { |
1432 | 1432 | $sql .= natural_search(array('t.lastname', 't.firstname'), $search_name); |
@@ -1441,17 +1441,17 @@ discard block |
||
1441 | 1441 | $sql .= natural_search('t.note_private', $search_note_private); |
1442 | 1442 | } |
1443 | 1443 | if ($search_birthday_dtstart != '') { |
1444 | - $sql .= " AND t.birthday >= '" . $db->idate($search_birthday_dtstart) . "'"; |
|
1444 | + $sql .= " AND t.birthday >= '".$db->idate($search_birthday_dtstart)."'"; |
|
1445 | 1445 | } |
1446 | 1446 | if ($search_birthday_dtend != '') { |
1447 | - $sql .= " AND t.birthday <= '" . $db->idate($search_birthday_dtend) . "'"; |
|
1447 | + $sql .= " AND t.birthday <= '".$db->idate($search_birthday_dtend)."'"; |
|
1448 | 1448 | } |
1449 | 1449 | if (count($search_roles) > 0) { |
1450 | - $sql .= " AND t.rowid IN (SELECT sc.fk_socpeople FROM " . MAIN_DB_PREFIX . "societe_contacts as sc WHERE sc.fk_c_type_contact IN (" . $db->sanitize(implode(',', $search_roles)) . "))"; |
|
1450 | + $sql .= " AND t.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".$db->sanitize(implode(',', $search_roles))."))"; |
|
1451 | 1451 | } |
1452 | 1452 | // Add where from extra fields |
1453 | 1453 | $extrafieldsobjectkey = $contactstatic->table_element; |
1454 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_sql.tpl.php'; |
|
1454 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; |
|
1455 | 1455 | // Add where from hooks |
1456 | 1456 | $parameters = array('socid' => $object->id); |
1457 | 1457 | $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -1482,16 +1482,16 @@ discard block |
||
1482 | 1482 | foreach ($contactstatic->fields as $key => $val) { |
1483 | 1483 | $align = ''; |
1484 | 1484 | if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
1485 | - $align .= ($align ? ' ' : '') . 'center'; |
|
1485 | + $align .= ($align ? ' ' : '').'center'; |
|
1486 | 1486 | } |
1487 | 1487 | if (in_array($val['type'], array('timestamp'))) { |
1488 | - $align .= ($align ? ' ' : '') . 'nowrap'; |
|
1488 | + $align .= ($align ? ' ' : '').'nowrap'; |
|
1489 | 1489 | } |
1490 | 1490 | if ($key == 'status' || $key == 'statut') { |
1491 | - $align .= ($align ? ' ' : '') . 'center'; |
|
1491 | + $align .= ($align ? ' ' : '').'center'; |
|
1492 | 1492 | } |
1493 | - if (!empty($arrayfields['t.' . $key]['checked']) || !empty($arrayfields['sc.' . $key]['checked'])) { |
|
1494 | - print '<td class="liste_titre' . ($align ? ' ' . $align : '') . '">'; |
|
1493 | + if (!empty($arrayfields['t.'.$key]['checked']) || !empty($arrayfields['sc.'.$key]['checked'])) { |
|
1494 | + print '<td class="liste_titre'.($align ? ' '.$align : '').'">'; |
|
1495 | 1495 | if (in_array($key, array('statut'))) { |
1496 | 1496 | print $form->selectarray('search_status', array('-1' => '', '0' => $contactstatic->LibStatut(0, 1), '1' => $contactstatic->LibStatut(1, 1)), $search_status, 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage'); |
1497 | 1497 | } elseif (in_array($key, array('role'))) { |
@@ -1504,7 +1504,7 @@ discard block |
||
1504 | 1504 | print $form->selectDate($search_birthday_dtend ? $search_birthday_dtend : '', "search_birthday_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); |
1505 | 1505 | print '</div>'; |
1506 | 1506 | } else { |
1507 | - print '<input type="text" class="flat maxwidth75" name="search_' . $key . '" value="' . (!empty($search[$key]) ? dol_escape_htmltag($search[$key]) : '') . '">'; |
|
1507 | + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.(!empty($search[$key]) ? dol_escape_htmltag($search[$key]) : '').'">'; |
|
1508 | 1508 | } |
1509 | 1509 | print '</td>'; |
1510 | 1510 | } |
@@ -1514,7 +1514,7 @@ discard block |
||
1514 | 1514 | } |
1515 | 1515 | // Extra fields |
1516 | 1516 | $extrafieldsobjectkey = $contactstatic->table_element; |
1517 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_input.tpl.php'; |
|
1517 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; |
|
1518 | 1518 | |
1519 | 1519 | // Fields from hook |
1520 | 1520 | $parameters = array('arrayfields' => $arrayfields); |
@@ -1526,7 +1526,7 @@ discard block |
||
1526 | 1526 | print $form->showFilterButtons(); |
1527 | 1527 | print '</td>'; |
1528 | 1528 | } |
1529 | - print '</tr>' . "\n"; |
|
1529 | + print '</tr>'."\n"; |
|
1530 | 1530 | |
1531 | 1531 | |
1532 | 1532 | // Fields title label |
@@ -1534,44 +1534,44 @@ discard block |
||
1534 | 1534 | print '<tr class="liste_titre">'; |
1535 | 1535 | // Action column |
1536 | 1536 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
1537 | - print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ') . "\n"; |
|
1537 | + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ')."\n"; |
|
1538 | 1538 | } |
1539 | 1539 | foreach ($contactstatic->fields as $key => $val) { |
1540 | 1540 | $align = ''; |
1541 | 1541 | if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
1542 | - $align .= ($align ? ' ' : '') . 'center'; |
|
1542 | + $align .= ($align ? ' ' : '').'center'; |
|
1543 | 1543 | } |
1544 | 1544 | if (in_array($val['type'], array('timestamp'))) { |
1545 | - $align .= ($align ? ' ' : '') . 'nowrap'; |
|
1545 | + $align .= ($align ? ' ' : '').'nowrap'; |
|
1546 | 1546 | } |
1547 | 1547 | if ($key == 'status' || $key == 'statut') { |
1548 | - $align .= ($align ? ' ' : '') . 'center'; |
|
1548 | + $align .= ($align ? ' ' : '').'center'; |
|
1549 | 1549 | } |
1550 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
1551 | - print getTitleFieldOfList($val['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($align ? 'class="' . $align . '"' : ''), $sortfield, $sortorder, $align . ' ') . "\n"; |
|
1550 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
1551 | + print getTitleFieldOfList($val['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; |
|
1552 | 1552 | } |
1553 | 1553 | if ($key == 'role') { |
1554 | - $align .= ($align ? ' ' : '') . 'left'; |
|
1554 | + $align .= ($align ? ' ' : '').'left'; |
|
1555 | 1555 | } |
1556 | - if (!empty($arrayfields['sc.' . $key]['checked'])) { |
|
1557 | - print getTitleFieldOfList($arrayfields['sc.' . $key]['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, ($align ? 'class="' . $align . '"' : ''), $sortfield, $sortorder, $align . ' ') . "\n"; |
|
1556 | + if (!empty($arrayfields['sc.'.$key]['checked'])) { |
|
1557 | + print getTitleFieldOfList($arrayfields['sc.'.$key]['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; |
|
1558 | 1558 | } |
1559 | 1559 | } |
1560 | 1560 | if ($showuserlogin) { |
1561 | - print '<th class="wrapcolumntitle liste_titre">' . $langs->trans("DolibarrLogin") . '</th>'; |
|
1561 | + print '<th class="wrapcolumntitle liste_titre">'.$langs->trans("DolibarrLogin").'</th>'; |
|
1562 | 1562 | } |
1563 | 1563 | // Extra fields |
1564 | 1564 | $extrafieldsobjectkey = $contactstatic->table_element; |
1565 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_title.tpl.php'; |
|
1565 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; |
|
1566 | 1566 | // Hook fields |
1567 | 1567 | $parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); |
1568 | 1568 | $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook |
1569 | 1569 | print $hookmanager->resPrint; |
1570 | 1570 | // Action column |
1571 | 1571 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
1572 | - print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ') . "\n"; |
|
1572 | + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ')."\n"; |
|
1573 | 1573 | } |
1574 | - print '</tr>' . "\n"; |
|
1574 | + print '</tr>'."\n"; |
|
1575 | 1575 | |
1576 | 1576 | $i = -1; |
1577 | 1577 | |
@@ -1627,21 +1627,21 @@ discard block |
||
1627 | 1627 | |
1628 | 1628 | // Add to agenda |
1629 | 1629 | if (isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create')) { |
1630 | - print '<a href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&actioncode=&contactid=' . $obj->rowid . '&socid=' . $object->id . '&backtopage=' . urlencode($backtopage) . '">'; |
|
1630 | + print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&actioncode=&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">'; |
|
1631 | 1631 | print img_object($langs->trans("Event"), "action"); |
1632 | 1632 | print '</a> '; |
1633 | 1633 | } |
1634 | 1634 | |
1635 | 1635 | // Edit |
1636 | 1636 | if ($user->hasRight('societe', 'contact', 'creer')) { |
1637 | - print '<a class="editfielda paddingleft" href="' . DOL_URL_ROOT . '/contact/card.php?action=edit&token=' . newToken() . '&id=' . $obj->rowid . '&backtopage=' . urlencode($backtopage) . '">'; |
|
1637 | + print '<a class="editfielda paddingleft" href="'.DOL_URL_ROOT.'/contact/card.php?action=edit&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($backtopage).'">'; |
|
1638 | 1638 | print img_edit(); |
1639 | 1639 | print '</a>'; |
1640 | 1640 | } |
1641 | 1641 | |
1642 | 1642 | // Delete |
1643 | 1643 | if ($user->hasRight('societe', 'contact', 'delete')) { |
1644 | - print '<a class="marginleftonly right" href="' . DOL_URL_ROOT . '/societe/contact.php?action=delete&token=' . newToken() . '&id=' . $obj->rowid . '&socid=' . $object->id . '&backtopage=' . urlencode($backtopage) . '">'; |
|
1644 | + print '<a class="marginleftonly right" href="'.DOL_URL_ROOT.'/societe/contact.php?action=delete&token='.newToken().'&id='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">'; |
|
1645 | 1645 | print img_delete(); |
1646 | 1646 | print '</a>'; |
1647 | 1647 | } |
@@ -1660,13 +1660,13 @@ discard block |
||
1660 | 1660 | if (!empty($arrayfields['t.name']['checked'])) { |
1661 | 1661 | print '<td class="tdoverflowmax150">'; |
1662 | 1662 | print $form->showphoto('contact', $contactstatic, 0, 0, 0, 'photorefnoborder valignmiddle marginrightonly', 'small', 1, 0, 'user'); |
1663 | - print $contactstatic->getNomUrl(0, '', 0, '&backtopage=' . urlencode($backtopage)); |
|
1663 | + print $contactstatic->getNomUrl(0, '', 0, '&backtopage='.urlencode($backtopage)); |
|
1664 | 1664 | print '</td>'; |
1665 | 1665 | } |
1666 | 1666 | |
1667 | 1667 | // Job position |
1668 | 1668 | if (!empty($arrayfields['t.poste']['checked'])) { |
1669 | - print '<td class="tdoverflowmax100" title="' . dol_escape_htmltag($obj->poste) . '">'; |
|
1669 | + print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->poste).'">'; |
|
1670 | 1670 | if ($obj->poste) { |
1671 | 1671 | print dol_escape_htmltag($obj->poste); |
1672 | 1672 | } |
@@ -1676,7 +1676,7 @@ discard block |
||
1676 | 1676 | // Address - Phone - Email |
1677 | 1677 | if (!empty($arrayfields['t.address']['checked'])) { |
1678 | 1678 | $addresstoshow = $contactstatic->getBannerAddress('contact', $object); |
1679 | - print '<td class="tdoverflowmax150" title="' . dolPrintHTMLForAttribute($addresstoshow) . '">'; |
|
1679 | + print '<td class="tdoverflowmax150" title="'.dolPrintHTMLForAttribute($addresstoshow).'">'; |
|
1680 | 1680 | print $addresstoshow; |
1681 | 1681 | print '</td>'; |
1682 | 1682 | } |
@@ -1704,7 +1704,7 @@ discard block |
||
1704 | 1704 | |
1705 | 1705 | // Status |
1706 | 1706 | if (!empty($arrayfields['t.statut']['checked'])) { |
1707 | - print '<td class="center">' . $contactstatic->getLibStatut(5) . '</td>'; |
|
1707 | + print '<td class="center">'.$contactstatic->getLibStatut(5).'</td>'; |
|
1708 | 1708 | } |
1709 | 1709 | |
1710 | 1710 | if ($showuserlogin) { |
@@ -1720,7 +1720,7 @@ discard block |
||
1720 | 1720 | |
1721 | 1721 | // Extra fields |
1722 | 1722 | $extrafieldsobjectkey = $contactstatic->table_element; |
1723 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_print_fields.tpl.php'; |
|
1723 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; |
|
1724 | 1724 | |
1725 | 1725 | // Actions |
1726 | 1726 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -1728,21 +1728,21 @@ discard block |
||
1728 | 1728 | |
1729 | 1729 | // Add to agenda |
1730 | 1730 | if (isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create')) { |
1731 | - print '<a href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&actioncode=&contactid=' . $obj->rowid . '&socid=' . $object->id . '&backtopage=' . urlencode($backtopage) . '">'; |
|
1731 | + print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&actioncode=&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">'; |
|
1732 | 1732 | print img_object($langs->trans("Event"), "action"); |
1733 | 1733 | print '</a> '; |
1734 | 1734 | } |
1735 | 1735 | |
1736 | 1736 | // Edit |
1737 | 1737 | if ($user->hasRight('societe', 'contact', 'creer')) { |
1738 | - print '<a class="editfielda paddingleft" href="' . DOL_URL_ROOT . '/contact/card.php?action=edit&token=' . newToken() . '&id=' . $obj->rowid . '&backtopage=' . urlencode($backtopage) . '">'; |
|
1738 | + print '<a class="editfielda paddingleft" href="'.DOL_URL_ROOT.'/contact/card.php?action=edit&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($backtopage).'">'; |
|
1739 | 1739 | print img_edit(); |
1740 | 1740 | print '</a>'; |
1741 | 1741 | } |
1742 | 1742 | |
1743 | 1743 | // Delete |
1744 | 1744 | if ($user->hasRight('societe', 'contact', 'delete')) { |
1745 | - print '<a class="marginleftonly right" href="' . DOL_URL_ROOT . '/societe/contact.php?action=delete&token=' . newToken() . '&id=' . $obj->rowid . '&socid=' . $object->id . '&backtopage=' . urlencode($backtopage) . '">'; |
|
1745 | + print '<a class="marginleftonly right" href="'.DOL_URL_ROOT.'/societe/contact.php?action=delete&token='.newToken().'&id='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">'; |
|
1746 | 1746 | print img_delete(); |
1747 | 1747 | print '</a>'; |
1748 | 1748 | } |
@@ -1761,7 +1761,7 @@ discard block |
||
1761 | 1761 | $colspan++; |
1762 | 1762 | } |
1763 | 1763 | } |
1764 | - print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
|
1764 | + print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; |
|
1765 | 1765 | } |
1766 | 1766 | } else { |
1767 | 1767 | $colspan = 1 + ($showuserlogin ? 1 : 0); |
@@ -1770,12 +1770,12 @@ discard block |
||
1770 | 1770 | $colspan++; |
1771 | 1771 | } |
1772 | 1772 | } |
1773 | - print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("None") . '</span></td></tr>'; |
|
1773 | + print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>'; |
|
1774 | 1774 | } |
1775 | 1775 | print "\n</table>\n"; |
1776 | 1776 | print '</div>'; |
1777 | 1777 | |
1778 | - print '</form>' . "\n"; |
|
1778 | + print '</form>'."\n"; |
|
1779 | 1779 | |
1780 | 1780 | return $i; |
1781 | 1781 | } |
@@ -1850,7 +1850,7 @@ discard block |
||
1850 | 1850 | $tms_start = ''; |
1851 | 1851 | $tms_end = ''; |
1852 | 1852 | } |
1853 | - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
1853 | + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
1854 | 1854 | |
1855 | 1855 | // Check parameters |
1856 | 1856 | if (!is_object($filterobj) && !is_object($objcon)) { |
@@ -1916,16 +1916,16 @@ discard block |
||
1916 | 1916 | |
1917 | 1917 | // Fields from hook |
1918 | 1918 | $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon); |
1919 | - $reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook |
|
1919 | + $reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook |
|
1920 | 1920 | if (!empty($hookmanager->resPrint)) { |
1921 | 1921 | $sql .= $hookmanager->resPrint; |
1922 | 1922 | } |
1923 | 1923 | |
1924 | - $sql .= " FROM " . MAIN_DB_PREFIX . "actioncomm as a"; |
|
1924 | + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; |
|
1925 | 1925 | // Link to the owner of action |
1926 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u on u.rowid = a.fk_user_action"; |
|
1926 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action"; |
|
1927 | 1927 | // Link to action types |
1928 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_actioncomm as c ON a.fk_action = c.id"; |
|
1928 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; |
|
1929 | 1929 | |
1930 | 1930 | // Set $force_filter_contact: |
1931 | 1931 | // - true for a filter on a user or a contact, so a link on table llx_actioncomm_resources or llx_actioncomm.fk_user_action |
@@ -1940,101 +1940,101 @@ discard block |
||
1940 | 1940 | |
1941 | 1941 | // Fields from hook |
1942 | 1942 | $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon); |
1943 | - $reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1943 | + $reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1944 | 1944 | if (!empty($hookmanager->resPrint)) { |
1945 | 1945 | $sql .= $hookmanager->resPrint; |
1946 | 1946 | } |
1947 | 1947 | if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) { |
1948 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "socpeople as sp ON a.fk_contact = sp.rowid"; |
|
1948 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; |
|
1949 | 1949 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { |
1950 | - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "element_resources as er"; |
|
1950 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er"; |
|
1951 | 1951 | $sql .= " ON er.resource_type = 'dolresource'"; |
1952 | 1952 | $sql .= " AND er.element_type = 'action'"; |
1953 | 1953 | $sql .= " AND er.element_id = a.id"; |
1954 | - $sql .= " AND er.resource_id = " . ((int) $filterobj->id); |
|
1954 | + $sql .= " AND er.resource_id = ".((int) $filterobj->id); |
|
1955 | 1955 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Project') { |
1956 | 1956 | /* Nothing */ |
1957 | 1957 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { |
1958 | - $sql .= ", " . MAIN_DB_PREFIX . "adherent as m"; |
|
1958 | + $sql .= ", ".MAIN_DB_PREFIX."adherent as m"; |
|
1959 | 1959 | } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { |
1960 | - $sql .= ", " . MAIN_DB_PREFIX . "commande_fournisseur as o"; |
|
1960 | + $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; |
|
1961 | 1961 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { |
1962 | - $sql .= ", " . MAIN_DB_PREFIX . "product as o"; |
|
1962 | + $sql .= ", ".MAIN_DB_PREFIX."product as o"; |
|
1963 | 1963 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { |
1964 | - $sql .= ", " . MAIN_DB_PREFIX . "ticket as o"; |
|
1964 | + $sql .= ", ".MAIN_DB_PREFIX."ticket as o"; |
|
1965 | 1965 | } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') { |
1966 | - $sql .= ", " . MAIN_DB_PREFIX . "bom_bom as o"; |
|
1966 | + $sql .= ", ".MAIN_DB_PREFIX."bom_bom as o"; |
|
1967 | 1967 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') { |
1968 | - $sql .= ", " . MAIN_DB_PREFIX . "contrat as o"; |
|
1968 | + $sql .= ", ".MAIN_DB_PREFIX."contrat as o"; |
|
1969 | 1969 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Expedition') { |
1970 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expedition as s ON a.fk_element = s.rowid AND a.elementtype = 'shipping'"; // Jointure sur la table des expéditions avec condition ON |
|
1970 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expedition as s ON a.fk_element = s.rowid AND a.elementtype = 'shipping'"; // Jointure sur la table des expéditions avec condition ON |
|
1971 | 1971 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Propal') { |
1972 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "propal as o ON a.fk_element = o.rowid AND a.elementtype = 'propal'"; |
|
1972 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."propal as o ON a.fk_element = o.rowid AND a.elementtype = 'propal'"; |
|
1973 | 1973 | } elseif ( |
1974 | 1974 | is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) |
1975 | 1975 | && ((!empty($filterobj->fields['ref']) && is_array($filterobj->fields['ref'])) || (!empty($filterobj->fields['label']) && is_array($filterobj->fields['label'])) || (!empty($filterobj->fields['titre']) && is_array($filterobj->fields['titre']))) // @phan-suppress-current-line PhanTypeInvalidDimOffset |
1976 | 1976 | && $filterobj->table_element && $filterobj->element |
1977 | 1977 | ) { |
1978 | - $sql .= ", " . MAIN_DB_PREFIX . $filterobj->table_element . " as o"; |
|
1978 | + $sql .= ", ".MAIN_DB_PREFIX.$filterobj->table_element." as o"; |
|
1979 | 1979 | } |
1980 | 1980 | |
1981 | - $sql .= " WHERE a.entity IN (" . getEntity('agenda') . ")"; |
|
1981 | + $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; |
|
1982 | 1982 | if (!$force_filter_contact) { |
1983 | 1983 | if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) { |
1984 | - $sql .= " AND a.fk_soc = " . ((int) $filterobj->id); |
|
1984 | + $sql .= " AND a.fk_soc = ".((int) $filterobj->id); |
|
1985 | 1985 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { |
1986 | 1986 | /* Nothing */ |
1987 | 1987 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) { |
1988 | - $sql .= " AND a.fk_project = " . ((int) $filterobj->id); |
|
1988 | + $sql .= " AND a.fk_project = ".((int) $filterobj->id); |
|
1989 | 1989 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { |
1990 | 1990 | $sql .= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; |
1991 | 1991 | if ($filterobj->id) { |
1992 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
1992 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
1993 | 1993 | } |
1994 | 1994 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Commande') { |
1995 | 1995 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order'"; |
1996 | 1996 | if ($filterobj->id) { |
1997 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
1997 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
1998 | 1998 | } |
1999 | 1999 | } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { |
2000 | 2000 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; |
2001 | 2001 | if ($filterobj->id) { |
2002 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2002 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2003 | 2003 | } |
2004 | 2004 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Facture') { |
2005 | 2005 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'invoice'"; |
2006 | 2006 | if ($filterobj->id) { |
2007 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2007 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2008 | 2008 | } |
2009 | 2009 | } elseif (is_object($filterobj) && get_class($filterobj) == 'FactureFournisseur') { |
2010 | 2010 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'invoice_supplier'"; |
2011 | 2011 | if ($filterobj->id) { |
2012 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2012 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2013 | 2013 | } |
2014 | 2014 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { |
2015 | 2015 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; |
2016 | 2016 | if ($filterobj->id) { |
2017 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2017 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2018 | 2018 | } |
2019 | 2019 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { |
2020 | 2020 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'"; |
2021 | 2021 | if ($filterobj->id) { |
2022 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2022 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2023 | 2023 | } |
2024 | 2024 | } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') { |
2025 | 2025 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'"; |
2026 | 2026 | if ($filterobj->id) { |
2027 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2027 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2028 | 2028 | } |
2029 | 2029 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') { |
2030 | 2030 | $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'"; |
2031 | 2031 | if ($filterobj->id) { |
2032 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2032 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2033 | 2033 | } |
2034 | 2034 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Expedition') { |
2035 | 2035 | $sql .= " AND a.fk_element = s.rowid AND a.elementtype = 'shipping'"; //expedition filter |
2036 | 2036 | if ($filterobj->id) { |
2037 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2037 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2038 | 2038 | } |
2039 | 2039 | } elseif ( |
2040 | 2040 | is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) |
@@ -2042,32 +2042,32 @@ discard block |
||
2042 | 2042 | && $filterobj->table_element && $filterobj->element |
2043 | 2043 | ) { |
2044 | 2044 | // Generic case (if there is a $filterobj and a field rowid and (ref or label) exists. |
2045 | - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = '" . $db->escape($filterobj->element) . ($module ? "@" . $module : "") . "'"; |
|
2045 | + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = '".$db->escape($filterobj->element).($module ? "@".$module : "")."'"; |
|
2046 | 2046 | if ($filterobj->id) { |
2047 | - $sql .= " AND a.fk_element = " . ((int) $filterobj->id); |
|
2047 | + $sql .= " AND a.fk_element = ".((int) $filterobj->id); |
|
2048 | 2048 | } |
2049 | 2049 | } elseif (is_object($filterobj)) { |
2050 | 2050 | return 'Bad value for $filterobj'; |
2051 | 2051 | } |
2052 | 2052 | } else { |
2053 | 2053 | if (is_object($filterobj) && $filterobj->id > 0 && get_class($filterobj) == 'User') { |
2054 | - $sql .= " AND (u.rowid = " . ((int) $filterobj->id) . ' OR '; |
|
2055 | - $sql .= " EXISTS (SELECT r.rowid FROM " . MAIN_DB_PREFIX . "actioncomm_resources as r WHERE a.id = r.fk_actioncomm"; |
|
2056 | - $sql .= " AND r.element_type = '" . $db->escape($filterobj->table_element) . "' AND r.fk_element = " . ((int) $filterobj->id) . ')'; |
|
2054 | + $sql .= " AND (u.rowid = ".((int) $filterobj->id).' OR '; |
|
2055 | + $sql .= " EXISTS (SELECT r.rowid FROM ".MAIN_DB_PREFIX."actioncomm_resources as r WHERE a.id = r.fk_actioncomm"; |
|
2056 | + $sql .= " AND r.element_type = '".$db->escape($filterobj->table_element)."' AND r.fk_element = ".((int) $filterobj->id).')'; |
|
2057 | 2057 | $sql .= ")"; |
2058 | 2058 | } |
2059 | 2059 | if (is_object($objcon) && $objcon->id > 0) { |
2060 | - $sql .= " AND EXISTS (SELECT r.rowid FROM " . MAIN_DB_PREFIX . "actioncomm_resources as r WHERE a.id = r.fk_actioncomm"; |
|
2061 | - $sql .= " AND r.element_type = '" . $db->escape($objcon->table_element) . "' AND r.fk_element = " . ((int) $objcon->id) . ')'; |
|
2060 | + $sql .= " AND EXISTS (SELECT r.rowid FROM ".MAIN_DB_PREFIX."actioncomm_resources as r WHERE a.id = r.fk_actioncomm"; |
|
2061 | + $sql .= " AND r.element_type = '".$db->escape($objcon->table_element)."' AND r.fk_element = ".((int) $objcon->id).')'; |
|
2062 | 2062 | } |
2063 | 2063 | } |
2064 | 2064 | |
2065 | 2065 | if (!empty($tms_start) && !empty($tms_end)) { |
2066 | - $sql .= " AND ((a.datep BETWEEN '" . $db->idate($tms_start) . "' AND '" . $db->idate($tms_end) . "') OR (a.datep2 BETWEEN '" . $db->idate($tms_start) . "' AND '" . $db->idate($tms_end) . "'))"; |
|
2066 | + $sql .= " AND ((a.datep BETWEEN '".$db->idate($tms_start)."' AND '".$db->idate($tms_end)."') OR (a.datep2 BETWEEN '".$db->idate($tms_start)."' AND '".$db->idate($tms_end)."'))"; |
|
2067 | 2067 | } elseif (empty($tms_start) && !empty($tms_end)) { |
2068 | - $sql .= " AND ((a.datep <= '" . $db->idate($tms_end) . "') OR (a.datep2 <= '" . $db->idate($tms_end) . "'))"; |
|
2068 | + $sql .= " AND ((a.datep <= '".$db->idate($tms_end)."') OR (a.datep2 <= '".$db->idate($tms_end)."'))"; |
|
2069 | 2069 | } elseif (!empty($tms_start) && empty($tms_end)) { |
2070 | - $sql .= " AND ((a.datep >= '" . $db->idate($tms_start) . "') OR (a.datep2 >= '" . $db->idate($tms_start) . "'))"; |
|
2070 | + $sql .= " AND ((a.datep >= '".$db->idate($tms_start)."') OR (a.datep2 >= '".$db->idate($tms_start)."'))"; |
|
2071 | 2071 | } |
2072 | 2072 | |
2073 | 2073 | if (is_array($actioncode) && !empty($actioncode)) { |
@@ -2097,7 +2097,7 @@ discard block |
||
2097 | 2097 | |
2098 | 2098 | // Fields from hook |
2099 | 2099 | $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module); |
2100 | - $reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
2100 | + $reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
2101 | 2101 | if (!empty($hookmanager->resPrint)) { |
2102 | 2102 | $sql .= $hookmanager->resPrint; |
2103 | 2103 | } |
@@ -2108,7 +2108,7 @@ discard block |
||
2108 | 2108 | $sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj); |
2109 | 2109 | if (!empty($sql2)) { |
2110 | 2110 | if (!empty($sql)) { |
2111 | - $sql = $sql . " UNION " . $sql2; |
|
2111 | + $sql = $sql." UNION ".$sql2; |
|
2112 | 2112 | } elseif (empty($sql)) { |
2113 | 2113 | $sql = $sql2; |
2114 | 2114 | } |
@@ -2118,7 +2118,7 @@ discard block |
||
2118 | 2118 | } else { |
2119 | 2119 | $sql2 = addMailingEventTypeSQL($actioncode, $objcon, $filterobj); |
2120 | 2120 | if (!empty($sql) && !empty($sql2)) { |
2121 | - $sql = $sql . " UNION " . $sql2; |
|
2121 | + $sql = $sql." UNION ".$sql2; |
|
2122 | 2122 | } elseif (empty($sql) && !empty($sql2)) { |
2123 | 2123 | $sql = $sql2; |
2124 | 2124 | } |
@@ -2229,10 +2229,10 @@ discard block |
||
2229 | 2229 | if (isModEnabled('agenda') || (isModEnabled('mailing') && !empty($objcon->email))) { |
2230 | 2230 | $delay_warning = getDolGlobalInt('MAIN_DELAY_ACTIONS_TODO') * 24 * 60 * 60; |
2231 | 2231 | |
2232 | - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
2233 | - include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
2234 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
2235 | - require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; |
|
2232 | + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
2233 | + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
2234 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
2235 | + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; |
|
2236 | 2236 | |
2237 | 2237 | $formactions = new FormActions($db); |
2238 | 2238 | |
@@ -2242,20 +2242,20 @@ discard block |
||
2242 | 2242 | $contactstatic = new Contact($db); |
2243 | 2243 | $elementlinkcache = array(); |
2244 | 2244 | |
2245 | - $out .= '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; |
|
2246 | - $out .= '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
2245 | + $out .= '<form name="listactionsfilter" class="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
|
2246 | + $out .= '<input type="hidden" name="token" value="'.newToken().'">'; |
|
2247 | 2247 | if ( |
2248 | 2248 | $objcon && get_class($objcon) == 'Contact' && |
2249 | 2249 | (is_null($filterobj) || get_class($filterobj) == 'Societe') |
2250 | 2250 | ) { |
2251 | - $out .= '<input type="hidden" name="id" value="' . $objcon->id . '" />'; |
|
2251 | + $out .= '<input type="hidden" name="id" value="'.$objcon->id.'" />'; |
|
2252 | 2252 | } else { |
2253 | - $out .= '<input type="hidden" name="id" value="' . $filterobj->id . '" />'; |
|
2253 | + $out .= '<input type="hidden" name="id" value="'.$filterobj->id.'" />'; |
|
2254 | 2254 | } |
2255 | 2255 | if ($filterobj && get_class($filterobj) == 'Societe') { |
2256 | - $out .= '<input type="hidden" name="socid" value="' . $filterobj->id . '" />'; |
|
2256 | + $out .= '<input type="hidden" name="socid" value="'.$filterobj->id.'" />'; |
|
2257 | 2257 | } else { |
2258 | - $out .= '<input type="hidden" name="userid" value="' . $filterobj->id . '" />'; |
|
2258 | + $out .= '<input type="hidden" name="userid" value="'.$filterobj->id.'" />'; |
|
2259 | 2259 | } |
2260 | 2260 | |
2261 | 2261 | $out .= "\n"; |
@@ -2278,7 +2278,7 @@ discard block |
||
2278 | 2278 | } |
2279 | 2279 | |
2280 | 2280 | // ID |
2281 | - $out .= '<td class="liste_titre"><input type="text" class="width50" name="search_rowid" value="' . (isset($filters['search_rowid']) ? $filters['search_rowid'] : '') . '"></td>'; |
|
2281 | + $out .= '<td class="liste_titre"><input type="text" class="width50" name="search_rowid" value="'.(isset($filters['search_rowid']) ? $filters['search_rowid'] : '').'"></td>'; |
|
2282 | 2282 | // Date |
2283 | 2283 | $out .= '<td class="liste_titre center">'; |
2284 | 2284 | $out .= $form->selectDateToDate($tms_start, $tms_end, 'dateevent', 1); |
@@ -2290,7 +2290,7 @@ discard block |
||
2290 | 2290 | $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, (getDolGlobalString('AGENDA_USE_MULTISELECT_TYPE') ? 1 : 0), 1, 'selecttype combolargeelem minwidth100 maxwidth150', 1); |
2291 | 2291 | $out .= '</td>'; |
2292 | 2292 | // Label |
2293 | - $out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="' . $filters['search_agenda_label'] . '"></td>'; |
|
2293 | + $out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>'; |
|
2294 | 2294 | $out .= '<td class="liste_titre"></td>'; |
2295 | 2295 | $out .= '<td class="liste_titre"></td>'; |
2296 | 2296 | $out .= '<td class="liste_titre"></td>'; |
@@ -2311,10 +2311,10 @@ discard block |
||
2311 | 2311 | if ($donetodo && $filterobj !== null) { |
2312 | 2312 | $tmp = ''; |
2313 | 2313 | if (get_class($filterobj) == 'Societe') { |
2314 | - $tmp .= '<a href="' . DOL_URL_ROOT . '/comm/action/list.php?mode=show_list&socid=' . $filterobj->id . '&status=done">'; |
|
2314 | + $tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&socid='.$filterobj->id.'&status=done">'; |
|
2315 | 2315 | } |
2316 | 2316 | if (get_class($filterobj) == 'User') { |
2317 | - $tmp .= '<a href="' . DOL_URL_ROOT . '/comm/action/list.php?mode=show_list&userid=' . $filterobj->id . '&status=done">'; |
|
2317 | + $tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&userid='.$filterobj->id.'&status=done">'; |
|
2318 | 2318 | } |
2319 | 2319 | $tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : ''); |
2320 | 2320 | $tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : ''); |
@@ -2342,7 +2342,7 @@ discard block |
||
2342 | 2342 | } |
2343 | 2343 | $out .= '</tr>'; |
2344 | 2344 | |
2345 | - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/cactioncomm.class.php'; |
|
2345 | + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; |
|
2346 | 2346 | $caction = new CActionComm($db); |
2347 | 2347 | $arraylist = $caction->liste_array(1, 'code', '', (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? 0 : 1), '', 1); |
2348 | 2348 | |
@@ -2371,7 +2371,7 @@ discard block |
||
2371 | 2371 | // Ref |
2372 | 2372 | $out .= '<td class="nowraponall">'; |
2373 | 2373 | if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') { |
2374 | - $out .= '<a href="' . DOL_URL_ROOT . '/comm/mailing/card.php?id=' . $histo[$key]['id'] . '">' . img_object($langs->trans("ShowEMailing"), "email") . ' '; |
|
2374 | + $out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'">'.img_object($langs->trans("ShowEMailing"), "email").' '; |
|
2375 | 2375 | $out .= $histo[$key]['id']; |
2376 | 2376 | $out .= '</a>'; |
2377 | 2377 | } else { |
@@ -2386,9 +2386,9 @@ discard block |
||
2386 | 2386 | $tmpa = dol_getdate($histo[$key]['datestart'], true); |
2387 | 2387 | $tmpb = dol_getdate($histo[$key]['dateend'], true); |
2388 | 2388 | if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { |
2389 | - $out .= '-' . dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel'); |
|
2389 | + $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel'); |
|
2390 | 2390 | } else { |
2391 | - $out .= '-' . dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel'); |
|
2391 | + $out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel'); |
|
2392 | 2392 | } |
2393 | 2393 | } |
2394 | 2394 | $late = 0; |
@@ -2405,7 +2405,7 @@ discard block |
||
2405 | 2405 | $late = 1; |
2406 | 2406 | } |
2407 | 2407 | if ($late) { |
2408 | - $out .= img_warning($langs->trans("Late")) . ' '; |
|
2408 | + $out .= img_warning($langs->trans("Late")).' '; |
|
2409 | 2409 | } |
2410 | 2410 | $out .= "</td>\n"; |
2411 | 2411 | |
@@ -2443,7 +2443,7 @@ discard block |
||
2443 | 2443 | $labelOfTypeToShow = $langs->trans("Emailing"); |
2444 | 2444 | } |
2445 | 2445 | if ($actionstatic->type_code == 'AC_OTH_AUTO' && ($actionstatic->type_code != $actionstatic->code) && $labelOfTypeToShow && !empty($arraylist[$actionstatic->code])) { |
2446 | - $labelOfTypeToShow .= ' - ' . $arraylist[$actionstatic->code]; // Show also detailed code |
|
2446 | + $labelOfTypeToShow .= ' - '.$arraylist[$actionstatic->code]; // Show also detailed code |
|
2447 | 2447 | } |
2448 | 2448 | } |
2449 | 2449 | |
@@ -2452,7 +2452,7 @@ discard block |
||
2452 | 2452 | $labelOfTypeToShowLong .= ' (auto)'; |
2453 | 2453 | } |
2454 | 2454 | |
2455 | - $out .= '<td class="tdoverflowmax125" title="' . $labelOfTypeToShowLong . '">'; |
|
2455 | + $out .= '<td class="tdoverflowmax125" title="'.$labelOfTypeToShowLong.'">'; |
|
2456 | 2456 | $out .= $actionstatic->getTypePicto(); |
2457 | 2457 | //if (empty($conf->dol_optimize_smallscreen)) { |
2458 | 2458 | $out .= $labelOfTypeToShow; |
@@ -2462,19 +2462,19 @@ discard block |
||
2462 | 2462 | // Title/Label of event |
2463 | 2463 | $out .= '<td class="tdoverflowmax300"'; |
2464 | 2464 | if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') { |
2465 | - $transcode = $langs->trans("Action" . $histo[$key]['acode']); |
|
2465 | + $transcode = $langs->trans("Action".$histo[$key]['acode']); |
|
2466 | 2466 | //$libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']); |
2467 | 2467 | $label = $histo[$key]['note']; |
2468 | 2468 | $actionstatic->id = $histo[$key]['id']; |
2469 | - $out .= ' title="' . dol_escape_htmltag($label) . '">'; |
|
2469 | + $out .= ' title="'.dol_escape_htmltag($label).'">'; |
|
2470 | 2470 | $out .= dol_trunc($label, 120); |
2471 | 2471 | } |
2472 | 2472 | if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') { |
2473 | - $transcode = $langs->trans("Action" . $histo[$key]['acode']); |
|
2474 | - $label = ($transcode != "Action" . $histo[$key]['acode'] ? $transcode : 'Send mass mailing'); |
|
2475 | - $label .= ' - ' . $histo[$key]['note']; |
|
2476 | - $out .= '<a href="' . DOL_URL_ROOT . '/comm/mailing/card.php?id=' . $histo[$key]['id'] . '"'; |
|
2477 | - $out .= ' title="' . dol_escape_htmltag($label) . '">'; |
|
2473 | + $transcode = $langs->trans("Action".$histo[$key]['acode']); |
|
2474 | + $label = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing'); |
|
2475 | + $label .= ' - '.$histo[$key]['note']; |
|
2476 | + $out .= '<a href="'.DOL_URL_ROOT.'/comm/mailing/card.php?id='.$histo[$key]['id'].'"'; |
|
2477 | + $out .= ' title="'.dol_escape_htmltag($label).'">'; |
|
2478 | 2478 | //$out .= img_object($langs->trans("EMailing").'<br>'.$histo[$key]['note'], "email").' '; |
2479 | 2479 | $out .= dol_trunc($label, 120); |
2480 | 2480 | $out .= '</a>'; |
@@ -2512,7 +2512,7 @@ discard block |
||
2512 | 2512 | $out .= $contact->getNomUrl(-3, '', 10, '', -1, 0, 'paddingright'); |
2513 | 2513 | if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') { |
2514 | 2514 | if (!empty($contact->phone_pro)) { |
2515 | - $out .= '(' . dol_print_phone($contact->phone_pro) . ')'; |
|
2515 | + $out .= '('.dol_print_phone($contact->phone_pro).')'; |
|
2516 | 2516 | } |
2517 | 2517 | } |
2518 | 2518 | $out .= '<div class="paddingright"></div>'; |
@@ -2524,13 +2524,13 @@ discard block |
||
2524 | 2524 | $contactstatic->firstname = $histo[$key]['firstname']; |
2525 | 2525 | $contactstatic->id = $histo[$key]['contact_id']; |
2526 | 2526 | $contactstatic->photo = $histo[$key]['contact_photo']; |
2527 | - $out .= '<td width="120">' . $contactstatic->getNomUrl(-1, '', 10) . '</td>'; |
|
2527 | + $out .= '<td width="120">'.$contactstatic->getNomUrl(-1, '', 10).'</td>'; |
|
2528 | 2528 | } else { |
2529 | 2529 | $out .= '<td> </td>'; |
2530 | 2530 | } |
2531 | 2531 | |
2532 | 2532 | // Status / Progression |
2533 | - $out .= '<td class="nowrap center">' . $actionstatic->LibStatut($histo[$key]['percent'], 2, 0, $histo[$key]['datestart']) . '</td>'; |
|
2533 | + $out .= '<td class="nowrap center">'.$actionstatic->LibStatut($histo[$key]['percent'], 2, 0, $histo[$key]['datestart']).'</td>'; |
|
2534 | 2534 | |
2535 | 2535 | // Action column |
2536 | 2536 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -2541,7 +2541,7 @@ discard block |
||
2541 | 2541 | } |
2542 | 2542 | if (empty($histo)) { |
2543 | 2543 | $colspan = 9; |
2544 | - $out .= '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
|
2544 | + $out .= '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; |
|
2545 | 2545 | } |
2546 | 2546 | |
2547 | 2547 | $out .= "</table>\n"; |
@@ -2574,9 +2574,9 @@ discard block |
||
2574 | 2574 | $i = -1; |
2575 | 2575 | |
2576 | 2576 | $sql = "SELECT s.rowid, s.client, s.fournisseur, s.nom as name, s.name_alias, s.email, s.address, s.zip, s.town, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.canvas, s.status"; |
2577 | - $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s"; |
|
2578 | - $sql .= " WHERE s.parent = " . ((int) $object->id); |
|
2579 | - $sql .= " AND s.entity IN (" . getEntity('societe') . ")"; |
|
2577 | + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; |
|
2578 | + $sql .= " WHERE s.parent = ".((int) $object->id); |
|
2579 | + $sql .= " AND s.entity IN (".getEntity('societe').")"; |
|
2580 | 2580 | $sql .= " ORDER BY s.nom"; |
2581 | 2581 | |
2582 | 2582 | $result = $db->query($sql); |
@@ -2587,12 +2587,12 @@ discard block |
||
2587 | 2587 | |
2588 | 2588 | print load_fiche_titre($langs->trans("Subsidiaries"), '', ''); |
2589 | 2589 | |
2590 | - print "\n" . '<div class="div-table-responsive-no-min">' . "\n"; |
|
2591 | - print '<table class="noborder centpercent">' . "\n"; |
|
2590 | + print "\n".'<div class="div-table-responsive-no-min">'."\n"; |
|
2591 | + print '<table class="noborder centpercent">'."\n"; |
|
2592 | 2592 | |
2593 | - print '<tr class="liste_titre"><td>' . $langs->trans("Company") . '</td>'; |
|
2594 | - print '<td>' . $langs->trans("Address") . '</td><td>' . $langs->trans("Zip") . '</td>'; |
|
2595 | - print '<td>' . $langs->trans("Town") . '</td><td>' . $langs->trans("CustomerCode") . '</td>'; |
|
2593 | + print '<tr class="liste_titre"><td>'.$langs->trans("Company").'</td>'; |
|
2594 | + print '<td>'.$langs->trans("Address").'</td><td>'.$langs->trans("Zip").'</td>'; |
|
2595 | + print '<td>'.$langs->trans("Town").'</td><td>'.$langs->trans("CustomerCode").'</td>'; |
|
2596 | 2596 | print "<td> </td>"; |
2597 | 2597 | print "</tr>"; |
2598 | 2598 | |
@@ -2622,13 +2622,13 @@ discard block |
||
2622 | 2622 | print $socstatic->getNomUrl(1); |
2623 | 2623 | print '</td>'; |
2624 | 2624 | |
2625 | - print '<td class="tdoverflowmax400" title="' . dol_escape_htmltag($obj->address) . '">' . dol_escape_htmltag($obj->address) . '</td>'; |
|
2626 | - print '<td class="tdoverflowmax100" title="' . dol_escape_htmltag($obj->zip) . '">' . $obj->zip . '</td>'; |
|
2627 | - print '<td class="tdoverflowmax200" title="' . dol_escape_htmltag($obj->town) . '">' . $obj->town . '</td>'; |
|
2628 | - print '<td class="tdoverflowmax200" title="' . dol_escape_htmltag($obj->code_client) . '">' . $obj->code_client . '</td>'; |
|
2625 | + print '<td class="tdoverflowmax400" title="'.dol_escape_htmltag($obj->address).'">'.dol_escape_htmltag($obj->address).'</td>'; |
|
2626 | + print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->zip).'">'.$obj->zip.'</td>'; |
|
2627 | + print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->town).'">'.$obj->town.'</td>'; |
|
2628 | + print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->code_client).'">'.$obj->code_client.'</td>'; |
|
2629 | 2629 | |
2630 | 2630 | print '<td class="center">'; |
2631 | - print '<a class="editfielda" href="' . DOL_URL_ROOT . '/societe/card.php?socid=' . ((int) $obj->rowid) . '&action=edit&token=' . newToken() . '">'; |
|
2631 | + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/societe/card.php?socid='.((int) $obj->rowid).'&action=edit&token='.newToken().'">'; |
|
2632 | 2632 | print img_edit(); |
2633 | 2633 | print '</a></td>'; |
2634 | 2634 | |
@@ -2636,7 +2636,7 @@ discard block |
||
2636 | 2636 | $i++; |
2637 | 2637 | } |
2638 | 2638 | print "\n</table>\n"; |
2639 | - print '</div>' . "\n"; |
|
2639 | + print '</div>'."\n"; |
|
2640 | 2640 | } |
2641 | 2641 | |
2642 | 2642 | print "<br>\n"; |
@@ -2679,7 +2679,7 @@ discard block |
||
2679 | 2679 | } elseif ($actioncode == 'AC_ALL_AUTO') { |
2680 | 2680 | $sql .= " $sqlANDOR c.type = 'systemauto'"; |
2681 | 2681 | } else { |
2682 | - $sql .= " $sqlANDOR c.code = '" . $db->escape($actioncode) . "'"; |
|
2682 | + $sql .= " $sqlANDOR c.code = '".$db->escape($actioncode)."'"; |
|
2683 | 2683 | } |
2684 | 2684 | } |
2685 | 2685 | |
@@ -2700,9 +2700,9 @@ discard block |
||
2700 | 2700 | global $db; |
2701 | 2701 | |
2702 | 2702 | if ($donetodo == 'todo') { |
2703 | - $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '" . $db->idate($now) . "'))"; |
|
2703 | + $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; |
|
2704 | 2704 | } elseif ($donetodo == 'done') { |
2705 | - $sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '" . $db->idate($now) . "'))"; |
|
2705 | + $sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; |
|
2706 | 2706 | } |
2707 | 2707 | if (is_array($filters) && !empty($filters['search_agenda_label'])) { |
2708 | 2708 | $sql .= natural_search('a.label', $filters['search_agenda_label']); |
@@ -2743,8 +2743,8 @@ discard block |
||
2743 | 2743 | } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { |
2744 | 2744 | $sql2 .= ", '' as ref"; |
2745 | 2745 | } |
2746 | - $sql2 .= " FROM " . MAIN_DB_PREFIX . "mailing as m, " . MAIN_DB_PREFIX . "mailing_cibles as mc, " . MAIN_DB_PREFIX . "user as u"; |
|
2747 | - $sql2 .= " WHERE mc.email = '" . $db->escape($objcon->email) . "'"; // Search is done on email. |
|
2746 | + $sql2 .= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u"; |
|
2747 | + $sql2 .= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email. |
|
2748 | 2748 | $sql2 .= " AND mc.statut = 1"; |
2749 | 2749 | $sql2 .= " AND u.rowid = m.fk_user_valid"; |
2750 | 2750 | $sql2 .= " AND mc.fk_mailing=m.rowid"; |
@@ -2786,15 +2786,15 @@ discard block |
||
2786 | 2786 | //$urllogo = ''; |
2787 | 2787 | $urllogopublic = ''; |
2788 | 2788 | if ($showlogo) { |
2789 | - if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $logosmall)) { |
|
2789 | + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { |
|
2790 | 2790 | //$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$logosmall); |
2791 | - $urllogopublic = $dolibarr_main_url_root . '/viewimage.php?modulepart=mycompany&entity=' . $conf->entity . '&file=' . urlencode('logos/thumbs/' . $logosmall); |
|
2792 | - } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output . '/logos/' . $logo)) { |
|
2791 | + $urllogopublic = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); |
|
2792 | + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { |
|
2793 | 2793 | //$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$logo); |
2794 | - $urllogopublic = $dolibarr_main_url_root . '/viewimage.php?modulepart=mycompany&entity=' . $conf->entity . '&file=' . urlencode('logos/' . $logo); |
|
2795 | - } elseif (is_readable(DOL_DOCUMENT_ROOT . '/theme/dolibarr_logo.svg')) { |
|
2794 | + $urllogopublic = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); |
|
2795 | + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { |
|
2796 | 2796 | //$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; |
2797 | - $urllogopublic = $dolibarr_main_url_root . '/theme/dolibarr_logo.svg'; |
|
2797 | + $urllogopublic = $dolibarr_main_url_root.'/theme/dolibarr_logo.svg'; |
|
2798 | 2798 | } |
2799 | 2799 | } |
2800 | 2800 | |
@@ -2806,19 +2806,19 @@ discard block |
||
2806 | 2806 | print '<div class="logopublicpayment">'; |
2807 | 2807 | if ($urllogopublic) { |
2808 | 2808 | if (!is_numeric($showlogo)) { |
2809 | - print '<a href="' . $showlogo . '">'; |
|
2809 | + print '<a href="'.$showlogo.'">'; |
|
2810 | 2810 | } |
2811 | - print '<img id="dolpaymentlogo" src="' . $urllogopublic . '">'; |
|
2811 | + print '<img id="dolpaymentlogo" src="'.$urllogopublic.'">'; |
|
2812 | 2812 | if (!is_numeric($showlogo)) { |
2813 | 2813 | print '</a>'; |
2814 | 2814 | } |
2815 | 2815 | } |
2816 | 2816 | if ($alttext) { |
2817 | - print '<div class="clearboth"></div><strong>' . $alttext . '</strong>'; |
|
2817 | + print '<div class="clearboth"></div><strong>'.$alttext.'</strong>'; |
|
2818 | 2818 | } |
2819 | 2819 | print '</div>'; |
2820 | 2820 | if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) { |
2821 | - print '<div class="poweredbypublicpayment opacitymedium right hideonsmartphone"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">' . $langs->trans("PoweredBy") . '<br><img class="poweredbyimg" src="' . DOL_URL_ROOT . '/theme/dolibarr_logo.svg" width="80px"></a></div>'; |
|
2821 | + print '<div class="poweredbypublicpayment opacitymedium right hideonsmartphone"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>'; |
|
2822 | 2822 | } |
2823 | 2823 | print '</div>'; |
2824 | 2824 | } |
@@ -2826,7 +2826,7 @@ discard block |
||
2826 | 2826 | // Add an optional image under the ban with logo/title |
2827 | 2827 | if (getDolGlobalString($subimageconst)) { |
2828 | 2828 | print '<div class="backimagepublicsubimage">'; |
2829 | - print '<img id="id' . $subimageconst . '" src="' . getDolGlobalString($subimageconst) . '">'; |
|
2829 | + print '<img id="id'.$subimageconst.'" src="'.getDolGlobalString($subimageconst).'">'; |
|
2830 | 2830 | print '</div>'; |
2831 | 2831 | } |
2832 | 2832 | |
@@ -2853,11 +2853,11 @@ discard block |
||
2853 | 2853 | // Juridical status |
2854 | 2854 | $line1 = ""; |
2855 | 2855 | if ($fromcompany->forme_juridique_code) { |
2856 | - $line1 .= ($line1 ? " - " : "") . getFormeJuridiqueLabel((string) $fromcompany->forme_juridique_code); |
|
2856 | + $line1 .= ($line1 ? " - " : "").getFormeJuridiqueLabel((string) $fromcompany->forme_juridique_code); |
|
2857 | 2857 | } |
2858 | 2858 | // Capital |
2859 | 2859 | if ($fromcompany->capital) { |
2860 | - $line1 .= ($line1 ? " - " : "") . $langs->transnoentities("CapitalOf", (string) $fromcompany->capital) . " " . $langs->transnoentities("Currency" . $conf->currency); |
|
2860 | + $line1 .= ($line1 ? " - " : "").$langs->transnoentities("CapitalOf", (string) $fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->currency); |
|
2861 | 2861 | } |
2862 | 2862 | // Prof Id 1 |
2863 | 2863 | if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) { |
@@ -2865,7 +2865,7 @@ discard block |
||
2865 | 2865 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
2866 | 2866 | $field = $reg[1]; |
2867 | 2867 | } |
2868 | - $line1 .= ($line1 ? " - " : "") . $field . ": " . $fromcompany->idprof1; |
|
2868 | + $line1 .= ($line1 ? " - " : "").$field.": ".$fromcompany->idprof1; |
|
2869 | 2869 | } |
2870 | 2870 | // Prof Id 2 |
2871 | 2871 | if ($fromcompany->idprof2) { |
@@ -2873,7 +2873,7 @@ discard block |
||
2873 | 2873 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
2874 | 2874 | $field = $reg[1]; |
2875 | 2875 | } |
2876 | - $line1 .= ($line1 ? " - " : "") . $field . ": " . $fromcompany->idprof2; |
|
2876 | + $line1 .= ($line1 ? " - " : "").$field.": ".$fromcompany->idprof2; |
|
2877 | 2877 | } |
2878 | 2878 | |
2879 | 2879 | // Second line of company infos |
@@ -2884,7 +2884,7 @@ discard block |
||
2884 | 2884 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
2885 | 2885 | $field = $reg[1]; |
2886 | 2886 | } |
2887 | - $line2 .= ($line2 ? " - " : "") . $field . ": " . $fromcompany->idprof3; |
|
2887 | + $line2 .= ($line2 ? " - " : "").$field.": ".$fromcompany->idprof3; |
|
2888 | 2888 | } |
2889 | 2889 | // Prof Id 4 |
2890 | 2890 | if ($fromcompany->idprof4) { |
@@ -2892,33 +2892,33 @@ discard block |
||
2892 | 2892 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
2893 | 2893 | $field = $reg[1]; |
2894 | 2894 | } |
2895 | - $line2 .= ($line2 ? " - " : "") . $field . ": " . $fromcompany->idprof4; |
|
2895 | + $line2 .= ($line2 ? " - " : "").$field.": ".$fromcompany->idprof4; |
|
2896 | 2896 | } |
2897 | 2897 | // IntraCommunautary VAT |
2898 | 2898 | if ($fromcompany->tva_intra != '') { |
2899 | - $line2 .= ($line2 ? " - " : "") . $langs->transnoentities("VATIntraShort") . ": " . $fromcompany->tva_intra; |
|
2899 | + $line2 .= ($line2 ? " - " : "").$langs->transnoentities("VATIntraShort").": ".$fromcompany->tva_intra; |
|
2900 | 2900 | } |
2901 | 2901 | |
2902 | - print '<!-- htmlPrintOnlineFooter -->' . "\n"; |
|
2902 | + print '<!-- htmlPrintOnlineFooter -->'."\n"; |
|
2903 | 2903 | |
2904 | 2904 | // css centpercent has been removed from class="..." because not compatible with paddingleft/right and there is an horizontal scroll appearring on payment page for example. |
2905 | - print '<footer class="center centpercent opacitymedium">' . "\n"; |
|
2905 | + print '<footer class="center centpercent opacitymedium">'."\n"; |
|
2906 | 2906 | print '<br>'; |
2907 | 2907 | if ($addformmessage) { |
2908 | - print '<!-- object = ' . (empty($object) ? 'undefined' : $object->element) . ' -->'; |
|
2908 | + print '<!-- object = '.(empty($object) ? 'undefined' : $object->element).' -->'; |
|
2909 | 2909 | print '<br>'; |
2910 | 2910 | |
2911 | - $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_' . $suffix; |
|
2911 | + $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix; |
|
2912 | 2912 | if (getDolGlobalString($parammessageform) !== '') { |
2913 | 2913 | print $langs->transnoentities(getDolGlobalString($parammessageform)); |
2914 | - } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM') !== '') { |
|
2914 | + } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM') !== '') { |
|
2915 | 2915 | print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM')); |
2916 | 2916 | } |
2917 | 2917 | |
2918 | 2918 | // Add other message if VAT exists |
2919 | 2919 | if (!empty($object->total_vat) || !empty($object->total_tva)) { |
2920 | - $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_' . $suffix; |
|
2921 | - if (getDolGlobalString($parammessageform) !== '') { |
|
2920 | + $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix; |
|
2921 | + if (getDolGlobalString($parammessageform) !== '') { |
|
2922 | 2922 | print $langs->transnoentities(getDolGlobalString($parammessageform)); |
2923 | 2923 | } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT') !== '') { |
2924 | 2924 | print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT')); |
@@ -2926,15 +2926,15 @@ discard block |
||
2926 | 2926 | } |
2927 | 2927 | } |
2928 | 2928 | |
2929 | - print '<span style="font-size: 10px;"><br><hr>' . "\n"; |
|
2930 | - print $fromcompany->name . '<br>'; |
|
2929 | + print '<span style="font-size: 10px;"><br><hr>'."\n"; |
|
2930 | + print $fromcompany->name.'<br>'; |
|
2931 | 2931 | print $line1; |
2932 | - if (strlen($line1 . $line2) > 50) { |
|
2932 | + if (strlen($line1.$line2) > 50) { |
|
2933 | 2933 | print '<br>'; |
2934 | 2934 | } else { |
2935 | 2935 | print ' - '; |
2936 | 2936 | } |
2937 | 2937 | print $line2; |
2938 | 2938 | print '</span>'; |
2939 | - print '</footer>' . "\n"; |
|
2939 | + print '</footer>'."\n"; |
|
2940 | 2940 | } |
@@ -414,19 +414,19 @@ discard block |
||
414 | 414 | |
415 | 415 | // Show message if accountancy hidden options are activated to help to resolve some problems |
416 | 416 | if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { |
417 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>'; |
|
417 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS").'</div>'; |
|
418 | 418 | } |
419 | 419 | if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) { |
420 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>'; |
|
420 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS").'</div>'; |
|
421 | 421 | } |
422 | 422 | if (getDolGlobalString('ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY')) { |
423 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>'; |
|
423 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY").'</div>'; |
|
424 | 424 | } |
425 | 425 | if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
426 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '</div>'; |
|
426 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED").'</div>'; |
|
427 | 427 | } |
428 | 428 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
429 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '</div>'; |
|
429 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED").'</div>'; |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | print '<br>'; |
@@ -496,8 +496,8 @@ discard block |
||
496 | 496 | print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200'); |
497 | 497 | } elseif ($key == 'ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') { |
498 | 498 | $array = array( |
499 | - 0=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece") . ' - ' . $langs->trans("LabelAccount"), |
|
500 | - 1=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece"), |
|
499 | + 0=>$langs->trans("ThirdPartyName").' - '.$langs->trans("NumPiece").' - '.$langs->trans("LabelAccount"), |
|
500 | + 1=>$langs->trans("ThirdPartyName").' - '.$langs->trans("NumPiece"), |
|
501 | 501 | 2=>$langs->trans("ThirdPartyName") |
502 | 502 | ); |
503 | 503 | print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width300'); |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | print '<div class="div-table-responsive-no-min">'; |
707 | 707 | print '<table class="noborder centpercent">'; |
708 | 708 | print '<tr class="liste_titre">'; |
709 | -print '<td colspan="2">' . $langs->trans('OptionsAdvanced') . '</td>'; |
|
709 | +print '<td colspan="2">'.$langs->trans('OptionsAdvanced').'</td>'; |
|
710 | 710 | print "</tr>\n"; |
711 | 711 | |
712 | 712 | print '<tr class="oddeven">'; |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | // Number of letters for lettering (3 by default (AAA), min 2 (AA)) |
728 | 728 | print '<tr class="oddeven">'; |
729 | 729 | print '<td>'; |
730 | - print $form->textwithpicto($langs->trans("ACCOUNTING_LETTERING_NBLETTERS"), $langs->trans("ACCOUNTING_LETTERING_NBLETTERS_DESC")) . '</td>'; |
|
730 | + print $form->textwithpicto($langs->trans("ACCOUNTING_LETTERING_NBLETTERS"), $langs->trans("ACCOUNTING_LETTERING_NBLETTERS_DESC")).'</td>'; |
|
731 | 731 | print '<td class="right">'; |
732 | 732 | |
733 | 733 | if (empty($letter)) { |
@@ -738,19 +738,19 @@ discard block |
||
738 | 738 | } |
739 | 739 | } |
740 | 740 | |
741 | - print '<input class="flat right" name="ACCOUNTING_LETTERING_NBLETTERS" id="ACCOUNTING_LETTERING_NBLETTERS" value="' . $nbletter . '" type="number" step="1" min="2" max="3" >' . "\n"; |
|
741 | + print '<input class="flat right" name="ACCOUNTING_LETTERING_NBLETTERS" id="ACCOUNTING_LETTERING_NBLETTERS" value="'.$nbletter.'" type="number" step="1" min="2" max="3" >'."\n"; |
|
742 | 742 | print '</tr>'; |
743 | 743 | |
744 | 744 | // Auto Lettering when transfer in accountancy is realized |
745 | 745 | print '<tr class="oddeven">'; |
746 | 746 | print '<td>'; |
747 | - print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING"), $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING_DESC")) . '</td>'; |
|
747 | + print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING"), $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING_DESC")).'</td>'; |
|
748 | 748 | if (getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) { |
749 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=0">'; |
|
749 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenableautolettering&value=0">'; |
|
750 | 750 | print img_picto($langs->trans("Activated"), 'switch_on'); |
751 | 751 | print '</a></td>'; |
752 | 752 | } else { |
753 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=1">'; |
|
753 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenableautolettering&value=1">'; |
|
754 | 754 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
755 | 755 | print '</a></td>'; |
756 | 756 | } |
@@ -761,11 +761,11 @@ discard block |
||
761 | 761 | print '<td>'; |
762 | 762 | print $form->textwithpicto($langs->trans("ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE"), $langs->trans("ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE_DESC", $langs->transnoentities("MenuDefaultAccounts"))).'</td>'; |
763 | 763 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
764 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenablevatreversecharge&value=0">'; |
|
764 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenablevatreversecharge&value=0">'; |
|
765 | 765 | print img_picto($langs->trans("Activated"), 'switch_on'); |
766 | 766 | print '</a></td>'; |
767 | 767 | } else { |
768 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenablevatreversecharge&value=1">'; |
|
768 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenablevatreversecharge&value=1">'; |
|
769 | 769 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
770 | 770 | print '</a></td>'; |
771 | 771 | } |
@@ -775,11 +775,11 @@ discard block |
||
775 | 775 | print '<td>'; |
776 | 776 | print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_TABONTHIRDPARTY"), $langs->trans("ACCOUNTING_ENABLE_TABONTHIRDPARTY_DESC")).'</td>'; |
777 | 777 | if (getDolGlobalString('ACCOUNTING_ENABLE_TABONTHIRDPARTY')) { |
778 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenabletabonthirdparty&value=0">'; |
|
778 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenabletabonthirdparty&value=0">'; |
|
779 | 779 | print img_picto($langs->trans("Activated"), 'switch_on'); |
780 | 780 | print '</a></td>'; |
781 | 781 | } else { |
782 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenabletabonthirdparty&value=1">'; |
|
782 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenabletabonthirdparty&value=1">'; |
|
783 | 783 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
784 | 784 | print '</a></td>'; |
785 | 785 | } |
@@ -39,29 +39,29 @@ discard block |
||
39 | 39 | |
40 | 40 | // Load Dolibarr environment |
41 | 41 | require '../main.inc.php'; |
42 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
43 | -require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; |
|
44 | -require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
45 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/product.lib.php'; |
|
46 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/sendings.lib.php'; |
|
47 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; |
|
48 | -require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
49 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
50 | -require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; |
|
51 | -require_once DOL_DOCUMENT_ROOT . '/product/stock/class/productlot.class.php'; |
|
52 | -require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; |
|
42 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
43 | +require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; |
|
44 | +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
45 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; |
|
46 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php'; |
|
47 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; |
|
48 | +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
49 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
50 | +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; |
|
51 | +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; |
|
52 | +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; |
|
53 | 53 | if (isModEnabled("product") || isModEnabled("service")) { |
54 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
54 | + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
55 | 55 | } |
56 | 56 | if (isModEnabled("propal")) { |
57 | - require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
57 | + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
58 | 58 | } |
59 | 59 | if (isModEnabled('productbatch')) { |
60 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productbatch.class.php'; |
|
60 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productbatch.class.php'; |
|
61 | 61 | } |
62 | 62 | if (isModEnabled('project')) { |
63 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
64 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
63 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
64 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -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 && $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'); |
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 | } |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | |
664 | 664 | if (!$error) { |
665 | 665 | if ($object->update($user) >= 0) { |
666 | - header("Location: card.php?id=" . $object->id); |
|
666 | + header("Location: card.php?id=".$object->id); |
|
667 | 667 | exit; |
668 | 668 | } |
669 | 669 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | $object->fetch($id); |
675 | 675 | $result = $object->setBilled(); |
676 | 676 | if ($result >= 0) { |
677 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
677 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
678 | 678 | exit(); |
679 | 679 | } |
680 | 680 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | $object->fetch($id); |
683 | 683 | $result = $object->setClosed(); |
684 | 684 | if ($result >= 0) { |
685 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
685 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
686 | 686 | exit(); |
687 | 687 | } |
688 | 688 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | } |
717 | 717 | |
718 | 718 | if (!$error) { |
719 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
719 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
720 | 720 | exit(); |
721 | 721 | } else { |
722 | 722 | setEventMessages($line->error, $line->errors, 'errors'); |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | // Unset extrafield POST Data |
741 | 741 | if (is_array($extrafields->attributes[$object->table_element_line]['label'])) { |
742 | 742 | foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) { |
743 | - unset($_POST["options_" . $key]); |
|
743 | + unset($_POST["options_".$key]); |
|
744 | 744 | } |
745 | 745 | } |
746 | 746 | $line->fk_product = $lines[$i]->fk_product; |
@@ -748,8 +748,8 @@ discard block |
||
748 | 748 | // line with lot |
749 | 749 | foreach ($lines[$i]->detail_batch as $detail_batch) { |
750 | 750 | $lotStock = new Productbatch($db); |
751 | - $batch = "batchl" . $detail_batch->fk_expeditiondet . "_" . $detail_batch->fk_origin_stock; |
|
752 | - $qty = "qtyl" . $detail_batch->fk_expeditiondet . '_' . $detail_batch->id; |
|
751 | + $batch = "batchl".$detail_batch->fk_expeditiondet."_".$detail_batch->fk_origin_stock; |
|
752 | + $qty = "qtyl".$detail_batch->fk_expeditiondet.'_'.$detail_batch->id; |
|
753 | 753 | $batch_id = GETPOSTINT($batch); |
754 | 754 | $batch_qty = GETPOSTFLOAT($qty); |
755 | 755 | if (!empty($batch_id)) { |
@@ -785,8 +785,8 @@ discard block |
||
785 | 785 | } |
786 | 786 | // add new batch |
787 | 787 | $lotStock = new Productbatch($db); |
788 | - $batch = "batchl" . $line_id . "_0"; |
|
789 | - $qty = "qtyl" . $line_id . "_0"; |
|
788 | + $batch = "batchl".$line_id."_0"; |
|
789 | + $qty = "qtyl".$line_id."_0"; |
|
790 | 790 | $batch_id = GETPOSTINT($batch); |
791 | 791 | $batch_qty = GETPOSTFLOAT($qty); |
792 | 792 | $lineIdToAddLot = 0; |
@@ -849,8 +849,8 @@ discard block |
||
849 | 849 | // line without lot |
850 | 850 | if ($lines[$i]->entrepot_id == 0) { |
851 | 851 | // single warehouse shipment line or line in several warehouses context but with warehouse not defined |
852 | - $stockLocation = "entl" . $line_id; |
|
853 | - $qty = "qtyl" . $line_id; |
|
852 | + $stockLocation = "entl".$line_id; |
|
853 | + $qty = "qtyl".$line_id; |
|
854 | 854 | $line->id = $line_id; |
855 | 855 | $line->entrepot_id = GETPOSTINT((string) $stockLocation); |
856 | 856 | $line->qty = GETPOSTFLOAT($qty); |
@@ -862,8 +862,8 @@ discard block |
||
862 | 862 | unset($_POST[$qty]); |
863 | 863 | } elseif ($lines[$i]->entrepot_id > 0) { |
864 | 864 | // single warehouse shipment line |
865 | - $stockLocation = "entl" . $line_id; |
|
866 | - $qty = "qtyl" . $line_id; |
|
865 | + $stockLocation = "entl".$line_id; |
|
866 | + $qty = "qtyl".$line_id; |
|
867 | 867 | $line->id = $line_id; |
868 | 868 | $line->entrepot_id = GETPOSTINT($stockLocation); |
869 | 869 | $line->qty = GETPOSTFLOAT($qty); |
@@ -877,8 +877,8 @@ discard block |
||
877 | 877 | // multi warehouse shipment lines |
878 | 878 | foreach ($lines[$i]->details_entrepot as $detail_entrepot) { |
879 | 879 | if (!$error) { |
880 | - $stockLocation = "entl" . $detail_entrepot->line_id; |
|
881 | - $qty = "qtyl" . $detail_entrepot->line_id; |
|
880 | + $stockLocation = "entl".$detail_entrepot->line_id; |
|
881 | + $qty = "qtyl".$detail_entrepot->line_id; |
|
882 | 882 | $warehouse = GETPOSTINT($stockLocation); |
883 | 883 | if (!empty($warehouse)) { |
884 | 884 | $line->id = $detail_entrepot->line_id; |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | } |
897 | 897 | } |
898 | 898 | } elseif (!isModEnabled('stock') && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated. |
899 | - $qty = "qtyl" . $line_id; |
|
899 | + $qty = "qtyl".$line_id; |
|
900 | 900 | $line->id = $line_id; |
901 | 901 | $line->qty = GETPOSTFLOAT($qty); |
902 | 902 | $line->entrepot_id = 0; |
@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | } |
911 | 911 | } else { |
912 | 912 | // Product no predefined |
913 | - $qty = "qtyl" . $line_id; |
|
913 | + $qty = "qtyl".$line_id; |
|
914 | 914 | $line->id = $line_id; |
915 | 915 | $line->qty = GETPOSTFLOAT($qty); |
916 | 916 | $line->entrepot_id = 0; |
@@ -953,11 +953,11 @@ discard block |
||
953 | 953 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
954 | 954 | } |
955 | 955 | } else { |
956 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited |
|
956 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited |
|
957 | 957 | exit(); |
958 | 958 | } |
959 | 959 | } elseif ($action == 'updateline' && $permissiontoadd && GETPOST('cancel', 'alpha') == $langs->trans("Cancel")) { |
960 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited |
|
960 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To redisplay the form being edited |
|
961 | 961 | exit(); |
962 | 962 | } elseif ($action == 'confirm_sign' && $confirm == 'yes' && $permissiontoadd) { |
963 | 963 | $result = $object->setSignedStatus($user, GETPOSTINT('signed_status'), 0, 'SHIPPING_MODIFY'); |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
980 | 980 | } |
981 | 981 | |
982 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
982 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
983 | 983 | exit; |
984 | 984 | } else { |
985 | 985 | $mesg = $object->error; |
@@ -1004,14 +1004,14 @@ discard block |
||
1004 | 1004 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
1005 | 1005 | } |
1006 | 1006 | |
1007 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
1007 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
1008 | 1008 | exit; |
1009 | 1009 | } else { |
1010 | 1010 | $mesg = $object->error; |
1011 | 1011 | } |
1012 | 1012 | } |
1013 | 1013 | |
1014 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
1014 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
1015 | 1015 | |
1016 | 1016 | // Actions to send emails |
1017 | 1017 | if (empty($id)) { |
@@ -1021,8 +1021,8 @@ discard block |
||
1021 | 1021 | $paramname = 'id'; |
1022 | 1022 | $autocopy = 'MAIN_MAIL_AUTOCOPY_SHIPMENT_TO'; |
1023 | 1023 | $mode = 'emailfromshipment'; |
1024 | - $trackid = 'shi' . $object->id; |
|
1025 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
1024 | + $trackid = 'shi'.$object->id; |
|
1025 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
1026 | 1026 | } |
1027 | 1027 | |
1028 | 1028 | |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | * View |
1031 | 1031 | */ |
1032 | 1032 | |
1033 | -$title = $object->ref . ' - ' . $langs->trans("Shipment"); |
|
1033 | +$title = $object->ref.' - '.$langs->trans("Shipment"); |
|
1034 | 1034 | if ($action == 'create2') { |
1035 | 1035 | $title = $langs->trans("CreateShipment"); |
1036 | 1036 | } |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | if ($action == 'create2') { |
1059 | 1059 | print load_fiche_titre($langs->trans("CreateShipment"), '', 'dolly'); |
1060 | 1060 | |
1061 | - print '<br>' . $langs->trans("ShipmentCreationIsDoneFromOrder"); |
|
1061 | + print '<br>'.$langs->trans("ShipmentCreationIsDoneFromOrder"); |
|
1062 | 1062 | $action = ''; |
1063 | 1063 | $id = ''; |
1064 | 1064 | $ref = ''; |
@@ -1092,13 +1092,13 @@ discard block |
||
1092 | 1092 | $entrepot = new Entrepot($db); |
1093 | 1093 | } |
1094 | 1094 | |
1095 | - print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
1096 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
1095 | + print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
1096 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
1097 | 1097 | print '<input type="hidden" name="action" value="add">'; |
1098 | - print '<input type="hidden" name="origin" value="' . $origin . '">'; |
|
1099 | - print '<input type="hidden" name="origin_id" value="' . $object->id . '">'; |
|
1098 | + print '<input type="hidden" name="origin" value="'.$origin.'">'; |
|
1099 | + print '<input type="hidden" name="origin_id" value="'.$object->id.'">'; |
|
1100 | 1100 | if (GETPOSTINT('entrepot_id')) { |
1101 | - print '<input type="hidden" name="entrepot_id" value="' . GETPOSTINT('entrepot_id') . '">'; |
|
1101 | + print '<input type="hidden" name="entrepot_id" value="'.GETPOSTINT('entrepot_id').'">'; |
|
1102 | 1102 | } |
1103 | 1103 | |
1104 | 1104 | print dol_get_fiche_head([]); |
@@ -1128,13 +1128,13 @@ discard block |
||
1128 | 1128 | print $langs->trans('RefCustomer'); |
1129 | 1129 | } |
1130 | 1130 | print '</td><td colspan="3">'; |
1131 | - print '<input type="text" name="ref_customer" value="' . $object->ref_client . '" />'; |
|
1131 | + print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />'; |
|
1132 | 1132 | print '</td>'; |
1133 | 1133 | print '</tr>'; |
1134 | 1134 | |
1135 | 1135 | // Tiers |
1136 | - print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Company') . '</td>'; |
|
1137 | - print '<td colspan="3">' . $soc->getNomUrl(1) . '</td>'; |
|
1136 | + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Company').'</td>'; |
|
1137 | + print '<td colspan="3">'.$soc->getNomUrl(1).'</td>'; |
|
1138 | 1138 | print '</tr>'; |
1139 | 1139 | |
1140 | 1140 | // Project |
@@ -1149,16 +1149,16 @@ discard block |
||
1149 | 1149 | |
1150 | 1150 | $langs->load("projects"); |
1151 | 1151 | print '<tr>'; |
1152 | - print '<td>' . $langs->trans("Project") . '</td><td colspan="2">'; |
|
1152 | + print '<td>'.$langs->trans("Project").'</td><td colspan="2">'; |
|
1153 | 1153 | print img_picto('', 'project', 'class="pictofixedwidth"'); |
1154 | 1154 | print $formproject->select_projects($soc->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'widthcentpercentminusxx'); |
1155 | - 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>'; |
|
1155 | + 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>'; |
|
1156 | 1156 | print '</td>'; |
1157 | 1157 | print '</tr>'; |
1158 | 1158 | } |
1159 | 1159 | |
1160 | 1160 | // Date delivery planned |
1161 | - print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>'; |
|
1161 | + print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>'; |
|
1162 | 1162 | print '<td colspan="3">'; |
1163 | 1163 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
1164 | 1164 | $date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date); // $date_delivery comes from GETPOST |
@@ -1167,7 +1167,7 @@ discard block |
||
1167 | 1167 | print '</tr>'; |
1168 | 1168 | |
1169 | 1169 | // Date shipment (sending) |
1170 | - print '<tr><td>' . $langs->trans("DateShipping") . '</td>'; |
|
1170 | + print '<tr><td>'.$langs->trans("DateShipping").'</td>'; |
|
1171 | 1171 | print '<td colspan="3">'; |
1172 | 1172 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
1173 | 1173 | //$date_shipping = ($date_shipping ? $date_shipping : $object->date_shipping); // $date_shipping comes from GETPOST |
@@ -1176,7 +1176,7 @@ discard block |
||
1176 | 1176 | print '</tr>'; |
1177 | 1177 | |
1178 | 1178 | // Note Public |
1179 | - print '<tr><td>' . $langs->trans("NotePublic") . '</td>'; |
|
1179 | + print '<tr><td>'.$langs->trans("NotePublic").'</td>'; |
|
1180 | 1180 | print '<td colspan="3">'; |
1181 | 1181 | $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%'); |
1182 | 1182 | print $doleditor->Create(1); |
@@ -1184,7 +1184,7 @@ discard block |
||
1184 | 1184 | |
1185 | 1185 | // Note Private |
1186 | 1186 | if ($object->note_private && !$user->socid) { |
1187 | - print '<tr><td>' . $langs->trans("NotePrivate") . '</td>'; |
|
1187 | + print '<tr><td>'.$langs->trans("NotePrivate").'</td>'; |
|
1188 | 1188 | print '<td colspan="3">'; |
1189 | 1189 | $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%'); |
1190 | 1190 | print $doleditor->Create(1); |
@@ -1196,19 +1196,19 @@ discard block |
||
1196 | 1196 | print $langs->trans("Weight"); |
1197 | 1197 | print '</td><td colspan="3">'; |
1198 | 1198 | print img_picto('', 'fa-balance-scale', 'class="pictofixedwidth"'); |
1199 | - print '<input name="weight" size="4" value="' . GETPOSTINT('weight') . '"> '; |
|
1199 | + print '<input name="weight" size="4" value="'.GETPOSTINT('weight').'"> '; |
|
1200 | 1200 | $text = $formproduct->selectMeasuringUnits("weight_units", "weight", (string) GETPOSTINT('weight_units'), 0, 2); |
1201 | 1201 | $htmltext = $langs->trans("KeepEmptyForAutoCalculation"); |
1202 | 1202 | print $form->textwithpicto($text, $htmltext); |
1203 | 1203 | print '</td></tr>'; |
1204 | 1204 | // Dim |
1205 | 1205 | print '<tr><td>'; |
1206 | - print $langs->trans("Width") . ' x ' . $langs->trans("Height") . ' x ' . $langs->trans("Depth"); |
|
1206 | + print $langs->trans("Width").' x '.$langs->trans("Height").' x '.$langs->trans("Depth"); |
|
1207 | 1207 | print ' </td><td colspan="3">'; |
1208 | 1208 | print img_picto('', 'fa-ruler', 'class="pictofixedwidth"'); |
1209 | - print '<input name="sizeW" size="4" value="' . GETPOSTINT('sizeW') . '">'; |
|
1210 | - print ' x <input name="sizeH" size="4" value="' . GETPOSTINT('sizeH') . '">'; |
|
1211 | - print ' x <input name="sizeS" size="4" value="' . GETPOSTINT('sizeS') . '">'; |
|
1209 | + print '<input name="sizeW" size="4" value="'.GETPOSTINT('sizeW').'">'; |
|
1210 | + print ' x <input name="sizeH" size="4" value="'.GETPOSTINT('sizeH').'">'; |
|
1211 | + print ' x <input name="sizeS" size="4" value="'.GETPOSTINT('sizeS').'">'; |
|
1212 | 1212 | print ' '; |
1213 | 1213 | $text = $formproduct->selectMeasuringUnits("size_units", "size", (string) GETPOSTINT('size_units'), 0, 2); |
1214 | 1214 | $htmltext = $langs->trans("KeepEmptyForAutoCalculation"); |
@@ -1216,7 +1216,7 @@ discard block |
||
1216 | 1216 | print '</td></tr>'; |
1217 | 1217 | |
1218 | 1218 | // Delivery method |
1219 | - print "<tr><td>" . $langs->trans("DeliveryMethod") . "</td>"; |
|
1219 | + print "<tr><td>".$langs->trans("DeliveryMethod")."</td>"; |
|
1220 | 1220 | print '<td colspan="3">'; |
1221 | 1221 | $expe->fetch_delivery_methods(); |
1222 | 1222 | print img_picto('', 'dolly', 'class="pictofixedwidth"'); |
@@ -1227,16 +1227,16 @@ discard block |
||
1227 | 1227 | print "</td></tr>\n"; |
1228 | 1228 | |
1229 | 1229 | // Tracking number |
1230 | - print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>"; |
|
1230 | + print "<tr><td>".$langs->trans("TrackingNumber")."</td>"; |
|
1231 | 1231 | print '<td colspan="3">'; |
1232 | 1232 | print img_picto('', 'barcode', 'class="pictofixedwidth"'); |
1233 | - print '<input name="tracking_number" size="20" value="' . GETPOST('tracking_number', 'alpha') . '">'; |
|
1233 | + print '<input name="tracking_number" size="20" value="'.GETPOST('tracking_number', 'alpha').'">'; |
|
1234 | 1234 | print "</td></tr>\n"; |
1235 | 1235 | |
1236 | 1236 | // Incoterms |
1237 | 1237 | if (isModEnabled('incoterm')) { |
1238 | 1238 | print '<tr>'; |
1239 | - print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1) . '</label></td>'; |
|
1239 | + print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>'; |
|
1240 | 1240 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
1241 | 1241 | print img_picto('', 'incoterm', 'class="pictofixedwidth"'); |
1242 | 1242 | print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); |
@@ -1244,10 +1244,10 @@ discard block |
||
1244 | 1244 | } |
1245 | 1245 | |
1246 | 1246 | // Document model |
1247 | - include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php'; |
|
1247 | + include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; |
|
1248 | 1248 | $list = ModelePdfExpedition::liste_modeles($db); |
1249 | 1249 | if (is_countable($list) && count($list) > 1) { |
1250 | - print "<tr><td>" . $langs->trans("DefaultModel") . "</td>"; |
|
1250 | + print "<tr><td>".$langs->trans("DefaultModel")."</td>"; |
|
1251 | 1251 | print '<td colspan="3">'; |
1252 | 1252 | print img_picto('', 'pdf', 'class="pictofixedwidth"'); |
1253 | 1253 | print $form->selectarray('model', $list, getDolGlobalString('EXPEDITION_ADDON_PDF'), 0, 0, 0, '', 0, 0, 0, '', 'widthcentpercentminusx'); |
@@ -1256,7 +1256,7 @@ discard block |
||
1256 | 1256 | |
1257 | 1257 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
1258 | 1258 | // $objectsrc is Commande|Facture |
1259 | - $objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc. |
|
1259 | + $objectsav = $object; // Because Expedition is $expe and not $object that is wrongly a duplicate of $objectsrc. |
|
1260 | 1260 | $object = $expe; |
1261 | 1261 | $parameters = array('objectsrc' => isset($objectsrc) ? $objectsrc : '', 'cols' => '3', 'socid' => $socid); |
1262 | 1262 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
@@ -1271,22 +1271,22 @@ discard block |
||
1271 | 1271 | |
1272 | 1272 | $numAsked = count($object->lines); |
1273 | 1273 | |
1274 | - print '<script type="text/javascript">' . "\n"; |
|
1275 | - print 'jQuery(document).ready(function() {' . "\n"; |
|
1274 | + print '<script type="text/javascript">'."\n"; |
|
1275 | + print 'jQuery(document).ready(function() {'."\n"; |
|
1276 | 1276 | print 'jQuery("#autofill").click(function() {'; |
1277 | 1277 | $i = 0; |
1278 | 1278 | while ($i < $numAsked) { |
1279 | - print 'jQuery("#qtyl' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n"; |
|
1279 | + print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; |
|
1280 | 1280 | if (isModEnabled('productbatch')) { |
1281 | - print 'jQuery("#qtyl' . $i . '_' . $i . '").val(jQuery("#qtyasked' . $i . '").val() - jQuery("#qtydelivered' . $i . '").val());' . "\n"; |
|
1281 | + print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; |
|
1282 | 1282 | } |
1283 | 1283 | $i++; |
1284 | 1284 | } |
1285 | - print 'return false; });' . "\n"; |
|
1286 | - print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);' . "\n"; |
|
1287 | - print 'return false; });' . "\n"; |
|
1288 | - print '});' . "\n"; |
|
1289 | - print '</script>' . "\n"; |
|
1285 | + print 'return false; });'."\n"; |
|
1286 | + print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);'."\n"; |
|
1287 | + print 'return false; });'."\n"; |
|
1288 | + print '});'."\n"; |
|
1289 | + print '</script>'."\n"; |
|
1290 | 1290 | |
1291 | 1291 | print '<br>'; |
1292 | 1292 | |
@@ -1320,26 +1320,26 @@ discard block |
||
1320 | 1320 | } |
1321 | 1321 | print $langs->trans("Description"); |
1322 | 1322 | print '</td>'; |
1323 | - print '<td class="center">' . $langs->trans("QtyOrdered") . '</td>'; |
|
1324 | - print '<td class="center">' . $langs->trans("QtyShipped") . '</td>'; |
|
1325 | - print '<td class="center">' . $langs->trans("QtyToShip"); |
|
1323 | + print '<td class="center">'.$langs->trans("QtyOrdered").'</td>'; |
|
1324 | + print '<td class="center">'.$langs->trans("QtyShipped").'</td>'; |
|
1325 | + print '<td class="center">'.$langs->trans("QtyToShip"); |
|
1326 | 1326 | if (empty($conf->productbatch->enabled)) { |
1327 | - print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"') . '</a>'; |
|
1327 | + print '<br><a href="#" id="autofill" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"').'</a>'; |
|
1328 | 1328 | print ' / '; |
1329 | 1329 | } else { |
1330 | 1330 | print '<br>'; |
1331 | 1331 | } |
1332 | - print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">' . img_picto($langs->trans("Reset"), 'eraser') . '</span>'; |
|
1332 | + print '<span id="autoreset" class="opacitymedium link cursor cursorpointer">'.img_picto($langs->trans("Reset"), 'eraser').'</span>'; |
|
1333 | 1333 | print '</td>'; |
1334 | 1334 | if (isModEnabled('stock')) { |
1335 | 1335 | if (empty($conf->productbatch->enabled)) { |
1336 | - print '<td class="left">' . $langs->trans("Warehouse") . ' (' . $langs->trans("Stock") . ')</td>'; |
|
1336 | + print '<td class="left">'.$langs->trans("Warehouse").' ('.$langs->trans("Stock").')</td>'; |
|
1337 | 1337 | } else { |
1338 | - print '<td class="left">' . $langs->trans("Warehouse") . ' / ' . $langs->trans("Batch") . ' (' . $langs->trans("Stock") . ')</td>'; |
|
1338 | + print '<td class="left">'.$langs->trans("Warehouse").' / '.$langs->trans("Batch").' ('.$langs->trans("Stock").')</td>'; |
|
1339 | 1339 | } |
1340 | 1340 | } |
1341 | 1341 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
1342 | - print '<td class="left">' . $langs->trans('StockEntryDate') . '</td>'; |
|
1342 | + print '<td class="left">'.$langs->trans('StockEntryDate').'</td>'; |
|
1343 | 1343 | } |
1344 | 1344 | print "</tr>\n"; |
1345 | 1345 | } |
@@ -1376,8 +1376,8 @@ discard block |
||
1376 | 1376 | $type = 1; |
1377 | 1377 | } |
1378 | 1378 | |
1379 | - print '<!-- line for order line ' . $line->id . ' -->' . "\n"; |
|
1380 | - print '<tr class="oddeven" id="row-' . $line->id . '">' . "\n"; |
|
1379 | + print '<!-- line for order line '.$line->id.' -->'."\n"; |
|
1380 | + print '<tr class="oddeven" id="row-'.$line->id.'">'."\n"; |
|
1381 | 1381 | |
1382 | 1382 | $qtyProdCom = $line->qty; |
1383 | 1383 | $productChildrenNb = 0; |
@@ -1398,7 +1398,7 @@ discard block |
||
1398 | 1398 | //var_dump($product->stock_warehouse[1]); |
1399 | 1399 | |
1400 | 1400 | print '<td>'; |
1401 | - print '<a name="' . $line->id . '"></a>'; // ancre pour retourner sur la ligne |
|
1401 | + print '<a name="'.$line->id.'"></a>'; // ancre pour retourner sur la ligne |
|
1402 | 1402 | |
1403 | 1403 | // Show product and description |
1404 | 1404 | $product_static->type = $line->fk_product_type; |
@@ -1411,7 +1411,7 @@ discard block |
||
1411 | 1411 | $showdescinproductdesc = getDolGlobalString('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE'); |
1412 | 1412 | |
1413 | 1413 | $text = $product_static->getNomUrl(1); |
1414 | - $text .= ' - ' . (!empty($line->label) ? $line->label : $line->product_label); |
|
1414 | + $text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label); |
|
1415 | 1415 | $description = ($showdescinproductdesc ? '' : dol_htmlentitiesbr($line->desc)); |
1416 | 1416 | $description .= empty($product->stockable_product) ? $langs->trans('StockDisabled') : $langs->trans('StockEnabled'); |
1417 | 1417 | print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i); |
@@ -1421,7 +1421,7 @@ discard block |
||
1421 | 1421 | |
1422 | 1422 | // Add description in form |
1423 | 1423 | if ($showdescinproductdesc) { |
1424 | - print ($line->desc && $line->desc != $line->product_label) ? '<br>' . dol_htmlentitiesbr($line->desc) : ''; |
|
1424 | + print ($line->desc && $line->desc != $line->product_label) ? '<br>'.dol_htmlentitiesbr($line->desc) : ''; |
|
1425 | 1425 | } |
1426 | 1426 | |
1427 | 1427 | print '</td>'; |
@@ -1434,10 +1434,10 @@ discard block |
||
1434 | 1434 | } |
1435 | 1435 | |
1436 | 1436 | if (!empty($line->label)) { |
1437 | - $text .= ' <strong>' . $line->label . '</strong>'; |
|
1437 | + $text .= ' <strong>'.$line->label.'</strong>'; |
|
1438 | 1438 | print $form->textwithtooltip($text, $line->desc, 3, 0, '', (string) $i); |
1439 | 1439 | } else { |
1440 | - print $text . ' ' . nl2br($line->desc); |
|
1440 | + print $text.' '.nl2br($line->desc); |
|
1441 | 1441 | } |
1442 | 1442 | |
1443 | 1443 | // Show range |
@@ -1452,16 +1452,16 @@ discard block |
||
1452 | 1452 | } |
1453 | 1453 | |
1454 | 1454 | // Qty |
1455 | - print '<td class="center">' . $line->qty; |
|
1456 | - print '<input name="qtyasked' . $indiceAsked . '" id="qtyasked' . $indiceAsked . '" type="hidden" value="' . $line->qty . '">'; |
|
1457 | - print '' . $unit_order . '</td>'; |
|
1455 | + print '<td class="center">'.$line->qty; |
|
1456 | + print '<input name="qtyasked'.$indiceAsked.'" id="qtyasked'.$indiceAsked.'" type="hidden" value="'.$line->qty.'">'; |
|
1457 | + print ''.$unit_order.'</td>'; |
|
1458 | 1458 | |
1459 | 1459 | // Qty already shipped |
1460 | 1460 | print '<td class="center">'; |
1461 | 1461 | $quantityDelivered = isset($object->expeditions[$line->id]) ? $object->expeditions[$line->id] : ''; |
1462 | 1462 | print $quantityDelivered; |
1463 | - print '<input name="qtydelivered' . $indiceAsked . '" id="qtydelivered' . $indiceAsked . '" type="hidden" value="' . $quantityDelivered . '">'; |
|
1464 | - print '' . $unit_order . '</td>'; |
|
1463 | + print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">'; |
|
1464 | + print ''.$unit_order.'</td>'; |
|
1465 | 1465 | |
1466 | 1466 | // Qty to ship |
1467 | 1467 | $quantityAsked = $line->qty; |
@@ -1492,19 +1492,19 @@ discard block |
||
1492 | 1492 | // Quantity to send |
1493 | 1493 | print '<td class="center">'; |
1494 | 1494 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES'))) { |
1495 | - if (GETPOSTINT('qtyl' . $indiceAsked)) { |
|
1496 | - $deliverableQty = GETPOSTINT('qtyl' . $indiceAsked); |
|
1495 | + if (GETPOSTINT('qtyl'.$indiceAsked)) { |
|
1496 | + $deliverableQty = GETPOSTINT('qtyl'.$indiceAsked); |
|
1497 | 1497 | } |
1498 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
1498 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
1499 | 1499 | $qtylValue = $deliverableQty; |
1500 | 1500 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
1501 | 1501 | $qtylValue = ''; |
1502 | 1502 | } |
1503 | - print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" class="qtyl right" type="text" size="4" value="' . $qtylValue . '">'; |
|
1503 | + print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" class="qtyl right" type="text" size="4" value="'.$qtylValue.'">'; |
|
1504 | 1504 | } else { |
1505 | 1505 | if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
1506 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
1507 | - print '<input name="qtyl' . $indiceAsked . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">'; |
|
1506 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
1507 | + print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">'; |
|
1508 | 1508 | } |
1509 | 1509 | |
1510 | 1510 | print $langs->trans("NA"); |
@@ -1516,8 +1516,8 @@ discard block |
||
1516 | 1516 | print '<td class="left">'; |
1517 | 1517 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { // Type of product need stock change ? |
1518 | 1518 | // Show warehouse combo list |
1519 | - $ent = "entl" . $indiceAsked; |
|
1520 | - $idl = "idl" . $indiceAsked; |
|
1519 | + $ent = "entl".$indiceAsked; |
|
1520 | + $idl = "idl".$indiceAsked; |
|
1521 | 1521 | $tmpentrepot_id = is_numeric(GETPOST($ent)) ? GETPOSTINT($ent) : $warehouse_id; |
1522 | 1522 | if ($line->fk_product > 0) { |
1523 | 1523 | print '<!-- Show warehouse selection -->'; |
@@ -1527,24 +1527,24 @@ discard block |
||
1527 | 1527 | $stockMin = 0; |
1528 | 1528 | } |
1529 | 1529 | if ($productChildrenNb > 0) { |
1530 | - print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
1530 | + print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
1531 | 1531 | } else { |
1532 | 1532 | if ($product->stockable_product == Product::ENABLED_STOCK) { |
1533 | - print $formproduct->selectWarehouses($tmpentrepot_id, 'entl' . $indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
1533 | + print $formproduct->selectWarehouses($tmpentrepot_id, 'entl'.$indiceAsked, '', 1, 0, $line->fk_product, '', 1, 0, array(), 'minwidth200', array(), 1, $stockMin, 'stock DESC, e.ref'); |
|
1534 | 1534 | } else { |
1535 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
1535 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
1536 | 1536 | } |
1537 | 1537 | } |
1538 | 1538 | |
1539 | 1539 | if ($tmpentrepot_id > 0 && $tmpentrepot_id == $warehouse_id) { |
1540 | 1540 | //print $stock.' '.$quantityToBeDelivered; |
1541 | 1541 | if ($stock < $quantityToBeDelivered) { |
1542 | - print ' ' . img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse |
|
1542 | + print ' '.img_warning($langs->trans("StockTooLow")); // Stock too low for this $warehouse_id but you can change warehouse |
|
1543 | 1543 | } |
1544 | 1544 | } |
1545 | 1545 | } |
1546 | 1546 | } else { |
1547 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span><input name="entl' . $indiceAsked . '" id="entl' . $indiceAsked . '" type="hidden" value="0">'; |
|
1547 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span><input name="entl'.$indiceAsked.'" id="entl'.$indiceAsked.'" type="hidden" value="0">'; |
|
1548 | 1548 | } |
1549 | 1549 | print '</td>'; |
1550 | 1550 | } |
@@ -1565,9 +1565,9 @@ discard block |
||
1565 | 1565 | $img = img_warning($langs->trans("StockTooLow")); |
1566 | 1566 | } |
1567 | 1567 | print "<tr class=\"oddeven\"><td> -> |
1568 | - <a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . " |
|
1569 | - </a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td> </td><td> </td> |
|
1570 | - <td class=\"center\">" . $value['stock'] . " " . $img . "</td>"; |
|
1568 | + <a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
|
1569 | + </a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
|
1570 | + <td class=\"center\">" . $value['stock']." ".$img."</td>"; |
|
1571 | 1571 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
1572 | 1572 | print '<td></td>'; |
1573 | 1573 | } //StockEntrydate |
@@ -1597,7 +1597,7 @@ discard block |
||
1597 | 1597 | $nbofsuggested++; |
1598 | 1598 | } |
1599 | 1599 | } |
1600 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
1600 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
1601 | 1601 | if (is_object($product->stock_warehouse[$warehouse_id]) && count($product->stock_warehouse[$warehouse_id]->detail_batch)) { |
1602 | 1602 | foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch) { // $dbatch is instance of Productbatch |
1603 | 1603 | //var_dump($dbatch); |
@@ -1623,7 +1623,7 @@ discard block |
||
1623 | 1623 | $deliverableQty = 0; |
1624 | 1624 | } |
1625 | 1625 | |
1626 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
1626 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
1627 | 1627 | if (GETPOSTISSET($inputName)) { |
1628 | 1628 | $deliverableQty = GETPOST($inputName, 'int'); |
1629 | 1629 | } |
@@ -1631,37 +1631,37 @@ discard block |
||
1631 | 1631 | $tooltipClass = $tooltipTitle = ''; |
1632 | 1632 | if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) { |
1633 | 1633 | $tooltipClass = ' classfortooltip'; |
1634 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
1634 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
1635 | 1635 | } else { |
1636 | 1636 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
1637 | 1637 | } |
1638 | 1638 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
1639 | 1639 | |
1640 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>'; |
|
1640 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>'; |
|
1641 | 1641 | print '<td colspan="3" ></td><td class="center">'; |
1642 | 1642 | $qtylValue = $deliverableQty; |
1643 | 1643 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
1644 | 1644 | $qtylValue = ''; |
1645 | 1645 | } |
1646 | - print '<input class="qtyl ' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
1646 | + print '<input class="qtyl '.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
1647 | 1647 | print '</td>'; |
1648 | 1648 | |
1649 | 1649 | print '<!-- Show details of lot -->'; |
1650 | 1650 | print '<td class="left">'; |
1651 | 1651 | |
1652 | - print $staticwarehouse->getNomUrl(0) . ' / '; |
|
1652 | + print $staticwarehouse->getNomUrl(0).' / '; |
|
1653 | 1653 | |
1654 | - print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">'; |
|
1654 | + print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">'; |
|
1655 | 1655 | |
1656 | 1656 | $detail = ''; |
1657 | - $detail .= $langs->trans("Batch") . ': ' . $dbatch->batch; |
|
1657 | + $detail .= $langs->trans("Batch").': '.$dbatch->batch; |
|
1658 | 1658 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) { |
1659 | - $detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
1659 | + $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
1660 | 1660 | } |
1661 | 1661 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) { |
1662 | - $detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
1662 | + $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
1663 | 1663 | } |
1664 | - $detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty; |
|
1664 | + $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; |
|
1665 | 1665 | $detail .= '<br>'; |
1666 | 1666 | print $detail; |
1667 | 1667 | |
@@ -1672,18 +1672,18 @@ discard block |
||
1672 | 1672 | $subj++; |
1673 | 1673 | print '</td>'; |
1674 | 1674 | if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
1675 | - print '<td>' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; //StockEntrydate |
|
1675 | + print '<td>'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; //StockEntrydate |
|
1676 | 1676 | } |
1677 | 1677 | print '</tr>'; |
1678 | 1678 | } |
1679 | 1679 | } else { |
1680 | 1680 | print '<!-- Case there is no details of lot at all -->'; |
1681 | 1681 | print '<tr class="oddeven"><td colspan="3"></td><td class="center">'; |
1682 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0" disabled="disabled"> '; |
|
1682 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0" disabled="disabled"> '; |
|
1683 | 1683 | print '</td>'; |
1684 | 1684 | |
1685 | 1685 | print '<td class="left">'; |
1686 | - print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); |
|
1686 | + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $staticwarehouse->label); |
|
1687 | 1687 | print '</td>'; |
1688 | 1688 | if (getDolGlobalInt('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
1689 | 1689 | print '<td></td>'; |
@@ -1699,9 +1699,9 @@ discard block |
||
1699 | 1699 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
1700 | 1700 | print '<td></td>'; |
1701 | 1701 | } //StockEntrydate |
1702 | - print '</tr>' . "\n"; // end line and start a new one for each warehouse |
|
1702 | + print '</tr>'."\n"; // end line and start a new one for each warehouse |
|
1703 | 1703 | |
1704 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
1704 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
1705 | 1705 | $subj = 0; |
1706 | 1706 | // Define nb of lines suggested for this order line |
1707 | 1707 | $nbofsuggested = 0; |
@@ -1725,8 +1725,8 @@ discard block |
||
1725 | 1725 | $deliverableQty = min($quantityToBeDelivered, $stock); |
1726 | 1726 | $deliverableQty = max(0, $deliverableQty); |
1727 | 1727 | // Quantity to send |
1728 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '>'; |
|
1729 | - print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked=' . $indiceAsked . ') -->'; |
|
1728 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'>'; |
|
1729 | + print '<td colspan="3" ></td><td class="center"><!-- qty to ship (no lot management for product line indiceAsked='.$indiceAsked.') -->'; |
|
1730 | 1730 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
1731 | 1731 | if (isset($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) { |
1732 | 1732 | $deliverableQty = min($quantityToBeDelivered, $stock - $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]); |
@@ -1745,14 +1745,14 @@ discard block |
||
1745 | 1745 | $tooltipClass = $tooltipTitle = ''; |
1746 | 1746 | if (!empty($alreadyQtySetted[$line->fk_product][intval($warehouse_id)])) { |
1747 | 1747 | $tooltipClass = ' classfortooltip'; |
1748 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
|
1748 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
|
1749 | 1749 | } else { |
1750 | 1750 | $alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = 0; |
1751 | 1751 | } |
1752 | 1752 | |
1753 | 1753 | $alreadyQtySetted[$line->fk_product][intval($warehouse_id)] = $deliverableQty + $alreadyQtySetted[$line->fk_product][intval($warehouse_id)]; |
1754 | 1754 | |
1755 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
1755 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
1756 | 1756 | if (GETPOSTISSET($inputName)) { |
1757 | 1757 | $deliverableQty = GETPOSTINT($inputName); |
1758 | 1758 | } |
@@ -1760,11 +1760,11 @@ discard block |
||
1760 | 1760 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
1761 | 1761 | $qtylValue = ''; |
1762 | 1762 | } |
1763 | - print '<input class="qtyl' . $tooltipClass . ' right" title="' . $tooltipTitle . '" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
1764 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_id . '">'; |
|
1763 | + print '<input class="qtyl'.$tooltipClass.' right" title="'.$tooltipTitle.'" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
1764 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_id.'">'; |
|
1765 | 1765 | } else { |
1766 | 1766 | if (getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) { |
1767 | - print '<input name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '" type="hidden" value="0">'; |
|
1767 | + print '<input name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'" type="hidden" value="0">'; |
|
1768 | 1768 | } |
1769 | 1769 | |
1770 | 1770 | print $langs->trans("NA"); |
@@ -1776,16 +1776,16 @@ discard block |
||
1776 | 1776 | print '<td class="left">'; |
1777 | 1777 | if ($line->product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
1778 | 1778 | if ($product->stockable_product == Product::ENABLED_STOCK || $productChildrenNb > 0) { |
1779 | - print $tmpwarehouseObject->getNomUrl(0) . ' '; |
|
1779 | + print $tmpwarehouseObject->getNomUrl(0).' '; |
|
1780 | 1780 | if ($productChildrenNb <= 0) { |
1781 | 1781 | print '<!-- Show details of stock -->'; |
1782 | - print '(' . $stock . ')'; |
|
1782 | + print '('.$stock.')'; |
|
1783 | 1783 | } |
1784 | 1784 | } else { |
1785 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
1785 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
1786 | 1786 | } |
1787 | 1787 | } else { |
1788 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
1788 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
1789 | 1789 | } |
1790 | 1790 | print '</td>'; |
1791 | 1791 | } |
@@ -1813,9 +1813,9 @@ discard block |
||
1813 | 1813 | } |
1814 | 1814 | print '<tr class"oddeven"><td>'; |
1815 | 1815 | print " -> |
1816 | - <a href=\"" . DOL_URL_ROOT . "/product/card.php?id=" . $value['id'] . "\">" . $value['fullpath'] . " |
|
1817 | - </a> (" . $value['nb'] . ")</td><td class=\"center\"> " . $value['nb_total'] . "</td><td> </td><td> </td> |
|
1818 | - <td class=\"center\">" . $value['stock'] . " " . $img . "</td>"; |
|
1816 | + <a href=\"" . DOL_URL_ROOT."/product/card.php?id=".$value['id']."\">".$value['fullpath']." |
|
1817 | + </a> (" . $value['nb'].")</td><td class=\"center\"> ".$value['nb_total']."</td><td> </td><td> </td> |
|
1818 | + <td class=\"center\">" . $value['stock']." ".$img."</td>"; |
|
1819 | 1819 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
1820 | 1820 | print '<td></td>'; |
1821 | 1821 | } //StockEntrydate |
@@ -1832,7 +1832,7 @@ discard block |
||
1832 | 1832 | print '</tr>'; // end line and start a new one for lot/serial |
1833 | 1833 | |
1834 | 1834 | $subj = 0; |
1835 | - print '<input name="idl' . $indiceAsked . '" type="hidden" value="' . $line->id . '">'; |
|
1835 | + print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">'; |
|
1836 | 1836 | |
1837 | 1837 | $tmpwarehouseObject = new Entrepot($db); |
1838 | 1838 | $productlotObject = new Productlot($db); |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | $deliverableQty = 0; |
1875 | 1875 | } |
1876 | 1876 | |
1877 | - $inputName = 'qtyl' . $indiceAsked . '_' . $subj; |
|
1877 | + $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
|
1878 | 1878 | if (GETPOSTISSET($inputName)) { |
1879 | 1879 | $deliverableQty = GETPOSTINT($inputName); |
1880 | 1880 | } |
@@ -1882,29 +1882,29 @@ discard block |
||
1882 | 1882 | $tooltipClass = $tooltipTitle = ''; |
1883 | 1883 | if (!empty($alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)])) { |
1884 | 1884 | $tooltipClass = ' classfortooltip'; |
1885 | - $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
1885 | + $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
|
1886 | 1886 | } else { |
1887 | 1887 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0; |
1888 | 1888 | } |
1889 | 1889 | $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)]; |
1890 | 1890 | |
1891 | - print '<!-- subj=' . $subj . '/' . $nbofsuggested . ' --><tr ' . ((($subj + 1) == $nbofsuggested) ? 'oddeven' : '') . '><td colspan="3"></td><td class="center">'; |
|
1891 | + print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'><td colspan="3"></td><td class="center">'; |
|
1892 | 1892 | $qtylValue = $deliverableQty; |
1893 | 1893 | if (getDolGlobalBool('SHIPMENT_DONT_PREFILL_QTY', false)) { |
1894 | 1894 | $qtylValue = ''; |
1895 | 1895 | } |
1896 | - print '<input class="qtyl right ' . $tooltipClass . '" title="' . $tooltipTitle . '" name="' . $inputName . '" id="' . $inputName . '" type="text" size="4" value="' . $qtylValue . '">'; |
|
1896 | + print '<input class="qtyl right '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$qtylValue.'">'; |
|
1897 | 1897 | print '</td>'; |
1898 | 1898 | |
1899 | 1899 | print '<td class="left">'; |
1900 | 1900 | |
1901 | - print $tmpwarehouseObject->getNomUrl(0) . ' / '; |
|
1901 | + print $tmpwarehouseObject->getNomUrl(0).' / '; |
|
1902 | 1902 | |
1903 | 1903 | print '<!-- Show details of lot -->'; |
1904 | - print '<input name="batchl' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $dbatch->id . '">'; |
|
1904 | + print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">'; |
|
1905 | 1905 | |
1906 | 1906 | //print '|'.$line->fk_product.'|'.$dbatch->batch.'|<br>'; |
1907 | - print $langs->trans("Batch") . ': '; |
|
1907 | + print $langs->trans("Batch").': '; |
|
1908 | 1908 | $result = $productlotObject->fetch(0, $line->fk_product, $dbatch->batch); |
1909 | 1909 | if ($result > 0) { |
1910 | 1910 | print $productlotObject->getNomUrl(1); |
@@ -1912,12 +1912,12 @@ discard block |
||
1912 | 1912 | print $langs->trans("TableLotIncompleteRunRepairWithParamStandardEqualConfirmed"); |
1913 | 1913 | } |
1914 | 1914 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY') && !empty($dbatch->sellby)) { |
1915 | - print ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
1915 | + print ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
1916 | 1916 | } |
1917 | 1917 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY') && !empty($dbatch->eatby)) { |
1918 | - print ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
1918 | + print ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
1919 | 1919 | } |
1920 | - print ' (' . $dbatch->qty . ')'; |
|
1920 | + print ' ('.$dbatch->qty.')'; |
|
1921 | 1921 | $quantityToBeDelivered -= $deliverableQty; |
1922 | 1922 | if ($quantityToBeDelivered < 0) { |
1923 | 1923 | $quantityToBeDelivered = 0; |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | $subj++; |
1927 | 1927 | print '</td>'; |
1928 | 1928 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
1929 | - print '<td class="left">' . dol_print_date($dbatch->context['stock_entry_date'], 'day') . '</td>'; |
|
1929 | + print '<td class="left">'.dol_print_date($dbatch->context['stock_entry_date'], 'day').'</td>'; |
|
1930 | 1930 | } |
1931 | 1931 | print '</tr>'; |
1932 | 1932 | } |
@@ -1951,9 +1951,9 @@ discard block |
||
1951 | 1951 | if ($product->stockable_product == Product::DISABLED_STOCK) { |
1952 | 1952 | $disabled = ''; |
1953 | 1953 | } |
1954 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="0"' . ($disabled ? ' ' . $disabled : '') . '> '; |
|
1954 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="0"'.($disabled ? ' '.$disabled : '').'> '; |
|
1955 | 1955 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
1956 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
1956 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
1957 | 1957 | } |
1958 | 1958 | } elseif ($line->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
1959 | 1959 | $disabled = ''; |
@@ -1963,9 +1963,9 @@ discard block |
||
1963 | 1963 | if ($warehouse_selected_id <= 0) { // We did not force a given warehouse, so we won't have no warehouse to change qty. |
1964 | 1964 | $disabled = 'disabled="disabled"'; |
1965 | 1965 | } |
1966 | - print '<input class="qtyl right" name="qtyl' . $indiceAsked . '_' . $subj . '" id="qtyl' . $indiceAsked . '_' . $subj . '" type="text" size="4" value="' . $quantityToBeDelivered . '"' . ($disabled ? ' ' . $disabled : '') . '> '; |
|
1966 | + print '<input class="qtyl right" name="qtyl'.$indiceAsked.'_'.$subj.'" id="qtyl'.$indiceAsked.'_'.$subj.'" type="text" size="4" value="'.$quantityToBeDelivered.'"'.($disabled ? ' '.$disabled : '').'> '; |
|
1967 | 1967 | if (empty($disabled) && !getDolGlobalInt('STOCK_DISALLOW_NEGATIVE_TRANSFER')) { |
1968 | - print '<input name="ent1' . $indiceAsked . '_' . $subj . '" type="hidden" value="' . $warehouse_selected_id . '">'; |
|
1968 | + print '<input name="ent1'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$warehouse_selected_id.'">'; |
|
1969 | 1969 | } |
1970 | 1970 | } else { |
1971 | 1971 | print $langs->trans("NA"); |
@@ -1977,20 +1977,20 @@ discard block |
||
1977 | 1977 | if ($warehouse_selected_id > 0) { |
1978 | 1978 | $warehouseObject = new Entrepot($db); |
1979 | 1979 | $warehouseObject->fetch($warehouse_selected_id); |
1980 | - print img_warning() . ' ' . $langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); |
|
1980 | + print img_warning().' '.$langs->trans("NoProductToShipFoundIntoStock", $warehouseObject->label); |
|
1981 | 1981 | } else { |
1982 | 1982 | if ($line->fk_product) { |
1983 | 1983 | if ($product->stockable_product == Product::ENABLED_STOCK) { |
1984 | - print img_warning() . ' ' . $langs->trans('StockTooLow'); |
|
1984 | + print img_warning().' '.$langs->trans('StockTooLow'); |
|
1985 | 1985 | } else { |
1986 | - print img_warning() . ' ' . $langs->trans('StockDisabled'); |
|
1986 | + print img_warning().' '.$langs->trans('StockDisabled'); |
|
1987 | 1987 | } |
1988 | 1988 | } else { |
1989 | 1989 | print ''; |
1990 | 1990 | } |
1991 | 1991 | } |
1992 | 1992 | } else { |
1993 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
1993 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
1994 | 1994 | } |
1995 | 1995 | print '</td>'; |
1996 | 1996 | if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { |
@@ -2037,7 +2037,7 @@ discard block |
||
2037 | 2037 | } |
2038 | 2038 | } |
2039 | 2039 | } elseif ($object->id > 0) { |
2040 | - '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
2040 | + '@phan-var-force Expedition $object'; // Need to force it (type overridden earlier) |
|
2041 | 2041 | |
2042 | 2042 | // Edit and view mode |
2043 | 2043 | |
@@ -2077,7 +2077,7 @@ discard block |
||
2077 | 2077 | ); |
2078 | 2078 | } |
2079 | 2079 | $formconfirm = $form->formconfirm( |
2080 | - $_SERVER['PHP_SELF'] . '?id=' . $object->id, |
|
2080 | + $_SERVER['PHP_SELF'].'?id='.$object->id, |
|
2081 | 2081 | $langs->trans('DeleteSending'), |
2082 | 2082 | $langs->trans("ConfirmDeleteSending", $object->ref), |
2083 | 2083 | 'confirm_delete', |
@@ -2098,7 +2098,7 @@ discard block |
||
2098 | 2098 | $title = "DeleteTitleLine"; |
2099 | 2099 | $question = "ConfirmDeleteTitleLine"; |
2100 | 2100 | } |
2101 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
2101 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
2102 | 2102 | } |
2103 | 2103 | |
2104 | 2104 | // Confirm validation |
@@ -2112,13 +2112,13 @@ discard block |
||
2112 | 2112 | |
2113 | 2113 | $text = $langs->trans("ConfirmValidateSending", $numref); |
2114 | 2114 | if (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) { |
2115 | - $text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementWillBeRecorded") . '.'; |
|
2115 | + $text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementWillBeRecorded").'.'; |
|
2116 | 2116 | } elseif (getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) { |
2117 | - $text .= '<br>' . img_picto('', 'movement', 'class="pictofixedwidth"') . $langs->trans("StockMovementNotYetRecorded") . '.'; |
|
2117 | + $text .= '<br>'.img_picto('', 'movement', 'class="pictofixedwidth"').$langs->trans("StockMovementNotYetRecorded").'.'; |
|
2118 | 2118 | } |
2119 | 2119 | |
2120 | 2120 | if (isModEnabled('notification')) { |
2121 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
2121 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
2122 | 2122 | $notify = new Notify($db); |
2123 | 2123 | $text .= '<br>'; |
2124 | 2124 | $text .= $notify->confirmMessage('SHIPPING_VALIDATE', $object->socid, $object); |
@@ -2129,14 +2129,14 @@ discard block |
||
2129 | 2129 | |
2130 | 2130 | // Confirm cancellation |
2131 | 2131 | if ($action == 'cancel') { |
2132 | - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); |
|
2132 | + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); |
|
2133 | 2133 | } |
2134 | 2134 | |
2135 | 2135 | // Confirm sign |
2136 | 2136 | if ($action == 'sign') { |
2137 | 2137 | $text = $langs->trans('ConfirmSignShipping'); |
2138 | 2138 | if (isModEnabled('notification')) { |
2139 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
2139 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
2140 | 2140 | $notify = new Notify($db); |
2141 | 2141 | $text .= '<br>'; |
2142 | 2142 | $text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object); |
@@ -2146,22 +2146,22 @@ discard block |
||
2146 | 2146 | 'type' => 'select', |
2147 | 2147 | 'name' => 'signed_status', |
2148 | 2148 | 'select_show_empty' => 0, |
2149 | - 'label' => '<span class="fieldrequired">' . $langs->trans('SignStatus') . '</span>', |
|
2149 | + 'label' => '<span class="fieldrequired">'.$langs->trans('SignStatus').'</span>', |
|
2150 | 2150 | 'values' => $object->getSignedStatusLocalisedArray() |
2151 | 2151 | ]; |
2152 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SignShipping'), $text, 'confirm_sign', $formquestion, 0, 1); |
|
2152 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SignShipping'), $text, 'confirm_sign', $formquestion, 0, 1); |
|
2153 | 2153 | } |
2154 | 2154 | |
2155 | 2155 | // Confirm unsign |
2156 | 2156 | if ($action == 'unsign') { |
2157 | 2157 | $text = $langs->trans('ConfirmUnsignShipping'); |
2158 | 2158 | if (isModEnabled('notification')) { |
2159 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
2159 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
2160 | 2160 | $notify = new Notify($db); |
2161 | 2161 | $text .= '<br>'; |
2162 | 2162 | $text .= $notify->confirmMessage('SHIPPING_MODIFY', $object->socid, $object); |
2163 | 2163 | } |
2164 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnsignShipping'), $text, 'confirm_unsign', '', 0, 1); |
|
2164 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnsignShipping'), $text, 'confirm_unsign', '', 0, 1); |
|
2165 | 2165 | } |
2166 | 2166 | |
2167 | 2167 | // Call Hook formConfirm |
@@ -2192,13 +2192,13 @@ discard block |
||
2192 | 2192 | } |
2193 | 2193 | |
2194 | 2194 | // Shipment card |
2195 | - $linkback = '<a href="' . DOL_URL_ROOT . '/expedition/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
2195 | + $linkback = '<a href="'.DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
2196 | 2196 | $morehtmlref = '<div class="refidno">'; |
2197 | 2197 | // Ref customer shipment |
2198 | 2198 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1); |
2199 | - $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); |
|
2199 | + $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); |
|
2200 | 2200 | // Thirdparty |
2201 | - $morehtmlref .= '<br>' . $object->thirdparty->getNomUrl(1); |
|
2201 | + $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1); |
|
2202 | 2202 | // Project |
2203 | 2203 | if (isModEnabled('project')) { |
2204 | 2204 | $langs->load("projects"); |
@@ -2206,16 +2206,16 @@ discard block |
||
2206 | 2206 | if (0) { // @phpstan-ignore-line Do not change on shipment |
2207 | 2207 | $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); |
2208 | 2208 | if ($action != 'classify') { |
2209 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
2209 | + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> '; |
|
2210 | 2210 | } |
2211 | - $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'); |
|
2211 | + $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'); |
|
2212 | 2212 | } else { |
2213 | 2213 | if (!empty($objectsrc) && !empty($objectsrc->fk_project)) { |
2214 | 2214 | $proj = new Project($db); |
2215 | 2215 | $proj->fetch($objectsrc->fk_project); |
2216 | 2216 | $morehtmlref .= $proj->getNomUrl(1); |
2217 | 2217 | if ($proj->title) { |
2218 | - $morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>'; |
|
2218 | + $morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>'; |
|
2219 | 2219 | } |
2220 | 2220 | } |
2221 | 2221 | } |
@@ -2235,7 +2235,7 @@ discard block |
||
2235 | 2235 | // Linked documents |
2236 | 2236 | if (!empty($typeobject) && $typeobject == 'commande' && $object->origin_object->id && isModEnabled('order')) { |
2237 | 2237 | print '<tr><td>'; |
2238 | - print $langs->trans("RefOrder") . '</td>'; |
|
2238 | + print $langs->trans("RefOrder").'</td>'; |
|
2239 | 2239 | print '<td>'; |
2240 | 2240 | print $objectsrc->getNomUrl(1, 'commande'); |
2241 | 2241 | print "</td>\n"; |
@@ -2243,7 +2243,7 @@ discard block |
||
2243 | 2243 | } |
2244 | 2244 | if (!empty($typeobject) && $typeobject == 'propal' && $object->origin_object->id && isModEnabled("propal")) { |
2245 | 2245 | print '<tr><td>'; |
2246 | - print $langs->trans("RefProposal") . '</td>'; |
|
2246 | + print $langs->trans("RefProposal").'</td>'; |
|
2247 | 2247 | print '<td>'; |
2248 | 2248 | print $objectsrc->getNomUrl(1, 'expedition'); |
2249 | 2249 | print "</td>\n"; |
@@ -2251,8 +2251,8 @@ discard block |
||
2251 | 2251 | } |
2252 | 2252 | |
2253 | 2253 | // Date creation |
2254 | - print '<tr><td class="titlefieldmiddle">' . $langs->trans("DateCreation") . '</td>'; |
|
2255 | - print '<td>' . dol_print_date($object->date_creation, "dayhour") . "</td>\n"; |
|
2254 | + print '<tr><td class="titlefieldmiddle">'.$langs->trans("DateCreation").'</td>'; |
|
2255 | + print '<td>'.dol_print_date($object->date_creation, "dayhour")."</td>\n"; |
|
2256 | 2256 | print '</tr>'; |
2257 | 2257 | |
2258 | 2258 | // Delivery date planned |
@@ -2261,16 +2261,16 @@ discard block |
||
2261 | 2261 | print $langs->trans('DateDeliveryPlanned'); |
2262 | 2262 | print '</td>'; |
2263 | 2263 | if ($action != 'editdate_livraison') { |
2264 | - 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>'; |
|
2264 | + 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>'; |
|
2265 | 2265 | } |
2266 | 2266 | print '</tr></table>'; |
2267 | 2267 | print '</td><td>'; |
2268 | 2268 | if ($action == 'editdate_livraison') { |
2269 | - print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
2270 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
2269 | + print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
2270 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
2271 | 2271 | print '<input type="hidden" name="action" value="setdate_livraison">'; |
2272 | 2272 | print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, 0, "setdate_livraison", 1, 0); |
2273 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
2273 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
2274 | 2274 | print '</form>'; |
2275 | 2275 | } else { |
2276 | 2276 | print $object->date_delivery ? dol_print_date($object->date_delivery, 'dayhour') : ' '; |
@@ -2284,16 +2284,16 @@ discard block |
||
2284 | 2284 | print $langs->trans('DateShipping'); |
2285 | 2285 | print '</td>'; |
2286 | 2286 | if ($action != 'editdate_shipping') { |
2287 | - 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>'; |
|
2287 | + 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>'; |
|
2288 | 2288 | } |
2289 | 2289 | print '</tr></table>'; |
2290 | 2290 | print '</td><td>'; |
2291 | 2291 | if ($action == 'editdate_shipping') { |
2292 | - print '<form name="setdate_shipping" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
2293 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
2292 | + print '<form name="setdate_shipping" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
2293 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
2294 | 2294 | print '<input type="hidden" name="action" value="setdate_shipping">'; |
2295 | 2295 | print $form->selectDate($object->date_shipping ? $object->date_shipping : -1, 'ship_', 1, 1, 0, "setdate_shipping", 1, 0); |
2296 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
2296 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
2297 | 2297 | print '</form>'; |
2298 | 2298 | } else { |
2299 | 2299 | print $object->date_shipping ? dol_print_date($object->date_shipping, 'dayhour') : ' '; |
@@ -2307,24 +2307,24 @@ discard block |
||
2307 | 2307 | print '</td><td>'; |
2308 | 2308 | |
2309 | 2309 | if ($action == 'edittrueWeight') { |
2310 | - print '<form name="settrueweight" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
2310 | + print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
2311 | 2311 | print '<input name="action" value="settrueWeight" type="hidden">'; |
2312 | - print '<input name="id" value="' . $object->id . '" type="hidden">'; |
|
2313 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
2314 | - print '<input id="trueWeight" name="trueWeight" value="' . $object->trueWeight . '" type="text" class="width50 valignmiddle">'; |
|
2312 | + print '<input name="id" value="'.$object->id.'" type="hidden">'; |
|
2313 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
2314 | + print '<input id="trueWeight" name="trueWeight" value="'.$object->trueWeight.'" type="text" class="width50 valignmiddle">'; |
|
2315 | 2315 | print $formproduct->selectMeasuringUnits("weight_units", "weight", (string) $object->weight_units, 0, 2, 'maxwidth125 valignmiddle'); |
2316 | - print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="' . $langs->trans("Modify") . '" type="submit">'; |
|
2317 | - print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">'; |
|
2316 | + print ' <input class="button smallpaddingimp valignmiddle" name="modify" value="'.$langs->trans("Modify").'" type="submit">'; |
|
2317 | + print ' <input class="button button-cancel smallpaddingimp valignmiddle" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">'; |
|
2318 | 2318 | print '</form>'; |
2319 | 2319 | } else { |
2320 | 2320 | print $object->trueWeight; |
2321 | - print ($object->trueWeight && $object->weight_units != '') ? ' ' . measuringUnitString(0, "weight", $object->weight_units) : ''; |
|
2321 | + print ($object->trueWeight && $object->weight_units != '') ? ' '.measuringUnitString(0, "weight", $object->weight_units) : ''; |
|
2322 | 2322 | } |
2323 | 2323 | |
2324 | 2324 | // Calculated |
2325 | 2325 | if ($totalWeight > 0) { |
2326 | 2326 | if (!empty($object->trueWeight)) { |
2327 | - print ' (' . $langs->trans("SumOfProductWeights") . ': '; |
|
2327 | + print ' ('.$langs->trans("SumOfProductWeights").': '; |
|
2328 | 2328 | } |
2329 | 2329 | print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); |
2330 | 2330 | if (!empty($object->trueWeight)) { |
@@ -2334,34 +2334,34 @@ discard block |
||
2334 | 2334 | print '</td></tr>'; |
2335 | 2335 | |
2336 | 2336 | // Width |
2337 | - print '<tr><td>' . $form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
2337 | + print '<tr><td>'.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
2338 | 2338 | print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->hasRight('expedition', 'creer')); |
2339 | - print ($object->trueWidth && $object->width_units != '') ? ' ' . measuringUnitString(0, "size", $object->width_units) : ''; |
|
2339 | + print ($object->trueWidth && $object->width_units != '') ? ' '.measuringUnitString(0, "size", $object->width_units) : ''; |
|
2340 | 2340 | print '</td></tr>'; |
2341 | 2341 | |
2342 | 2342 | // Height |
2343 | - print '<tr><td>' . $form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
2343 | + print '<tr><td>'.$form->editfieldkey("Height", 'trueHeight', $object->trueHeight, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
2344 | 2344 | if ($action == 'edittrueHeight') { |
2345 | - print '<form name="settrueHeight" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; |
|
2345 | + print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">'; |
|
2346 | 2346 | print '<input name="action" value="settrueHeight" type="hidden">'; |
2347 | - print '<input name="id" value="' . $object->id . '" type="hidden">'; |
|
2348 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
2349 | - print '<input id="trueHeight" name="trueHeight" value="' . $object->trueHeight . '" type="text" class="width50">'; |
|
2347 | + print '<input name="id" value="'.$object->id.'" type="hidden">'; |
|
2348 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
2349 | + print '<input id="trueHeight" name="trueHeight" value="'.$object->trueHeight.'" type="text" class="width50">'; |
|
2350 | 2350 | print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2); |
2351 | - print ' <input class="button smallpaddingimp" name="modify" value="' . $langs->trans("Modify") . '" type="submit">'; |
|
2352 | - print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="' . $langs->trans("Cancel") . '" type="submit">'; |
|
2351 | + print ' <input class="button smallpaddingimp" name="modify" value="'.$langs->trans("Modify").'" type="submit">'; |
|
2352 | + print ' <input class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">'; |
|
2353 | 2353 | print '</form>'; |
2354 | 2354 | } else { |
2355 | 2355 | print $object->trueHeight; |
2356 | - print ($object->trueHeight && $object->height_units != '') ? ' ' . measuringUnitString(0, "size", $object->height_units) : ''; |
|
2356 | + print ($object->trueHeight && $object->height_units != '') ? ' '.measuringUnitString(0, "size", $object->height_units) : ''; |
|
2357 | 2357 | } |
2358 | 2358 | |
2359 | 2359 | print '</td></tr>'; |
2360 | 2360 | |
2361 | 2361 | // Depth |
2362 | - print '<tr><td>' . $form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
2362 | + print '<tr><td>'.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
2363 | 2363 | print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->hasRight('expedition', 'creer')); |
2364 | - print ($object->trueDepth && $object->depth_units != '') ? ' ' . measuringUnitString(0, "size", $object->depth_units) : ''; |
|
2364 | + print ($object->trueDepth && $object->depth_units != '') ? ' '.measuringUnitString(0, "size", $object->depth_units) : ''; |
|
2365 | 2365 | print '</td></tr>'; |
2366 | 2366 | |
2367 | 2367 | // Volume |
@@ -2380,12 +2380,12 @@ discard block |
||
2380 | 2380 | if ($volumeUnit < 50) { |
2381 | 2381 | print showDimensionInBestUnit($calculatedVolume, $volumeUnit, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no')); |
2382 | 2382 | } else { |
2383 | - print $calculatedVolume . ' ' . measuringUnitString(0, "volume", $volumeUnit); |
|
2383 | + print $calculatedVolume.' '.measuringUnitString(0, "volume", $volumeUnit); |
|
2384 | 2384 | } |
2385 | 2385 | } |
2386 | 2386 | if ($totalVolume > 0) { |
2387 | 2387 | if ($calculatedVolume) { |
2388 | - print ' (' . $langs->trans("SumOfProductVolumes") . ': '; |
|
2388 | + print ' ('.$langs->trans("SumOfProductVolumes").': '; |
|
2389 | 2389 | } |
2390 | 2390 | print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no')); |
2391 | 2391 | //if (empty($calculatedVolume)) print ' ('.$langs->trans("Calculated").')'; |
@@ -2398,7 +2398,7 @@ discard block |
||
2398 | 2398 | |
2399 | 2399 | // Other attributes |
2400 | 2400 | //$cols = 2; |
2401 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
2401 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
2402 | 2402 | |
2403 | 2403 | print '</table>'; |
2404 | 2404 | |
@@ -2415,33 +2415,33 @@ discard block |
||
2415 | 2415 | print '</td>'; |
2416 | 2416 | |
2417 | 2417 | if ($action != 'editshipping_method_id' && $permissiontoadd) { |
2418 | - 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>'; |
|
2418 | + 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>'; |
|
2419 | 2419 | } |
2420 | 2420 | print '</tr></table>'; |
2421 | 2421 | print '</td><td>'; |
2422 | 2422 | if ($action == 'editshipping_method_id') { |
2423 | - print '<form name="setshipping_method_id" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
2424 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
2423 | + print '<form name="setshipping_method_id" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
2424 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
2425 | 2425 | print '<input type="hidden" name="action" value="setshipping_method_id">'; |
2426 | 2426 | $object->fetch_delivery_methods(); |
2427 | 2427 | print $form->selectarray("shipping_method_id", $object->meths, $object->shipping_method_id, 1, 0, 0, "", 1); |
2428 | 2428 | if ($user->admin) { |
2429 | 2429 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
2430 | 2430 | } |
2431 | - print '<input type="submit" class="button button-edit smallpaddingimp" value="' . $langs->trans('Modify') . '">'; |
|
2431 | + print '<input type="submit" class="button button-edit smallpaddingimp" value="'.$langs->trans('Modify').'">'; |
|
2432 | 2432 | print '</form>'; |
2433 | 2433 | } else { |
2434 | 2434 | if ($object->shipping_method_id > 0) { |
2435 | 2435 | // Get code using getLabelFromKey |
2436 | 2436 | $code = $langs->getLabelFromKey($db, (string) $object->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); |
2437 | - print $langs->trans("SendingMethod" . strtoupper($code)); |
|
2437 | + print $langs->trans("SendingMethod".strtoupper($code)); |
|
2438 | 2438 | } |
2439 | 2439 | } |
2440 | 2440 | print '</td>'; |
2441 | 2441 | print '</tr>'; |
2442 | 2442 | |
2443 | 2443 | // Tracking Number |
2444 | - print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')) . '</td><td>'; |
|
2444 | + print '<tr><td class="titlefieldmiddle">'.$form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->hasRight('expedition', 'creer')).'</td><td>'; |
|
2445 | 2445 | print $form->editfieldval("TrackingNumber", 'tracking_number', $object->tracking_url, $object, $user->hasRight('expedition', 'creer'), 'safehtmlstring', $object->tracking_number); |
2446 | 2446 | print '</td></tr>'; |
2447 | 2447 | |
@@ -2452,7 +2452,7 @@ discard block |
||
2452 | 2452 | print $langs->trans('IncotermLabel'); |
2453 | 2453 | print '<td><td class="right">'; |
2454 | 2454 | if ($permissiontoadd) { |
2455 | - print '<a class="editfielda" href="' . DOL_URL_ROOT . '/expedition/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>'; |
|
2455 | + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/expedition/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>'; |
|
2456 | 2456 | } else { |
2457 | 2457 | print ' '; |
2458 | 2458 | } |
@@ -2462,7 +2462,7 @@ discard block |
||
2462 | 2462 | if ($action != 'editincoterm') { |
2463 | 2463 | print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); |
2464 | 2464 | } else { |
2465 | - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
|
2465 | + print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); |
|
2466 | 2466 | } |
2467 | 2467 | print '</td></tr>'; |
2468 | 2468 | } |
@@ -2483,11 +2483,11 @@ discard block |
||
2483 | 2483 | // Lines of products |
2484 | 2484 | |
2485 | 2485 | if ($action == 'editline') { |
2486 | - print ' <form name="updateline" id="updateline" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $line_id . '" method="POST"> |
|
2487 | - <input type="hidden" name="token" value="' . newToken() . '"> |
|
2486 | + print ' <form name="updateline" id="updateline" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$line_id.'" method="POST"> |
|
2487 | + <input type="hidden" name="token" value="' . newToken().'"> |
|
2488 | 2488 | <input type="hidden" name="action" value="updateline"> |
2489 | 2489 | <input type="hidden" name="mode" value=""> |
2490 | - <input type="hidden" name="id" value="' . $object->id . '"> |
|
2490 | + <input type="hidden" name="id" value="' . $object->id.'"> |
|
2491 | 2491 | '; |
2492 | 2492 | } |
2493 | 2493 | print '<br>'; |
@@ -2501,11 +2501,11 @@ discard block |
||
2501 | 2501 | print '<td width="5" class="center linecolnum"> </td>'; |
2502 | 2502 | } |
2503 | 2503 | // Product/Service |
2504 | - print '<td class="linecoldescription" >' . $langs->trans("Products") . '</td>'; |
|
2504 | + print '<td class="linecoldescription" >'.$langs->trans("Products").'</td>'; |
|
2505 | 2505 | // Qty |
2506 | - print '<td class="center linecolqty">' . $langs->trans("QtyOrdered") . '</td>'; |
|
2506 | + print '<td class="center linecolqty">'.$langs->trans("QtyOrdered").'</td>'; |
|
2507 | 2507 | if ($origin && $origin_id > 0) { |
2508 | - print '<td class="center linecolqtyinothershipments">' . $langs->trans("QtyInOtherShipments") . '</td>'; |
|
2508 | + print '<td class="center linecolqtyinothershipments">'.$langs->trans("QtyInOtherShipments").'</td>'; |
|
2509 | 2509 | } |
2510 | 2510 | if ($action == 'editline') { |
2511 | 2511 | $editColspan = 3; |
@@ -2515,35 +2515,35 @@ discard block |
||
2515 | 2515 | if (empty($conf->productbatch->enabled)) { |
2516 | 2516 | $editColspan--; |
2517 | 2517 | } |
2518 | - print '<td class="center linecoleditlineotherinfo" colspan="' . $editColspan . '">'; |
|
2518 | + print '<td class="center linecoleditlineotherinfo" colspan="'.$editColspan.'">'; |
|
2519 | 2519 | if ($object->status <= 1) { |
2520 | 2520 | print $langs->trans("QtyToShip"); |
2521 | 2521 | } else { |
2522 | 2522 | print $langs->trans("QtyShipped"); |
2523 | 2523 | } |
2524 | 2524 | if (isModEnabled('stock')) { |
2525 | - print ' - ' . $langs->trans("WarehouseSource"); |
|
2525 | + print ' - '.$langs->trans("WarehouseSource"); |
|
2526 | 2526 | } |
2527 | 2527 | if (isModEnabled('productbatch')) { |
2528 | - print ' - ' . $langs->trans("Batch"); |
|
2528 | + print ' - '.$langs->trans("Batch"); |
|
2529 | 2529 | } |
2530 | 2530 | print '</td>'; |
2531 | 2531 | } else { |
2532 | 2532 | if ($object->status <= 1) { |
2533 | - print '<td class="center linecolqtytoship">' . $langs->trans("QtyToShip") . '</td>'; |
|
2533 | + print '<td class="center linecolqtytoship">'.$langs->trans("QtyToShip").'</td>'; |
|
2534 | 2534 | } else { |
2535 | - print '<td class="center linecolqtyshipped">' . $langs->trans("QtyShipped") . '</td>'; |
|
2535 | + print '<td class="center linecolqtyshipped">'.$langs->trans("QtyShipped").'</td>'; |
|
2536 | 2536 | } |
2537 | 2537 | if (isModEnabled('stock')) { |
2538 | - print '<td class="left linecolwarehousesource">' . $langs->trans("WarehouseSource") . '</td>'; |
|
2538 | + print '<td class="left linecolwarehousesource">'.$langs->trans("WarehouseSource").'</td>'; |
|
2539 | 2539 | } |
2540 | 2540 | |
2541 | 2541 | if (isModEnabled('productbatch')) { |
2542 | - print '<td class="left linecolbatch">' . $langs->trans("Batch") . '</td>'; |
|
2542 | + print '<td class="left linecolbatch">'.$langs->trans("Batch").'</td>'; |
|
2543 | 2543 | } |
2544 | 2544 | } |
2545 | - print '<td class="center linecolweight">' . $langs->trans("CalculatedWeight") . '</td>'; |
|
2546 | - print '<td class="center linecolvolume">' . $langs->trans("CalculatedVolume") . '</td>'; |
|
2545 | + print '<td class="center linecolweight">'.$langs->trans("CalculatedWeight").'</td>'; |
|
2546 | + print '<td class="center linecolvolume">'.$langs->trans("CalculatedVolume").'</td>'; |
|
2547 | 2547 | //print '<td class="center">'.$langs->trans("Size").'</td>'; |
2548 | 2548 | if ($object->status == 0) { |
2549 | 2549 | print '<td class="linecoledit"></td>'; |
@@ -2578,13 +2578,13 @@ discard block |
||
2578 | 2578 | //if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY')) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received"; |
2579 | 2579 | $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'; |
2580 | 2580 | $sql .= ', p.description as product_desc'; |
2581 | - $sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed"; |
|
2582 | - $sql .= ", " . MAIN_DB_PREFIX . "expedition as e"; |
|
2583 | - $sql .= ", " . MAIN_DB_PREFIX . $origin . "det as obj"; |
|
2581 | + $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; |
|
2582 | + $sql .= ", ".MAIN_DB_PREFIX."expedition as e"; |
|
2583 | + $sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj"; |
|
2584 | 2584 | //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"; |
2585 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid"; |
|
2586 | - $sql .= " WHERE e.entity IN (" . getEntity('expedition') . ")"; |
|
2587 | - $sql .= " AND obj.fk_" . $origin . " = " . ((int) $origin_id); |
|
2585 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid"; |
|
2586 | + $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; |
|
2587 | + $sql .= " AND obj.fk_".$origin." = ".((int) $origin_id); |
|
2588 | 2588 | $sql .= " AND obj.rowid = ed.fk_elementdet"; |
2589 | 2589 | $sql .= " AND ed.fk_expedition = e.rowid"; |
2590 | 2590 | //if ($filter) $sql.= $filter; |
@@ -2631,12 +2631,12 @@ discard block |
||
2631 | 2631 | } |
2632 | 2632 | |
2633 | 2633 | if (empty($reshook) && $lines[$i]->product_type != "9") { |
2634 | - print '<!-- origin line id = ' . $lines[$i]->origin_line_id . ' -->'; // id of order line |
|
2635 | - print '<tr class="oddeven" id="row-' . $lines[$i]->id . '" data-id="' . $lines[$i]->id . '" data-element="' . $lines[$i]->element . '" >'; |
|
2634 | + print '<!-- origin line id = '.$lines[$i]->origin_line_id.' -->'; // id of order line |
|
2635 | + print '<tr class="oddeven" id="row-'.$lines[$i]->id.'" data-id="'.$lines[$i]->id.'" data-element="'.$lines[$i]->element.'" >'; |
|
2636 | 2636 | |
2637 | 2637 | // # |
2638 | 2638 | if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { |
2639 | - print '<td class="center linecolnum">' . ($i + 1) . '</td>'; |
|
2639 | + print '<td class="center linecolnum">'.($i + 1).'</td>'; |
|
2640 | 2640 | } |
2641 | 2641 | |
2642 | 2642 | // Predefined product or service |
@@ -2681,12 +2681,12 @@ discard block |
||
2681 | 2681 | $product_static->stockable_product = $lines[$i]->stockable_product; |
2682 | 2682 | |
2683 | 2683 | $text = $product_static->getNomUrl(1); |
2684 | - $text .= ' - ' . $label; |
|
2684 | + $text .= ' - '.$label; |
|
2685 | 2685 | $description = (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE') ? '' : dol_htmlentitiesbr($lines[$i]->description)); |
2686 | 2686 | print $form->textwithtooltip($text, $description, 3, 0, '', (string) $i); |
2687 | 2687 | print_date_range(!empty($lines[$i]->date_start) ? $lines[$i]->date_start : '', !empty($lines[$i]->date_end) ? $lines[$i]->date_end : ''); |
2688 | 2688 | if (getDolGlobalInt('PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE')) { |
2689 | - print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>' . dol_htmlentitiesbr($lines[$i]->description) : ''; |
|
2689 | + print (!empty($lines[$i]->description) && $lines[$i]->description != $lines[$i]->product) ? '<br>'.dol_htmlentitiesbr($lines[$i]->description) : ''; |
|
2690 | 2690 | } |
2691 | 2691 | print "</td>\n"; |
2692 | 2692 | } else { |
@@ -2698,10 +2698,10 @@ discard block |
||
2698 | 2698 | } |
2699 | 2699 | |
2700 | 2700 | if (!empty($lines[$i]->label)) { |
2701 | - $text .= ' <strong>' . $lines[$i]->label . '</strong>'; |
|
2701 | + $text .= ' <strong>'.$lines[$i]->label.'</strong>'; |
|
2702 | 2702 | print $form->textwithtooltip($text, $lines[$i]->description, 3, 0, '', (string) $i); |
2703 | 2703 | } else { |
2704 | - print $text . ' ' . nl2br($lines[$i]->description); |
|
2704 | + print $text.' '.nl2br($lines[$i]->description); |
|
2705 | 2705 | } |
2706 | 2706 | |
2707 | 2707 | print_date_range($lines[$i]->date_start, $lines[$i]->date_end); |
@@ -2714,7 +2714,7 @@ discard block |
||
2714 | 2714 | } |
2715 | 2715 | |
2716 | 2716 | // Qty ordered |
2717 | - print '<td class="center linecolqty">' . $lines[$i]->qty_asked . ' ' . $unit_order . '</td>'; |
|
2717 | + print '<td class="center linecolqty">'.$lines[$i]->qty_asked.' '.$unit_order.'</td>'; |
|
2718 | 2718 | |
2719 | 2719 | // Qty in other shipments (with shipment and warehouse used) |
2720 | 2720 | if ($origin && $origin_id > 0) { |
@@ -2735,8 +2735,8 @@ discard block |
||
2735 | 2735 | } |
2736 | 2736 | $shipment_static->fetch($shipmentline_var['shipment_id']); |
2737 | 2737 | $htmltooltip .= $shipment_static->getNomUrl(1, '', 0, 0, 1); |
2738 | - $htmltooltip .= ' - ' . $shipmentline_var['qty_shipped']; |
|
2739 | - $htmltooltip .= ' - ' . $langs->trans("DateValidation") . ' : ' . (empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); |
|
2738 | + $htmltooltip .= ' - '.$shipmentline_var['qty_shipped']; |
|
2739 | + $htmltooltip .= ' - '.$langs->trans("DateValidation").' : '.(empty($shipmentline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($shipmentline_var['date_valid'], 'dayhour')); |
|
2740 | 2740 | /*if (isModEnabled('stock') && $shipmentline_var['warehouse'] > 0) { |
2741 | 2741 | $warehousestatic->fetch($shipmentline_var['warehouse']); |
2742 | 2742 | $htmltext .= '<br>'.$langs->trans("FromLocation").' : '.$warehousestatic->getNomUrl(1, '', 0, 1); |
@@ -2746,39 +2746,39 @@ discard block |
||
2746 | 2746 | $qtyalreadysent += $shipmentline_var['qty_shipped']; |
2747 | 2747 | } |
2748 | 2748 | if ($j) { |
2749 | - $htmltooltip = $langs->trans("QtyInOtherShipments") . '...<br><br>' . $htmltooltip . '<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>'; |
|
2749 | + $htmltooltip = $langs->trans("QtyInOtherShipments").'...<br><br>'.$htmltooltip.'<br><input type="submit" name="dummyhiddenbuttontogetfocus" style="display:none" autofocus>'; |
|
2750 | 2750 | } |
2751 | 2751 | } |
2752 | 2752 | } |
2753 | - print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip' . $lines[$i]->id); |
|
2753 | + print $form->textwithpicto((string) $qtyalreadysent, $htmltooltip, 1, 'info', '', 0, 3, 'tooltip'.$lines[$i]->id); |
|
2754 | 2754 | print '</td>'; |
2755 | 2755 | } |
2756 | 2756 | |
2757 | 2757 | if ($action == 'editline' && $lines[$i]->id == $line_id) { |
2758 | 2758 | // edit mode |
2759 | - print '<td colspan="' . $editColspan . '" class="center"><table class="nobordernopadding centpercent">'; |
|
2759 | + print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding centpercent">'; |
|
2760 | 2760 | if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) { |
2761 | 2761 | print '<!-- case edit 1 -->'; |
2762 | 2762 | $line = new ExpeditionLigne($db); |
2763 | 2763 | foreach ($lines[$i]->detail_batch as $detail_batch) { |
2764 | 2764 | print '<tr>'; |
2765 | 2765 | // Qty to ship or shipped |
2766 | - 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>'; |
|
2766 | + 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>'; |
|
2767 | 2767 | // Batch number management |
2768 | 2768 | if ($lines[$i]->entrepot_id == 0) { |
2769 | 2769 | // only show lot numbers from src warehouse when shipping from multiple warehouses |
2770 | 2770 | $line->fetch($detail_batch->fk_expeditiondet); |
2771 | 2771 | } |
2772 | 2772 | $entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id; |
2773 | - 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>'; |
|
2773 | + 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>'; |
|
2774 | 2774 | print '</tr>'; |
2775 | 2775 | } |
2776 | 2776 | // add a 0 qty lot row to be able to add a lot |
2777 | 2777 | print '<tr>'; |
2778 | 2778 | // Qty to ship or shipped |
2779 | - print '<td><input class="qtyl" name="qtyl' . $line_id . '_0" id="qtyl' . $line_id . '_0" type="text" size="4" value="0"></td>'; |
|
2779 | + print '<td><input class="qtyl" name="qtyl'.$line_id.'_0" id="qtyl'.$line_id.'_0" type="text" size="4" value="0"></td>'; |
|
2780 | 2780 | // Batch number management |
2781 | - print '<td>' . $formproduct->selectLotStock('', 'batchl' . $line_id . '_0', '', 1, 0, $lines[$i]->fk_product) . '</td>'; |
|
2781 | + print '<td>'.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'</td>'; |
|
2782 | 2782 | print '</tr>'; |
2783 | 2783 | } elseif (isModEnabled('stock')) { |
2784 | 2784 | if ($lines[$i]->fk_product > 0) { |
@@ -2786,13 +2786,13 @@ discard block |
||
2786 | 2786 | print '<!-- case edit 2 -->'; |
2787 | 2787 | print '<tr>'; |
2788 | 2788 | // Qty to ship or shipped |
2789 | - 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>'; |
|
2789 | + 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>'; |
|
2790 | 2790 | // Warehouse source |
2791 | - print '<td>' . $formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl' . $line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>'; |
|
2791 | + print '<td>'.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>'; |
|
2792 | 2792 | // Batch number management |
2793 | 2793 | print '<td>'; |
2794 | 2794 | if (isModEnabled('productbatch')) { |
2795 | - print ' - ' . $langs->trans("NA"); |
|
2795 | + print ' - '.$langs->trans("NA"); |
|
2796 | 2796 | } |
2797 | 2797 | print '</td>'; |
2798 | 2798 | print '</tr>'; |
@@ -2801,13 +2801,13 @@ discard block |
||
2801 | 2801 | foreach ($lines[$i]->details_entrepot as $detail_entrepot) { |
2802 | 2802 | print '<tr>'; |
2803 | 2803 | // Qty to ship or shipped |
2804 | - 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>'; |
|
2804 | + 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>'; |
|
2805 | 2805 | // Warehouse source |
2806 | - print '<td>' . $formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl' . $detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200') . '</td>'; |
|
2806 | + print '<td>'.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1, 0, array(), 'minwidth200').'</td>'; |
|
2807 | 2807 | // Batch number management |
2808 | 2808 | print '<td>'; |
2809 | 2809 | if (isModEnabled('productbatch')) { |
2810 | - print ' - ' . $langs->trans("NA"); |
|
2810 | + print ' - '.$langs->trans("NA"); |
|
2811 | 2811 | } |
2812 | 2812 | print '</td>'; |
2813 | 2813 | print '</tr>'; |
@@ -2816,19 +2816,19 @@ discard block |
||
2816 | 2816 | print '<!-- case edit 4 -->'; |
2817 | 2817 | print '<tr>'; |
2818 | 2818 | // Qty to ship or shipped |
2819 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>'; |
|
2820 | - print '<td><span class="opacitymedium">(' . $langs->trans("Service") . ')</span></td>'; |
|
2819 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>'; |
|
2820 | + print '<td><span class="opacitymedium">('.$langs->trans("Service").')</span></td>'; |
|
2821 | 2821 | print '<td></td>'; |
2822 | 2822 | print '</tr>'; |
2823 | 2823 | } else { |
2824 | 2824 | print '<!-- case edit 5 -->'; |
2825 | - print '<tr><td colspan="3">' . $langs->trans("ErrorStockIsNotEnough") . '</td></tr>'; |
|
2825 | + print '<tr><td colspan="3">'.$langs->trans("ErrorStockIsNotEnough").'</td></tr>'; |
|
2826 | 2826 | } |
2827 | 2827 | } else { |
2828 | 2828 | print '<!-- case edit 6 -->'; |
2829 | 2829 | print '<tr>'; |
2830 | 2830 | // Qty to ship or shipped |
2831 | - 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>'; |
|
2831 | + 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>'; |
|
2832 | 2832 | // Warehouse source |
2833 | 2833 | print '<td></td>'; |
2834 | 2834 | // Batch number management |
@@ -2839,7 +2839,7 @@ discard block |
||
2839 | 2839 | print '<!-- case edit 7 -->'; |
2840 | 2840 | print '<tr>'; |
2841 | 2841 | // Qty to ship or shipped |
2842 | - print '<td><input class="qtyl right" name="qtyl' . $line_id . '" id="qtyl' . $line_id . '" type="text" size="4" value="' . $lines[$i]->qty_shipped . '"></td>'; |
|
2842 | + print '<td><input class="qtyl right" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>'; |
|
2843 | 2843 | // Warehouse source |
2844 | 2844 | print '<td></td>'; |
2845 | 2845 | // Batch number management |
@@ -2850,13 +2850,13 @@ discard block |
||
2850 | 2850 | print '</table></td>'; |
2851 | 2851 | } else { |
2852 | 2852 | // Qty to ship or shipped |
2853 | - print '<td class="linecolqtytoship center">' . $lines[$i]->qty_shipped . ' ' . $unit_order . '</td>'; |
|
2853 | + print '<td class="linecolqtytoship center">'.$lines[$i]->qty_shipped.' '.$unit_order.'</td>'; |
|
2854 | 2854 | |
2855 | 2855 | // Warehouse source |
2856 | 2856 | if (isModEnabled('stock')) { |
2857 | 2857 | print '<td class="linecolwarehousesource tdoverflowmax200">'; |
2858 | 2858 | if ($lines[$i]->product_type == Product::TYPE_SERVICE && getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) { |
2859 | - print '<span class="opacitymedium">(' . $langs->trans("Service") . ')</span>'; |
|
2859 | + print '<span class="opacitymedium">('.$langs->trans("Service").')</span>'; |
|
2860 | 2860 | } elseif ($lines[$i]->entrepot_id > 0 && $lines[$i]->stockable_product == Product::ENABLED_STOCK) { |
2861 | 2861 | $warehouse_id = $lines[$i]->entrepot_id; |
2862 | 2862 | if (!isset($conf->cache['warehouse'][$warehouse_id])) { |
@@ -2879,7 +2879,7 @@ discard block |
||
2879 | 2879 | } else { |
2880 | 2880 | $warehouse = $conf->cache['warehouse'][$warehouse_id]; |
2881 | 2881 | } |
2882 | - $detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped) . '<br>'; |
|
2882 | + $detail .= $langs->trans("DetailWarehouseFormat", $warehouse->label, $detail_entrepot->qty_shipped).'<br>'; |
|
2883 | 2883 | } |
2884 | 2884 | } |
2885 | 2885 | print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans("DetailWarehouseNumber"), $detail); |
@@ -2896,7 +2896,7 @@ discard block |
||
2896 | 2896 | } else { |
2897 | 2897 | $child_product = $conf->cache['product'][$child_product_id]; |
2898 | 2898 | } |
2899 | - $child_product_label = $child_product->ref . ' ' . $child_product->label; |
|
2899 | + $child_product_label = $child_product->ref.' '.$child_product->label; |
|
2900 | 2900 | |
2901 | 2901 | // get warehouse from cache |
2902 | 2902 | if (!isset($conf->cache['warehouse'][$warehouse_id])) { |
@@ -2907,10 +2907,10 @@ discard block |
||
2907 | 2907 | $child_warehouse = $conf->cache['warehouse'][$warehouse_id]; |
2908 | 2908 | } |
2909 | 2909 | |
2910 | - $detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')) . '<br>'; |
|
2910 | + $detail .= $langs->trans('DetailChildrenFormat', $child_product_label, $child_warehouse->label, price2num($total_qty, 'MS')).'<br>'; |
|
2911 | 2911 | } |
2912 | 2912 | } |
2913 | - print $form->textwithtooltip(img_picto('', 'object_stock') . ' ' . $langs->trans('DetailWarehouseNumber'), $detail); |
|
2913 | + print $form->textwithtooltip(img_picto('', 'object_stock').' '.$langs->trans('DetailWarehouseNumber'), $detail); |
|
2914 | 2914 | } |
2915 | 2915 | print '</td>'; |
2916 | 2916 | } |
@@ -2923,17 +2923,17 @@ discard block |
||
2923 | 2923 | if ($lines[$i]->product_tobatch) { |
2924 | 2924 | $detail = ''; |
2925 | 2925 | foreach ($lines[$i]->detail_batch as $dbatch) { // $dbatch is instance of ExpeditionLineBatch |
2926 | - $detail .= $langs->trans("Batch") . ': ' . $dbatch->batch; |
|
2926 | + $detail .= $langs->trans("Batch").': '.$dbatch->batch; |
|
2927 | 2927 | if (!getDolGlobalString('PRODUCT_DISABLE_SELLBY')) { |
2928 | - $detail .= ' - ' . $langs->trans("SellByDate") . ': ' . dol_print_date($dbatch->sellby, "day"); |
|
2928 | + $detail .= ' - '.$langs->trans("SellByDate").': '.dol_print_date($dbatch->sellby, "day"); |
|
2929 | 2929 | } |
2930 | 2930 | if (!getDolGlobalString('PRODUCT_DISABLE_EATBY')) { |
2931 | - $detail .= ' - ' . $langs->trans("EatByDate") . ': ' . dol_print_date($dbatch->eatby, "day"); |
|
2931 | + $detail .= ' - '.$langs->trans("EatByDate").': '.dol_print_date($dbatch->eatby, "day"); |
|
2932 | 2932 | } |
2933 | - $detail .= ' - ' . $langs->trans("Qty") . ': ' . $dbatch->qty; |
|
2933 | + $detail .= ' - '.$langs->trans("Qty").': '.$dbatch->qty; |
|
2934 | 2934 | $detail .= '<br>'; |
2935 | 2935 | } |
2936 | - print $form->textwithtooltip(img_picto('', 'object_barcode') . ' ' . $langs->trans("DetailBatchNumber"), $detail); |
|
2936 | + print $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $detail); |
|
2937 | 2937 | } else { |
2938 | 2938 | print $langs->trans("NA"); |
2939 | 2939 | } |
@@ -2947,7 +2947,7 @@ discard block |
||
2947 | 2947 | // Weight |
2948 | 2948 | print '<td class="center linecolweight">'; |
2949 | 2949 | if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { |
2950 | - print $lines[$i]->weight * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "weight", $lines[$i]->weight_units); |
|
2950 | + print $lines[$i]->weight * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "weight", $lines[$i]->weight_units); |
|
2951 | 2951 | } else { |
2952 | 2952 | print ' '; |
2953 | 2953 | } |
@@ -2956,7 +2956,7 @@ discard block |
||
2956 | 2956 | // Volume |
2957 | 2957 | print '<td class="center linecolvolume">'; |
2958 | 2958 | if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) { |
2959 | - print $lines[$i]->volume * $lines[$i]->qty_shipped . ' ' . measuringUnitString(0, "volume", $lines[$i]->volume_units); |
|
2959 | + print $lines[$i]->volume * $lines[$i]->qty_shipped.' '.measuringUnitString(0, "volume", $lines[$i]->volume_units); |
|
2960 | 2960 | } else { |
2961 | 2961 | print ' '; |
2962 | 2962 | } |
@@ -2967,11 +2967,11 @@ discard block |
||
2967 | 2967 | |
2968 | 2968 | if ($action == 'editline' && $lines[$i]->id == $line_id) { |
2969 | 2969 | print '<td class="center" colspan="2" valign="middle">'; |
2970 | - print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="' . $langs->trans("Save") . '"><br>'; |
|
2971 | - print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="' . $langs->trans("Cancel") . '"><br>'; |
|
2970 | + print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'"><br>'; |
|
2971 | + print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"><br>'; |
|
2972 | 2972 | print '</td>'; |
2973 | 2973 | } elseif ($object->status == Expedition::STATUS_DRAFT) { |
2974 | - $edit_url = $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=editline&token=' . newToken() . '&lineid=' . $lines[$i]->id; |
|
2974 | + $edit_url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&token='.newToken().'&lineid='.$lines[$i]->id; |
|
2975 | 2975 | if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) { |
2976 | 2976 | $product_id = $lines[$i]->fk_product; |
2977 | 2977 | if (!isset($conf->cache['product'][$product_id])) { |
@@ -2983,16 +2983,16 @@ discard block |
||
2983 | 2983 | } |
2984 | 2984 | |
2985 | 2985 | if ($product->hasFatherOrChild(1)) { |
2986 | - $edit_url = dol_buildpath('/expedition/dispatch.php?id=' . $object->id, 1); |
|
2986 | + $edit_url = dol_buildpath('/expedition/dispatch.php?id='.$object->id, 1); |
|
2987 | 2987 | } |
2988 | 2988 | } |
2989 | 2989 | |
2990 | 2990 | // edit-delete buttons |
2991 | 2991 | print '<td class="linecoledit center">'; |
2992 | - print '<a class="editfielda reposition" href="' . $edit_url . '">' . img_edit() . '</a>'; |
|
2992 | + print '<a class="editfielda reposition" href="'.$edit_url.'">'.img_edit().'</a>'; |
|
2993 | 2993 | print '</td>'; |
2994 | 2994 | print '<td class="linecoldelete" width="10">'; |
2995 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=deleteline&token=' . newToken() . '&lineid=' . $lines[$i]->id . '">' . img_delete() . '</a>'; |
|
2995 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$lines[$i]->id.'">'.img_delete().'</a>'; |
|
2996 | 2996 | print '</td>'; |
2997 | 2997 | |
2998 | 2998 | // Display lines extrafields |
@@ -3041,7 +3041,7 @@ discard block |
||
3041 | 3041 | // TODO Show also lines ordered but not delivered |
3042 | 3042 | |
3043 | 3043 | if (empty($num_prod)) { |
3044 | - print '<tr><td colspan="8"><span class="opacitymedium">' . $langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")) . '</span></td></tr>'; |
|
3044 | + print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("NoLineGoOnTabToAddSome", $langs->transnoentitiesnoconv("ShipmentDistribution")).'</span></td></tr>'; |
|
3045 | 3045 | } |
3046 | 3046 | |
3047 | 3047 | print "</table>\n"; |
@@ -3070,21 +3070,21 @@ discard block |
||
3070 | 3070 | if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'creer')) |
3071 | 3071 | || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'shipping_advance', 'validate')) |
3072 | 3072 | ) { |
3073 | - print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=valid&token=' . newToken() . '&id=' . $object->id, ''); |
|
3073 | + print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, ''); |
|
3074 | 3074 | } else { |
3075 | - print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'] . '#', '', false); |
|
3075 | + print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
3076 | 3076 | } |
3077 | 3077 | } |
3078 | 3078 | |
3079 | 3079 | // 0=draft, 1=validated/delivered, 2=closed/delivered |
3080 | 3080 | if ($object->status == Expedition::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) { |
3081 | 3081 | if ($user->hasRight('expedition', 'creer')) { |
3082 | - print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"] . '?action=setdraft&token=' . newToken() . '&id=' . $object->id, ''); |
|
3082 | + print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=setdraft&token='.newToken().'&id='.$object->id, ''); |
|
3083 | 3083 | } |
3084 | 3084 | } |
3085 | 3085 | if ($object->status == Expedition::STATUS_CLOSED) { |
3086 | 3086 | if ($user->hasRight('expedition', 'creer')) { |
3087 | - print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"] . '?action=reopen&token=' . newToken() . '&id=' . $object->id, ''); |
|
3087 | + print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
|
3088 | 3088 | } |
3089 | 3089 | } |
3090 | 3090 | |
@@ -3092,9 +3092,9 @@ discard block |
||
3092 | 3092 | if (empty($user->socid)) { |
3093 | 3093 | if ($object->status > 0) { |
3094 | 3094 | if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('expedition', 'shipping_advance', 'send')) { |
3095 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', ''); |
|
3095 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
|
3096 | 3096 | } else { |
3097 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'] . '#', '', false); |
|
3097 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
3098 | 3098 | } |
3099 | 3099 | } |
3100 | 3100 | } |
@@ -3102,15 +3102,15 @@ discard block |
||
3102 | 3102 | // This is just to generate a delivery receipt when option to do this is on |
3103 | 3103 | //var_dump($object->linkedObjectsIds['delivery']); |
3104 | 3104 | if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED) && $user->hasRight('expedition', 'delivery', 'creer') && empty($object->linkedObjectsIds['delivery'])) { |
3105 | - print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"] . '?action=create_delivery&token=' . newToken() . '&id=' . $object->id, ''); |
|
3105 | + print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"].'?action=create_delivery&token='.newToken().'&id='.$object->id, ''); |
|
3106 | 3106 | } |
3107 | 3107 | |
3108 | 3108 | // Sign (to set to status "Signed" without using the online signature page) |
3109 | 3109 | if ($object->status > Expedition::STATUS_DRAFT) { |
3110 | 3110 | if ($object->signed_status != Expedition::$SIGNED_STATUSES['STATUS_SIGNED_ALL']) { |
3111 | - 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>'; |
|
3111 | + 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>'; |
|
3112 | 3112 | } else { |
3113 | - 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>'; |
|
3113 | + 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>'; |
|
3114 | 3114 | } |
3115 | 3115 | } |
3116 | 3116 | |
@@ -3118,7 +3118,7 @@ discard block |
||
3118 | 3118 | if (isModEnabled('invoice') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED)) { |
3119 | 3119 | if ($user->hasRight('facture', 'creer')) { |
3120 | 3120 | if (getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') { |
3121 | - print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT . '/compta/facture/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, ''); |
|
3121 | + print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, ''); |
|
3122 | 3122 | } |
3123 | 3123 | } |
3124 | 3124 | } |
@@ -3127,22 +3127,22 @@ discard block |
||
3127 | 3127 | if ($object->status == Expedition::STATUS_VALIDATED) { |
3128 | 3128 | if ($user->hasRight('expedition', 'creer') && $object->status > 0) { |
3129 | 3129 | if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') { |
3130 | - print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"] . '?action=classifybilled&token=' . newToken() . '&id=' . $object->id, ''); |
|
3130 | + print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, ''); |
|
3131 | 3131 | } |
3132 | - print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"] . '?action=classifyclosed&token=' . newToken() . '&id=' . $object->id, ''); |
|
3132 | + print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action=classifyclosed&token='.newToken().'&id='.$object->id, ''); |
|
3133 | 3133 | } |
3134 | 3134 | } |
3135 | 3135 | |
3136 | 3136 | // Cancel |
3137 | 3137 | if ($object->status == Expedition::STATUS_VALIDATED) { |
3138 | 3138 | if ($user->hasRight('expedition', 'creer')) { |
3139 | - print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"] . '?action=cancel&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', ''); |
|
3139 | + print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"].'?action=cancel&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
|
3140 | 3140 | } |
3141 | 3141 | } |
3142 | 3142 | |
3143 | 3143 | // Delete |
3144 | 3144 | if ($user->hasRight('expedition', 'supprimer')) { |
3145 | - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&id=' . $object->id, ''); |
|
3145 | + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
|
3146 | 3146 | } |
3147 | 3147 | } |
3148 | 3148 | |
@@ -3158,9 +3158,9 @@ discard block |
||
3158 | 3158 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
3159 | 3159 | |
3160 | 3160 | $objectref = dol_sanitizeFileName($object->ref); |
3161 | - $filedir = $conf->expedition->dir_output . "/sending/" . $objectref; |
|
3161 | + $filedir = $conf->expedition->dir_output."/sending/".$objectref; |
|
3162 | 3162 | |
3163 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
3163 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
3164 | 3164 | |
3165 | 3165 | $genallowed = $user->hasRight('expedition', 'lire'); |
3166 | 3166 | $delallowed = $user->hasRight('expedition', 'creer'); |
@@ -3181,8 +3181,8 @@ discard block |
||
3181 | 3181 | |
3182 | 3182 | if ($object->status != Expedition::STATUS_DRAFT && $useonlinesignature) { |
3183 | 3183 | print '<br><!-- Link to sign -->'; |
3184 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; |
|
3185 | - print showOnlineSignatureUrl('expedition', $object->ref, $object) . '<br>'; |
|
3184 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
|
3185 | + print showOnlineSignatureUrl('expedition', $object->ref, $object).'<br>'; |
|
3186 | 3186 | } |
3187 | 3187 | |
3188 | 3188 | print '</div><div class="fichehalfright">'; |
@@ -3190,13 +3190,13 @@ discard block |
||
3190 | 3190 | |
3191 | 3191 | |
3192 | 3192 | // List of actions on element |
3193 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
3193 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
3194 | 3194 | $formactions = new FormActions($db); |
3195 | 3195 | |
3196 | 3196 | //button to go to messaging from the events box |
3197 | 3197 | $MAXEVENT = 10; |
3198 | - $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/expedition/messaging.php?id=' . $object->id); |
|
3199 | - $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/expedition/agenda.php?id=' . $object->id); |
|
3198 | + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/expedition/messaging.php?id='.$object->id); |
|
3199 | + $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/expedition/agenda.php?id='.$object->id); |
|
3200 | 3200 | |
3201 | 3201 | $somethingshown = $formactions->showactions($object, 'shipping', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); |
3202 | 3202 | |
@@ -3216,10 +3216,10 @@ discard block |
||
3216 | 3216 | // Presend form |
3217 | 3217 | $modelmail = 'shipping_send'; |
3218 | 3218 | $defaulttopic = 'SendShippingRef'; |
3219 | - $diroutput = $conf->expedition->dir_output . '/sending'; |
|
3220 | - $trackid = 'shi' . $object->id; |
|
3219 | + $diroutput = $conf->expedition->dir_output.'/sending'; |
|
3220 | + $trackid = 'shi'.$object->id; |
|
3221 | 3221 | |
3222 | - include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php'; |
|
3222 | + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
|
3223 | 3223 | } |
3224 | 3224 | |
3225 | 3225 | // End of page |