@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | } |
160 | 160 | $sql .= "("; |
161 | 161 | $sql .= " SELECT cp.fk_categorie, cp.fk_product"; |
162 | - $sql .= " FROM " . MAIN_DB_PREFIX . "categorie_product as cp"; |
|
162 | + $sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cp"; |
|
163 | 163 | $sql .= " WHERE cp.fk_product = p.rowid"; // Join for the needed table to filter by categ |
164 | 164 | if ($search_categ > 0) { |
165 | - $sql .= " AND cp.fk_categorie = " . ((int) $search_categ); |
|
165 | + $sql .= " AND cp.fk_categorie = ".((int) $search_categ); |
|
166 | 166 | } |
167 | 167 | $sql .= ")"; |
168 | 168 | } |
@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | } |
211 | 211 | if ($search_stock_physique != '') { |
212 | 212 | //$natural_search_physique = natural_search('HAVING SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1); |
213 | - $natural_search_physique = natural_search('SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1); |
|
214 | - $natural_search_physique = " " . substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters |
|
213 | + $natural_search_physique = natural_search('SUM('.$db->ifsql('s.reel IS NULL', '0', 's.reel').')', $search_stock_physique, 1, 1); |
|
214 | + $natural_search_physique = " ".substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters |
|
215 | 215 | if (!empty($sql_having)) { |
216 | 216 | $sql_having .= " AND"; |
217 | 217 | } else { |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | $param .= "&sbarcode=".urlencode($sbarcode); |
299 | 299 | } |
300 | 300 | if ($search_stock_physique) { |
301 | - $param .= '&search_stock_physique=' . urlencode($search_stock_physique); |
|
301 | + $param .= '&search_stock_physique='.urlencode($search_stock_physique); |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | llxHeader("", $texte, $helpurl); |
@@ -156,7 +156,7 @@ |
||
156 | 156 | * $price Can be set to update AWP (Average Weighted Price) when you make a stock increase |
157 | 157 | * $dlc Eat-by date. Will be used if lot does not exists yet and will be created. |
158 | 158 | * $dluo Sell-by date. Will be used if lot does not exists yet and will be created. |
159 | - * |
|
159 | + * |
|
160 | 160 | * @param int $product_id Id product id {@min 1} {@from body} {@required true} |
161 | 161 | * @param int $warehouse_id Id warehouse {@min 1} {@from body} {@required true} |
162 | 162 | * @param float $qty Qty to add (Use negative value for a stock decrease) {@from body} {@required true} |
@@ -954,7 +954,7 @@ |
||
954 | 954 | } |
955 | 955 | $result .= $linkend; |
956 | 956 | global $action; |
957 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
957 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
958 | 958 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
959 | 959 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
960 | 960 | if ($reshook > 0) { |
@@ -987,7 +987,7 @@ |
||
987 | 987 | $result .= $linkend; |
988 | 988 | |
989 | 989 | global $action; |
990 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
990 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
991 | 991 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
992 | 992 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
993 | 993 | if ($reshook > 0) { |
@@ -987,7 +987,7 @@ |
||
987 | 987 | $result .= $linkend; |
988 | 988 | |
989 | 989 | global $action; |
990 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
990 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
991 | 991 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
992 | 992 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
993 | 993 | if ($reshook > 0) { |
@@ -954,7 +954,7 @@ |
||
954 | 954 | } |
955 | 955 | $result .= $linkend; |
956 | 956 | global $action; |
957 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
957 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
958 | 958 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
959 | 959 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
960 | 960 | if ($reshook > 0) { |
@@ -987,7 +987,7 @@ |
||
987 | 987 | $result .= $linkend; |
988 | 988 | |
989 | 989 | global $action; |
990 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
990 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
991 | 991 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
992 | 992 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
993 | 993 | if ($reshook > 0) { |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | // Object card |
93 | 93 | // ------------------------------------------------------------ |
94 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
94 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
95 | 95 | |
96 | 96 | $morehtmlref = '<div class="refidno">'; |
97 | 97 | $morehtmlref .= '</div>'; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | |
107 | 107 | $cssclass = "titlefield"; |
108 | - include DOL_DOCUMENT_ROOT . '/core/tpl/notes.tpl.php'; |
|
108 | + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; |
|
109 | 109 | |
110 | 110 | print '</div>'; |
111 | 111 |
@@ -91,7 +91,7 @@ |
||
91 | 91 | |
92 | 92 | // Object card |
93 | 93 | // ------------------------------------------------------------ |
94 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
94 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
95 | 95 | |
96 | 96 | $morehtmlref = '<div class="refidno">'; |
97 | 97 | $morehtmlref .= '</div>'; |