<?php

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

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

        $this->SetDrawColor(128, 128, 128);
        
        $this->Font('bold');

        $this->NewLine();
        
        $this->Text($this->leftMargin + 200, "EMPLOYEES' TRUST FUND BOARD");
        
        $this->NewLine();
        		
        $b1x1 = $this->leftMargin;
        $b1x2 = $this->leftMargin + 200;
        $b1y1 = $this->row;
        $b1y2 = $this->row - 100;
        
        $this->SetLineWidth(2);
        $this->LineTo($b1x1, $b1y1, $b1x2, $b1y1);
        $this->LineTo($b1x2, $b1y1, $b1x2, $b1y2);
        $this->LineTo($b1x1, $b1y2, $b1x2, $b1y2);
        $this->LineTo($b1x1, $b1y1, $b1x1, $b1y2);
        
        $b2x1 = $this->leftMargin + 270;
        $b2x2 = $this->leftMargin + 500;
        $b2y1 = $this->row;
        $b2y2 = $this->row - 15;
        
        $this->SetLineWidth(2);
        $this->LineTo($b2x1, $b2y1, $b2x2, $b2y1);
        $this->LineTo($b2x2, $b2y1, $b2x2, $b2y2);
        $this->LineTo($b2x1, $b2y2, $b2x2, $b2y2);
        $this->LineTo($b2x1, $b2y1, $b2x1, $b2y2);
        
        $this->SetLineWidth(0);
        
        $this->NewLine();
        
        

        $this->Text($this->leftMargin+5, $this->company['coy_name']);
        $this->NewLine();
        $this->TextWrapLines($this->rightMargin+15, $this->rightMargin + 200, $this->company['postal_address']);
        
        $this->row = $this->row - 1 * $this->lineHeight;

        $contact_nos = '';
        if (@$this->company['phone'])
        {
            $contact_nos = "Telephone: ".$this->company['phone'];       
        }

        $this->Text($this->leftMargin+5, $contact_nos);
        $this->NewLine();
        
        
        //2nd column
        $col2_text_start = $b2x1 + 5;
        $col3_text_start = $col2_text_start + 130;
        $this->row = $start_row - 2 * $this->lineHeight;
        $this->NewLine();
        $this->Text($col2_text_start, "Advice of remittance form:  R 4");
        $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->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 > 638)
            $this->row = 638;
        
        $h0 = $this->cols[0]-5;
        $h1 = $this->cols[1]-5;
        $h2 = $this->cols[2]-5;
        $h3 = $this->cols[3]-5;
        $h4 = $this->cols[4]+5;
        $h5 = $this->cols[5]+5;


        
        $v1 = $this->row - 2;
        //$v2 = $this->row - $this->lineHeight - 2;
        $v3 = $this->row - 2*$this->lineHeight - 3;
        
        
        $this->LineTo($h0, $v1, $h5, $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->TextCol($i, $i + 1, $this->headers[$i]);
        }
        $this->Font();
        $this->LineTo($h0, $v3, $h5, $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, $v1, $h4, $v3);
        $this->LineTo($h5, $v1, $h5, $v3);

        
        $this->Font();

        $this->NewLine();
	
	
?>
