noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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
 
 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)
 
 get_filter_operation ()
 
 get_from ()
 
 get_ledger ()
 
 get_to ()
 
 set_filter_operation ($filter_operation)
 Filter the operations ,.
 
 set_from ($from)
 
 set_ledger ($ledger)
 
 set_to ($to)
 
- Public Member Functions inherited from PDF
 get_tiers ($p_jr_id, $p_jrn_type)
 retrieve the client name and quick_code
 
 setDossierInfo ($dossier="n/a")
 
- Public Member Functions inherited from PDF_Core
 __construct ( $orientation='P', $unit='mm', $format='A4')
 
 fill_row ($enable)
 set color for row ,
 
 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.
 
 line_new ($p_step=null)
 Print all the cell stored and call Ln (new line)
 
 LongLine ($w, $h, $txt, $border=0, $align='', $fill=false)
 add a cell with automatic return to the line if the text is too long, deprecated , it calls only PDFCore::write_cell_
 
 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
 

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
 
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)
 
- Static Public Member Functions inherited from PDF
static test_me ()
 test the class
 
- 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.
 
- Protected Member Functions inherited from PDF_Core
 add_cell (Cellule $Ce)
 
 check_page_add ()
 Check if a page must be added due a MultiCell.
 
 count_nb_row ($p_text, $p_colSize)
 Count the number of rows a p_text will take for a multicell.
 
 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
 
- Protected Attributes inherited from Print_Ledger
 $a_Tva
 $other_tax_previous (array)
 
 $filter_operation
 See Acc_Ledger_History::filter_operation.
 
 $flag_other_tax
 $flag_other_tax(bool) true if other tax exists
 
 $from
 
 $jrn_type
 
 $ledger
 concerned Ledger
 
 $other_tax_previous
 
 $previous
 internal variables for computing sum on PDF Listing
 
 $rap_htva
 $previous (array) see Acc_Ledger->previous_amount
 
 $rap_nd
 $rap_nd (float) $no-deductible tax
 
 $rap_other
 VAT when page starts.
 
 $rap_other_tax
 $rap_other_tav, amount to report for other tax than VAT
 
 $rap_priv
 $rap_priv (float) personal expense
 
 $rap_tva
 $rap_tva array(tva_id,amount)
 
 $rap_tva_np
 $rap_tva_np VAT not deductible
 
 $rap_tvac
 $rap_tvac (float) previous amount
 
 $show_col
 
 $to
 
 $tp_htva
 $tp_htva (float) total page price w/o VAT
 
 $tp_nd
 $tp_nd (float) total page price w/o VAT
 
 $tp_priv
 $tp_priv (float) total page personal expense
 
 $tp_tva
 $tp_tva (float) total page VAT
 
 $tp_tva_np
 $tp_tva_np (float) total page not deductible
 
 $tp_tvac
 $tp_tvac (float) total page full price All Tax Incl.
 
- Protected Attributes inherited from PDF_Core
 $bigger
 
 $cells =array()
 

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 $border='0';
82 for ( $i=0;$i<count($a_jrn);$i++)
83 {
84 $row=$a_jrn[$i];
85
86 $this->write_cell(10,3, smaller_date($row['date']),border:$border);
87 $this->write_multi(30,3,$row['jr_pj_number'],border:$border);
88 $this->write_cell(20,3,$row['jr_internal'],border:$border);
89 $type=$this->cn->get_value("select jrn_def_type from jrn_def where jrn_def_id=$1",array($a_jrn[$i]['jr_def_id']));
90 $other=mb_substr($ledger->get_tiers($type,$a_jrn[$i]['jr_id']),0,25);
91 $this->write_multi(25,3,$other,$border,'L');
92 $positive=$row['montant'];
93 $this->write_multi(60,3,$row['str_comment'],$border,'L');
94 if ( $type == 'FIN' ) {
95 $positive = $this->cn->get_value("select qf_amount from quant_fin ".
96 " where jr_id=".$row['jr_id']);
97 }
98 if ( $row['currency_id'] != 0 ) {
99 $this->write_cell(20,3,nbm(bcadd($row['sum_ocvat_amount'],$row['sum_ocamount']),2).$row['cr_code_iso'],border:$border);
100 } else {
101 $this->write_cell(20,3,"",border:$border);
102 }
103 $this->write_cell(15,3,nbm($positive),$border,0,'R');
104 $this->line_new(5);
105
106 }
107 }
smaller_date($p_date)
shrink the date, make a date shorter for the printing
nbm($p_number, $p_dec=2)
format the number with a sep.
$input_from cn
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
$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(), nbm(), smaller_date(), PDF_Core\write_cell(), and PDF_Core\write_multi().

+ 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 }
_("actif, passif,charge,...")

References _.


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