<?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 + 600, $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 + 80, Today() . '   ' . Now());
        $this->Font();
        $this->NewLine();
        
             
        $str = _("Fiscal Year") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Text($this->leftMargin + 80, $this->fiscal_year);
        $this->NewLine();
        
        $str = _("Payroll run") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Text($this->leftMargin + 80, $this->params[0]);
        $this->NewLine();   
               
        $str = _("Employee") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Text($this->leftMargin + 80, $this->params[1]);
        $this->NewLine();
               
        $str = _("Shift") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Text($this->leftMargin + 80, $this->params[2]);
        $this->NewLine();
        
         $str = _("OT Table") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Text($this->leftMargin + 80, $this->params[3]);
        $this->NewLine();
        
        $str = _("Status Code") . ':';
        $this->Text($this->leftMargin, $str, $titleCol);
        $this->Text($this->leftMargin + 80, $this->params[4]);
        $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();
	$this->NewLine();
	
?>
