|
noalyss
Version-6.7.2
|
Public Member Functions | |
| __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") | |
Data Fields | |
| $cn = null | |
| $date = "" | |
| $dossier = "n/a" | |
| $own = null | |
| $soc = "" | |
Definition at line 28 of file class_pdf.php.
| PDF::__construct | ( | $ | p_cn = null, |
| $ | orientation = 'P', |
||
| $ | unit = 'mm', |
||
| $ | format = 'A4' |
||
| ) |
Reimplemented in PDFLand.
Definition at line 37 of file class_pdf.php.
References cn.
{
$this->bigger=0;
if($p_cn == null) die("No database connection. Abort.");
parent::TFPDF($orientation, $unit, $format);
$this->AddFont('DejaVu','','DejaVuSans.ttf',true);
$this->AddFont('DejaVu','B','DejaVuSans-Bold.ttf',true);
$this->AddFont('DejaVu','BI','DejaVuSans-BoldOblique.ttf',true);
$this->AddFont('DejaVuCond','','DejaVuSansCondensed.ttf',true);
$this->AddFont('DejaVuCond','B','DejaVuSansCondensed-Bold.ttf',true);
$this->AddFont('DejaVuCond','I','DejaVuSansCondensed-Oblique.ttf',true);
date_default_timezone_set ('Europe/Paris');
$this->cn = $p_cn;
$this->own = new own($this->cn);
$this->soc = $this->own->MY_NAME;
$this->date = date('d.m.Y');
}
| PDF::Cell | ( | $ | w, |
| $ | h = 0, |
||
| $ | txt = '', |
||
| $ | border = 0, |
||
| $ | ln = 0, |
||
| $ | align = '', |
||
| $ | fill = false, |
||
| $ | link = '' |
||
| ) |
Reimplemented in Print_Ledger_Simple, Print_Ledger_Simple_Without_Vat, Print_Ledger_Detail_Item, and Print_Ledger_Detail.
Definition at line 83 of file class_pdf.php.
Referenced by Print_Ledger_Financial\export(), Print_Ledger_Misc\export(), Print_Ledger_Misc\Footer(), Print_Ledger_Financial\Footer(), Footer(), PDFLand\Footer(), Print_Ledger_Misc\Header(), Print_Ledger_Financial\Header(), Header(), PDFLand\Header(), and PDFBalance_simple\Header().
{
$txt = str_replace("\\", "", $txt);
return parent::Cell($w, $h, $txt, $border, $ln, $align, $fill, $link);
}
| PDF::Footer | ( | ) |
Reimplemented in PDFLand, Print_Ledger_Simple, Print_Ledger_Simple_Without_Vat, Print_Ledger_Detail_Item, Print_Ledger_Detail, Print_Ledger_Financial, and Print_Ledger_Misc.
Definition at line 71 of file class_pdf.php.
{
//Position at 2 cm from bottom
$this->SetY(-20);
//Arial italic 8
$this->SetFont('Arial', '', 8);
//Page number
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
$this->Ln(3);
// Created by NOALYSS
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
}
| PDF::get_tiers | ( | $ | p_jr_id, |
| $ | p_jrn_type | ||
| ) |
retrieve the client name and quick_code
| $p_jr_id | jrn.jr_id |
| $p_jrn_type | ledger type ACH VEN FIN |
Definition at line 116 of file class_pdf.php.
References $array, $fiche, and cn.
Referenced by Print_Ledger_Simple_Without_Vat\export(), and Print_Ledger_Simple\export().
{
if ( $p_jrn_type=='ACH' )
{
$array=$this->cn->get_array('SELECT
jrnx.j_grpt,
quant_purchase.qp_supplier,
quant_purchase.qp_internal,
jrn.jr_internal
FROM
public.quant_purchase,
public.jrnx,
public.jrn
WHERE
quant_purchase.j_id = jrnx.j_id AND
jrnx.j_grpt = jrn.jr_grpt_id and jr_id=$1',array($p_jr_id));
if (count($array)==0) return array("ERREUR $p_jr_id",'');
$customer_id=$array[0]['qp_supplier'];
$fiche=new Fiche($this->cn,$customer_id);
$customer_qc=$fiche->get_quick_code($customer_id);
$customer_name=$fiche->getName();
return array($customer_qc,$customer_name);
}
if ( $p_jrn_type=='VEN' )
{
$array=$this->cn->get_array('SELECT
quant_sold.qs_client
FROM
public.quant_sold,
public.jrnx,
public.jrn
WHERE
quant_sold.j_id = jrnx.j_id AND
jrnx.j_grpt = jrn.jr_grpt_id and jr_id=$1',array($p_jr_id));
if (count($array)==0) return array("ERREUR $p_jr_id",'');
$customer_id=$array[0]['qs_client'];
$fiche=new Fiche($this->cn,$customer_id);
$customer_qc=$fiche->get_quick_code($customer_id);
$customer_name=$fiche->getName();
return array($customer_qc,$customer_name);
}
if ( $p_jrn_type=='FIN' )
{
$array=$this->cn->get_array('SELECT
qf_other,qf_bank
FROM
public.quant_fin
WHERE
quant_fin.jr_id =$1',array($p_jr_id));
if (count($array)==0) return array("ERREUR $p_jr_id",'','','');
$customer_id=$array[0]['qf_other'];
$fiche=new Fiche($this->cn,$customer_id);
$customer_qc=$fiche->get_quick_code($customer_id);
$customer_name=$fiche->getName();
$bank_id=$array[0]['qf_bank'];
$fiche=new Fiche($this->cn,$bank_id);
$bank_qc=$fiche->get_quick_code($bank_id);
$bank_name=$fiche->getName();
return array($customer_qc,$customer_name,$bank_qc,$bank_name);
}
}
| PDF::Header | ( | ) |
Reimplemented in PDFBalance_simple, PDFLand, Print_Ledger_Simple, Print_Ledger_Simple_Without_Vat, Print_Ledger_Detail_Item, Print_Ledger_Detail, Print_Ledger_Financial, and Print_Ledger_Misc.
Definition at line 62 of file class_pdf.php.
| PDF::Ln | ( | $ | p_step = null | ) |
Definition at line 104 of file class_pdf.php.
Referenced by Print_Ledger_Financial\export(), Print_Ledger_Misc\export(), Print_Ledger_Detail\export(), Print_Ledger_Detail_Item\export(), Print_Ledger_Simple_Without_Vat\export(), Print_Ledger_Simple\export(), Print_Ledger_Financial\Footer(), Print_Ledger_Misc\Footer(), Print_Ledger_Detail_Item\Footer(), Footer(), Print_Ledger_Simple_Without_Vat\Footer(), Print_Ledger_Simple\Footer(), PDFLand\Footer(), Print_Ledger_Financial\Header(), Print_Ledger_Misc\Header(), Print_Ledger_Detail\Header(), Print_Ledger_Detail_Item\Header(), Print_Ledger_Simple_Without_Vat\Header(), Header(), Print_Ledger_Simple\Header(), PDFLand\Header(), and PDFBalance_simple\Header().
{
if ( $this->bigger==0) parent::Ln($p_step);
parent::Ln($this->bigger);
$this->bigger=0;
}
| PDF::LongLine | ( | $ | w, |
| $ | h, | ||
| $ | txt, | ||
| $ | border = 0, |
||
| $ | align = '', |
||
| $ | fill = false |
||
| ) |
Definition at line 88 of file class_pdf.php.
References $align, $tmp, $w, and h().
Referenced by Print_Ledger_Financial\export(), Print_Ledger_Misc\export(), Print_Ledger_Detail\export(), Print_Ledger_Detail_Item\export(), Print_Ledger_Simple_Without_Vat\export(), and Print_Ledger_Simple\export().
{
$x_m=$this->GetX();
$y_m=$this->GetY();
$txt = str_replace("\\", "", $txt);
if ( $y_m > ($this->h-$this->bMargin-10 )) {
$this->AddPage ();
$y_m=$this->GetY();
}
$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);
}
| PDF::setDossierInfo | ( | $ | dossier = "n/a" | ) |
Reimplemented in Print_Ledger_Simple, Print_Ledger_Simple_Without_Vat, Print_Ledger_Detail, and Print_Ledger_Detail_Item.
Definition at line 57 of file class_pdf.php.
References $dossier, and name.
{
$this->dossier = dossier::name()." ".$dossier;
}
| PDF::$cn = null |
Definition at line 31 of file class_pdf.php.
| PDF::$date = "" |
Definition at line 35 of file class_pdf.php.
| PDF::$dossier = "n/a" |
Definition at line 34 of file class_pdf.php.
Referenced by Print_Ledger_Detail_Item\setDossierInfo(), Print_Ledger_Detail\setDossierInfo(), Print_Ledger_Simple_Without_Vat\setDossierInfo(), setDossierInfo(), and Print_Ledger_Simple\setDossierInfo().
| PDF::$own = null |
Definition at line 32 of file class_pdf.php.
| PDF::$soc = "" |
Definition at line 33 of file class_pdf.php.