phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4872 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4872 - phpcompta/trunk/include
Date: Sat, 9 Jun 2012 16:10:45 +0200 (CEST)

Author: danydb
Date: 2012-06-09 16:10:45 +0200 (Sat, 09 Jun 2012)
New Revision: 4872

Modified:
   phpcompta/trunk/include/class_pdf.php
   phpcompta/trunk/include/class_print_ledger_detail.php
   phpcompta/trunk/include/class_print_ledger_fin.php
   phpcompta/trunk/include/class_print_ledger_misc.php
   phpcompta/trunk/include/class_print_ledger_simple.php
   phpcompta/trunk/include/class_print_ledger_simple_without_vat.php
   phpcompta/trunk/include/export_poste_detail_pdf.php
Log:
0000012: Impression PDF : libell?\195?\169 trop longs

Modified: phpcompta/trunk/include/class_pdf.php
===================================================================
--- phpcompta/trunk/include/class_pdf.php       2012-06-09 13:51:27 UTC (rev 
4871)
+++ phpcompta/trunk/include/class_pdf.php       2012-06-09 14:10:45 UTC (rev 
4872)
@@ -37,7 +37,7 @@
 
     public function __construct ($p_cn = null, $orientation = 'P', $unit = 
'mm', $format = 'A4')
     {
-
+               $this->bigger=0;
         if($p_cn == null) die("No database connection. Abort.");
 
         parent::TFPDF($orientation, $unit, $format);
@@ -85,7 +85,23 @@
     {
         $txt = str_replace("\\", "", $txt);
         return parent::Cell($w, $h, $txt, $border, $ln, $align, $fill, $link);
-    }
+               }
+       function LongLine($w,$h,$txt,$border=0,$align='',$fill=false)
+       {
+               $x_m=$this->GetX();
+               $y_m=$this->GetY();
+               $txt = str_replace("\\", "", $txt);
+               $this->MultiCell($w,$h,$txt,$border,$align,$fill);
+               $x_m=$x_m+$w;
+               $tmp=$this->GetY()-$y_m;
+               if ( $tmp > $this->bigger) $this->bigger=$tmp;
+               $this->SetXY($x_m,$y_m);
+       }
+       function Ln($p_step=null){
+               if ( $this->bigger==0) parent::Ln($p_step);
+               parent::Ln($this->bigger);
+               $this->bigger=0;
+       }
     /**
      address@hidden retrieve the client name and quick_code
      address@hidden $p_jr_id jrn.jr_id

Modified: phpcompta/trunk/include/class_print_ledger_detail.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_detail.php       2012-06-09 
13:51:27 UTC (rev 4871)
+++ phpcompta/trunk/include/class_print_ledger_detail.php       2012-06-09 
14:10:45 UTC (rev 4872)
@@ -96,10 +96,10 @@
             $this->Cell(20,7,$row['pj']);
             $this->Cell(15,7,$row['date_fmt']);
             $this->Cell(20,7,$row['internal']);
-            $this->Cell(170,7,$row['comment']);
+            $this->LongLine(170,7,$row['comment']);
             $this->Cell(20,7,nbm($row['montant']),0,0,'R');
 
-            $this->Ln(4);
+            $this->Ln();
             // get the entries
             $aEntry=$this->cn->get_array("select 
j_id,j_poste,j_qcode,j_montant,j_debit, j_text,".
                                                                                
 " case when j_text='' or j_text is null then pcm_lib else j_text end as desc,".

Modified: phpcompta/trunk/include/class_print_ledger_fin.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_fin.php  2012-06-09 13:51:27 UTC 
(rev 4871)
+++ phpcompta/trunk/include/class_print_ledger_fin.php  2012-06-09 14:10:45 UTC 
(rev 4872)
@@ -88,9 +88,9 @@
             $this->Cell(40,5,$name,0,0);
 
 
-            $this->Cell(105,5,$row['comment'],0,0);
+            $this->LongLine(105,5,$row['comment'],0,'L');
             $amount=$this->cn->get_value('select qf_amount from quant_fin 
where jr_id=$1',array( $row['id']));
-            $this->Cell(15,5,sprintf('%.2f',$amount),0,0,'R');
+            $this->Cell(15,5,sprintf('%s',nbm($amount)),0,0,'R');
             $this->Ln(5);
 
         }

Modified: phpcompta/trunk/include/class_print_ledger_misc.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_misc.php 2012-06-09 13:51:27 UTC 
(rev 4871)
+++ phpcompta/trunk/include/class_print_ledger_misc.php 2012-06-09 14:10:45 UTC 
(rev 4872)
@@ -83,8 +83,8 @@
             $this->Cell(20,5,$row['internal']);
            $type=$this->cn->get_value("select jrn_def_type from jrn_def where 
jrn_def_id=$1",array($a_jrn[$i]['jr_def_id']));
            
$other=mb_substr($this->ledger->get_tiers($type,$a_jrn[$i]['id']),0,25);
-           $this->Cell(25,5,$other,0,0);
-            $this->Cell(80,5,$row['comment'],0,0);
+           $this->LongLine(25,5,$other,0,'L');
+            $this->LongLine(80,5,$row['comment'],0,'L');
             $this->Cell(15,5,nbm($row['montant']),0,0,'R');
             $this->Ln(5);
 

Modified: phpcompta/trunk/include/class_print_ledger_simple.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_simple.php       2012-06-09 
13:51:27 UTC (rev 4871)
+++ phpcompta/trunk/include/class_print_ledger_simple.php       2012-06-09 
14:10:45 UTC (rev 4872)
@@ -229,9 +229,9 @@
             $this->Cell(10,5,$row['date_fmt'],0,0);
             $this->Cell(13,5,$row['internal'],0,0);
             list($qc,$name)=$this->get_tiers($row['id'],$this->jrn_type);
-            $this->Cell(40,5,"[".$qc."]".$name,0,0);
+            $this->LongLine(40,5,"[".$qc."]".$name,0,'L');
 
-            $this->Cell(65,5,mb_substr($row['comment'],0,47),0,0);
+            $this->LongLine(65,5,mb_substr($row['comment'],0,150),0,'L');
 
             /* get other amount (without vat, total vat included, private, ND 
*/
             $other=$this->ledger->get_other_amount($a_jrn[$i]['jr_grpt_id']);

