Disable button add a line in bank module when accountancy module is activated

This commit is contained in:
aspangaro 2015-07-03 06:48:49 +02:00
parent 6ef0b8e330
commit 111e44493a

View File

@ -392,7 +392,7 @@ if ($id > 0 || ! empty($ref))
if ($action != 'addline') if ($action != 'addline')
{ {
if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT) && empty($conf->accounting->enabled))
{ {
if ($user->rights->banque->modifier) if ($user->rights->banque->modifier)
{ {
@ -466,15 +466,12 @@ if ($id > 0 || ! empty($ref))
print '<div class="floatright">'.$navig.'</div>'; print '<div class="floatright">'.$navig.'</div>';
} }
print '<table class="noborder" width="100%">';
// Form to add a transaction with no invoice // Form to add a transaction with no invoice
if ($user->rights->banque->modifier && $action == 'addline') if ($user->rights->banque->modifier && $action == 'addline')
{ {
print '<tr>'; print_fiche_titre($langs->trans("AddBankRecordLong"),'','');
print '<td align="left" colspan="10"><b>'.$langs->trans("AddBankRecordLong").'</b></td>';
print '</tr>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Date").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
@ -507,11 +504,13 @@ if ($id > 0 || ! empty($ref))
print '<input type="submit" name="save" class="button" value="'.$langs->trans("Add").'"><br>'; print '<input type="submit" name="save" class="button" value="'.$langs->trans("Add").'"><br>';
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';
print "</form>"; print '</table>';
print '</form>';
print '<tr class="noborder"><td colspan="10">&nbsp;</td></tr>'."\n"; print '<br>';
} }
print '<table class="noborder" width="100%">';
/* /*
* Affiche tableau des transactions bancaires * Affiche tableau des transactions bancaires
*/ */