[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 04/12: #1251 : impression PDF Les Headers et
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 04/12: #1251 : impression PDF Les Headers et Footer ne doivent pas utiliser write_celle et ln |
Date: |
Mon, 25 Jan 2016 22:58:36 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit b92a8780cc551d781c007be5f6efd0adcda29b20
Author: Dany De Bontridder <address@hidden>
Date: Sun Jan 24 15:57:25 2016 +0100
#1251 : impression PDF
Les Headers et Footer ne doivent pas utiliser write_celle et ln
---
include/class/class_print_ledger_detail_item.php | 30 ++++++------
include/class/class_print_ledger_simple.php | 36 +++++++-------
.../class_print_ledger_simple_without_vat.php | 52 ++++++++++----------
3 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/include/class/class_print_ledger_detail_item.php
b/include/class/class_print_ledger_detail_item.php
index 8562127..a14db41 100644
--- a/include/class/class_print_ledger_detail_item.php
+++ b/include/class/class_print_ledger_detail_item.php
@@ -49,21 +49,21 @@ class Print_Ledger_Detail_Item extends PDFLand
//Arial bold 12
$this->SetFont('DejaVu', 'B', 12);
//Title
- $this->write_cell(0,10,$this->dossier, 'B', 0, 'C');
+ $this->Cell(0,10,$this->dossier, 'B', 0, 'C');
//Line break
- $this->line_new(20);
+ $this->Ln(20);
$high=6;
$this->SetFont('DejaVu', '', 6);
$this->LongLine(20, $high, _('Date'),0, 'L', false);
- $this->write_cell(20, $high, _('Numéro interne'), 0, 0, 'L', false);
+ $this->Cell(20, $high, _('Numéro interne'), 0, 0, 'L', false);
$this->LongLine(50, $high, _('Code'),0,'L',false);
$this->LongLine(80, $high, _('Libellé'),0,'L',false);
- $this->write_cell(20, $high, _('Tot HTVA'), 0, 0, 'R', false);
- $this->write_cell(20, $high, _('Tot TVA NP'), 0, 0, 'R', false);
- $this->write_cell(20, $high, "", 0, 0, 'R', false);
- $this->write_cell(20, $high, _('Tot TVA'), 0, 0, 'R', false);
- $this->write_cell(20, $high, _('TVAC'), 0, 0, 'R', false);
- $this->line_new(6);
+ $this->Cell(20, $high, _('Tot HTVA'), 0, 0, 'R', false);
+ $this->Cell(20, $high, _('Tot TVA NP'), 0, 0, 'R', false);
+ $this->Cell(20, $high, "", 0, 0, 'R', false);
+ $this->Cell(20, $high, _('Tot TVA'), 0, 0, 'R', false);
+ $this->Cell(20, $high, _('TVAC'), 0, 0, 'R', false);
+ $this->Ln(6);
$this->show_col=true;
}
@@ -72,14 +72,14 @@ class Print_Ledger_Detail_Item extends PDFLand
*/
function Footer()
{
- $this->line_new(2);
+ $this->Ln(2);
$this->SetFont('Arial', 'I', 8);
- $this->write_cell(50,8,' Journal '.$this->ledger->get_name(),0,0,'C');
+ $this->Cell(50,8,' Journal '.$this->ledger->get_name(),0,0,'C');
//Arial italic 8
//Page number
- $this->write_cell(30,8,'Date '.$this->date." - Page
".$this->PageNo().'/{nb}',0,0,'L');
+ $this->Cell(30,8,'Date '.$this->date." - Page
".$this->PageNo().'/{nb}',0,0,'L');
// Created by NOALYSS
- $this->write_cell(0,8,'Created by NOALYSS, online on
http://www.noalyss.eu',0,0,'R',false,'http://www.noalyss.eu');
+ $this->Cell(0,8,'Created by NOALYSS, online on
http://www.noalyss.eu',0,0,'R',false,'http://www.noalyss.eu');
}
@@ -144,7 +144,7 @@ class Print_Ledger_Detail_Item extends PDFLand
$this->write_cell(20,$high,'Code TVA');
$this->write_cell(20,$high,'TVA',0,0,'R');
$this->write_cell(20,$high,'TVAC',0,0,'R');
- $this->line_new(6);
+ $this->Ln(6);
$this->show_col=false;
}
}
@@ -161,7 +161,7 @@ class Print_Ledger_Detail_Item extends PDFLand
$this->write_cell(20,$high,nbm($row['vat']),0,0,'R');
$sum=bcadd($row['price'],$row['vat']);
$this->write_cell(20,$high,nbm($sum),0,0,'R');
- $this->line_new(6);
+ $this->Ln(6);
}
}
diff --git a/include/class/class_print_ledger_simple.php
b/include/class/class_print_ledger_simple.php
index af25ff3..26e0c93 100644
--- a/include/class/class_print_ledger_simple.php
+++ b/include/class/class_print_ledger_simple.php
@@ -151,46 +151,46 @@ class Print_Ledger_Simple extends PDF
//Position at 3 cm from bottom
$this->SetY(-20);
/* write reporting */
- $this->write_cell(143,6,'Total page ','T',0,'R'); /* HTVA */
- $this->write_cell(15,6,nbm($this->tp_htva),'T',0,'R'); /* HTVA */
+ $this->Cell(143,6,'Total page ','T',0,'R'); /* HTVA */
+ $this->Cell(15,6,nbm($this->tp_htva),'T',0,'R'); /* HTVA */
if ( $this->jrn_type !='VEN')
{
- $this->write_cell(15,6,nbm($this->tp_priv),'T',0,'R'); /* prive */
- $this->write_cell(15,6,nbm($this->tp_nd),'T',0,'R'); /* Tva ND */
+ $this->Cell(15,6,nbm($this->tp_priv),'T',0,'R'); /* prive */
+ $this->Cell(15,6,nbm($this->tp_nd),'T',0,'R'); /* Tva ND */
}
- $this->write_cell(15,6,nbm($this->tp_tva_np),'T',0,'R'); /* Tva
Unpaid */
+ $this->Cell(15,6,nbm($this->tp_tva_np),'T',0,'R'); /* Tva Unpaid */
foreach($this->a_Tva as $line_tva)
{
$l=$line_tva['tva_id'];
- $this->write_cell(15,6,nbm($this->tp_tva[$l]),'T',0,'R');
+ $this->Cell(15,6,nbm($this->tp_tva[$l]),'T',0,'R');
}
- $this->write_cell(15,6,nbm($this->tp_tvac),'T',0,'R'); /* Tvac */
- $this->line_new(2);
+ $this->Cell(15,6,nbm($this->tp_tvac),'T',0,'R'); /* Tvac */
+ $this->Ln(2);
- $this->write_cell(143,6,'report',0,0,'R'); /* HTVA */
- $this->write_cell(15,6,nbm($this->rap_htva),0,0,'R'); /* HTVA */
+ $this->Cell(143,6,'report',0,0,'R'); /* HTVA */
+ $this->Cell(15,6,nbm($this->rap_htva),0,0,'R'); /* HTVA */
if ( $this->jrn_type !='VEN')
{
- $this->write_cell(15,6,nbm($this->rap_priv),0,0,'R'); /* prive */
- $this->write_cell(15,6,nbm($this->rap_nd),0,0,'R'); /* Tva ND */
+ $this->Cell(15,6,nbm($this->rap_priv),0,0,'R'); /* prive */
+ $this->Cell(15,6,nbm($this->rap_nd),0,0,'R'); /* Tva ND */
}
- $this->write_cell(15,6,nbm($this->rap_tva_np),0,0,'R'); /* Tva ND */
+ $this->Cell(15,6,nbm($this->rap_tva_np),0,0,'R'); /* Tva ND */
foreach($this->a_Tva as $line_tva)
{
$l=$line_tva['tva_id'];
- $this->write_cell(15,6,nbm($this->rap_tva[$l]),0,0,'R');
+ $this->Cell(15,6,nbm($this->rap_tva[$l]),0,0,'R');
}
- $this->write_cell(15,6,nbm($this->rap_tvac),0,0,'R'); /* Tvac */
- $this->line_new(2);
+ $this->Cell(15,6,nbm($this->rap_tvac),0,0,'R'); /* Tvac */
+ $this->Ln(2);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
- $this->write_cell(0,8,'Date '.$this->date." - Page
".$this->PageNo().'/{nb}',0,0,'L');
+ $this->Cell(0,8,'Date '.$this->date." - Page
".$this->PageNo().'/{nb}',0,0,'L');
// Created by NOALYSS
- $this->write_cell(0,8,'Created by NOALYSS, online on
http://www.noalyss.eu',0,0,'R',false,'http://www.noalyss.eu');
+ $this->Cell(0,8,'Created by NOALYSS, online on
http://www.noalyss.eu',0,0,'R',false,'http://www.noalyss.eu');
}
diff --git a/include/class/class_print_ledger_simple_without_vat.php
b/include/class/class_print_ledger_simple_without_vat.php
index c45c0a4..6988ff1 100644
--- a/include/class/class_print_ledger_simple_without_vat.php
+++ b/include/class/class_print_ledger_simple_without_vat.php
@@ -63,40 +63,40 @@ class Print_Ledger_Simple_Without_Vat extends PDF
//Arial bold 12
$this->SetFont('DejaVu', 'B', 12);
//Title
- $this->write_cell(0,10,$this->dossier, 'B', 0, 'C');
+ $this->Cell(0,10,$this->dossier, 'B', 0, 'C');
//Line break
- $this->line_new(20);
+ $this->Ln(20);
$this->SetFont('DejaVu', 'B', 8);
/* column header */
- $this->write_cell(15,6,'Pièce');
- $this->write_cell(15,6,'Date');
- $this->write_cell(20,6,'ref');
+ $this->Cell(15,6,'Pièce');
+ $this->Cell(15,6,'Date');
+ $this->Cell(20,6,'ref');
if ( $this->jrn_type=='ACH')
- $this->write_cell(60,6,'Client');
+ $this->Cell(60,6,'Client');
else
- $this->write_cell(60,6,'Fournisseur');
- $this->write_cell(105,6,'Commentaire');
+ $this->Cell(60,6,'Fournisseur');
+ $this->Cell(105,6,'Commentaire');
if ( $this->jrn_type=='ACH')
{
- $this->write_cell(15,6,'Privé',0,0,'R');
+ $this->Cell(15,6,'Privé',0,0,'R');
}
- $this->write_cell(15,6,'Prix',0,0,'R');
+ $this->Cell(15,6,'Prix',0,0,'R');
- $this->line_new(5);
+ $this->Ln(5);
$this->SetFont('DejaVu','',6);
// page Header
- $this->write_cell(215,6,'report',0,0,'R'); /* HTVA */
+ $this->Cell(215,6,'report',0,0,'R'); /* HTVA */
if ( $this->jrn_type != 'VEN')
{
- $this->write_cell(15,6,sprintf('%.2f',$this->rap_priv),0,0,'R');
/* prive */
+ $this->Cell(15,6,sprintf('%.2f',$this->rap_priv),0,0,'R'); /*
prive */
}
- $this->write_cell(15,6,sprintf('%.2f',$this->rap_htva),0,0,'R'); /*
HTVA */
+ $this->Cell(15,6,sprintf('%.2f',$this->rap_htva),0,0,'R'); /* HTVA */
- $this->line_new(6);
+ $this->Ln(6);
//total page
$this->tp_htva=0.0;
$this->tp_tvac=0.0;
@@ -111,29 +111,29 @@ class Print_Ledger_Simple_Without_Vat extends PDF
//Position at 3 cm from bottom
$this->SetY(-20);
/* write reporting */
- $this->write_cell(215,6,'Total page ','T',0,'R'); /* HTVA */
+ $this->Cell(215,6,'Total page ','T',0,'R'); /* HTVA */
if ( $this->jrn_type !='VEN')
{
- $this->write_cell(15,6,sprintf('%.2f',$this->tp_priv),'T',0,'R');
/* prive */
+ $this->Cell(15,6,sprintf('%.2f',$this->tp_priv),'T',0,'R'); /*
prive */
}
- $this->write_cell(15,6,sprintf('%.2f',$this->tp_htva),'T',0,'R'); /*
HTVA */
- $this->write_cell(0,6,'','T',0,'R'); /* line */
- $this->line_new(2);
+ $this->Cell(15,6,sprintf('%.2f',$this->tp_htva),'T',0,'R'); /* HTVA */
+ $this->Cell(0,6,'','T',0,'R'); /* line */
+ $this->Ln(2);
- $this->write_cell(215,6,'report',0,0,'R'); /* HTVA */
+ $this->Cell(215,6,'report',0,0,'R'); /* HTVA */
if ( $this->jrn_type !='VEN')
{
- $this->write_cell(15,6,sprintf('%.2f',$this->rap_priv),0,0,'R');
/* prive */
+ $this->Cell(15,6,sprintf('%.2f',$this->rap_priv),0,0,'R'); /*
prive */
}
- $this->write_cell(15,6,sprintf('%.2f',$this->rap_htva),0,0,'R'); /*
HTVA */
- $this->line_new(2);
+ $this->Cell(15,6,sprintf('%.2f',$this->rap_htva),0,0,'R'); /* HTVA */
+ $this->Ln(2);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
- $this->write_cell(0,8,'Date '.$this->date." - Page
".$this->PageNo().'/{nb}',0,0,'L');
+ $this->Cell(0,8,'Date '.$this->date." - Page
".$this->PageNo().'/{nb}',0,0,'L');
// Created by NOALYSS
- $this->write_cell(0,8,'Created by NOALYSS, online on
http://www.noalyss.eu',0,0,'R',false,'http://www.noalyss.eu');
+ $this->Cell(0,8,'Created by NOALYSS, online on
http://www.noalyss.eu',0,0,'R',false,'http://www.noalyss.eu');
}
/**
- [Noalyss-commit] [noalyss] branch master updated (8f47684 -> 01d9cf0), Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 05/12: Update comment for belong_ledger, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 01/12: Problem read README.export-PDF, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 07/12: Debugging info to remove, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 03/12: Task #3 - Problem avec export PDF depuis COMPTA/PRINT/PRINTJRN Cannot remove a shared note, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 04/12: #1251 : impression PDF Les Headers et Footer ne doivent pas utiliser write_celle et ln,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 10/12: Compute the height of a MultiCell and check is a page must be added, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 06/12: Update unit-test to new structure, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 12/12: Merge branch 'rel6912-export-pdf', Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 11/12: Fix problem with PDF and the empty page due a wrong page break, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 02/12: #1251 impression PDF Remove function Cell that fct cannot be overloaded Change Cell by write_cell change ln by print_row, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 09/12: HTML doc, Dany De Bontridder, 2016/01/25
- [Noalyss-commit] [noalyss] 08/12: update doc, Dany De Bontridder, 2016/01/25