ledger=$p_jrn; $this->jrn_type=$p_jrn->get_type(); } function Header() { //Arial bold 12 $this->SetFont('DejaVu', 'B', 12); //Title $this->Cell(0,10,$this->dossier, 'B', 0, 'C'); //Line break $this->Ln(20); $this->SetFont('DejaVu', 'B', 7); $this->Cell(30,6,'Piece'); $this->Cell(10,6,'Date'); $this->Cell(20,6,'Interne'); $this->Cell(25,6,'Tiers'); $this->Cell(80,6,'Commentaire'); $this->Cell(15,6,'Montant'); $this->Ln(6); } function Footer() { //Position at 2 cm from bottom $this->SetY(-20); //Arial italic 8 $this->SetFont('Arial', 'I', 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'); } /** *@brief print the pdf *@param *@param *@return *@see */ function export() { $a_jrn=$this->ledger->get_rowSimple($_GET['from_periode'], $_GET['to_periode']); $this->SetFont('DejaVu', '', 6); if ( $a_jrn == null ) return; for ( $i=0;$iLongLine(30,5,$row['jr_pj_number']); $this->Cell(10,5, smaller_date($row['date'])); $this->Cell(20,5,$row['jr_internal']); $type=$this->cn->get_value("select jrn_def_type from jrn_def where jrn_def_id=$1",array($a_jrn[$i]['jr_def_id'])); $other=mb_substr($this->ledger->get_tiers($type,$a_jrn[$i]['jr_id']),0,25); $this->LongLine(25,5,$other,0,'L'); $positive=$row['montant']; $this->LongLine(80,5,$row['comment'],0,'L'); if ( $type == 'FIN' ) { $positive = $this->cn->get_value("select qf_amount from quant_fin ". " where jr_id=".$row['jr_id']); } $this->Cell(15,5,nbm($positive),0,0,'R'); $this->Ln(5); } } }