Ret Travis

This commit is contained in:
atm-lena 2022-02-22 11:50:47 +01:00
parent 5b8d80ab17
commit 5cf723e7a5

View File

@ -41,7 +41,7 @@ if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_stock as ps on ps.rowid = pb.fk_product_stock";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "entrepot as e on e.rowid = ps.fk_entrepot AND e.entity IN (" . getEntity('stock') . ")";
$sql .= " WHERE ps.fk_product = " .((int) $fk_product);
if ($warehouse_id > 0) $sql .= " AND fk_entrepot = '" . $warehouse_id . "'";
if ($warehouse_id > 0) $sql .= " AND fk_entrepot = '" . ((int) $warehouse_id) . "'";
$sql .= " ORDER BY e.ref, pb.batch";
$resql = $db->query($sql);