Skip to content

Commit

Permalink
fix erreur sql si l'entrepôt ne posséde pas de sous entrepôt
Browse files Browse the repository at this point in the history
  • Loading branch information
ATM-nicolasV committed Oct 2, 2024
1 parent 1efd414 commit 7ba46dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion htdocs/product/inventory/class/inventory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ public function validate(User $user, $notrigger = false, $include_sub_warehouse
if (!empty($include_sub_warehouse) && getDolGlobalInt('INVENTORY_INCLUDE_SUB_WAREHOUSE')) {
$TChildWarehouses = array();
$this->getChildWarehouse($this->fk_warehouse, $TChildWarehouses);
$sql .= " OR ps.fk_entrepot IN (".$this->db->sanitize(join(',', $TChildWarehouses)).")";
if (!empty($TChildWarehouses)) {
$sql .= " OR ps.fk_entrepot IN (".$this->db->sanitize(join(',', $TChildWarehouses)).")";
}
}
$sql .= ')';
}
Expand Down

0 comments on commit 7ba46dc

Please sign in to comment.