Mise jour des permissions
This commit is contained in:
parent
e1cf783a85
commit
45327fe709
@ -1,5 +1,5 @@
|
||||
<?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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -25,8 +25,7 @@ require("./bank.lib.php");
|
||||
|
||||
$user->getrights('compta');
|
||||
|
||||
if (!$user->admin && !$user->rights->banque->lire)
|
||||
accessforbidden();
|
||||
if (!$user->rights->banque->lire) accessforbidden();
|
||||
|
||||
llxHeader();
|
||||
|
||||
@ -36,7 +35,6 @@ $offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
print_barre_liste("Transactions BPLC", $page, "bplc.php");
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
|
||||
@ -59,40 +57,39 @@ $sql = "SELECT ipclient,
|
||||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$var=True;
|
||||
$num = $db->num_rows();
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0; $total = 0;
|
||||
|
||||
|
||||
$sep = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
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 );
|
||||
|
||||
if ($type == 10)
|
||||
{
|
||||
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->date_transaction</td>";
|
||||
print "<td>$objp->heure_transaction</td>";
|
||||
print "<td>$objp->num_autorisation</td>";
|
||||
print "<td>$objp->cle_acceptation</td>";
|
||||
print "<td>$objp->code_retour</td>";
|
||||
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
$db->free();
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
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 );
|
||||
|
||||
if ($type == 10)
|
||||
{
|
||||
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->date_transaction</td>";
|
||||
print "<td>$objp->heure_transaction</td>";
|
||||
print "<td>$objp->num_autorisation</td>";
|
||||
print "<td>$objp->cle_acceptation</td>";
|
||||
print "<td>$objp->code_retour</td>";
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?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) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
@ -23,73 +23,69 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/bank/pre.inc.php
|
||||
\ingroup compta
|
||||
\brief Fichier gestionnaire du menu compta banque
|
||||
\file htdocs/compta/bank/pre.inc.php
|
||||
\ingroup compta
|
||||
\brief Fichier gestionnaire du menu compta banque
|
||||
*/
|
||||
|
||||
require_once("../../main.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||
|
||||
|
||||
$langs->load("banks");
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
|
||||
function llxHeader($head = "")
|
||||
{
|
||||
global $db, $user, $conf, $langs;
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
$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)
|
||||
global $db, $user, $conf, $langs;
|
||||
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
if ($user->rights->banque->lire)
|
||||
{
|
||||
$numr = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
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++;
|
||||
}
|
||||
$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);
|
||||
$i = 0;
|
||||
|
||||
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_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/bilan.php","Bilan");
|
||||
|
||||
if ($user->rights->banque->modifier)
|
||||
$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/bilan.php","Bilan");
|
||||
|
||||
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