mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 00:53:00 +01:00
Qual: Uniformize code
This commit is contained in:
@@ -39,6 +39,7 @@ if (GETPOST('commissionBase'))
|
||||
if (dolibarr_set_const($db, 'COMMISSION_BASE', GETPOST('commissionBase'), 'string', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
$conf->global->COMMISSION_BASE = GETPOST('commissionBase');
|
||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -154,10 +155,15 @@ print '</tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
dol_htmloutput_events();
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@@ -33,7 +33,8 @@ require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php';
|
||||
|
||||
$action=GETPOST('action');
|
||||
|
||||
$langs->load("holiday");
|
||||
$langs->load("admin");
|
||||
$langs->load("holiday");
|
||||
|
||||
// Si pas administrateur
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@@ -70,6 +70,7 @@ if ($action == 'remises')
|
||||
if (dolibarr_set_const($db, 'MARGIN_METHODE_FOR_DISCOUNT', $_POST['MARGIN_METHODE_FOR_DISCOUNT'], 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
$conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_METHODE_FOR_DISCOUNT'];
|
||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -82,6 +83,7 @@ if ($action == 'typemarges')
|
||||
if (dolibarr_set_const($db, 'MARGIN_TYPE', $_POST['MARGIN_TYPE'], 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
$conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_TYPE'];
|
||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -134,7 +136,7 @@ if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '2')
|
||||
print '/>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" class="button">';
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans('MARGIN_TYPE_DETAILS').'</td>';
|
||||
print '</tr>';
|
||||
@@ -222,7 +224,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"remises\">";
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("MARGIN_METHODE_FOR_DISCOUNT").'</td>';
|
||||
print '<td align="left">';
|
||||
print '<select name="MARGIN_METHODE_FOR_DISCOUNT" >';
|
||||
print '<select name="MARGIN_METHODE_FOR_DISCOUNT" class="flat">';
|
||||
print '<option value="1" ';
|
||||
if (isset($conf->global->MARGIN_METHODE_FOR_DISCOUNT) && $conf->global->MARGIN_METHODE_FOR_DISCOUNT == '1')
|
||||
print 'selected ';
|
||||
@@ -245,8 +247,12 @@ print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
dol_htmloutput_events();
|
||||
|
||||
print '<br>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
Reference in New Issue
Block a user