Add a condition to show option

This commit is contained in:
Alexandre SPANGARO 2023-01-07 14:06:20 +01:00
parent 183552461c
commit 81a8838070

View File

@ -514,18 +514,20 @@ if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
} }
print '</tr>'; print '</tr>';
print '<tr class="oddeven">'; if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
print '<td>'.$langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING").'</td>'; print '<tr class="oddeven">';
if (!empty($conf->global->ACCOUNTING_ENABLE_AUTOLETTERING)) { print '<td>' . $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING") . '</td>';
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenableautolettering&value=0">'; if (!empty($conf->global->ACCOUNTING_ENABLE_AUTOLETTERING)) {
print img_picto($langs->trans("Activated"), 'switch_on'); print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=0">';
print '</a></td>'; print img_picto($langs->trans("Activated"), 'switch_on');
} else { print '</a></td>';
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenableautolettering&value=1">'; } else {
print img_picto($langs->trans("Disabled"), 'switch_off'); print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=1">';
print '</a></td>'; print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
} }
print '</tr>';
print '</table>'; print '</table>';