noalyss Version-9
Public Member Functions
Print_Ledger_Misc Class Reference

print a listing of Miscelleaneous operation More...

+ Inheritance diagram for Print_Ledger_Misc:
+ Collaboration diagram for Print_Ledger_Misc:

Public Member Functions

 __construct (Database $p_cn, $p_jrn, $p_from, $p_to)
 
 export ()
 print the pdf More...
 
 Footer ()
 
 Header ()
 
- Public Member Functions inherited from Print_Ledger
 __construct (\Database $p_cn, $orientation, $unit, $format, Acc_Ledger $p_ledger, $p_from, $p_to, $p_filter_operation)
 integer parm_periode.p_id , end periode; More...
 
 get_filter_operation ()
 
 get_from ()
 
 get_ledger ()
 
 get_to ()
 
 set_filter_operation ($filter_operation)
 Filter the operations ,. More...
 
 set_from ($from)
 
 set_ledger ($ledger)
 
 set_to ($to)
 
- Public Member Functions inherited from PDF
 __construct (Database $p_cn, $orientation='P', $unit='mm', $format='A4')
 
 Footer ()
 
 get_tiers ($p_jr_id, $p_jrn_type)
 retrieve the client name and quick_code More...
 
 Header ()
 
 set_filter_operation ($filter_operation)
 
 setDossierInfo ($dossier="n/a")
 
- Public Member Functions inherited from PDF_Core
 __construct ( $orientation='P', $unit='mm', $format='A4')
 
 get_margin_bottom ()
 
 get_margin_left ()
 
 get_margin_right ()
 
 get_margin_top ()
 
 get_orientation ()
 
 get_page_size ()
 
 get_unit ()
 
 is_fill ($p_step)
 If the step is even then return 1 and set the backgroup color to blue , otherwise returns 0, and set the background color to white It is use to compute alternated colored row , it the parameter fill in write_cell and cell. More...
 
 line_new ($p_step=null)
 Print all the cell stored and call Ln (new line) More...
 
 LongLine ($w, $h, $txt, $border=0, $align='', $fill=false)
 
 write_cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
 

Additional Inherited Members

- Static Public Member Functions inherited from Print_Ledger
static available_ledger ($get_from_periode)
 find all the active ledger for the exerice of the periode and readable by the current user @global type $g_user More...
 
static factory (Database $cn, $p_type_export, Acc_Ledger $p_ledger, $p_from, $p_to, $p_filter_operation)
 Create an object Print_Ledger* depending on $p_type_export ( 0 => accounting 1-> one row per operation 2-> detail of item) More...
 
- Data Fields inherited from PDF
 $cn = null
 
 $date = ""
 
 $dossier = "n/a"
 
 $own = null
 
 $soc = ""
 
- Protected Member Functions inherited from Print_Ledger
 build_filter_operation ()
 Build a SQL clause to filter operation depending if they are paid, unpaid or no filter. More...
 
- Protected Member Functions inherited from PDF_Core
 print_row ()
 print the current array of cell and reset it , if different colors are set on the same row you have to print it before changing More...
 
- Protected Attributes inherited from Print_Ledger
 $filter_operation
 

Detailed Description

print a listing of Miscelleaneous operation

Definition at line 30 of file print_ledger_misc.class.php.

Constructor & Destructor Documentation

◆ __construct()

Print_Ledger_Misc::__construct ( Database  $p_cn,
  $p_jrn,
  $p_from,
  $p_to 
)

Reimplemented from PDF.

Definition at line 32 of file print_ledger_misc.class.php.

33 {
34 parent::__construct($p_cn,'P','mm','A4',$p_jrn,$p_from,$p_to,"all");
35 }

References $p_jrn.

Member Function Documentation

◆ export()

Print_Ledger_Misc::export ( )

print the pdf

Parameters

param

Returns
See also

Definition at line 74 of file print_ledger_misc.class.php.

75 {
76 $a_jrn=$this->get_ledger()->get_rowSimple($this->get_from(),$this->get_to());
77
78 $this->SetFont('DejaVu', '', 6);
79 if ( $a_jrn == null ) return;
80 $ledger=$this->get_ledger();
81 for ( $i=0;$i<count($a_jrn);$i++)
82 {
83 $row=$a_jrn[$i];
84
85 $this->write_cell(10,5, smaller_date($row['date']));
86 $this->LongLine(30,5,$row['jr_pj_number']);
87 $this->write_cell(20,5,$row['jr_internal']);
88 $type=$this->cn->get_value("select jrn_def_type from jrn_def where jrn_def_id=$1",array($a_jrn[$i]['jr_def_id']));
89 $other=mb_substr($ledger->get_tiers($type,$a_jrn[$i]['jr_id']),0,25);
90 $this->LongLine(25,5,$other,0,'L');
91 $positive=$row['montant'];
92 $this->LongLine(60,5,$row['comment'],0,'L');
93 if ( $type == 'FIN' ) {
94 $positive = $this->cn->get_value("select qf_amount from quant_fin ".
95 " where jr_id=".$row['jr_id']);
96 }
97 if ( $row['currency_id'] != 0 ) {
98 $this->write_cell(20,5,nbm(bcadd($row['sum_ocvat_amount'],$row['sum_ocamount']),2).$row['cr_code_iso'],0,0,'R');
99 } else {
100 $this->write_cell(20,5,"");
101 }
102 $this->write_cell(15,5,nbm($positive),0,0,'R');
103 $this->line_new(5);
104
105 }
106 }
smaller_date($p_date)
shrink the date, make a date shorter for the printing
Definition: ac_common.php:837
nbm($p_number, $p_dec=2)
format the number with a sep.
Definition: ac_common.php:137
$input_from cn
Definition: balance.inc.php:66
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='')
$ledger
concerned Ledger

References $i, Print_Ledger\$ledger, $other, $row, $type, cn, Print_Ledger\get_from(), Print_Ledger\get_ledger(), Print_Ledger\get_to(), PDF_Core\line_new(), PDF_Core\LongLine(), nbm(), smaller_date(), and PDF_Core\write_cell().

+ Here is the call graph for this function:

◆ Footer()

Print_Ledger_Misc::Footer ( )

Reimplemented from PDF.

Definition at line 55 of file print_ledger_misc.class.php.

56 {
57 //Position at 2 cm from bottom
58 $this->SetY(-20);
59 //Arial italic 8
60 $this->SetFont('Arial', 'I', 8);
61 //Page number
62 $this->Cell(0,6,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
63 $this->Ln(3);
64 // Created by NOALYSS
65 $this->Cell(0,6,'Created by NOALYSS, online on https://www.noalyss.eu',0,0,'C',false,'https://www.noalyss.eu');
66 }

◆ Header()

Print_Ledger_Misc::Header ( )

Reimplemented from PDF.

Definition at line 36 of file print_ledger_misc.class.php.

37 {
38 //Arial bold 12
39 $this->SetFont('DejaVu', 'B', 12);
40 //Title
41 $this->Cell(0,10,$this->dossier, 'B', 0, 'C');
42 //Line break
43 $this->Ln(20);
44 $this->SetFont('DejaVu', 'B', 7);
45 $this->Cell(10,6,_('Date'));
46 $this->Cell(30,6,_('Piece'));
47 $this->Cell(20,6,_('Interne'));
48 $this->Cell(25,6,_('Tiers'));
49 $this->Cell(60,6,_('Commentaire'));
50 $this->Cell(20,6,_('Devise'),0,0,'R');
51 $this->Cell(15,6,_('Montant'),0,0,'R');
52 $this->Ln(6);
53
54 }

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