Mise à jour des permissions
This commit is contained in:
parent
e1cf783a85
commit
45327fe709
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -25,8 +25,7 @@ require("./bank.lib.php");
|
|||||||
|
|
||||||
$user->getrights('compta');
|
$user->getrights('compta');
|
||||||
|
|
||||||
if (!$user->admin && !$user->rights->banque->lire)
|
if (!$user->rights->banque->lire) accessforbidden();
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
@ -36,7 +35,6 @@ $offset = $conf->liste_limit * $page ;
|
|||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste("Transactions BPLC", $page, "bplc.php");
|
print_barre_liste("Transactions BPLC", $page, "bplc.php");
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
print "<table class=\"noborder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||||
@ -59,40 +57,39 @@ $sql = "SELECT ipclient,
|
|||||||
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
|
$sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($result) {
|
if ($resql)
|
||||||
|
{
|
||||||
$var=True;
|
$var=True;
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows($resql);
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
|
|
||||||
$sep = 0;
|
$sep = 0;
|
||||||
|
|
||||||
while ($i < $num) {
|
while ($i < $num)
|
||||||
$objp = $db->fetch_object($result);
|
{
|
||||||
|
$objp = $db->fetch_object($resql);
|
||||||
print "<tr $bc[1]>";
|
|
||||||
|
print "<tr $bc[1]>";
|
||||||
$type = substr($objp->ref_commande, strlen($objp->ref_commande) - 2 );
|
|
||||||
$id = substr($objp->ref_commande, 0 , strlen($objp->ref_commande) - 2 );
|
$type = substr($objp->ref_commande, strlen($objp->ref_commande) - 2 );
|
||||||
|
$id = substr($objp->ref_commande, 0 , strlen($objp->ref_commande) - 2 );
|
||||||
if ($type == 10)
|
|
||||||
{
|
if ($type == 10)
|
||||||
print '<td><a href="../dons/fiche.php?rowid='.$id.'&action=edit">'.$objp->ref_commande.'</a></td>';
|
{
|
||||||
}
|
print '<td><a href="../dons/fiche.php?rowid='.$id.'&action=edit">'.$objp->ref_commande.'</a></td>';
|
||||||
|
}
|
||||||
print "<td>$objp->ipclient</td>";
|
|
||||||
print "<td>$objp->num_transaction</td>";
|
print "<td>$objp->ipclient</td>";
|
||||||
print "<td>$objp->date_transaction</td>";
|
print "<td>$objp->num_transaction</td>";
|
||||||
print "<td>$objp->heure_transaction</td>";
|
print "<td>$objp->date_transaction</td>";
|
||||||
print "<td>$objp->num_autorisation</td>";
|
print "<td>$objp->heure_transaction</td>";
|
||||||
print "<td>$objp->cle_acceptation</td>";
|
print "<td>$objp->num_autorisation</td>";
|
||||||
print "<td>$objp->code_retour</td>";
|
print "<td>$objp->cle_acceptation</td>";
|
||||||
|
print "<td>$objp->code_retour</td>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
$i++;
|
$db->free($resql);
|
||||||
}
|
|
||||||
$db->free();
|
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
@ -23,73 +23,69 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/bank/pre.inc.php
|
\file htdocs/compta/bank/pre.inc.php
|
||||||
\ingroup compta
|
\ingroup compta
|
||||||
\brief Fichier gestionnaire du menu compta banque
|
\brief Fichier gestionnaire du menu compta banque
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("../../main.inc.php");
|
require_once("../../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||||
|
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
|
|
||||||
$user->getrights('banque');
|
$user->getrights('banque');
|
||||||
|
|
||||||
|
|
||||||
function llxHeader($head = "")
|
function llxHeader($head = "")
|
||||||
{
|
{
|
||||||
global $db, $user, $conf, $langs;
|
global $db, $user, $conf, $langs;
|
||||||
|
|
||||||
top_menu($head);
|
top_menu($head);
|
||||||
|
|
||||||
$menu = new Menu();
|
$menu = new Menu();
|
||||||
|
if ($user->rights->banque->lire)
|
||||||
$sql = "SELECT rowid, label, courant";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
|
||||||
$sql.= " WHERE clos = 0";
|
|
||||||
$sql.= " AND courant in (1,2)";
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
{
|
||||||
$numr = $db->num_rows($resql);
|
$sql = "SELECT rowid, label, courant";
|
||||||
$i = 0;
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||||
|
$sql.= " WHERE clos = 0";
|
||||||
while ($i < $numr)
|
$sql.= " AND courant in (1,2)";
|
||||||
{
|
$resql = $db->query($sql);
|
||||||
$objp = $db->fetch_object($resql);
|
if ($resql)
|
||||||
$menu->add(DOL_URL_ROOT."/compta/bank/account.php?account=" . $objp->rowid, $objp->label);
|
{
|
||||||
if ($objp->courant != 2) $menu->add_submenu(DOL_URL_ROOT."/compta/bank/releve.php?account=" . $objp->rowid ,$langs->trans("AccountStatements"));
|
$numr = $db->num_rows($resql);
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/annuel.php?account=" . $objp->rowid ,$langs->trans("IOMonthlyReporting"));
|
$i = 0;
|
||||||
$i++;
|
|
||||||
}
|
while ($i < $numr)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object($resql);
|
||||||
|
$menu->add(DOL_URL_ROOT."/compta/bank/account.php?account=" . $objp->rowid, $objp->label);
|
||||||
|
if ($objp->courant != 2) $menu->add_submenu(DOL_URL_ROOT."/compta/bank/releve.php?account=" . $objp->rowid ,$langs->trans("AccountStatements"));
|
||||||
|
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/annuel.php?account=" . $objp->rowid ,$langs->trans("IOMonthlyReporting"));
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$menu->add(DOL_URL_ROOT."/compta/bank/index.php",$langs->trans("Bank"));
|
||||||
|
|
||||||
$menu->add(DOL_URL_ROOT."/compta/bank/index.php",$langs->trans("Bank"));
|
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/search.php",$langs->trans("SearchTransaction"));
|
||||||
|
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/budget.php",$langs->trans("ByCategories"));
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/search.php",$langs->trans("SearchTransaction"));
|
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/bilan.php","Bilan");
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/budget.php",$langs->trans("ByCategories"));
|
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/bilan.php","Bilan");
|
if ($user->rights->banque->modifier)
|
||||||
|
|
||||||
if ($user->rights->banque->modifier)
|
|
||||||
{
|
{
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/virement.php",$langs->trans("Virements"));
|
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/virement.php",$langs->trans("Virements"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->banque->configurer)
|
if ($user->rights->banque->configurer)
|
||||||
{
|
{
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/config.php",$langs->trans("Setup"));
|
$menu->add_submenu(DOL_URL_ROOT."/compta/bank/config.php",$langs->trans("Setup"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("COMPTA_ONLINE_PAYMENT_BPLC") && COMPTA_ONLINE_PAYMENT_BPLC)
|
if (defined("COMPTA_ONLINE_PAYMENT_BPLC") && COMPTA_ONLINE_PAYMENT_BPLC)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/compta/bank/bplc.php","Transactions BPLC");
|
$menu->add(DOL_URL_ROOT."/compta/bank/bplc.php","Transactions BPLC");
|
||||||
}
|
}
|
||||||
|
|
||||||
left_menu($menu->liste);
|
left_menu($menu->liste);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user