Fix: hide bank account field if module disabled
This commit is contained in:
parent
44405e5415
commit
cd888a2149
@ -330,25 +330,27 @@ if ($id > 0)
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Compte bancaire par défaut
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentBankAccount');
|
||||
print '<td>';
|
||||
if (($action != 'editbankaccount') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&socid='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editbankaccount')
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'fk_account',1);
|
||||
// Compte bancaire par défaut
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentBankAccount');
|
||||
print '<td>';
|
||||
if (($action != 'editbankaccount') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&socid='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editbankaccount')
|
||||
{
|
||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'fk_account',1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'none');
|
||||
}
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_account,'none');
|
||||
}
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Relative discounts (Discounts-Drawbacks-Rebates)
|
||||
print '<tr><td class="nowrap">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user