Merge pull request #5171 from atm-ph/fix_develop_delete_buy_price
Fix no confirm window if we delete buying price
This commit is contained in:
commit
156a5349c1
@ -325,3 +325,6 @@ ProductVolume=Volume for 1 product
|
|||||||
WeightUnits=Weight unit
|
WeightUnits=Weight unit
|
||||||
VolumeUnits=Volume unit
|
VolumeUnits=Volume unit
|
||||||
SizeUnits=Size 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
|
if ($rowid) // id of product supplier price to remove
|
||||||
{
|
{
|
||||||
@ -285,6 +285,12 @@ if ($id > 0 || $ref)
|
|||||||
|
|
||||||
if ($result)
|
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')
|
if ($action <> 'edit' && $action <> 're-edit')
|
||||||
{
|
{
|
||||||
$head=product_prepare_head($object);
|
$head=product_prepare_head($object);
|
||||||
@ -680,7 +686,7 @@ if ($id > 0 || $ref)
|
|||||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
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=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>';
|
print '</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user