[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r5571 - phpcompta/tags/rel670/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r5571 - phpcompta/tags/rel670/include |
Date: |
Fri, 6 Dec 2013 12:20:38 +0100 (CET) |
Author: danydb
Date: 2013-12-06 12:20:37 +0100 (Fri, 06 Dec 2013)
New Revision: 5571
Modified:
phpcompta/tags/rel670/include/class_fiche.php
phpcompta/tags/rel670/include/compta_fin_saldo.inc.php
Log:
task #925 - FSALDO : ajouter les totaux
Task #925 - FSALDO : ajouter les totaux
Modified: phpcompta/tags/rel670/include/class_fiche.php
===================================================================
--- phpcompta/tags/rel670/include/class_fiche.php 2013-12-06 11:07:37 UTC
(rev 5570)
+++ phpcompta/tags/rel670/include/class_fiche.php 2013-12-06 11:20:37 UTC
(rev 5571)
@@ -73,7 +73,8 @@
{
global $g_user;
$sql_ledger=$g_user->get_ledger_sql('FIN',3);
- $avail=$this->cn->get_array("select jrn_def_id,jrn_def_bank from jrn_def
where jrn_def_type='FIN' and $sql_ledger
+ $avail=$this->cn->get_array("select jrn_def_id,jrn_def_name,"
+ . "jrn_def_bank,jrn_def_description from jrn_def where
jrn_def_type='FIN' and $sql_ledger
order by jrn_def_name");
if ( count($avail) == 0 )
@@ -82,6 +83,8 @@
for ($i=0;$i<count($avail);$i++)
{
$t=new Fiche($this->cn,$avail[$i]['jrn_def_bank']);
+ $t->ledger_name=$avail[$i]['jrn_def_name'];
+ $t->ledger_description=$avail[$i]['jrn_def_description'];
$t->getAttribut();
$all[$i]=$t;
Modified: phpcompta/tags/rel670/include/compta_fin_saldo.inc.php
===================================================================
--- phpcompta/tags/rel670/include/compta_fin_saldo.inc.php 2013-12-06
11:07:37 UTC (rev 5570)
+++ phpcompta/tags/rel670/include/compta_fin_saldo.inc.php 2013-12-06
11:20:37 UTC (rev 5571)
@@ -36,16 +36,23 @@
echo '<div class="content">';
echo dossier::hidden();
- echo '<table style="margin-left:10%;width:60%" class="result">';
- echo tr(th('Quick Code').th('Compte en banque','
style="text-align:left"').th('solde opération',' style="text-align:right"')
- .th('solde extrait/relevé',' style="text-align:right"')
- .th('différence',' style="text-align:right"'));
+ echo _('Filtre :').HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3', '1');
+ echo '<table class="sortable" style="margin-left:10%;width:60%"
class="result" id="fin_saldo_tb">';
+ echo tr(th('Quick Code',' class="
sorttable_sorted_reverse"',HtmlInput::infobulle(17).'<span
id="sorttable_sortrevind"> ▴</span>')
+ .th('Compte en banque',' style="text-align:left"')
+ .th('Journal',' style="text-align:center"')
+ .th('Description',' style="text-align:center"')
+ .th('solde opération',' style="text-align:right"
class="sorttable_numeric"')
+ .th('solde extrait/relevé',' style="text-align:right"
class="sorttable_numeric"')
+ .th('différence',' style="text-align:right"
class="sorttable_numeric"')
+ );
// Filter the saldo
// on the current year
$filter_year=" j_tech_per in (select p_id from parm_periode where
p_exercice='".$g_user->get_exercice()."')";
// for highligting tje line
$idx=0;
bcscale(2);
+ $tot_extrait=0;$tot_diff=0;$tot_operation=0;
// for each account
for ( $i = 0; $i < count($array);$i++)
{
@@ -86,18 +93,35 @@
echo "<TD >".
$array[$i]->strAttribut(ATTR_DEF_NAME).
"</TD>".
- "<TD align=\"right\">".
+ td(h($array[$i]->ledger_name)).
+ td(h($array[$i]->ledger_description)).
+ '<TD class="sorttable_numeric" sorttable_customkey="'.$solde.'"
style="text-align:right">'.
nbm($solde).
"</TD>".
- "<TD align=\"right\">".
+ '<TD class="sorttable_numeric"
sorttable_customkey="'.$saldo_rec.'" style="text-align:right">'.
nbm($saldo_rec).
"</TD>".
- "<TD align=\"right\">".
+ '<TD class="sorttable_numeric" sorttable_customkey="'.$diff.'"
style="text-align:right">'.
nbm($diff).
"</TD>".
"</TR>";
+ $tot_extrait=bcadd($tot_extrait,$solde);
+ $tot_operation=bcadd($tot_operation,$saldo_rec);
+ $tot_diff=bcadd($tot_diff,$diff);
}
}// for
+ echo '<tfoot>';
+ echo '<tr>';
+ echo td('');
+ echo td('');
+ echo td('');
+ echo td(' TOTAUX ','style="font-weight:bold"');
+ echo td(nbm($tot_extrait),'style="font-weight:bold" class="num"');
+ echo td(nbm($tot_operation),' style="font-weight:bold" class="num"');
+ echo td(nbm($tot_diff),' style="font-weight:bold" class="num"');
+ echo '</tr>';
+
+ echo '</tfoot>';
echo "</table>";
echo "</div>";
exit();
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r5571 - phpcompta/tags/rel670/include,
phpcompta-dev <=