diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index b481a7e1f60..96bf0da9bfa 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -325,3 +325,6 @@ ProductVolume=Volume for 1 product
WeightUnits=Weight unit
VolumeUnits=Volume unit
SizeUnits=Size unit
+DeleteProductBuyPrice=Delete buying price
+ConfirmDeleteProductBuyPrice=Are you sure you want to delete this buying price?
+
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index ce6815911e1..6a76055d3fc 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -115,7 +115,7 @@ if (empty($reshook))
}
}
- if ($action == 'remove_pf')
+ if ($action == 'confirm_remove_pf')
{
if ($rowid) // id of product supplier price to remove
{
@@ -285,6 +285,12 @@ if ($id > 0 || $ref)
if ($result)
{
+ if ($action == 'ask_remove_pf') {
+ $form = new Form($db);
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id . '&rowid=' . $rowid, $langs->trans('DeleteProductBuyPrice'), $langs->trans('ConfirmDeleteProductBuyPrice'), 'confirm_remove_pf', '', 0, 1);
+ echo $formconfirm;
+ }
+
if ($action <> 'edit' && $action <> 're-edit')
{
$head=product_prepare_head($object);
@@ -680,7 +686,7 @@ if ($id > 0 || $ref)
if ($user->rights->produit->creer || $user->rights->service->creer)
{
print ''.img_edit()."";
- print ''.img_picto($langs->trans("Remove"),'disable.png').'';
+ print ''.img_picto($langs->trans("Remove"),'disable.png').'';
}
print '';