@@ -74,7 +74,7 @@ |
||
74 | 74 | include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
75 | 75 | |
76 | 76 | //avoid warning on missing/undef entity |
77 | -$object->entity = (GETPOSTISSET('entity') ? GETPOSTINT('entity') : $conf->entity); |
|
77 | +$object->entity = (GETPOSTISSET('entity') ? GETPOSTINT('entity') : $conf->entity); |
|
78 | 78 | |
79 | 79 | // There is several ways to check permission. |
80 | 80 | // Set $enablepermissioncheck to 1 to enable a minimum low level of checks |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | // Get parameters |
39 | 39 | $id = GETPOSTINT('id'); |
40 | 40 | $ref = GETPOST('ref', 'alpha'); |
41 | -$lineid = GETPOSTINT('lineid'); |
|
41 | +$lineid = GETPOSTINT('lineid'); |
|
42 | 42 | |
43 | 43 | $action = GETPOST('action', 'aZ09'); |
44 | 44 | $confirm = GETPOST('confirm', 'alpha'); |
45 | 45 | $cancel = GETPOST('cancel', 'aZ09'); |
46 | 46 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
47 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
48 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
47 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
48 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
49 | 49 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
50 | 50 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |
51 | 51 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | // Load object |
82 | 82 | include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
83 | 83 | |
84 | -$object->entity = (GETPOSTISSET('entity') ? GETPOSTINT('entity') : $conf->entity); |
|
84 | +$object->entity = (GETPOSTISSET('entity') ? GETPOSTINT('entity') : $conf->entity); |
|
85 | 85 | |
86 | 86 | // There is several ways to check permission. |
87 | 87 | // Set $enablepermissioncheck to 1 to enable a minimum low level of checks |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | |
378 | 378 | // Link to public page |
379 | 379 | print '<tr><td>Link</td>'; |
380 | - print '<td><a href="'. DOL_URL_ROOT.'/public/bookcal/index.php?id='.$object->id.'" target="_blank">Public page</a>'; |
|
380 | + print '<td><a href="'.DOL_URL_ROOT.'/public/bookcal/index.php?id='.$object->id.'" target="_blank">Public page</a>'; |
|
381 | 381 | print '</td></tr>'; |
382 | 382 | |
383 | 383 | print '</table>'; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $sql .= $hookmanager->resPrint; |
156 | 156 | $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; |
157 | 157 | if (!getDolGlobalString('PRODUCT_STOCK_LIST_SHOW_WITH_PRECALCULATED_DENORMALIZED_PHYSICAL_STOCK')) { |
158 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s ON p.rowid = s.fk_product'; |
|
158 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product'; |
|
159 | 159 | } |
160 | 160 | if (getDolGlobalString('PRODUCT_USE_UNITS')) { |
161 | 161 | $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid'; |
@@ -174,48 +174,48 @@ discard block |
||
174 | 174 | } |
175 | 175 | $sql .= "("; |
176 | 176 | $sql .= " SELECT cp.fk_categorie, cp.fk_product"; |
177 | - $sql .= " FROM " . MAIN_DB_PREFIX . "categorie_product as cp"; |
|
177 | + $sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cp"; |
|
178 | 178 | $sql .= " WHERE cp.fk_product = p.rowid"; // Join for the needed table to filter by categ |
179 | 179 | if ($search_categ > 0) { |
180 | - $sql .= " AND cp.fk_categorie = " . ((int) $search_categ); |
|
180 | + $sql .= " AND cp.fk_categorie = ".((int) $search_categ); |
|
181 | 181 | } |
182 | 182 | $sql .= ")"; |
183 | 183 | } |
184 | 184 | if (!getDolGlobalString('PRODUCT_STOCK_LIST_SHOW_WITH_PRECALCULATED_DENORMALIZED_PHYSICAL_STOCK')) { |
185 | 185 | if (!getDolGlobalString('PRODUCT_STOCK_LIST_SHOW_VIRTUAL_WITH_NO_PHYSICAL')) { |
186 | - $sql .= " AND EXISTS (SELECT e.rowid FROM " . MAIN_DB_PREFIX . "entrepot as e WHERE e.rowid = s.fk_entrepot AND e.entity IN (" . getEntity('stock') . "))"; |
|
186 | + $sql .= " AND EXISTS (SELECT e.rowid FROM ".MAIN_DB_PREFIX."entrepot as e WHERE e.rowid = s.fk_entrepot AND e.entity IN (".getEntity('stock')."))"; |
|
187 | 187 | } else { |
188 | 188 | $sql .= " AND |
189 | 189 | ( |
190 | 190 | EXISTS |
191 | 191 | (SELECT e.rowid |
192 | - FROM " . MAIN_DB_PREFIX . "entrepot as e |
|
193 | - WHERE e.rowid = s.fk_entrepot AND e.entity IN (" . getEntity('stock') . ")) |
|
192 | + FROM " . MAIN_DB_PREFIX."entrepot as e |
|
193 | + WHERE e.rowid = s.fk_entrepot AND e.entity IN (" . getEntity('stock').")) |
|
194 | 194 | OR ( |
195 | 195 | SELECT SUM(cd1.qty) as qty |
196 | - FROM " . MAIN_DB_PREFIX . "commande_fournisseurdet as cd1 |
|
197 | - LEFT JOIN " . MAIN_DB_PREFIX . "commande_fournisseur as c1 |
|
196 | + FROM " . MAIN_DB_PREFIX."commande_fournisseurdet as cd1 |
|
197 | + LEFT JOIN " . MAIN_DB_PREFIX."commande_fournisseur as c1 |
|
198 | 198 | ON c1.rowid = cd1.fk_commande |
199 | 199 | WHERE c1.entity IN (1) AND cd1.fk_product = p.rowid AND c1.fk_statut in (3,4) AND cd1.qty <> 0 |
200 | 200 | ) IS NOT NULL |
201 | 201 | OR ( |
202 | 202 | SELECT SUM(cd2.qty) as qty |
203 | - FROM " . MAIN_DB_PREFIX . "commandedet as cd2 |
|
204 | - LEFT JOIN " . MAIN_DB_PREFIX . "commande as c2 ON c2.rowid = cd2.fk_commande |
|
203 | + FROM " . MAIN_DB_PREFIX."commandedet as cd2 |
|
204 | + LEFT JOIN " . MAIN_DB_PREFIX."commande as c2 ON c2.rowid = cd2.fk_commande |
|
205 | 205 | WHERE c2.entity IN (1) AND cd2.fk_product = p.rowid AND c2.fk_statut in (1,2) AND cd2.qty <> 0 |
206 | 206 | ) IS NOT NULL |
207 | 207 | OR ( |
208 | 208 | SELECT SUM(ed3.qty) as qty |
209 | - FROM " . MAIN_DB_PREFIX . "expeditiondet as ed3 |
|
210 | - LEFT JOIN " . MAIN_DB_PREFIX . "expedition as e3 ON e3.rowid = ed3.fk_expedition |
|
211 | - LEFT JOIN " . MAIN_DB_PREFIX . "commandedet as cd3 ON ed3.fk_elementdet = cd3.rowid |
|
212 | - LEFT JOIN " . MAIN_DB_PREFIX . "commande as c3 ON c3.rowid = cd3.fk_commande |
|
209 | + FROM " . MAIN_DB_PREFIX."expeditiondet as ed3 |
|
210 | + LEFT JOIN " . MAIN_DB_PREFIX."expedition as e3 ON e3.rowid = ed3.fk_expedition |
|
211 | + LEFT JOIN " . MAIN_DB_PREFIX."commandedet as cd3 ON ed3.fk_elementdet = cd3.rowid |
|
212 | + LEFT JOIN " . MAIN_DB_PREFIX."commande as c3 ON c3.rowid = cd3.fk_commande |
|
213 | 213 | WHERE e3.entity IN (1) AND cd3.fk_product = p.rowid AND c3.fk_statut IN (1,2) AND e3.fk_statut IN (1,2) AND ed3.qty <> 0 |
214 | 214 | ) IS NOT NULL |
215 | 215 | OR ( |
216 | 216 | SELECT SUM(mp4.qty) as qty |
217 | - FROM " . MAIN_DB_PREFIX . "mrp_production as mp4 |
|
218 | - LEFT JOIN " . MAIN_DB_PREFIX . "mrp_mo as m4 ON m4.rowid = mp4.fk_mo AND m4.entity IN (1) AND m4.status IN (1,2) |
|
217 | + FROM " . MAIN_DB_PREFIX."mrp_production as mp4 |
|
218 | + LEFT JOIN " . MAIN_DB_PREFIX."mrp_mo as m4 ON m4.rowid = mp4.fk_mo AND m4.entity IN (1) AND m4.status IN (1,2) |
|
219 | 219 | WHERE mp4.fk_product = p.rowid AND mp4.qty <> 0 |
220 | 220 | ) IS NOT NULL |
221 | 221 | ) "; |
@@ -278,12 +278,12 @@ discard block |
||
278 | 278 | $sql_having = ''; |
279 | 279 | if (!getDolGlobalString('PRODUCT_STOCK_LIST_SHOW_WITH_PRECALCULATED_DENORMALIZED_PHYSICAL_STOCK')) { |
280 | 280 | if ($search_toolowstock) { |
281 | - $sql_having .= " HAVING SUM(" . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ") < p.seuil_stock_alerte"; |
|
281 | + $sql_having .= " HAVING SUM(".$db->ifsql('s.reel IS NULL', '0', 's.reel').") < p.seuil_stock_alerte"; |
|
282 | 282 | } |
283 | 283 | if ($search_stock_physique != '') { |
284 | 284 | //$natural_search_physique = natural_search('HAVING SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1); |
285 | - $natural_search_physique = natural_search('SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1); |
|
286 | - $natural_search_physique = " " . substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters |
|
285 | + $natural_search_physique = natural_search('SUM('.$db->ifsql('s.reel IS NULL', '0', 's.reel').')', $search_stock_physique, 1, 1); |
|
286 | + $natural_search_physique = " ".substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters |
|
287 | 287 | if (!empty($sql_having)) { |
288 | 288 | $sql_having .= " AND"; |
289 | 289 | } else { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | $param .= "&sbarcode=".urlencode((string) ($sbarcode)); |
385 | 385 | } |
386 | 386 | if ($search_stock_physique) { |
387 | - $param .= '&search_stock_physique=' . urlencode($search_stock_physique); |
|
387 | + $param .= '&search_stock_physique='.urlencode($search_stock_physique); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | llxHeader("", $texte, $helpurl); |
@@ -282,11 +282,11 @@ discard block |
||
282 | 282 | $reg = array(); |
283 | 283 | $fromtype = GETPOST('fromtype', 'alpha'); |
284 | 284 | if ($fromtype === 'robot') { |
285 | - $from = dol_string_nospecial($conf->global->MAIN_MAIL_EMAIL_FROM, ' ', array(",")).' <' . getDolGlobalString('MAIN_MAIL_EMAIL_FROM').'>'; |
|
285 | + $from = dol_string_nospecial($conf->global->MAIN_MAIL_EMAIL_FROM, ' ', array(",")).' <'.getDolGlobalString('MAIN_MAIL_EMAIL_FROM').'>'; |
|
286 | 286 | } elseif ($fromtype === 'user') { |
287 | 287 | $from = dol_string_nospecial($user->getFullName($langs), ' ', array(",")).' <'.$user->email.'>'; |
288 | 288 | } elseif ($fromtype === 'company') { |
289 | - $from = dol_string_nospecial($conf->global->MAIN_INFO_SOCIETE_NOM, ' ', array(",")).' <' . getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>'; |
|
289 | + $from = dol_string_nospecial($conf->global->MAIN_INFO_SOCIETE_NOM, ' ', array(",")).' <'.getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>'; |
|
290 | 290 | } elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { |
291 | 291 | $tmp = explode(',', $user->email_aliases); |
292 | 292 | $from = trim($tmp[($reg[1] - 1)]); |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | // Autocomplete the $sendtobcc |
329 | 329 | // $autocopy can be MAIN_MAIL_AUTOCOPY_PROPOSAL_TO, MAIN_MAIL_AUTOCOPY_ORDER_TO, MAIN_MAIL_AUTOCOPY_INVOICE_TO, MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO... |
330 | 330 | if (!empty($autocopy)) { |
331 | - $sendtobcc .= (getDolGlobalString($autocopy) ? (($sendtobcc ? ", " : "") . getDolGlobalString($autocopy)) : ''); |
|
331 | + $sendtobcc .= (getDolGlobalString($autocopy) ? (($sendtobcc ? ", " : "").getDolGlobalString($autocopy)) : ''); |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | $deliveryreceipt = GETPOST('deliveryreceipt'); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $object->actionmsg = $message; // Long text |
398 | 398 | $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentByTo')...); |
399 | 399 | if (getDolGlobalString('MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT')) { |
400 | - $object->actionmsg2 = $subject; // Short text |
|
400 | + $object->actionmsg2 = $subject; // Short text |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | $object->trackid = $trackid; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | const KEY_ID = 0; |
142 | 142 | const KEY_LABEL = 1; |
143 | - const KEY_TYPE = 2; // deprecated |
|
143 | + const KEY_TYPE = 2; // deprecated |
|
144 | 144 | const KEY_DEFAULT = 3; |
145 | 145 | const KEY_FIRST_LEVEL = 4; |
146 | 146 | const KEY_SECOND_LEVEL = 5; |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $moduleNameInConf = 'supplier_proposal'; |
637 | 637 | } |
638 | 638 | |
639 | - unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used) |
|
639 | + unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used) |
|
640 | 640 | |
641 | 641 | return 1; |
642 | 642 | } else { |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | $pathoffile = $this->getDescLongReadmeFound(); |
733 | 733 | |
734 | 734 | if ($pathoffile) { // Mostly for external modules |
735 | - $content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024); // Max size loaded 1Mb |
|
735 | + $content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024); // Max size loaded 1Mb |
|
736 | 736 | |
737 | 737 | if ((float) DOL_VERSION >= 6.0) { |
738 | 738 | @include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php'; |
@@ -1497,7 +1497,7 @@ discard block |
||
1497 | 1497 | |
1498 | 1498 | $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def"; |
1499 | 1499 | $sql .= " WHERE file = '".$this->db->escape($file)."'"; |
1500 | - $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1500 | + $sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company |
|
1501 | 1501 | |
1502 | 1502 | dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG); |
1503 | 1503 | $resql = $this->db->query($sql); |
@@ -1920,9 +1920,9 @@ discard block |
||
1920 | 1920 | |
1921 | 1921 | // If the module is active |
1922 | 1922 | foreach ($this->rights as $key => $value) { |
1923 | - $r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1923 | + $r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity) |
|
1924 | 1924 | $r_label = $this->rights[$key][self::KEY_LABEL]; |
1925 | - $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated |
|
1925 | + $r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated |
|
1926 | 1926 | $r_default = $this->rights[$key][self::KEY_DEFAULT] ?? 0; |
1927 | 1927 | $r_perms = $this->rights[$key][self::KEY_FIRST_LEVEL] ?? ''; |
1928 | 1928 | $r_subperms = $this->rights[$key][self::KEY_SECOND_LEVEL] ?? ''; |
@@ -1946,7 +1946,7 @@ discard block |
||
1946 | 1946 | } |
1947 | 1947 | |
1948 | 1948 | // condition to show or hide a user right (default: 1) (eg isModEnabled('anothermodule') or ($conf->global->MAIN_FEATURES_LEVEL > 0) or etc..) |
1949 | - $r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1'; |
|
1949 | + $r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1'; |
|
1950 | 1950 | |
1951 | 1951 | // Search if perm already present |
1952 | 1952 | $sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."rights_def"; |
@@ -1964,7 +1964,7 @@ discard block |
||
1964 | 1964 | $sql .= ", libelle"; |
1965 | 1965 | $sql .= ", module"; |
1966 | 1966 | $sql .= ", module_origin"; |
1967 | - $sql .= ", type"; // TODO deprecated |
|
1967 | + $sql .= ", type"; // TODO deprecated |
|
1968 | 1968 | $sql .= ", bydefault"; |
1969 | 1969 | $sql .= ", perms"; |
1970 | 1970 | $sql .= ", subperms"; |
@@ -1977,13 +1977,13 @@ discard block |
||
1977 | 1977 | $sql .= ", '".$this->db->escape($r_label)."'"; |
1978 | 1978 | $sql .= ", '".$this->db->escape($r_module)."'"; |
1979 | 1979 | $sql .= ", '".$this->db->escape($r_module_origin)."'"; |
1980 | - $sql .= ", '".$this->db->escape($r_type)."'"; // TODO deprecated |
|
1980 | + $sql .= ", '".$this->db->escape($r_type)."'"; // TODO deprecated |
|
1981 | 1981 | $sql .= ", ".((int) $r_default); |
1982 | 1982 | $sql .= ", '".$this->db->escape($r_perms)."'"; |
1983 | 1983 | $sql .= ", '".$this->db->escape($r_subperms)."'"; |
1984 | 1984 | $sql .= ", '".$this->db->escape($r_enabled)."'"; |
1985 | 1985 | |
1986 | - $sql.= ")"; |
|
1986 | + $sql .= ")"; |
|
1987 | 1987 | |
1988 | 1988 | $resqlinsert = $this->db->query($sql, 1); |
1989 | 1989 | |
@@ -2583,36 +2583,36 @@ discard block |
||
2583 | 2583 | } |
2584 | 2584 | |
2585 | 2585 | if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { |
2586 | - $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); |
|
2586 | + $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); |
|
2587 | 2587 | if ($this->needUpdate) { |
2588 | 2588 | $versionTitle .= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; |
2589 | 2589 | } |
2590 | 2590 | |
2591 | - $return .= '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >'; |
|
2592 | - $return .= $this->getVersion(1); |
|
2593 | - $return .= '</span>'; |
|
2591 | + $return .= '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >'; |
|
2592 | + $return .= $this->getVersion(1); |
|
2593 | + $return .= '</span>'; |
|
2594 | 2594 | } |
2595 | 2595 | |
2596 | - $return .= '</div> |
|
2596 | + $return .= '</div> |
|
2597 | 2597 | <div class="info-box-content info-box-text-module'.(!getDolGlobalString($const_name) ? '' : ' info-box-module-enabled'.($versiontrans ? ' info-box-content-warning' : '')).'"> |
2598 | 2598 | <span class="info-box-title">'.$this->getName().'</span> |
2599 | 2599 | <span class="info-box-desc twolinesmax opacitymedium" title="'.dol_escape_htmltag($this->getDesc()).'">'.nl2br($this->getDesc()).'</span>'; |
2600 | 2600 | |
2601 | - $return .= '<div class="valignmiddle inline-block info-box-more">'; |
|
2601 | + $return .= '<div class="valignmiddle inline-block info-box-more">'; |
|
2602 | 2602 | //if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' '; |
2603 | - $return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>'; |
|
2604 | - $return .= '</div><br>'; |
|
2605 | - |
|
2606 | - $return .= '<div class="valignmiddle inline-block info-box-actions">'; |
|
2607 | - $return .= '<div class="valignmiddle inline-block info-box-setup">'; |
|
2608 | - $return .= $codetoconfig; |
|
2609 | - $return .= '</div>'; |
|
2610 | - $return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">'; |
|
2611 | - $return .= $codeenabledisable; |
|
2612 | - $return .= '</div>'; |
|
2613 | - $return .= '</div>'; |
|
2614 | - |
|
2615 | - $return .= ' |
|
2603 | + $return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>'; |
|
2604 | + $return .= '</div><br>'; |
|
2605 | + |
|
2606 | + $return .= '<div class="valignmiddle inline-block info-box-actions">'; |
|
2607 | + $return .= '<div class="valignmiddle inline-block info-box-setup">'; |
|
2608 | + $return .= $codetoconfig; |
|
2609 | + $return .= '</div>'; |
|
2610 | + $return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">'; |
|
2611 | + $return .= $codeenabledisable; |
|
2612 | + $return .= '</div>'; |
|
2613 | + $return .= '</div>'; |
|
2614 | + |
|
2615 | + $return .= ' |
|
2616 | 2616 | </div><!-- /.info-box-content --> |
2617 | 2617 | </div><!-- /.info-box --> |
2618 | 2618 | </div>'; |
@@ -2631,7 +2631,7 @@ discard block |
||
2631 | 2631 | { |
2632 | 2632 | require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; |
2633 | 2633 | if (!empty($this->url_last_version)) { |
2634 | - $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2634 | + $lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only |
|
2635 | 2635 | if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) { |
2636 | 2636 | // Security warning : be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . - |
2637 | 2637 | $this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $sql .= " WHERE p.fk_soc = ".((int) $object->id); |
75 | 75 | $sql .= " AND p.entity IN (".getEntity($object->element).")"; |
76 | 76 | // Add where from hooks |
77 | - $parameters = array('contacttab' => true); // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
77 | + $parameters = array('contacttab' => true); // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
78 | 78 | $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook |
79 | 79 | $sql .= $hookmanager->resPrint; |
80 | 80 | $resql = $db->query($sql); |
@@ -83,7 +83,7 @@ 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 | 89 | $head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } else { |
162 | 162 | dol_print_error($db); |
163 | 163 | } |
164 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
164 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
165 | 165 | } |
166 | 166 | $head[$h][0] = DOL_URL_ROOT.'/societe/project.php?socid='.$object->id; |
167 | 167 | $head[$h][1] = $langs->trans("Projects"); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | } else { |
337 | 337 | dol_print_error($db); |
338 | 338 | } |
339 | - dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
339 | + dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
340 | 340 | } |
341 | 341 | |
342 | 342 | $head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.urlencode((string) ($object->id)); |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); |
380 | 380 | $nbLinks = Link::count($db, $object->element, $object->id); |
381 | 381 | $totalAttached = $nbFiles + $nbLinks; |
382 | - dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
382 | + dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
383 | 383 | } |
384 | 384 | |
385 | 385 | $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | } else { |
414 | 414 | dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR); |
415 | 415 | } |
416 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
416 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
417 | 417 | } |
418 | 418 | |
419 | 419 | $head[$h][1] .= '/'; |
@@ -807,7 +807,7 @@ discard block |
||
807 | 807 | return false; |
808 | 808 | } |
809 | 809 | |
810 | - $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
810 | + $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
811 | 811 | |
812 | 812 | //print "dd".$object->country_code; |
813 | 813 | return in_array($object->country_code, $country_code_in_EEC); |
@@ -1302,7 +1302,7 @@ discard block |
||
1302 | 1302 | $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; |
1303 | 1303 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)"; |
1304 | 1304 | $sql .= " WHERE t.fk_soc = ".((int) $object->id); |
1305 | - $sql .= " AND t.entity IN (" .getEntity('socpeople') .")"; |
|
1305 | + $sql .= " AND t.entity IN (".getEntity('socpeople').")"; |
|
1306 | 1306 | $sql .= " AND ((t.fk_user_creat = ".((int) $user->id)." AND t.priv = 1) OR t.priv = 0)"; |
1307 | 1307 | if ($search_rowid) { |
1308 | 1308 | $sql .= natural_search('t.rowid', $search_rowid); |
@@ -1732,7 +1732,7 @@ discard block |
||
1732 | 1732 | $tms_start = ''; |
1733 | 1733 | $tms_end = ''; |
1734 | 1734 | } |
1735 | - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
1735 | + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
1736 | 1736 | |
1737 | 1737 | // Check parameters |
1738 | 1738 | if (!is_object($filterobj) && !is_object($objcon)) { |
@@ -1800,7 +1800,7 @@ discard block |
||
1800 | 1800 | |
1801 | 1801 | // Fields from hook |
1802 | 1802 | $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon); |
1803 | - $reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook |
|
1803 | + $reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook |
|
1804 | 1804 | if (!empty($hookmanager->resPrint)) { |
1805 | 1805 | $sql .= $hookmanager->resPrint; |
1806 | 1806 | } |
@@ -1822,7 +1822,7 @@ discard block |
||
1822 | 1822 | |
1823 | 1823 | // Fields from hook |
1824 | 1824 | $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon); |
1825 | - $reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1825 | + $reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1826 | 1826 | if (!empty($hookmanager->resPrint)) { |
1827 | 1827 | $sql .= $hookmanager->resPrint; |
1828 | 1828 | } |
@@ -1913,7 +1913,7 @@ discard block |
||
1913 | 1913 | return 'Bad value for $filterobj'; |
1914 | 1914 | } |
1915 | 1915 | } else { |
1916 | - $sql .= " AND u.rowid = ". ((int) $filterobj->id); |
|
1916 | + $sql .= " AND u.rowid = ".((int) $filterobj->id); |
|
1917 | 1917 | } |
1918 | 1918 | |
1919 | 1919 | if (!empty($tms_start) && !empty($tms_end)) { |
@@ -1943,7 +1943,7 @@ discard block |
||
1943 | 1943 | |
1944 | 1944 | // Fields from hook |
1945 | 1945 | $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module); |
1946 | - $reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
1946 | + $reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
1947 | 1947 | if (!empty($hookmanager->resPrint)) { |
1948 | 1948 | $sql .= $hookmanager->resPrint; |
1949 | 1949 | } |
@@ -2637,14 +2637,14 @@ discard block |
||
2637 | 2637 | $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix; |
2638 | 2638 | if (getDolGlobalString($parammessageform) !== '') { |
2639 | 2639 | print $langs->transnoentities(getDolGlobalString($parammessageform)); |
2640 | - } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM') !== '') { |
|
2640 | + } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM') !== '') { |
|
2641 | 2641 | print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM')); |
2642 | 2642 | } |
2643 | 2643 | |
2644 | 2644 | // Add other message if VAT exists |
2645 | 2645 | if (!empty($object->total_vat) || !empty($object->total_tva)) { |
2646 | 2646 | $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix; |
2647 | - if (getDolGlobalString($parammessageform) !== '') { |
|
2647 | + if (getDolGlobalString($parammessageform) !== '') { |
|
2648 | 2648 | print $langs->transnoentities(getDolGlobalString($parammessageform)); |
2649 | 2649 | } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT') !== '') { |
2650 | 2650 | print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT')); |
@@ -212,12 +212,12 @@ |
||
212 | 212 | $entry .= '</td>'; |
213 | 213 | $entry .= '<td class="right" width="20px;">'; |
214 | 214 | if ($user->hasRight('categorie', 'creer')) { |
215 | - $entry .= '<a class="editfielda" href="' . DOL_URL_ROOT . '/categories/edit.php?id=' . $val['id'] . '&type=' . urlencode($type) . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . urlencode($type)) . '">' . img_edit() . '</a>'; |
|
215 | + $entry .= '<a class="editfielda" href="'.DOL_URL_ROOT.'/categories/edit.php?id='.$val['id'].'&type='.urlencode($type).$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.urlencode($type)).'">'.img_edit().'</a>'; |
|
216 | 216 | } |
217 | 217 | $entry .= '</td>'; |
218 | 218 | $entry .= '<td class="right" width="20px;">'; |
219 | 219 | if ($user->hasRight('categorie', 'supprimer')) { |
220 | - $entry .= '<a class="deletefilelink" href="' . DOL_URL_ROOT . '/categories/viewcat.php?action=delete&token=' . newToken() . '&id=' . $val['id'] . '&type=' . urlencode($type) . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . urlencode($type) . $moreparam) . '&backtolist=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . urlencode($type) . $moreparam) . '">' . img_delete() . '</a>'; |
|
220 | + $entry .= '<a class="deletefilelink" href="'.DOL_URL_ROOT.'/categories/viewcat.php?action=delete&token='.newToken().'&id='.$val['id'].'&type='.urlencode($type).$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.urlencode($type).$moreparam).'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.urlencode($type).$moreparam).'">'.img_delete().'</a>'; |
|
221 | 221 | } |
222 | 222 | $entry .= '</td>'; |
223 | 223 |
@@ -178,8 +178,8 @@ discard block |
||
178 | 178 | $sql .= " JOIN ".MAIN_DB_PREFIX."product_stock as ps"; |
179 | 179 | $sql .= " ON ps.rowid = pb.fk_product_stock"; |
180 | 180 | $sql .= " WHERE pb.batch = '".$db->escape($lot)."'"; |
181 | - $sql .= " AND ps.fk_product = ".((int) $prod_id) ; |
|
182 | - $sql .= " AND ps.fk_entrepot = ".((int) $warehouse_id) ; |
|
181 | + $sql .= " AND ps.fk_product = ".((int) $prod_id); |
|
182 | + $sql .= " AND ps.fk_entrepot = ".((int) $warehouse_id); |
|
183 | 183 | |
184 | 184 | $resql = $db->query($sql); |
185 | 185 | if ($resql) { |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $qtystart = 0; |
208 | 208 | |
209 | 209 | if ($idline > 0) { |
210 | - $result = $expeditiondispatch->fetch($idline); // get line from llx_expeditiondet |
|
210 | + $result = $expeditiondispatch->fetch($idline); // get line from llx_expeditiondet |
|
211 | 211 | if ($result < 0) { |
212 | 212 | setEventMessages($expeditiondispatch->error, $expeditiondispatch->errors, 'errors'); |
213 | 213 | $error++; |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | llxHeader('', $title, $help_url, '', 0, 0, $morejs); |
381 | 381 | |
382 | 382 | if ($object->id > 0 || !empty($object->ref)) { |
383 | - $lines = $object->lines; // This is an array of detail of line, on line per source order line found intolines[]->fk_elementdet, then each line may have sub data |
|
383 | + $lines = $object->lines; // This is an array of detail of line, on line per source order line found intolines[]->fk_elementdet, then each line may have sub data |
|
384 | 384 | //var_dump($lines[0]->fk_elementdet); exit; |
385 | 385 | |
386 | 386 | $num_prod = count($lines); |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | |
439 | 439 | // Ref customer shipment |
440 | 440 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1); |
441 | - $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); |
|
441 | + $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); |
|
442 | 442 | |
443 | 443 | // Thirdparty |
444 | 444 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1); |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | print '<center>'; |
530 | 530 | |
531 | 531 | print '<br>'; |
532 | - $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0. |
|
532 | + $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0. |
|
533 | 533 | |
534 | 534 | if ($object->statut == Expedition::STATUS_DRAFT) { |
535 | 535 | require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | } |
634 | 634 | print '<td class="right">'.$langs->trans("QtyOrdered").'</td>'; |
635 | 635 | if ($object->status == Expedition::STATUS_DRAFT) { |
636 | - print '<td class="right">'.$langs->trans("QtyToShip"); // Qty to dispatch (sum for all lines of batch detail if there is) |
|
636 | + print '<td class="right">'.$langs->trans("QtyToShip"); // Qty to dispatch (sum for all lines of batch detail if there is) |
|
637 | 637 | } else { |
638 | 638 | print '<td class="right">'.$langs->trans("QtyDispatchedShort").'</td>'; |
639 | 639 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | $object->fields = dol_sort_array($object->fields, 'position'); |
148 | 148 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
149 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
149 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
150 | 150 | |
151 | 151 | // Security check |
152 | 152 | $expeditionid = GETPOSTINT('id'); |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | if ($searchCategoryCustomerOperator == 0) { |
409 | 409 | $searchCategoryCustomerSqlList[] = " EXISTS (SELECT cs.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as cs WHERE s.rowid = cs.fk_soc AND cs.fk_categorie = ".((int) $searchCategoryCustomer).")"; |
410 | 410 | } else { |
411 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); |
|
411 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer); |
|
412 | 412 | } |
413 | 413 | } |
414 | 414 | } |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | if ($searchCategoryProductOperator == 0) { |
439 | 439 | $searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_elementdet = cd.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")"; |
440 | 440 | } else { |
441 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct); |
|
441 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct); |
|
442 | 442 | } |
443 | 443 | } |
444 | 444 | } |