phpcompta  Version-6
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions
Print_Ledger_Financial Class Reference
Inheritance diagram for Print_Ledger_Financial:
PDF TFPDF

Public Member Functions

 __construct ($p_cn, $p_jrn)
 
 export ()
 print the pdf for a financial ledger
 
 Footer ()
 
 Header ()
 
- Public Member Functions inherited from PDF
 __construct ($p_cn=null, $orientation= 'P', $unit= 'mm', $format= 'A4')
 
 Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
 
 Footer ()
 
 get_tiers ($p_jr_id, $p_jrn_type)
 retrieve the client name and quick_code
 
 Header ()
 
 Ln ($p_step=null)
 
 LongLine ($w, $h, $txt, $border=0, $align='', $fill=false)
 
 setDossierInfo ($dossier="n/a")
 

Additional Inherited Members

- Data Fields inherited from PDF
 $cn = null
 
 $date = ""
 
 $dossier = "n/a"
 
 $own = null
 
 $soc = ""
 

Detailed Description

Definition at line 27 of file class_print_ledger_fin.php.

Constructor & Destructor Documentation

Print_Ledger_Financial::__construct (   $p_cn,
  $p_jrn 
)

Definition at line 29 of file class_print_ledger_fin.php.

{
parent::__construct($p_cn,'L','mm','A4');
$this->ledger=$p_jrn;
$this->jrn_type=$p_jrn->get_type();
}

Member Function Documentation

Print_Ledger_Financial::export ( )

print the pdf for a financial ledger

Definition at line 69 of file class_print_ledger_fin.php.

References $_GET, $amount, $i, $name, $row, PDF\Cell(), cn, PDF\Ln(), PDF\LongLine(), and nbm().

{
$a_jrn=$this->ledger->get_operation($_GET['from_periode'],
$_GET['to_periode']);
$this->SetFont('DejaVu', '', 6);
if ( $a_jrn == null ) return;
for ( $i=0;$i<count($a_jrn);$i++)
{
$row=$a_jrn[$i];
$this->Cell(30,5,$row['pj']);
$this->Cell(10,5,$row['date_fmt']);
$this->Cell(20,5,$row['internal']);
$name=$this->ledger->get_tiers($this->jrn_type,$row['id']);
$this->LongLine(40,5,$name,0,'L');
$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('%s',nbm($amount)),0,0,'R');
$this->Ln(5);
}
}
Print_Ledger_Financial::Footer ( )

Definition at line 53 of file class_print_ledger_fin.php.

References PDF\Cell(), and PDF\Ln().

{
//Position at 2 cm from bottom
$this->SetY(-20);
//Arial italic 8
$this->SetFont('Arial', 'I', 8);
//Page number
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
$this->Ln(3);
// Created by PhpCompta
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
}
Print_Ledger_Financial::Header ( )

Definition at line 35 of file class_print_ledger_fin.php.

References PDF\Cell(), and PDF\Ln().

{
//Arial bold 12
$this->SetFont('DejaVu', 'B', 12);
//Title
$this->Cell(0,10,$this->dossier, 'B', 0, 'C');
//Line break
$this->Ln(20);
$this->SetFont('DejaVu', 'B', 7);
$this->Cell(30,6,'Piece');
$this->Cell(10,6,'Date');
$this->Cell(20,6,'Interne');
$this->Cell(40,6,'Dest/Orig');
$this->Cell(105,6,'Commentaire');
$this->Cell(15,6,'Montant');
$this->Ln(6);
}

The documentation for this class was generated from the following file: