Fix use Form::selectyesno() for added options in admin/compta.php

This commit is contained in:
DEMAREST Maxime (Indelog) 2020-05-06 13:55:38 +02:00
parent 7bf037ab2f
commit 889e5db4fb

View File

@ -177,20 +177,14 @@ foreach ($list as $key)
print '<tr class="oddeven value">'."\n";
print '<td><label for="ACCOUNTING_REPORTS_INCLUDE_VARPAY">'.$langs->trans('IncludeVarpaysInResults').'</label></td>'."\n";
print '<td class="center">'."\n";
print '<select id="ACCOUNTING_REPORTS_INCLUDE_VARPAY" name="ACCOUNTING_REPORTS_INCLUDE_VARPAY">'."\n";
print '<option value="no" '.(empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY)?'selected':'').'>'.$langs->trans('No').'</option>'."\n";
print '<option value="yes" '.(!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY)?'selected':'').'>'.$langs->trans('Yes').'</option>'."\n";
print '</select>'."\n";
print $form->selectyesno('ACCOUNTING_REPORTS_INCLUDE_VARPAY', (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY)));
print '</td></tr>';
// Option to include loan in results
print '<tr class="oddeven value">'."\n";
print '<td><label for="ACCOUNTING_REPORTS_INCLUDE_LOAN">'.$langs->trans('IncludeLoansInResults').'</label></td>'."\n";
print '<td class="center">'."\n";
print '<select id="ACCOUNTING_REPORTS_INCLUDE_LOAN" name="ACCOUNTING_REPORTS_INCLUDE_LOAN">'."\n";
print '<option value="no" '.(empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN)?'selected':'').'>'.$langs->trans('No').'</option>'."\n";
print '<option value="yes" '.(!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN)?'selected':'').'>'.$langs->trans('Yes').'</option>'."\n";
print '</select>'."\n";
print $form->selectyesno('ACCOUNTING_REPORTS_INCLUDE_LOAN', (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN)));
print '</td></tr>';
print "</table>\n";