Update product.class.php

This commit is contained in:
Laurent Destailleur 2022-03-07 14:06:54 +01:00 committed by GitHub
parent 744b84cb09
commit e13038dc30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1804,7 +1804,8 @@ class Product extends CommonObject
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", pfp.packaging";
$sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
$sql .= " WHERE 1 = 1";
if ($product_id != 0) { $sql .= " AND pfp.fk_product = '".$product_id."'";
if ($product_id > 0) {
$sql .= " AND pfp.fk_product = ".((int) $product_id);
}
if ($fourn_ref != 'none') { $sql .= " AND pfp.ref_fourn = '".$fourn_ref."'";
}