FIX : New conf must be in payments tab
This commit is contained in:
parent
b8f5175343
commit
427695d869
@ -280,24 +280,6 @@ if ($action == 'set_INVOICE_AUTO_FILLJS')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS')
|
|
||||||
{
|
|
||||||
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS'); // No alpha here, we want exact string
|
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$freetext,'chaine',0,'',$conf->entity);
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -782,20 +764,6 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" /
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Add js auto fill amount on paiement form
|
|
||||||
$var=! $var;
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
|
||||||
print '<input type="hidden" name="action" value="set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS" />';
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("PaymentOnDifferentThirdBills");
|
|
||||||
print '</td><td width="60" align="center">';
|
|
||||||
print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS,1);
|
|
||||||
print '</td><td align="right">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
|
||||||
print "</td></tr>\n";
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||||
|
|||||||
@ -69,7 +69,23 @@ if ($action == 'setmod')
|
|||||||
dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS')
|
||||||
|
{
|
||||||
|
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS'); // No alpha here, we want exact string
|
||||||
|
|
||||||
|
$res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$freetext,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -215,6 +231,33 @@ foreach ($dirmodels as $reldir)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print "<br />";
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||||
|
print '<td width="80"> </td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Allow payments on different thirdparties bills but same parent company
|
||||||
|
$var=! $var;
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||||
|
print '<input type="hidden" name="action" value="set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS" />';
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("PaymentOnDifferentThirdBills");
|
||||||
|
print '</td><td width="60" align="center">';
|
||||||
|
print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS,1);
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||||
|
print "</td></tr>\n";
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user