NEW #3767 Allow changing multiple prices of a product at once
This commit is contained in:
parent
e7554d377f
commit
45b4122a95
@ -4073,4 +4073,15 @@ class Product extends CommonObject
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRights()
|
||||||
|
{
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
if ($this->isproduct()) {
|
||||||
|
return $user->rights->produit;
|
||||||
|
} else {
|
||||||
|
return $user->rights->service;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,86 +113,115 @@ if (empty($reshook))
|
|||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($action == 'update_price') && !$cancel && ($user->rights->produit->creer || $user->rights->service->creer))
|
if (($action == 'update_price') && !$cancel && $object->getRights()->creer)
|
||||||
{
|
{
|
||||||
$newprice = '';
|
$error = 0;
|
||||||
$newprice_min = '';
|
$pricestoupdate = array();
|
||||||
$newpricebase = '';
|
|
||||||
$newvat = '';
|
$psq = GETPOST('psqflag');
|
||||||
|
$psq = empty($newpsq) ? 0 : $newpsq;
|
||||||
$maxpricesupplier = $object->min_recommended_price();
|
$maxpricesupplier = $object->min_recommended_price();
|
||||||
$object->fk_price_expression = empty($eid) ? 0 : $eid; //0 discards expression
|
|
||||||
|
|
||||||
// MultiPrix
|
if (!empty($conf->dynamicprices->enabled)) {
|
||||||
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
|
$object->fk_price_expression = empty($eid) ? 0 : $eid; //0 discards expression
|
||||||
|
|
||||||
//Shall we generate prices using price rules?
|
|
||||||
$object->price_autogen = GETPOST('usePriceRules') == 'on' ? true : false;
|
|
||||||
$object->update($object->id, $user);
|
|
||||||
|
|
||||||
for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++) {
|
|
||||||
if (isset($_POST ["price_".$i])) {
|
|
||||||
$level = $i;
|
|
||||||
$newprice = price2num($_POST ["price_".$i], 'MU');
|
|
||||||
$newprice_min = price2num($_POST ["price_min_".$i], 'MU');
|
|
||||||
$newpricebase = $_POST ["multiprices_base_type_".$i];
|
|
||||||
$newnpr = (preg_match('/\*/', $_POST ["tva_tx_".$i]) ? 1 : 0);
|
|
||||||
$newvat = str_replace('*', '', $_POST ["tva_tx_".$i]);
|
|
||||||
$newpsq = GETPOST('psqflag');
|
|
||||||
$newpsq = empty($newpsq) ? 0 : $newpsq;
|
|
||||||
break; // We found submited price
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$level = 0;
|
|
||||||
$newprice = price2num($_POST ["price"], 'MU');
|
|
||||||
$newprice_min = price2num($_POST ["price_min"], 'MU');
|
|
||||||
$newpricebase = $_POST ["price_base_type"];
|
|
||||||
$newnpr = (preg_match('/\*/', $_POST ["tva_tx"]) ? 1 : 0);
|
|
||||||
$newvat = str_replace('*', '', $_POST ["tva_tx"]);
|
|
||||||
$newpsq = GETPOST('psqflag');
|
|
||||||
$newpsq = empty($newpsq) ? 0 : $newpsq;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE) && $newprice_min < $maxpricesupplier) {
|
|
||||||
setEventMessage($langs->trans("MinimumPriceLimit", price($maxpricesupplier, 0, '', 1, - 1, - 1, 'auto')), 'errors');
|
|
||||||
$error ++;
|
|
||||||
$action = 'edit_price';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($newprice < $newprice_min && !empty($object->fk_price_expression)) {
|
|
||||||
$newprice = $newprice_min; //Set price same as min, the user will not see the
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = $object->updatePrice($newprice, $newpricebase, $user, $newvat, $newprice_min, $level, $newnpr, $newpsq);
|
|
||||||
|
|
||||||
if ($res) {
|
|
||||||
|
|
||||||
if ($object->fk_price_expression != 0) {
|
if ($object->fk_price_expression != 0) {
|
||||||
//Check the expression validity by parsing it
|
//Check the expression validity by parsing it
|
||||||
$priceparser = new PriceParser($db);
|
$priceparser = new PriceParser($db);
|
||||||
$price_result = $priceparser->parseProduct($object);
|
|
||||||
if ($price_result < 0) { //Expression is not valid
|
if ($priceparser->parseProduct($object) < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$action = 'edit_price';
|
|
||||||
setEventMessage($priceparser->translatedError(), 'errors');
|
setEventMessage($priceparser->translatedError(), 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($error) && !empty($conf->dynamicprices->enabled)) {
|
}
|
||||||
$ret = $object->setPriceExpression($object->fk_price_expression);
|
|
||||||
if ($ret < 0) {
|
// Multiprices
|
||||||
$error ++;
|
if (!$error && !empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||||
$action = 'edit_price';
|
|
||||||
setEventMessage($object->error, 'errors');
|
$newprice = GETPOST('price', 'array');
|
||||||
|
$newprice_min = GETPOST('price_min', 'array');
|
||||||
|
$newpricebase = GETPOST('multiprices_base_type', 'array');
|
||||||
|
$newvattx = GETPOST('tva_tx', 'array');
|
||||||
|
|
||||||
|
//Shall we generate prices using price rules?
|
||||||
|
$object->price_autogen = GETPOST('usePriceRules') == 'on' ? true : false;
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++) {
|
||||||
|
|
||||||
|
if (!isset($newprice[$i])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$newnpr = (preg_match('/\*/', $newvattx[$i] ? 1 : 0));
|
||||||
|
$newvat = str_replace('*', '', $newvattx[$i]);
|
||||||
|
|
||||||
|
$pricestoupdate[$i] = array(
|
||||||
|
'price' => $newprice[$i],
|
||||||
|
'price_min' => $newprice_min[$i],
|
||||||
|
'price_base_type' => $newpricebase[$i],
|
||||||
|
'vat_tx' => $newvat,
|
||||||
|
'npr' => $newnpr
|
||||||
|
);
|
||||||
|
|
||||||
|
//If autogeneration is enabled, then we only set the first level
|
||||||
|
if ($object->price_autogen) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($error)) {
|
} else {
|
||||||
$action = '';
|
$pricestoupdate[0] = array(
|
||||||
setEventMessage($langs->trans("RecordSaved"));
|
'price' => $_POST ["price"],
|
||||||
|
'price_min' => $_POST ["price_min"],
|
||||||
|
'price_base_type' => $_POST ["price_base_type"],
|
||||||
|
'vat_tx' => str_replace('*', '', $_POST ["tva_tx"]),
|
||||||
|
'npr' => preg_match('/\*/', $_POST ["tva_tx"]) ? 1 : 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error && $object->update($object->id, $user) < 1) {
|
||||||
|
$error++;
|
||||||
|
setEventMessage($object->error, 'errors');
|
||||||
|
$action = 'edit_price';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
|
foreach ($pricestoupdate as $key => $val) {
|
||||||
|
|
||||||
|
$newprice = $val['price'];
|
||||||
|
|
||||||
|
if ($val['price'] < $val['price_min'] && !empty($object->fk_price_expression)) {
|
||||||
|
$newprice = $val['price_min']; //Set price same as min, the user will not see the
|
||||||
|
}
|
||||||
|
|
||||||
|
$newprice = price2num($newprice, 'MU');
|
||||||
|
$newprice_min = price2num($val['price_min'], 'MU');
|
||||||
|
|
||||||
|
if (!empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE) && $newprice_min < $maxpricesupplier) {
|
||||||
|
setEventMessage($langs->trans("MinimumPriceLimit", price($maxpricesupplier, 0, '', 1, - 1, - 1, 'auto')), 'errors');
|
||||||
|
$error ++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$res = $object->updatePrice($newprice, $val['price_base_type'], $user, $val['vat_tx'], $newprice_min, $key, $val['npr'], $psq);
|
||||||
|
|
||||||
|
if ($res < 0) {
|
||||||
|
$error ++;
|
||||||
|
setEventMessage($object->error, 'errors');
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($error)) {
|
||||||
|
$action = '';
|
||||||
|
setEventMessage($langs->trans("RecordSaved"));
|
||||||
|
$db->commit();
|
||||||
} else {
|
} else {
|
||||||
$action = 'edit_price';
|
$action = 'edit_price';
|
||||||
setEventMessage($object->error, 'errors');
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,13 +473,13 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
|||||||
// Selling price
|
// Selling price
|
||||||
print '<tr>' . $langs->trans("SellingPrice") . '</td>';
|
print '<tr>' . $langs->trans("SellingPrice") . '</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
if ($object->multiprices_base_type["$soc->price_level"] == 'TTC') {
|
if ($object->multiprices_base_type[$soc->price_level] == 'TTC') {
|
||||||
print price($object->multiprices_ttc["$soc->price_level"]);
|
print price($object->multiprices_ttc[$soc->price_level]);
|
||||||
} else {
|
} else {
|
||||||
print price($object->multiprices["$soc->price_level"]);
|
print price($object->multiprices[$soc->price_level]);
|
||||||
}
|
}
|
||||||
if ($object->multiprices_base_type["$soc->price_level"]) {
|
if ($object->multiprices_base_type[$soc->price_level]) {
|
||||||
print ' ' . $langs->trans($object->multiprices_base_type["$soc->price_level"]);
|
print ' ' . $langs->trans($object->multiprices_base_type[$soc->price_level]);
|
||||||
} else {
|
} else {
|
||||||
print ' ' . $langs->trans($object->price_base_type);
|
print ' ' . $langs->trans($object->price_base_type);
|
||||||
}
|
}
|
||||||
@ -458,18 +487,18 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
|||||||
|
|
||||||
// Price min
|
// Price min
|
||||||
print '<tr><td>' . $langs->trans("MinPrice") . '</td><td colspan="2">';
|
print '<tr><td>' . $langs->trans("MinPrice") . '</td><td colspan="2">';
|
||||||
if ($object->multiprices_base_type["$soc->price_level"] == 'TTC')
|
if ($object->multiprices_base_type[$soc->price_level] == 'TTC')
|
||||||
{
|
{
|
||||||
print price($object->multiprices_min_ttc["$soc->price_level"]) . ' ' . $langs->trans($object->multiprices_base_type["$soc->price_level"]);
|
print price($object->multiprices_min_ttc[$soc->price_level]) . ' ' . $langs->trans($object->multiprices_base_type[$soc->price_level]);
|
||||||
} else {
|
} else {
|
||||||
print price($object->multiprices_min["$soc->price_level"]) . ' ' . $langs->trans(empty($object->multiprices_base_type["$soc->price_level"])?'HT':$object->multiprices_base_type["$soc->price_level"]);
|
print price($object->multiprices_min[$soc->price_level]) . ' ' . $langs->trans(empty($object->multiprices_base_type[$soc->price_level])?'HT':$object->multiprices_base_type[$soc->price_level]);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
|
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
|
||||||
{
|
{
|
||||||
// TVA
|
// TVA
|
||||||
print '<tr><td>' . $langs->trans("VATRate") . '</td><td colspan="2">' . vatrate($object->multiprices_tva_tx["$soc->price_level"], true) . '</td></tr>';
|
print '<tr><td>' . $langs->trans("VATRate") . '</td><td colspan="2">' . vatrate($object->multiprices_tva_tx[$soc->price_level], true) . '</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -503,28 +532,28 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
|||||||
if (! empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel);
|
if (! empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if ($object->multiprices_base_type ["$i"] == 'TTC') {
|
if ($object->multiprices_base_type [$i] == 'TTC') {
|
||||||
print '<td style="text-align: right">' . price($object->multiprices_ttc["$i"]);
|
print '<td style="text-align: right">' . price($object->multiprices_ttc[$i]);
|
||||||
} else {
|
} else {
|
||||||
print '<td style="text-align: right">' . price($object->multiprices["$i"]);
|
print '<td style="text-align: right">' . price($object->multiprices[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->multiprices_base_type["$i"]) {
|
if ($object->multiprices_base_type[$i]) {
|
||||||
print ' '.$langs->trans($object->multiprices_base_type ["$i"]).'</td>';;
|
print ' '.$langs->trans($object->multiprices_base_type [$i]).'</td>';
|
||||||
} else {
|
} else {
|
||||||
print ' '.$langs->trans($object->price_base_type).'</td>';;
|
print ' '.$langs->trans($object->price_base_type).'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prix min
|
// Prix min
|
||||||
print '<td style="text-align: right">';
|
print '<td style="text-align: right">';
|
||||||
if (empty($object->multiprices_base_type["$i"])) $object->multiprices_base_type["$i"]="HT";
|
if (empty($object->multiprices_base_type[$i])) $object->multiprices_base_type[$i]="HT";
|
||||||
if ($object->multiprices_base_type["$i"] == 'TTC')
|
if ($object->multiprices_base_type[$i] == 'TTC')
|
||||||
{
|
{
|
||||||
print price($object->multiprices_min_ttc["$i"]) . ' ' . $langs->trans($object->multiprices_base_type["$i"]);
|
print price($object->multiprices_min_ttc[$i]) . ' ' . $langs->trans($object->multiprices_base_type[$i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print price($object->multiprices_min["$i"]) . ' ' . $langs->trans($object->multiprices_base_type["$i"]);
|
print price($object->multiprices_min[$i]) . ' ' . $langs->trans($object->multiprices_base_type[$i]);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -894,7 +923,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
var showHidePriceRules = function () {
|
var showHidePriceRules = function () {
|
||||||
var otherPrices = $('div.fiche form:not(:first)');
|
var otherPrices = $('div.fiche form table:not(:first), div.fiche form table:first tr:not(:first)');
|
||||||
var minPrice1 = $('div.fiche form:first tr:eq(1)');
|
var minPrice1 = $('div.fiche form:first tr:eq(1)');
|
||||||
|
|
||||||
if (jQuery('input#usePriceRules').prop('checked')) {
|
if (jQuery('input#usePriceRules').prop('checked')) {
|
||||||
@ -914,11 +943,12 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">';
|
||||||
|
|
||||||
for($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++)
|
for($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++)
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">';
|
if ($i > 1) print '<br>';
|
||||||
if ($i > 1) print '<br>';
|
|
||||||
elseif (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($conf->global->PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL)) {
|
elseif (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($conf->global->PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL)) {
|
||||||
print $langs->trans('UseMultipriceRules'). ' <input type="checkbox" id="usePriceRules" name="usePriceRules" '.($object->price_autogen ? 'checked' : '').'><br><br>';
|
print $langs->trans('UseMultipriceRules'). ' <input type="checkbox" id="usePriceRules" name="usePriceRules" '.($object->price_autogen ? 'checked' : '').'><br><br>';
|
||||||
}
|
}
|
||||||
@ -927,7 +957,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
print '<input type="hidden" name="id" value="' . $object->id . '">';
|
print '<input type="hidden" name="id" value="' . $object->id . '">';
|
||||||
if (empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL))
|
if (empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL))
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="tva_tx_' . $i . '" value="' . $object->tva_tx . '">';
|
print '<input type="hidden" name="tva_tx[' . $i . ']" value="' . $object->tva_tx . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
@ -936,7 +966,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // This option is kept for backward compatibility but has no sense
|
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // This option is kept for backward compatibility but has no sense
|
||||||
{
|
{
|
||||||
print '<tr><td>' . $langs->trans("VATRate") . '</td><td>';
|
print '<tr><td>' . $langs->trans("VATRate") . '</td><td>';
|
||||||
print $form->load_tva("tva_tx_" . $i, $object->multiprices_tva_tx["$i"], $mysoc, '', $object->id);
|
print $form->load_tva("tva_tx[" . $i.']', $object->multiprices_tva_tx[$i], $mysoc, '', $object->id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -945,22 +975,22 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
$text = $langs->trans('SellingPrice') . ' ' . $i;
|
$text = $langs->trans('SellingPrice') . ' ' . $i;
|
||||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
|
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($object->multiprices_base_type ["$i"] == 'TTC') {
|
if ($object->multiprices_base_type [$i] == 'TTC') {
|
||||||
print '<input name="price_' . $i . '" size="10" value="' . price($object->multiprices_ttc ["$i"]) . '">';
|
print '<input name="price[' . $i . ']" size="10" value="' . price($object->multiprices_ttc [$i]) . '">';
|
||||||
} else {
|
} else {
|
||||||
print '<input name="price_' . $i . '" size="10" value="' . price($object->multiprices ["$i"]) . '">';
|
print '<input name="price[' . $i . ']" size="10" value="' . price($object->multiprices [$i]) . '">';
|
||||||
}
|
}
|
||||||
print $form->selectPriceBaseType($object->multiprices_base_type ["$i"], "multiprices_base_type_" . $i);
|
print ' '.$form->selectPriceBaseType($object->multiprices_base_type [$i], "multiprices_base_type[" . $i."]");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Min price
|
// Min price
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$text = $langs->trans('MinPrice') . ' ' . $i;
|
$text = $langs->trans('MinPrice') . ' ' . $i;
|
||||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
|
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
|
||||||
if ($object->multiprices_base_type ["$i"] == 'TTC') {
|
if ($object->multiprices_base_type [$i] == 'TTC') {
|
||||||
print '<td><input name="price_min_' . $i . '" size="10" value="' . price($object->multiprices_min_ttc ["$i"]) . '">';
|
print '<td><input name="price_min[' . $i . ']" size="10" value="' . price($object->multiprices_min_ttc [$i]) . '">';
|
||||||
} else {
|
} else {
|
||||||
print '<td><input name="price_min_' . $i . '" size="10" value="' . price($object->multiprices_min ["$i"]) . '">';
|
print '<td><input name="price_min[' . $i . ']" size="10" value="' . price($object->multiprices_min [$i]) . '">';
|
||||||
}
|
}
|
||||||
if ( !empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE))
|
if ( !empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE))
|
||||||
{
|
{
|
||||||
@ -968,15 +998,16 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
|
||||||
print ' ';
|
|
||||||
print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '"></td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '<br><div style="text-align: center">';
|
||||||
|
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
||||||
|
print ' ';
|
||||||
|
print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '"></div>';
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user