altocompta/include/template/anc_balance_group.php
Dany De Bontridder ed9bf5d559 Merged revisions 5645-5664 via svnmerge from
svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel671

........
  r5645 | danydb | 2014-01-07 17:54:56 +0100 (mar., 07 janv. 2014) | 2 lines
  
  Rewrite and have one row by ND
  Task #960 - TVA ND & comptabilité analytique
........
  r5646 | danydb | 2014-01-07 18:01:31 +0100 (mar., 07 janv. 2014) | 2 lines
  
  Rewrite and have one row by ND : add documentation 2 new private function : compute_no_deductible & insert_no_deductible
  Task #960 - TVA ND & comptabilité analytique
........
  r5647 | danydb | 2014-01-07 18:16:00 +0100 (mar., 07 janv. 2014) | 2 lines
  
  Add label for ND row
  Task #960 - TVA ND & comptabilité analytique
........
  r5648 | danydb | 2014-01-07 18:44:04 +0100 (mar., 07 janv. 2014) | 2 lines
  
  Task #960 - TVA ND & comptabilité analytique
  Move function find_label
........
  r5649 | danydb | 2014-01-07 21:22:48 +0100 (mar., 07 janv. 2014) | 1 line
  
  show TVA ND
........
  r5650 | danydb | 2014-01-08 21:48:44 +0100 (mer., 08 janv. 2014) | 3 lines
  
  Task #960 - TVA ND & comptabilité analytique
  TVA ND is now in the Analytic accountancy
  The Analytic Accountancy can work with negative amount
........
  r5651 | danydb | 2014-01-08 21:51:40 +0100 (mer., 08 janv. 2014) | 5 lines
  
  Task #960 - TVA ND & comptabilité analytique
  TVA ND is now in the Analytic accountancy
  The Analytic Accountancy can work with negative amount
  
  Fix problem with update script
........
  r5652 | danydb | 2014-01-08 22:08:51 +0100 (mer., 08 janv. 2014) | 1 line
  
  Update SQL script
........
  r5653 | danydb | 2014-01-08 22:09:17 +0100 (mer., 08 janv. 2014) | 1 line
  
  Task #971 : Cosmetic 
........
  r5654 | danydb | 2014-01-08 22:09:51 +0100 (mer., 08 janv. 2014) | 1 line
  
  Task #960 : show negative
........
  r5655 | danydb | 2014-01-09 13:08:05 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Task #961 - Compta analytique
  ANCODS
........
  r5656 | danydb | 2014-01-09 13:10:24 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Task #961 - Compta analytique
  ANCHOP
........
  r5657 | danydb | 2014-01-09 13:17:46 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Task #961 - Compta analytique
  ANCGL
........
  r5658 | danydb | 2014-01-09 13:19:05 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Task #961 - Compta analytique
  ANCBS
........
  r5659 | danydb | 2014-01-09 13:24:46 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Task #961 - Compta analytique
  ANCTAB
........
  r5660 | danydb | 2014-01-09 13:27:09 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Task #961 - Compta analytique
  ANCGR
........
  r5661 | danydb | 2014-01-09 13:29:06 +0100 (jeu., 09 janv. 2014) | 1 line
  
  Bug : race condition
........
  r5662 | danydb | 2014-01-09 13:30:08 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Task #961 - Compta analytique
  ANC
........
  r5663 | danydb | 2014-01-09 16:40:48 +0100 (jeu., 09 janv. 2014) | 2 lines
  
  Update unit test
........
  r5664 | danydb | 2014-01-09 16:41:07 +0100 (jeu., 09 janv. 2014) | 1 line
  
  Bug CSS
........
2014-01-09 19:06:29 +00:00

78 lines
No EOL
1.8 KiB
PHP

<?php
/**
* defined variable $array with the result included from class_anc_group
*/
$prev='';
?>
<table class="result">
<?php
$idx=0;bcscale(2);$solde=0;$tot_group_deb=0;$tot_group_cred=0;
for ($i=0;$i<count($array);$i++):
echo '<tr>';
if ( $i==0) {
$prev=$array[$i]['ga_id'];
echo '<tr>';
echo td($array[$i]['ga_id'],' colspan="5" style="width:auto;font-size:1.2em"');
echo '</tr>';
?>
<tr>
<th>Activité</th>
<th style="text-align:right" >Débit</th>
<th style="text-align:right">Crébit</th>
<th style="text-align:right">Solde</th>
</tr>
<?php
}
if ( $prev != $array[$i]['ga_id'])
{
$prev=$array[$i]['ga_id'];
echo '<tr>';
echo td('Solde');
echo td(nbm($tot_group_deb),' class="num"');
echo td(nbm($tot_group_cred),' class="num"');
echo td(nbm(bcsub($tot_group_cred,$tot_group_deb)),' class="num"');
echo '</tr>';
$tot_group_deb=0;$tot_group_cred=0;
$prev=$array[$i]['ga_id'];
echo '<tr>';
echo td($array[$i]['ga_id'],' colspan="5" style="width:auto;font-size:1.2em"');
echo '</tr>';
?>
<tr>
<th>Activité</th>
<th style="text-align:right">Débit</th>
<th style="text-align:right" >Crébit</th>
<th style="text-align:right" >Solde</th>
</tr>
<?php
}
if ($idx %2 == 0)
echo '<tr class="even">';
else
echo '<tr class="odd">';
echo td($array[$i]['po_name']);
echo td(nbm($array[$i]['sum_deb']),' class="num"');
echo td(nbm($array[$i]['sum_cred']),' class="num"');
$solde=bcsub($array[$i]['sum_cred'],$array[$i]['sum_deb']);
echo td(nbm($solde),' class="num"');
$tot_group_deb=bcadd($tot_group_deb,$array[$i]['sum_deb']);
$tot_group_cred=bcadd($tot_group_cred,$array[$i]['sum_cred']);
echo '</tr>';
$idx++;
endfor;
echo '<tr>';
echo td('Solde');
echo td(nbm($tot_group_deb),' class="num"');
echo td(nbm($tot_group_cred),' class="num"');
echo td(nbm(bcsub($tot_group_cred,$tot_group_deb)),' class="num"');
echo '</tr>';
?>
</table>