Fix no confirm window if we delete buying price
This commit is contained in:
parent
5a75f346ff
commit
0d03360375
@ -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?
|
||||
|
||||
|
||||
@ -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 '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$productfourn->fourn_id.'&action=add_price&rowid='.$productfourn->product_fourn_price_id.'">'.img_edit()."</a>";
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$productfourn->fourn_id.'&action=remove_pf&rowid='.$productfourn->product_fourn_price_id.'">'.img_picto($langs->trans("Remove"),'disable.png').'</a>';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$productfourn->fourn_id.'&action=ask_remove_pf&rowid='.$productfourn->product_fourn_price_id.'">'.img_picto($langs->trans("Remove"),'disable.png').'</a>';
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user