As suggested by Dolibarr, removed PROPALE_MODIFY_MARGIN_RATES as not needed.
This commit is contained in:
parent
f974295a45
commit
b8cd507287
@ -615,19 +615,6 @@ print "<td> </td>\n";
|
||||
print "</tr>";
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ModifyMarginRates").'</td>';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('PROPALE_MODIFY_MARGIN_RATES');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("PROPALE_MODIFY_MARGIN_RATES", $arrval, $conf->global->PROPALE_MODIFY_MARGIN_RATES);
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"setdefaultduration\">";
|
||||
|
||||
@ -914,7 +914,7 @@ if (empty($reshook)) {
|
||||
foreach ($object->lines as $line) {
|
||||
$result = $object->updateline($line->id, $line->subprice, $line->qty, $remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice);
|
||||
}
|
||||
} elseif (!empty($conf->global->PROPALE_MODIFY_MARGIN_RATES) && $action == 'addline' && GETPOST('submitforallmargins', 'alpha') && GETPOST('marginforalllines') !== '' && $usercancreate) {
|
||||
} elseif ($action == 'addline' && GETPOST('submitforallmargins', 'alpha') && GETPOST('marginforalllines') !== '' && $usercancreate) {
|
||||
// Define margin
|
||||
$margin_rate = (GETPOST('marginforalllines') ? GETPOST('marginforalllines') : 0);
|
||||
foreach ($object->lines as &$line) {
|
||||
|
||||
@ -140,9 +140,9 @@ if ($usemargins && isModEnabled('margin') && empty($user->socid)) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(empty($conf->global->DISPLAY_MARGIN_RATES) && empty($conf->global->PROPALE_MODIFY_MARGIN_RATES)) && $user->rights->margins->liretous) {
|
||||
if (!empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) {
|
||||
print '<th class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarginRate');
|
||||
if (!empty($conf->global->PROPALE_MODIFY_MARGIN_RATES) && $user->hasRight("propal", "creer")) {
|
||||
if ($user->hasRight("propal", "creer")) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?mode=marginforalllines&id='.$object->id.'">'.img_edit($langs->trans("UpdateForAllLines"), 0, 'class="clickmarginforalllines opacitymedium paddingleft cursorpointer"').'</a>';
|
||||
if (GETPOST('mode', 'aZ09') == 'marginforalllines') {
|
||||
print '<div class="classmarginforalllines inline-block nowraponall">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user