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
* along with this program; if not, write to the Free Software
* 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");
@@ -48,13 +51,13 @@ print '<br>';
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="2">';
print "<tr class=\"liste_titre\">";
echo '<td colspan="2">R<>sum<75></td>';
echo '<td colspan="2">R<>sum<75></td>';
print "</tr>\n";
$var=!$var;
$sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."paiement";
$paiem = valeur($sql);
print "<tr $bc[$var]><td>Somme des paiements (associ<EFBFBD>s <EFBFBD> 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;
$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
* along with this program; if not, write to the Free Software
* 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_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
if (!$user->rights->banque->lire) accessforbidden();
// Security check
restrictedArea($user,'banque');
/*
* View
*/
llxHeader();
@@ -36,20 +47,20 @@ print_barre_liste("Transactions BPLC", $page, "bplc.php");
print "<table class=\"noborder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
print "<tr class=\"liste_titre\">";
print "<td>R<>f. commande</td>";
print "<td>R<>f. commande</td>";
print "<td>ip client</td><td>Num. transaction</td><td>Date</td><td>Heure</td>";
print "<td>Num autorisation</td>";
print "<td>cl<63> acceptation</td>";
print "<td>cl<63> acceptation</td>";
print "<td>code retour</td>";
print "</tr>\n";
$sql = "SELECT ipclient,
num_transaction,
date_transaction,
heure_transaction,
num_autorisation,
cle_acceptation,
code_retour,
$sql = "SELECT ipclient,
num_transaction,
date_transaction,
heure_transaction,
num_autorisation,
cle_acceptation,
code_retour,
ref_commande";
$sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
@@ -57,33 +68,33 @@ $sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
$resql = $db->query($sql);
if ($resql)
{
$var=True;
$var=True;
$num = $db->num_rows($resql);
$i = 0; $total = 0;
$sep = 0;
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>";
print "<td>$objp->code_retour</td>";
$i++;
}
$db->free($resql);

View File

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