lint(stickler) again

This commit is contained in:
Antonin MARCHAL 2021-04-26 20:10:57 +02:00
parent 1d162cc62c
commit 285fa4a506
3 changed files with 5 additions and 8 deletions

View File

@ -2185,7 +2185,7 @@ class Product extends CommonObject
$separatedEntityPMP = false; $separatedEntityPMP = false;
if (!empty($conf->global->MULTICOMPANY_PRODUCT_SHARING_ENABLED) && !empty($conf->global->MULTICOMPANY_PMP_PER_ENTITY_ENABLED)) { if (!empty($conf->global->MULTICOMPANY_PRODUCT_SHARING_ENABLED) && !empty($conf->global->MULTICOMPANY_PMP_PER_ENTITY_ENABLED)) {
$checkPMPPerEntity = $this->db->query("SELECT pmp FROM " . MAIN_DB_PREFIX . "entity_product_pmp WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity); $checkPMPPerEntity = $this->db->query("SELECT pmp FROM " . MAIN_DB_PREFIX . "entity_product_pmp WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
if( $this->db->num_rows($checkPMPPerEntity)>0 ){ if ($this->db->num_rows($checkPMPPerEntity)>0) {
$separatedEntityPMP = true; $separatedEntityPMP = true;
} }
} }
@ -2196,7 +2196,7 @@ class Product extends CommonObject
$separatedStock = true; $separatedStock = true;
$visibleWarehousesEntities = $conf->entity; $visibleWarehousesEntities = $conf->entity;
if (isset($mc->sharings['stock']) && !empty($mc->sharings['stock'])) { if (isset($mc->sharings['stock']) && !empty($mc->sharings['stock'])) {
$visibleWarehousesEntities .= "," . implode( ",", $mc->sharings['stock'] ); $visibleWarehousesEntities .= "," . implode(",", $mc->sharings['stock']);
} }
} }
if ($separatedStock) { if ($separatedStock) {

View File

@ -609,7 +609,6 @@ if ($action == 'create') {
else { else {
$sql .= " p.pmp as ppmp,"; $sql .= " p.pmp as ppmp,";
} }
$sql .= " ps.reel as value"; $sql .= " ps.reel as value";
if (!empty($conf->global->PRODUCT_USE_UNITS)) { if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$sql .= ",fk_unit"; $sql .= ",fk_unit";

View File

@ -627,9 +627,7 @@ class Entrepot extends CommonObject
$sql = "SELECT sum(ps.reel) as nb, sum(ps.reel * p.pmp) as value"; $sql = "SELECT sum(ps.reel) as nb, sum(ps.reel * p.pmp) as value";
} }
$sql .= " FROM ".MAIN_DB_PREFIX."product_stock as ps"; $sql .= " FROM ".MAIN_DB_PREFIX."product_stock as ps";
$sql .= ", ".MAIN_DB_PREFIX."product as p"; $sql .= ", ".MAIN_DB_PREFIX."product as p";
if ($separatedPMP) { if ($separatedPMP) {
$sql .= ", ".MAIN_DB_PREFIX."entity_product_pmp as ppe"; $sql .= ", ".MAIN_DB_PREFIX."entity_product_pmp as ppe";
} }