lint(stickler) again
This commit is contained in:
parent
1d162cc62c
commit
285fa4a506
@ -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) {
|
||||||
@ -2235,7 +2235,7 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($separatedEntityPMP) {
|
if ($separatedEntityPMP) {
|
||||||
$sql .= " AND ppe.entity = " . (int) $conf->entity;
|
$sql .= " AND ppe.entity = " . (int) $conf->entity;
|
||||||
}
|
}
|
||||||
if ($separatedStock) {
|
if ($separatedStock) {
|
||||||
$sql .= " AND sp.fk_entrepot IN (
|
$sql .= " AND sp.fk_entrepot IN (
|
||||||
|
|||||||
@ -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";
|
||||||
|
|||||||
@ -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";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user