39 parent::__construct($p_cn,
'L',
'mm',
'A4',
$p_jrn,$p_from,$p_to,$p_filter_operation);
40 $this->jrn_type=
$p_jrn->get_type();
47 $this->previous=$this->
get_ledger()->previous_amount($p_from);
50 $this->rap_htva=$this->previous[
'price'];
51 $this->rap_tvac=$this->previous[
'price'];
52 $this->rap_priv=$this->previous[
'priv'];
66 $this->SetFont(
'DejaVu',
'B', 12);
68 $this->Cell(0,10,$this->dossier,
'B', 0,
'C');
71 $this->SetFont(
'DejaVu',
'B', 8);
73 $this->Cell(15,6,
'Pièce');
74 $this->Cell(15,6,
'Date');
75 $this->Cell(20,6,
'ref');
76 if ( $this->jrn_type==
'ACH')
77 $this->Cell(60,6,
'Client');
79 $this->Cell(60,6,
'Fournisseur');
80 $this->Cell(105,6,
'Commentaire');
81 if ( $this->jrn_type==
'ACH')
83 $this->Cell(15,6,
'Privé',0,0,
'R');
85 $this->Cell(15,6,
'Prix',0,0,
'R');
89 $this->SetFont(
'DejaVu',
'',6);
91 $this->Cell(215,6,
'report',0,0,
'R');
92 if ( $this->jrn_type !=
'VEN')
94 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_priv),0,0,
'R');
96 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_htva),0,0,
'R');
116 $this->Cell(215,6,
'Total page ',
'T',0,
'R');
117 if ( $this->jrn_type !=
'VEN')
119 $this->Cell(15,6,sprintf(
'%.2f',$this->tp_priv),
'T',0,
'R');
121 $this->Cell(15,6,sprintf(
'%.2f',$this->tp_htva),
'T',0,
'R');
122 $this->Cell(0,6,
'',
'T',0,
'R');
125 $this->Cell(215,6,
'report',0,0,
'R');
126 if ( $this->jrn_type !=
'VEN')
128 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_priv),0,0,
'R');
130 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_htva),0,0,
'R');
134 $this->SetFont(
'Arial',
'I', 8);
136 $this->Cell(0,8,
'Date '.$this->date.
" - Page ".$this->PageNo().
'/{nb}',0,0,
'L');
138 $this->Cell(0,8,
'Created by NOALYSS, online on https://www.noalyss.eu',0,0,
'R',
false,
'https://www.noalyss.eu');
154 $ledger_history->get_row();
155 $a_jrn=$ledger_history->get_data();
157 if ( empty($a_jrn ) )
return;
161 $prepared_query->prepare_reconcile_date();
165 for (
$i=0;
$i<count($a_jrn);
$i++)
180 $this->tp_htva+=
$other[
'price'];
181 $this->tp_priv+=
$other[
'priv'];
182 $this->rap_htva+=
$other[
'price'];
183 $this->rap_priv+=
$other[
'priv'];
186 if ( $ledger_history->get_ledger_type() !=
'VEN')
199 $msg=(
$row[
'qcode_bank'] !=
"")?
"[".
$row[
'qcode_bank'].
"]":
$row[
'jr_internal'];
200 $str_payment=
$row[
'jr_date'].$msg.$sep;
static factory(Database $cn, $pa_ledger, $p_from, $p_to, $p_mode, $p_paid)
Build the right object.
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows
line_new($p_step=null)
Print all the cell stored and call Ln (new line)
LongLine($w, $h, $txt, $border=0, $align='', $fill=false)
write_cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
get_tiers($p_jr_id, $p_jrn_type)
retrieve the client name and quick_code
contains prepared query used in different classes of the application
this class extends PDF and let you export the detailled printing of any ledgers
export()
export the ledger in PDF
Header()
write the header of each page
setDossierInfo($dossier="n/a")
__construct($p_cn, $p_jrn, $p_from, $p_to, $p_filter_operation)
Parent class for the print_ledger class.