Merge pull request #21329 from defrance/patch-212

fix $fk_product instead $this->fk_product
This commit is contained in:
Laurent Destailleur 2022-06-23 11:38:38 +02:00 committed by GitHub
commit 41e9a0ded8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2264,8 +2264,8 @@ class Commande extends CommonOrder
}
$sql .= ' ed.fk_origin_line = cd.rowid';
$sql .= ' AND cd.fk_commande = '.((int) $this->id);
if ($this->fk_product > 0) {
$sql .= ' AND cd.fk_product = '.((int) $this->fk_product);
if ($fk_product > 0) {
$sql .= ' AND cd.fk_product = '.((int) $fk_product);
}
if ($filtre_statut >= 0) {
$sql .= ' AND e.fk_statut >= '.((int) $filtre_statut);