Update commondocgenerator.class.php

This commit is contained in:
Laurent Destailleur 2019-10-20 14:37:15 +02:00 committed by GitHub
parent a8e73533b9
commit 8ce6197314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -598,7 +598,7 @@ abstract class CommonDocGenerator
$columns .= "$key, ";
}
$columns = substr($columns, 0, strlen($columns) - 2);
$resql = $this->db->query("SELECT $columns FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields AS ex INNER JOIN " . MAIN_DB_PREFIX . "product_fournisseur_price AS f ON ex.fk_object = f.rowid WHERE f.ref_fourn = '" . $line->ref_fourn . "'");
$resql = $this->db->query("SELECT $columns FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields AS ex INNER JOIN " . MAIN_DB_PREFIX . "product_fournisseur_price AS f ON ex.fk_object = f.rowid WHERE f.ref_fourn = '" . $line->ref_supplier . "'");
if ($this->db->num_rows($resql) > 0) {
$resql = $this->db->fetch_object($resql);
foreach ($extralabels as $key => $value) {