diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index 7aecbdddbd2..f9df7d76b23 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -13,4 +13,5 @@ OrderDate=Order date BuyingPrice=Buying price AddSupplierPrice=Add supplier price ChangeSupplierPrice=Change supplier price -ErrorQtyTooLowForThisSupplier=Quantity too low for this supplier \ No newline at end of file +ErrorQtyTooLowForThisSupplier=Quantity too low for this supplier +ProductHasAlreadyReferenceInThisSupplier=This product has already a reference in this supplier \ No newline at end of file diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 3c7eb0a0a61..3234d96c402 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -13,4 +13,5 @@ OrderDate=Date commande BuyingPrice=Prix d'achat AddSupplierPrice=Ajouter prix fournisseur ChangeSupplierPrice=Modifier prix fournisseur -ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur \ No newline at end of file +ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur +ProductHasAlreadyReferenceInThisSupplier=Ce produit a déjà une référence chez ce fournisseur \ No newline at end of file diff --git a/htdocs/product.class.php b/htdocs/product.class.php index a3cc1095932..37de0243aba 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -1354,7 +1354,7 @@ class Product $sql = "SELECT count(*) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur"; $sql.= " WHERE fk_product = ".$this->id." AND fk_soc = ".$id_fourn; - $sql.= " AND ref_fourn = '".$ref_fourn."'"; + //$sql.= " AND ref_fourn = '".$ref_fourn."'"; // crée des doublons $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 4756c2d61dc..c5eae6a71b3 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -110,6 +110,10 @@ if ($_POST["action"] == 'updateprice' && $_POST["cancel"] <> $langs->trans("Canc if ($ret < 0) { $error++; $mesg='