fk_entrepot fix (#26465)

This commit is contained in:
andreubisquerra 2023-11-06 00:36:49 +01:00 committed by GitHub
parent b65d5c8740
commit 0214df1fbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -395,7 +395,7 @@ class Productbatch extends CommonObject
$sql .= " WHERE t.fk_product_stock = ".((int) $fk_product_stock);
} else {
$sql .= ", ".$this->db->prefix()."product_stock as ps";
$sql .= " WHERE t.fk_product_stock = ps.rowid AND ps.fk_warehouse = ".((int) $fk_warehouse);
$sql .= " WHERE t.fk_product_stock = ps.rowid AND ps.fk_entrepot = ".((int) $fk_warehouse);
}
if (!empty($eatby)) {
array_push($where, " eatby = '".$this->db->idate($eatby)."'"); // deprecated