@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | $action = GETPOST('action', 'aZ09'); |
38 | 38 | $value = GETPOST('value', 'alpha'); |
39 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
39 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
40 | 40 | |
41 | 41 | $param = GETPOST('param', 'alpha'); |
42 | 42 | $cancel = GETPOST('cancel', 'alpha'); |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | while ($assoc = $db->fetch_array($resql)) { |
802 | 802 | $rate_key = $assoc['rate']; |
803 | 803 | if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) { |
804 | - $rate_key .= ' (' . $assoc['vat_src_code'] . ')'; |
|
804 | + $rate_key .= ' ('.$assoc['vat_src_code'].')'; |
|
805 | 805 | } |
806 | 806 | |
807 | 807 | // Code to avoid warnings when array entry not defined |
@@ -986,7 +986,7 @@ discard block |
||
986 | 986 | while ($assoc = $db->fetch_array($resql)) { |
987 | 987 | $rate_key = $assoc['rate']; |
988 | 988 | if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) { |
989 | - $rate_key .= ' (' . $assoc['vat_src_code'] . ')'; |
|
989 | + $rate_key .= ' ('.$assoc['vat_src_code'].')'; |
|
990 | 990 | } |
991 | 991 | |
992 | 992 | // Code to avoid warnings when array entry not defined |
@@ -1113,7 +1113,7 @@ discard block |
||
1113 | 1113 | while ($assoc = $db->fetch_array($resql)) { |
1114 | 1114 | $rate_key = $assoc['rate']; |
1115 | 1115 | if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) { |
1116 | - $rate_key .= ' (' . $assoc['vat_src_code'] . ')'; |
|
1116 | + $rate_key .= ' ('.$assoc['vat_src_code'].')'; |
|
1117 | 1117 | } |
1118 | 1118 | |
1119 | 1119 | // Code to avoid warnings when array entry not defined |
@@ -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); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | 'skip_batch' => &$skip_batch, |
199 | 199 | 'id_product_batch' => &$id_product_batch |
200 | 200 | ); |
201 | - $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
|
201 | + $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
|
202 | 202 | |
203 | 203 | if ($reshook < 0) { |
204 | 204 | if (!empty($hookmanager->resPrint)) { |
@@ -665,8 +665,8 @@ discard block |
||
665 | 665 | $this->price = $obj->price; |
666 | 666 | $this->fk_user_author = $obj->fk_user_author; |
667 | 667 | $this->label = $obj->label; |
668 | - $this->fk_origin = $obj->origin_id; // For backward compatibility |
|
669 | - $this->origintype = $obj->origin_type; // For backward compatibility |
|
668 | + $this->fk_origin = $obj->origin_id; // For backward compatibility |
|
669 | + $this->origintype = $obj->origin_type; // For backward compatibility |
|
670 | 670 | $this->origin_id = $obj->origin_id; |
671 | 671 | $this->origin_type = $obj->origin_type; |
672 | 672 | $this->inventorycode = $obj->inventorycode; |
@@ -894,8 +894,8 @@ discard block |
||
894 | 894 | } else { // product_batch record not found |
895 | 895 | $pdluo->fk_product_stock = $vfk_product_stock; |
896 | 896 | $pdluo->qty = $qty; |
897 | - $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table. |
|
898 | - $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table. |
|
897 | + $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table. |
|
898 | + $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table. |
|
899 | 899 | $pdluo->batch = $vbatchnumber; |
900 | 900 | |
901 | 901 | $result = $pdluo->create($user, 1); |
@@ -1205,8 +1205,8 @@ discard block |
||
1205 | 1205 | $sql = "SELECT sum(pb.qty) as cpt"; |
1206 | 1206 | $sql .= " FROM ".$this->db->prefix()."product_batch as pb"; |
1207 | 1207 | $sql .= " INNER JOIN ".$this->db->prefix()."product_stock as ps ON ps.rowid = pb.fk_product_stock"; |
1208 | - $sql .= " WHERE ps.fk_product = " . ((int) $fk_product); |
|
1209 | - $sql .= " AND pb.batch = '" . $this->db->escape($batch) . "'"; |
|
1208 | + $sql .= " WHERE ps.fk_product = ".((int) $fk_product); |
|
1209 | + $sql .= " AND pb.batch = '".$this->db->escape($batch)."'"; |
|
1210 | 1210 | |
1211 | 1211 | $result = $this->db->query($sql); |
1212 | 1212 | if ($result) { |
@@ -214,8 +214,8 @@ |
||
214 | 214 | $newuser->admin = 1; |
215 | 215 | $newuser->entity = 0; |
216 | 216 | |
217 | - $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email |
|
218 | - $conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation |
|
217 | + $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email |
|
218 | + $conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation |
|
219 | 219 | |
220 | 220 | $result = $newuser->create($createuser, 1); |
221 | 221 | if ($result > 0) { |
@@ -503,7 +503,7 @@ |
||
503 | 503 | // Turning on or off the ssl target certificate |
504 | 504 | if ($ssl_verifypeer < 0) { |
505 | 505 | global $dolibarr_main_prod; |
506 | - $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
506 | + $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
507 | 507 | } |
508 | 508 | if (!empty($conf->global->MAIN_CURL_DISABLE_VERIFYPEER)) { |
509 | 509 | $ssl_verifypeer = 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) { |
@@ -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) { |