27require
'../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
31$langs->loadLangs(array(
'banks',
'categories'));
34if (empty($user->rights->banque->lire)) {
51 $resql = $db->query($sql);
53 $obj = $db->fetch_object($resql);
54 $valeur = $obj->amount;
70print
'<table class="noborder" width="100%" cellpadding="2">';
71print
"<tr class=\"liste_titre\">";
72echo
'<td colspan="2">'.$langs->trans(
"Summary").
'</td>';
76$sql =
"SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX.
"paiement";
78print
"<tr class=\"oddeven\"><td>Somme des paiements (associes a une facture)</td><td align=\"right\">".price($paiem).
"</td></tr>";
81$sql =
"SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX.
"bank WHERE amount > 0";
83print
"<tr class=\"oddeven\"><td>Somme des credits</td><td align=\"right\">".price($credits).
"</td></tr>";
86$sql =
"SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX.
"bank WHERE amount < 0";
88print
"<tr class=\"oddeven\"><td>Somme des debits</td><td align=\"right\">".price($debits).
"</td></tr>";
91$sql =
"SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX.
"bank ";
93print
"<tr class=\"oddeven\"><td>".$langs->trans(
"BankBalance").
"</td><td align=\"right\">".
price($solde).
"</td></tr>";
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
if(empty( $user->rights->banque->lire)) valeur($sql)
Get result of sql for field amount.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.