diff --git a/htdocs/product/price.php b/htdocs/product/price.php index aad0311502d..bb46839e588 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1108,34 +1108,41 @@ print dol_get_fiche_end(); /* * Action bar */ + + if (!$action || $action == 'delete' || $action == 'showlog_customer_price' || $action == 'showlog_default_price' || $action == 'add_customer_price' || $action == 'activate_price_by_qty' || $action == 'disable_price_by_qty') { print "\n".'
'."\n"; - if ($object->isVariant()) { - if ($user->rights->produit->creer || $user->rights->service->creer) { - print '
'.$langs->trans("UpdateDefaultPrice").'
'; - } - } else { - if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { - if ($user->rights->produit->creer || $user->rights->service->creer) { - print '
'.$langs->trans("UpdateDefaultPrice").'
'; - } - } - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been + if (empty($reshook)) { + if ($object->isVariant()) { if ($user->rights->produit->creer || $user->rights->service->creer) { - print '
id.'">'.$langs->trans("AddCustomerPrice").'
'; + print '
' . $langs->trans("UpdateDefaultPrice") . '
'; } - } - - if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { - if ($user->rights->produit->creer || $user->rights->service->creer) { - print '
'.$langs->trans("UpdateVAT").'
'; + } else { + if (empty($conf->global->PRODUIT_MULTIPRICES) && empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + if ($user->rights->produit->creer || $user->rights->service->creer) { + print '
' . $langs->trans("UpdateDefaultPrice") . '
'; + } } - if ($user->rights->produit->creer || $user->rights->service->creer) { - print '
'.$langs->trans("UpdateLevelPrices").'
'; + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + if ($user->rights->produit->creer || $user->rights->service->creer) { + print '
id . '">' . $langs->trans("AddCustomerPrice") . '
'; + } + } + + if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { + if ($user->rights->produit->creer || $user->rights->service->creer) { + print '
' . $langs->trans("UpdateVAT") . '
'; + } + + if ($user->rights->produit->creer || $user->rights->service->creer) { + print '
' . $langs->trans("UpdateLevelPrices") . '
'; + } } } }