This commit is contained in:
Laurent Destailleur 2009-07-15 13:50:36 +00:00
parent 3d7199a8b5
commit e5be7dbcda
3 changed files with 45 additions and 31 deletions

View File

@ -15,10 +15,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* */
* $Id$
* $Source$ /**
* * \file htdocs/compta/bank/bilan.php
* \ingroup banque
* \brief Page de bilan
* \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -48,13 +51,13 @@ print '<br>';
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="2">'; print '<table class="noborder" width="100%" cellspacing="0" cellpadding="2">';
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
echo '<td colspan="2">Résumé</td>'; echo '<td colspan="2">R<EFBFBD>sum<EFBFBD></td>';
print "</tr>\n"; print "</tr>\n";
$var=!$var; $var=!$var;
$sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."paiement"; $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."paiement";
$paiem = valeur($sql); $paiem = valeur($sql);
print "<tr $bc[$var]><td>Somme des paiements (associés à une facture)</td><td align=\"right\">".price($paiem)."</td></tr>"; print "<tr $bc[$var]><td>Somme des paiements (associes a une facture)</td><td align=\"right\">".price($paiem)."</td></tr>";
$var=!$var; $var=!$var;
$sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount > 0"; $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount > 0";

View File

@ -15,14 +15,25 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* */
* $Id$
/**
* \file htdocs/compta/bank/bplc.php
* \ingroup banque
* \brief Page of BPLC transactions
* \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
if (!$user->rights->banque->lire) accessforbidden(); // Security check
restrictedArea($user,'banque');
/*
* View
*/
llxHeader(); llxHeader();
@ -36,20 +47,20 @@ 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\">";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print "<td>Réf. commande</td>"; print "<td>R<EFBFBD>f. commande</td>";
print "<td>ip client</td><td>Num. transaction</td><td>Date</td><td>Heure</td>"; print "<td>ip client</td><td>Num. transaction</td><td>Date</td><td>Heure</td>";
print "<td>Num autorisation</td>"; print "<td>Num autorisation</td>";
print "<td>clé acceptation</td>"; print "<td>cl<EFBFBD> acceptation</td>";
print "<td>code retour</td>"; print "<td>code retour</td>";
print "</tr>\n"; print "</tr>\n";
$sql = "SELECT ipclient, $sql = "SELECT ipclient,
num_transaction, num_transaction,
date_transaction, date_transaction,
heure_transaction, heure_transaction,
num_autorisation, num_autorisation,
cle_acceptation, cle_acceptation,
code_retour, code_retour,
ref_commande"; ref_commande";
$sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc"; $sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
@ -57,33 +68,33 @@ $sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
$var=True; $var=True;
$num = $db->num_rows($resql); $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($resql); $objp = $db->fetch_object($resql);
print "<tr $bc[1]>"; print "<tr $bc[1]>";
$type = substr($objp->ref_commande, 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 ); $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->ipclient</td>";
print "<td>$objp->num_transaction</td>"; print "<td>$objp->num_transaction</td>";
print "<td>$objp->date_transaction</td>"; print "<td>$objp->date_transaction</td>";
print "<td>$objp->heure_transaction</td>"; print "<td>$objp->heure_transaction</td>";
print "<td>$objp->num_autorisation</td>"; print "<td>$objp->num_autorisation</td>";
print "<td>$objp->cle_acceptation</td>"; print "<td>$objp->cle_acceptation</td>";
print "<td>$objp->code_retour</td>"; print "<td>$objp->code_retour</td>";
$i++; $i++;
} }
$db->free($resql); $db->free($resql);

View File

@ -19,11 +19,11 @@
*/ */
/** /**
\file htdocs/compta/bank/budget.php * \file htdocs/compta/bank/budget.php
\ingroup banque * \ingroup banque
\brief Page de budget * \brief Page de budget
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -40,7 +40,7 @@ $result=restrictedArea($user,'banque');
*/ */
$companystatic=new Societe($db); $companystatic=new Societe($db);
llxHeader(); llxHeader();