Modified: phpcompta/trunk/include/class_print_ledger_simple_without_vat.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_simple_without_vat.php   
2012-06-09 13:51:27 UTC (rev 4871)
+++ phpcompta/trunk/include/class_print_ledger_simple_without_vat.php   
2012-06-09 14:10:45 UTC (rev 4872)
@@ -163,9 +163,9 @@
             $this->Cell(20,5,$row['internal'],0,0);
             list($qc,$name)=$this->get_tiers($row['id'],$this->jrn_type);
             $this->Cell(20,5,$qc,0,0);
-            $this->Cell(40,5,$name,0,0);
+            $this->LongLine(40,5,$name,0,'L');
 
-            $this->Cell(105,5,$row['comment'],0,0);
+            $this->LongLine(105,5,$row['comment'],0,'L');
 
             /* get other amount (without vat, total vat included, private, ND 
*/
             $other=$this->ledger->get_other_amount($a_jrn[$i]['jr_grpt_id']);

Modified: phpcompta/trunk/include/export_poste_detail_pdf.php
===================================================================
--- phpcompta/trunk/include/export_poste_detail_pdf.php 2012-06-09 13:51:27 UTC 
(rev 4871)
+++ phpcompta/trunk/include/export_poste_detail_pdf.php 2012-06-09 14:10:45 UTC 
(rev 4872)
@@ -86,7 +86,7 @@
     $l++;
     $pdf->Cell($size[$l],6,'Journal',0,0,'C');
     $l++;
-    $pdf->Cell($size[$l],6,'Libellé',0,0,'L');
+    $pdf->LongLine($size[$l],6,'Libellé',0,'L');
     $l++;
     $pdf->Cell($size[$l],6,'Let',0,0,'R');
     $l++;
@@ -116,7 +116,7 @@
         $l++;
         
$pdf->Cell($size[$l],6,mb_substr($row['jrn_name'],0,14),0,0,$align[$l]);
         $l++;
-        $pdf->Cell($size[$l],6,  
mb_substr($row['description'],0,55),0,0,$align[$l]);
+        $pdf->LongLine($size[$l],6,  $row['description'],0,$align[$l]);
         $l++;
         
$pdf->Cell($size[$l],6,(($row['letter']!=-1)?$row['letter']:''),0,0,$align[$l]);
         $l++;



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]