43 parent::__construct($p_cn,
'L',
'mm',
'A4',
$p_jrn,$p_from,$p_to,$p_filter_operation);
44 $this->jrn_type=
$p_jrn->get_type();
51 $this->previous=$this->
get_ledger()->previous_amount($p_from);
54 $this->rap_htva=$this->previous[
'price'];
55 $this->rap_tvac=$this->previous[
'price'];
56 $this->rap_priv=$this->previous[
'priv'];
62 $this->dossier = dossier::name().
" ".
$dossier;
70 $this->SetFont(
'DejaVu',
'B', 12);
72 $this->Cell(0,10,$this->dossier,
'B', 0,
'C');
75 $this->SetFont(
'DejaVu',
'B', 8);
77 $this->Cell(15,6,
'Pièce');
78 $this->Cell(15,6,
'Date');
79 $this->Cell(20,6,
'ref');
80 if ( $this->jrn_type==
'ACH')
81 $this->Cell(60,6,
'Client');
83 $this->Cell(60,6,
'Fournisseur');
84 $this->Cell(105,6,
'Commentaire');
85 if ( $this->jrn_type==
'ACH')
87 $this->Cell(15,6,
'Privé',0,0,
'R');
89 $this->Cell(15,6,
'Prix',0,0,
'R');
93 $this->SetFont(
'DejaVu',
'',6);
95 $this->Cell(215,6,
'report',0,0,
'R');
96 if ( $this->jrn_type !=
'VEN')
98 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_priv),0,0,
'R');
100 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_htva),0,0,
'R');
120 $this->Cell(215,6,
'Total page ',
'T',0,
'R');
121 if ( $this->jrn_type !=
'VEN')
123 $this->Cell(15,6,sprintf(
'%.2f',$this->tp_priv),
'T',0,
'R');
125 $this->Cell(15,6,sprintf(
'%.2f',$this->tp_htva),
'T',0,
'R');
126 $this->Cell(0,6,
'',
'T',0,
'R');
129 $this->Cell(215,6,
'report',0,0,
'R');
130 if ( $this->jrn_type !=
'VEN')
132 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_priv),0,0,
'R');
134 $this->Cell(15,6,sprintf(
'%.2f',$this->rap_htva),0,0,
'R');
138 $this->SetFont(
'Arial',
'I', 8);
140 $this->Cell(0,8,
'Date '.$this->date.
" - Page ".$this->PageNo().
'/{nb}',0,0,
'L');
142 $this->Cell(0,8,
'Created by NOALYSS, online on https://www.noalyss.eu',0,0,
'R',
false,
'https://www.noalyss.eu');
158 $ledger_history->get_row();
159 $a_jrn=$ledger_history->get_data();
161 if ( empty($a_jrn ) )
return;
165 $prepared_query->prepare_reconcile_date();
169 for (
$i=0;
$i<count($a_jrn);
$i++)
184 $this->tp_htva+=
$other[
'price'];
185 $this->tp_priv+=
$other[
'priv'];
186 $this->rap_htva+=
$other[
'price'];
187 $this->rap_priv+=
$other[
'priv'];
190 if ( $ledger_history->get_ledger_type() !=
'VEN')
203 $msg=(
$row[
'qcode_bank'] !=
"")?
"[".
$row[
'qcode_bank'].
"]":
$row[
'jr_internal'];
204 $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)
write_cell($width, $height=0, $txt='', $border=0, $interline=0, $align='', $fill=false, $link='')
add a cell the text is not cut and don't return to this line if too large
write_multi($width, $interline, $txt, $border=0, $align='', $fill=false)
add a cell with automatic return to the line if the text is too long
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.