Fix: cheques sending to bank
This commit is contained in:
parent
84fddd5ca5
commit
e2306ccf7a
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -145,7 +145,7 @@ if ($_GET['action'] == 'new')
|
||||
{
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?action=new';
|
||||
$head[$h][1] = $langs->trans("NewCheckDeposit");
|
||||
$head[$h][1] = $langs->trans("MenuChequeDeposits");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
|
||||
@ -198,11 +198,7 @@ else
|
||||
|
||||
if ($mesg) print $mesg.'<br>';
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($_GET['action'] == 'new')
|
||||
{
|
||||
$accounts = array();
|
||||
@ -272,9 +268,14 @@ if ($_GET['action'] == 'new')
|
||||
print "</table>";
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="fiche.php?action=create&accountid='.$bid.'">';
|
||||
print $langs->trans('NewCheckDepositOn',$account_label);
|
||||
print '</a>';
|
||||
if ($user->rights->banque->modifier)
|
||||
{
|
||||
print '<a class="butAction" href="fiche.php?action=create&accountid='.$bid.'">'.$langs->trans('NewCheckDepositOn',$account_label).'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('NewCheckDepositOn',$account_label).'</a>';
|
||||
}
|
||||
print '</div><br />';
|
||||
}
|
||||
|
||||
|
||||
@ -524,9 +524,8 @@ class MenuLeft {
|
||||
if ($conf->facture->enabled && $conf->banque->enabled)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/index.php?leftmenu=checks",$langs->trans("MenuChequeDeposits"),0,$user->rights->banque->lire);
|
||||
if (eregi("checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->creer);
|
||||
if (eregi("checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->modifier);
|
||||
if (eregi("checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php?leftmenu=checks",$langs->trans("MenuChequesReceipts"),1,$user->rights->banque->lire);
|
||||
|
||||
}
|
||||
|
||||
// Bank-Caisse
|
||||
|
||||
@ -510,10 +510,9 @@ class MenuLeft {
|
||||
/*
|
||||
if ($conf->facture->enabled && $conf->banque->enabled)
|
||||
{
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/index.php?leftmenu=checks",$langs->trans("MenuChequeDeposits"),0,$user->rights->facture->lire);
|
||||
if (eregi("checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new",$langs->trans("NewChequeDeposit"),1,$user->rights->facture->creer);
|
||||
if (eregi("checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php?leftmenu=checks",$langs->trans("MenuChequesReceipts"),1,$user->rights->facture->lire);
|
||||
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/index.php?leftmenu=checks",$langs->trans("MenuChequeDeposits"),0,$user->rights->banque->lire);
|
||||
if (eregi("checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new",$langs->trans("NewChequeDeposit"),1,$user->rights->banque->modifier);
|
||||
if (eregi("checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php?leftmenu=checks",$langs->trans("MenuChequesReceipts"),1,$user->rights->banque->lire);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@ -17,12 +17,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/** \defgroup banque Module banque
|
||||
\brief Module pour gérer la tenue d'un compte bancaire et rapprochements
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -1248,7 +1248,7 @@ function restrictedArea($user, $feature='societe', $objectid=0, $dbtablename='')
|
||||
{
|
||||
if (! $user->rights->fournisseur->commande->lire) $readok=0;
|
||||
}
|
||||
else if (! empty($features))
|
||||
else if (! empty($feature))
|
||||
{
|
||||
if (! $user->rights->$feature->lire) $readok=0;
|
||||
}
|
||||
@ -1276,6 +1276,10 @@ function restrictedArea($user, $feature='societe', $objectid=0, $dbtablename='')
|
||||
{
|
||||
if (! $user->rights->fournisseur->commande->creer) $createok=0;
|
||||
}
|
||||
else if ($feature == 'banque')
|
||||
{
|
||||
if (! $user->rights->banque->modifier) $createok=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $user->rights->$feature->creer) $createok=0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user