Clean code

This commit is contained in:
Laurent Destailleur
2020-09-28 11:07:53 +02:00
parent e7c044cc05
commit 2e79064098
2 changed files with 1 additions and 33 deletions

View File

@@ -61,8 +61,6 @@ $list_binding = array(
* Actions
*/
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE;
if ($action == 'update') {
$error = 0;
@@ -227,36 +225,6 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
// Default mode for calculating turnover (parameter ACCOUNTING_MODE)
/*
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
print "</tr>\n";
print '<tr ' . $bc[false] . '><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"' . ($accounting_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>';
print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
// Write info on way to count VAT
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
// {
// // print "<br>\n";
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
// }
// else
// {
// // print "<br>\n";
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
// }
print "</td></tr>\n";
print '<tr ' . $bc[true] . '><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"' . ($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>';
print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n";
print "</table>\n";
print '<br>';
*/
// Params
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';

View File

@@ -251,7 +251,7 @@ function dol_json_decode($json, $assoc = false)
if ($out != '') {
try {
eval('$array = '.$out.';');
} catch(Exception $e) {
} catch (Exception $e) {
$array = array();
}
}