<?php

        $companyCol = $this->endLine - 170;
        $titleCol = $this->leftMargin + 100;

        $start_row = $this->row = $this->pageHeight - $this->topMargin;

        $this->SetDrawColor(128, 128, 128);
        $this->Line($this->row + 5, 1);

        $this->NewLine();
        		
        $logo = company_path() . "/images/" . $this->company['coy_logo'];
	if ($this->company['coy_logo'] != '' && file_exists($logo))
	{
            $this->AddImage($logo, 595, $this->row - 30, 0, 43);
	}

        $this->fontSize += 4;
        $this->Font('bold');
        $this->Text($this->leftMargin, $this->title, $companyCol);
        $this->Text($companyCol, $this->company['coy_name']);
        $this->Font();
        $this->fontSize -= 4;
        $this->NewLine();
        
        $contact_nos = '';
        if (@$this->company['phone'])
        {
            $contact_nos = "(Phone) ".$this->company['phone'];       
        }

        if (@$this->company['fax'])
        {
            $contact_nos .= ", (Fax) ".$this->company['fax'];
        }
        $this->Text($companyCol, $contact_nos);
        $this->NewLine();
        
        $contact_info = '';
        if (@$this->company['email'])
        {
            $contact_info = $this->company['email'].", ";
        }

        $contact_info .= "www.ukengineering.lk";

        $this->Text($companyCol, $contact_info);
        
        $this->NewLine(2);
        $this->Text($this->leftMargin + 355, $this->user);
        
        $str = _("Page") . ' ' . $this->pageNumber;
        $this->Text($this->endLine - 38, $str);
                
        $this->row = $start_row - ($this->lineHeight);
        
        

        $this->NewLine();
        $str = _("Print Out Date") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Font();
        $this->Text($this->leftMargin + 100, Today() . '   ' . Now());
        $this->Font();
        $this->NewLine();
        
             
        $str = _("Fiscal Year") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Text($this->leftMargin + 100, $this->fiscal_year);
        $this->NewLine();
         
        if($this->row > 730)
            $this->row = 730;            
                     

        
        $this->Line($this->row - 5, 1);

//        $this->row -= ($this->lineHeight + 6);
//        $this->Font('italic');
//        if ($this->headers2 != null)
//        {
//                $count = count($this->headers2);
//                for ($i = 0; $i < $count; $i++)
//                $this->TextCol2($i, $i + 1,$this->headers2[$i]);
//                $this->NewLine();
//        }
//        $count = count($this->headers);
//        for ($i = 0; $i < $count; $i++){
//                $this->TextCol($i, $i + 1, $this->headers[$i]);
//        }
//        $this->Font();
//        $this->Line($this->row - 6, 1);
//
//        $this->NewLine();
	
        
        
        //2nd column
//        $col2_text_start = $b2x1 + 5;
//        $col3_text_start = $col2_text_start + 130;
//        $this->row = $start_row;
//        $this->NewLine();
//        $this->Text($col2_text_start, "C FORM EPF Act No. 15 of 1958");
//        $this->NewLine(2);
//        $this->Text($col2_text_start, "E.P.F. Reg No:");
//        $this->Text($col3_text_start, $this->params['epf_reg_no']);
//        $this->NewLine();
//        $this->Text($col2_text_start, "Contributions for the Month:");
//        $this->Text($col3_text_start, $this->params['month']);
//        $this->NewLine();
//        $this->Text($col2_text_start, "Contributions:");
//        //$this->Text($col3_text_start, $this->params['total_contribution']);
//        $this->Text($col3_text_start, '');
//        $this->NewLine();
//        $this->Text($col2_text_start, "Surcharges:");
//        $this->Text($col3_text_start, $this->params['surcharges']);
//        $this->NewLine();
//        $this->Text($col2_text_start, "Total Remittance:");
//        $this->Text($col3_text_start, $this->params['total_remitance']);
//        $this->NewLine();
//        $this->Text($col2_text_start, "Cheque No:");
//        $this->row = $this->row -3;
//        $this->Text($col3_text_start, $this->params['cheque_no']);
//        $this->row = $this->row +3;
//        $this->NewLine();
//        $this->Text($col2_text_start, "Bank & Branch:");
//        $this->Text($col3_text_start, $this->params['epf_payment_bank']);

  
        if($this->row > 700)
            $this->row = 700;
        
//        $h0 = $this->cols[0]-5;
//        $h1 = $this->cols[1]-5;
//        $h2 = $this->cols[2]-5;
//        $h3 = $this->cols[3]-5;
//       
//        
//        $v1 = $this->row - 2;
//        $v2 = $this->row - $this->lineHeight - 2;
//        $v3 = $this->row - 2*$this->lineHeight - 3;
//        
        
//        $this->LineTo($h0, $v1, $h7, $v1);
//        $this->NewLine();
//        $this->Text($this->leftMargin+330, "Contributions");
//        $this->LineTo($h3, $v2, $h6, $v2);
//        $this->NewLine();
        //$this->Font('italic');
        if ($this->headers2 != null)
        {
                $count = count($this->headers2);
                for ($i = 0; $i < $count; $i++)
                        $this->TextCol2($i, $i + 1,	$this->headers2[$i]);
                $this->NewLine();
        }
        
        
//        $count = count($this->headers);
//        for ($i = 0; $i < $count; $i++){
//                $this->LineTo($this->cols[$i], $this->row+15, $this->cols[$i+1], $this->row+15);
//                $this->TextCol($i, $i + 1, $this->headers[$i]);
//                $this->LineTo($this->cols[$i], $this->row-5, $this->cols[$i+1], $this->row-5);
//        }
//        $this->LineTo($start, $v, $end, $v);
        
        $this->Font();
//        $this->LineTo($h0, $v3, $h3, $v3);
//        
//        $this->LineTo($h0, $v1, $h0, $v3);
//        $this->LineTo($h1, $v1, $h1, $v3);
//        $this->LineTo($h2, $v1, $h2, $v3);
//        $this->LineTo($h3, $v1, $h3, $v3);
//        $this->LineTo($h4, $v2, $h4, $v3);
//        $this->LineTo($h5, $v2, $h5, $v3);
//        $this->LineTo($h6, $v1, $h6, $v3);
//        $this->LineTo($h7, $v1, $h7, $v3);
        
        $this->Font();
$this->NewLine();

        //$this->NewLine();
	
	
?>
