[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4186 - in phpcompta/trunk: . html/document/fr_be includ
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4186 - in phpcompta/trunk: . html/document/fr_be include |
Date: |
Sat, 16 Jul 2011 23:44:27 +0200 (CEST) |
Author: danydb
Date: 2011-07-16 23:44:25 +0200 (Sat, 16 Jul 2011)
New Revision: 4186
Modified:
phpcompta/trunk/
phpcompta/trunk/html/document/fr_be/bnb.form
phpcompta/trunk/include/export_balance_pdf.php
Log:
Merged revisions 4183-4185 via svnmerge from
svn+ssh://address@hidden/svn/phpcompta/branches/rel560
........
r4183 | danydb | 2011-07-12 18:40:02 +0200 (Tue, 12 Jul 2011) | 1 line
Bug stock not computed in bilan
........
r4184 | danydb | 2011-07-13 00:16:50 +0200 (Wed, 13 Jul 2011) | 2 lines
bug with bilan
........
r4185 | danydb | 2011-07-13 00:42:41 +0200 (Wed, 13 Jul 2011) | 2 lines
bug incomplete balance
........
Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
- /phpcompta/branches/rel560:1-4181
+ /phpcompta/branches/rel560:1-4185
Modified: phpcompta/trunk/html/document/fr_be/bnb.form
===================================================================
--- phpcompta/trunk/html/document/fr_be/bnb.form 2011-07-12 22:42:41 UTC
(rev 4185)
+++ phpcompta/trunk/html/document/fr_be/bnb.form 2011-07-16 21:44:25 UTC
(rev 4186)
@@ -146,13 +146,14 @@
#
$S1=abs($C2-$C29)
$S2=$C22+$C23+$C24+$C25+$C26+$C27
-$S3=$C29+$C50+$C51+$C52+$C53+$C54+$C55+$C56+$C57+$C58+$C490+$C491+$C41+$C40
$S4=$C30+$C31+$C32+$C33+$C34+$C35+$C36
+$S3=$C29+$C50+$C51+$C52+$C53+$C54+$C55+$C56+$C57+$C58+$C490+$C491+$C41+$C40+$S4
+
$S5=$C40+$C41
$S6=$C50+$C51+$C52+$C53
$S7=$C54+$C55+$C56+$C57+$C58
$S8=$C490+$C491
-$S9=$S1+$S3+$C3
+$S9=$S1+$S3
$S10=$C10+$C11+$C12+$C13+$C14+$C15
$S11=$C160+$C161+$C162+$C163+$C164+$C165
$S12=$C17+$C42+$C43+$C44+$C45+$C46+$C47+$C48+$C492+$C493
Modified: phpcompta/trunk/include/export_balance_pdf.php
===================================================================
--- phpcompta/trunk/include/export_balance_pdf.php 2011-07-12 22:42:41 UTC
(rev 4185)
+++ phpcompta/trunk/include/export_balance_pdf.php 2011-07-16 21:44:25 UTC
(rev 4186)
@@ -117,79 +117,106 @@
$lvl3_old='';
bcscale(2);
+if (! empty($array))
+ {
+ $i=0;
+ foreach ($array as $key=>$value)
+ {
+ $i++;
+ /*
+ * level x
+ */
+ if ( $value['poste']=='') continue;
+ foreach (array(3,2,1) as $ind)
+ {
+ $r=$value;
+ if ( ! isset($_GET['lvl'.$ind]))continue;
+
+ if (${'lvl'.$ind.'_old'} == '')
${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind);
+ if ( ${'lvl'.$ind.'_old'} != substr($r['poste'],0,$ind))
+ {
+ $pdf->SetFont('DejaVu','B',7);
+ $pdf->Cell(30,6,"Totaux ".$ind);
+ $pdf->Cell(80,6,${'lvl'.$ind.'_old'});
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['sum_deb']),0,0,'R');
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['sum_cred']),0,0,'R');
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['solde_deb']),0,0,'R');
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['solde_cred']),0,0,'R');
+ $pdf->Ln();
+ $pdf->SetFont('DejaVuCond','',7);
+ ${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind);
+ foreach(array('sum_cred','sum_deb','solde_deb','solde_cred') as
$a)
+ {
+ ${'nlvl'.$ind}[$a]=0;
+ }
+ }
+ }
+ foreach(array('sum_cred','sum_deb','solde_deb','solde_cred') as $a)
+ {
+ $nlvl1[$a]=bcadd($nlvl1[$a],$r[$a]);
+ $nlvl2[$a]=bcadd($nlvl2[$a],$r[$a]);
+ $nlvl3[$a]=bcadd($nlvl3[$a],$r[$a]);
+ }
+
+ if ( $i % 2 == 0 )
+ {
+ $pdf->SetFillColor(220,221,255);
+ $fill=1;
+ }
+ else
+ {
+ $pdf->SetFillColor(0,0,0);
+ $fill=0;
+ }
+
+ $pdf->Cell(30,6,$value['poste'],0,0,'L',$fill);
+ $pdf->Cell(80,6,$value['label'],0,0,'L',$fill);
+ $pdf->Cell(20,6,nbm($value['sum_deb']),0,0,'R',$fill);
+ $pdf->Cell(20,6,nbm($value['sum_cred']),0,0,'R',$fill);
+ $pdf->Cell(20,6,nbm($value['solde_deb']),0,0,'R',$fill);
+ $pdf->Cell(20,6,nbm($value['solde_cred']),0,0,'R',$fill);
+ $pdf->Ln();
+ $tp_deb=bcadd($tp_deb,$value['sum_deb']);
+ $tp_cred=bcadd($tp_cred,$value['sum_cred']);
+ $tp_sold=bcadd($tp_sold,$value['solde_deb']);
+ $tp_solc=bcadd($tp_solc,$value['solde_cred']);
-for ($i=0;$i<count($array);$i++)
-{
- if ( ! isset($array[$i]))continue;
- /*
- * level x
- */
-
- foreach (array(3,2,1) as $ind)
- {
- $r=$array[$i];
- if ( ! isset($_GET['lvl'.$ind]))continue;
-
- if (${'lvl'.$ind.'_old'} == '')
${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind);
- if ( ${'lvl'.$ind.'_old'} != substr($r['poste'],0,$ind))
- {
- $pdf->SetFont('DejaVu','B',7);
- $pdf->Cell(30,6,"Totaux ".$ind);
- $pdf->Cell(80,6,${'lvl'.$ind.'_old'});
- $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['sum_deb']),0,0,'R');
- $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['sum_cred']),0,0,'R');
- $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['solde_deb']),0,0,'R');
- $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['solde_cred']),0,0,'R');
- $pdf->Ln();
- $pdf->SetFont('DejaVuCond','',7);
- ${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind);
- foreach(array('sum_cred','sum_deb','solde_deb','solde_cred') as $a)
- {
- ${'nlvl'.$ind}[$a]=0;
- }
- }
- }
- foreach(array('sum_cred','sum_deb','solde_deb','solde_cred') as $a)
- {
- $nlvl1[$a]=bcadd($nlvl1[$a],$r[$a]);
- $nlvl2[$a]=bcadd($nlvl2[$a],$r[$a]);
- $nlvl3[$a]=bcadd($nlvl3[$a],$r[$a]);
- }
-
- if ( $i % 2 == 0 )
- {
- $pdf->SetFillColor(220,221,255);
- $fill=1;
- }
- else
- {
- $pdf->SetFillColor(0,0,0);
- $fill=0;
- }
-
- $pdf->Cell(30,6,$array[$i]['poste'],0,0,'L',$fill);
- $pdf->Cell(80,6,$array[$i]['label'],0,0,'L',$fill);
- $pdf->Cell(20,6,nbm($array[$i]['sum_deb']),0,0,'R',$fill);
- $pdf->Cell(20,6,nbm($array[$i]['sum_cred']),0,0,'R',$fill);
- $pdf->Cell(20,6,nbm($array[$i]['solde_deb']),0,0,'R',$fill);
- $pdf->Cell(20,6,nbm($array[$i]['solde_cred']),0,0,'R',$fill);
+ }
+ foreach (array(3,2,1) as $ind)
+ {
+ $r=$value;
+ if ( ! isset($_GET['lvl'.$ind]))continue;
+
+ if (${'lvl'.$ind.'_old'} == '')
${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind);
+ if ( ${'lvl'.$ind.'_old'} != substr($r['poste'],0,$ind))
+ {
+ $pdf->SetFont('DejaVu','B',7);
+ $pdf->Cell(30,6,"Totaux ".$ind);
+ $pdf->Cell(80,6,${'lvl'.$ind.'_old'});
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['sum_deb']),0,0,'R');
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['sum_cred']),0,0,'R');
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['solde_deb']),0,0,'R');
+ $pdf->Cell(20,6,nbm(${'nlvl'.$ind}['solde_cred']),0,0,'R');
+ $pdf->Ln();
+ $pdf->SetFont('DejaVuCond','',7);
+ ${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind);
+ foreach(array('sum_cred','sum_deb','solde_deb','solde_cred') as $a)
+ {
+ ${'nlvl'.$ind}[$a]=0;
+ }
+ }
+ }
+
+ // Totaux
+ $pdf->SetFont('DejaVuCond','B',8);
+ $pdf->Cell(110,6,'Totaux');
+ $pdf->Cell(20,6,nbm($tp_deb),'T',0,'R',0);
+ $pdf->Cell(20,6,nbm($tp_cred),'T',0,'R',0);
+ $pdf->Cell(20,6,nbm($tp_sold),'T',0,'R',0);
+ $pdf->Cell(20,6,nbm($tp_solc),'T',0,'R',0);
$pdf->Ln();
- $tp_deb=bcadd($tp_deb,$array[$i]['sum_deb']);
- $tp_cred=bcadd($tp_cred,$array[$i]['sum_cred']);
- $tp_sold=bcadd($tp_sold,$array[$i]['solde_deb']);
- $tp_solc=bcadd($tp_solc,$array[$i]['solde_cred']);
+ } // if ! empty
-}
-// Totaux
-$pdf->SetFont('DejaVuCond','B',8);
-$pdf->Cell(110,6,'Totaux');
-$pdf->Cell(20,6,nbm($tp_deb),'T',0,'R',0);
-$pdf->Cell(20,6,nbm($tp_cred),'T',0,'R',0);
-$pdf->Cell(20,6,nbm($tp_sold),'T',0,'R',0);
-$pdf->Cell(20,6,nbm($tp_solc),'T',0,'R',0);
-$pdf->Ln();
-
-
$fDate=date('dmy-Hi');
$pdf->Output('balance-'.$fDate.'.pdf','I');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4186 - in phpcompta/trunk: . html/document/fr_be include,
phpcompta-dev <=