diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index d5cda255c33..7a7d6e8ba59 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -30,6 +30,7 @@ require("./pre.inc.php"); $langs->load("products"); +$langs->load("suppliers"); $user->getrights('produit'); @@ -75,7 +76,7 @@ if (isset($_REQUEST['catid'])) $title=$langs->trans("ProductsAndServices"); $sql = "SELECT p.rowid, p.label, p.ref, p.fk_product_type"; -$sql .= ", pf.fk_soc"; +$sql .= ", pf.fk_soc, pf.ref_fourn"; $sql .= ", min(ppf.price) as price"; $sql .= ", s.nom"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; @@ -85,7 +86,7 @@ if ($catid) } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur as pf ON p.rowid = pf.fk_product"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = pf.fk_soc"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as ppf ON ppf.fk_soc = pf.fk_soc AND ppf.fk_product = p.rowid AND ppf.quantity = 1"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as ppf ON ppf.fk_product_fournisseur = pf.rowid AND ppf.quantity = 1"; if ($_POST["mode"] == 'search') { @@ -161,6 +162,7 @@ if ($resql) // Lignes des titres print ""; print_liste_field_titre($langs->trans("Ref"),"liste.php", "p.ref",$param,"","",$sortfield); + print_liste_field_titre($langs->trans("RefSupplierShort"),"liste.php", "pf.ref_fourn",$param,"","",$sortfield); print_liste_field_titre($langs->trans("Label"),"liste.php", "p.label",$param,"","",$sortfield); print_liste_field_titre($langs->trans("Supplier"),"liste.php", "pf.fk_soc",$param,"","",$sortfield); print_liste_field_titre($langs->trans("BuyingPrice"),"liste.php", "ppf.price",$param,"",'align="right"',$sortfield); @@ -176,6 +178,9 @@ if ($resql) print ''; print ''; print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -201,13 +206,14 @@ if ($resql) else print img_object($langs->trans("ShowProduct"),"product"); print " "; print ''.$objp->ref.''; - print "$objp->label\n"; + print ''.$objp->ref_fourn.''; + print ''.$objp->label.''."\n"; } else { print ' '; } - + print ''.$objp->nom.''; print ''.price($objp->price).''; print "\n"; diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index fb195df31ae..037a7a2c8e9 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -19,3 +19,4 @@ ProductHasAlreadyReferenceInThisSupplier=This product has already a reference in NoRecordedSuppliers=No suppliers recorded SupplierPayment=Supplier payment SuppliersArea=Suppliers area +RefSupplierShort=Ref. supplier \ No newline at end of file diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 3e19a71b5ed..268de95fb1e 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -18,4 +18,5 @@ ErrorSupplierCountryIsNotDefined=Le pays de ce fournisseur n'est pas d ProductHasAlreadyReferenceInThisSupplier=Ce produit a déjà une référence chez ce fournisseur NoRecordedSuppliers=Pas de fournisseurs enregistrés SupplierPayment=Paiement fournisseur -SuppliersArea=Espace fournisseurs \ No newline at end of file +SuppliersArea=Espace fournisseurs +RefSupplierShort=Réf. fournisseur \ No newline at end of file