New: Add hidden option BANK_DISABLE_DIRECT_INPUT

This commit is contained in:
Laurent Destailleur 2013-07-31 18:40:09 +02:00
parent eccfd33c38
commit 37592afa7e
2 changed files with 12 additions and 3 deletions

View File

@ -4,6 +4,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.5 compared to 3.4.* ***** ***** ChangeLog for 3.5 compared to 3.4.* *****
For users: For users:
- New: Add hidden option BANK_DISABLE_DIRECT_INPUT.
- New: More options to select status of users into select user list. - New: More options to select status of users into select user list.
- New: [ task #862 ] Add ODT on shipments - New: [ task #862 ] Add ODT on shipments
- New: [ task #149 ] Add # of notes and attachments in tabs - New: [ task #149 ] Add # of notes and attachments in tabs

View File

@ -104,6 +104,7 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu
$insertid = $object->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); $insertid = $object->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user);
if ($insertid > 0) if ($insertid > 0)
{ {
setEventMessage($langs->trans("RecordSaved"));
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id."&action=addline"); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id."&action=addline");
exit; exit;
} }
@ -795,6 +796,8 @@ if ($id > 0 || ! empty($ref))
} }
if ($action != 'addline') if ($action != 'addline')
{
if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT))
{ {
if ($user->rights->banque->modifier) if ($user->rights->banque->modifier)
{ {
@ -805,6 +808,11 @@ if ($id > 0 || ! empty($ref))
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>'; print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
} }
} }
else
{
print '<a class="butActionRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}
}
print '</div>'; print '</div>';
} }