<meta charset="utf-8">
<?php
    require('conn/conn_mssql.php');
    $VCID =$_GET['VCID'];
	
 function moneytotext($m){
    If ($m == ""){
        return "";
	}
	$m=str_replace(",", "", $m);
	if(! is_numeric($m)){
		return "";
	}
    $mtext = number_format($m, 2, '.', '');
    $totdigit = strlen($mtext) - 3;
    $outtext = "";
    //หน้าทศนิยม
    for ($i=$totdigit;$i>=1;$i--){
        $c = substr($mtext, $i-1, 1);
        $cdigit = $totdigit + 1 - $i;
        //ตัวเลข
        switch ($c){
        case "0":
            if ($cdigit == 7 and $totdigit > 7 ){
                $t = "ศูนย์";
			}else{
                $t = "";
			}
			break;
        case "1":
            if ($cdigit == 1 and $totdigit > 1 or $cdigit == 7 and $totdigit > 7 ){
                $t = "เอ็ด";
			}else{
                $t = "หนึ่ง";
            }
			break;
        case "2":
            if ($cdigit == 2 or $cdigit == 8){
                $t = "ยี่";
			}else{
                $t = "สอง";
			}
			break;
		case "3":
            $t = "สาม";
			break;
        case "4":
            $t = "สี่";
			break;
        case "5":
            $t = "ห้า";
			break;
        case "6":
            $t = "หก";
			break;
        case "7":
            $t = "เจ็ด";
			break;
        case "8":
            $t = "แปด";
			break;
        case "9":
            $t = "เก้า";
			break;
        default :
            $t = "";
        }
        //หลัก
        if ($t <> ""){
            switch ($cdigit){
            case 1:  //หน่วย
                $d = "";
				break;
            case 2:  //สิบ
                if ($t == "หนึ่ง"){
                    $t = "";
				}
                $d = "สิบ";
				break;
            case 3:  //ร้อย
                $d = "ร้อย";
				break;
            case 4:  //พัน
                $d = "พัน";
				break;
            case 5:  //หมื่น
                $d = "หมื่น";
				break;
            case 6:  //แสน
                $d = "แสน";
				break;
            case 7:  //ล้าน
                if ($t == "ศูนย์"){
                    $t = "";
				}
                $d = "ล้าน";
				break;
            case 8:  //สิบล้าน
                if ($t == "หนึ่ง"){
                    $t = "";
				}
                $d = "สิบ";
				break;
            case 9: //ร้อยล้าน
                $d = "ร้อย";
				break;
            case 10: //พันล้าน
                $d = "พัน";
				break;
            default :
                $d = "";
            }
        }
		else{
            $d = "";
		}	
        $outtext = $t.$d.$outtext;
	}
    if ($outtext <> ""){
        $outtext = $outtext ."บาท";
	}
    
    //หลัง ทศนิยม ตำแหน่งที่ 1
    switch (substr($mtext, strlen($mtext) - 2, 1)){
        case "1":
            $d01 = "สิบ";
			break;
        case "2":
            $d01 = "ยี่สิบ";
			break;
        case "3":
            $d01 = "สามสิบ";
			break;
        case "4":
            $d01 = "สี่สิบ";
			break;
        case "5";
            $d01 = "ห้าสิบ";
			break;
        case "6":
            $d01 = "หกสิบ";
			break;
        case "7":
            $d01 = "เจ็ดสิบ";
			break;
        case "8":
            $d01 = "แปดสิบ";
			break;
        case "9":
            $d01 = "เก้าสิบ";
			break;
        default:
            $d01 = "";
    }
    //ทศนิยม ตำแหน่งที่ 2
    switch (substr($mtext, strlen($mtext)-1, 1)){
        case "1":
            if ($d01 <> ""){
                $d02 = "เอ็ด";
			}else{
                $d02 = "หนึ่ง";
            }
			break;
        case "2":
            $d02 = "สอง";
			break;
        case "3":
            $d02 = "สาม";
			break;
        case "4":
            $d02 = "สี่";
			break;
        case "5":
            $d02 = "ห้า";
			break;
        case "6":
            $d02 = "หก";
			break;
        case "7":
            $d02 = "เจ็ด";
			break;
        case "8":
            $d02 = "แปด";
			break;
        case "9":
            $d02 = "เก้า";
			break;
        default:
            $d02 = "";
    }
    if ($d01.$d02 <> ""){
        $d02 = $d02 ."สตางค์";
    }
    
    if ($d01.$d02 <> ""){
        $outtext = $outtext.$d01.$d02;
	}
    else{
        $outtext = $outtext."ถ้วน";
    }
    return $outtext;
 }
	
	
	
function format_dateD($fulldate1){
    $day = substr($fulldate1,-2,2);
   // $month = substr($fulldate1,-5,2);
   // $year = substr($fulldate1,-10,4);
   //$fulldate1 = $day ."/".$month."/".$year ;
    $fulldate1 = $day  ;
    return $fulldate1;
}
function format_dateM($fulldate1){
   // $day = substr($fulldate1,-2,2);
     $month = substr($fulldate1,-5,2);
   // $year = substr($fulldate1,-10,4);
   //$fulldate1 = $day ."/".$month."/".$year ;
    $fulldate1 = $month  ;
    return $fulldate1;
}

function format_dateY($fulldate1){
   // $day = substr($fulldate1,-2,2);
   //  $month = substr($fulldate1,-5,2);
    $year = substr($fulldate1,-10,4);
   //$fulldate1 = $day ."/".$month."/".$year ;
    $fulldate1 = $year  ;
    return $fulldate1;
}
	
function format_dateDMY($fulldate1){
    $day = substr($fulldate1,-2,2);
    $month = substr($fulldate1,-5,2);
    $year = substr($fulldate1,-10,4);
    $fulldate1 = $day ."/".$month."/".$year ;
   // $fulldate1 = $year  ;
    return $fulldate1;
}	
	
	
 $sql_code="select   *    from   vw_VCPrint    where   VCID    like  '$VCID'     order by  VCID Desc ";
 $query_code=$conn->prepare($sql_code);
 $query_code->execute();
 $result_code = $query_code->fetch( PDO::FETCH_ASSOC);
	
$VCID =   $result_code['VCID'] ;
$VCDate  = $result_code['VCDate'] ;	
$VCDealerName = $result_code['VCDealerName'] ;	
$VCAddr   = $result_code['DealerAddr1']." ".$result_code['DealerAddr2']."  โทร.".$result_code['DealerPhone'] ;	
$VCDealerBranchName = 	$result_code['VCDealerBranchName'] ;	
	

	
//$txtDRepTax   = "ภาษีหัก ณ ที่จ่าย  ".number_format($TaxPercent,2)."% เป็นเงิน  ".number_format($dat['TotalTaxBath'],2)                                   ;	
	
	
	
	
	
	
	
	
	
//$sql_code="select   *    from   vw_VCPrint    where   VCID    like  '$VCID'     order by  VCID Desc ";
//$query_code=$conn->prepare($sql_code);
//$query_code->execute();
//while($result_code = $query_code->fetch( PDO::FETCH_ASSOC)){


//$VCID =   $result_code['VCID'] ;
//$VCDate  = $result_code['VCDate'] ;


//}	
	

	
	?>
	
	
<?php
$header = '

  <table width="100%" border="0" cellpadding="1" cellspacing="1" >
    <tr>
    <td colspan="2" align = "right">หน้าที่   {PAGENO} จาก  {nb} </td>
  </tr>
  <tr>
    <td colspan="2" align="center" ><h2>'.$VCDealerName.'</h2></td>
  </tr>
  <tr>
    <td colspan="2"  align="center"><div align="center">'.$VCAddr.'</div></td>
  </tr>
  
  
  <tr>
    <td colspan="2"height="40"  >&nbsp;</td>
  </tr>
  
  
  <tr>
    <td colspan="2" align="center"><h3>ใบสำคัญจ่ายเงินสดย่อย   ('.$VCDealerBranchName.')</h3></td>
  </tr>
  <tr>
    <td >&nbsp;</td>
    <td >เลขที่  &nbsp;&nbsp; '.$VCID.'</td>
  </tr>
  <tr>
    <td width="75%" >&nbsp;</td>
    <td width="25%" >วันที่ &nbsp;&nbsp; '.format_dateDMY($VCDate).'</td>
  </tr>
  
  
  <tr>
    <td height="30" colspan="2" >&nbsp;</td>
  </tr>
  
  <tr>
    <td colspan="2" >ชื่อบัญชี____________________________________________________________________________________________</td>
  </tr>
</table>
	
	
	
	
	
	
	
';	

?>	
	
	
	
	
	
<?php

$htmlele = '
<meta charset="utf-8">

<!DOCTYPE html>
<html> 
<head>
<title>ใบเสนอราคา</title>
</head>   
<body>
<style>
body{
    font-family: "Garuda";
    font-size: 9pt;
}
.thai2{
    font-family: "Garuda";
}



</style>


<table class="items" width="100%" style="font-size: 9pt; border-collapse: collapse; " cellpadding="8">
<thead>
<tr>
<td width="11%" >&#3623;.&#3604;.&#3611;</td>
<td width="24%">&#3592;&#3656;&#3634;&#3618;&#3651;&#3627;&#3657;</td>
<td width="50%">&#3619;&#3634;&#3618;&#3585;&#3634;&#3619;</td>
<td width="8%">&#3618;&#3629;&#3604;&#3586;&#3629;&#3648;&#3610;&#3636;&#3585;</td>
<td width="7%">&#3612;&#3641;&#3657;&#3629;&#3609;&#3640;&#3617;&#3633;&#3605;&#3636;</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->
<tr>
<td align="center">MF1234567</td>
<td align="center">10</td>
<td>Large pack Hoover bags</td>
<td class="cost">&pound;2.56</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MX37801982</td>
<td align="center">1</td>
<td>Womans waterproof jacket<br />Options - Red and charcoal.</td>
<td class="cost">&pound;102.11</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<tr>
<td align="center">MR7009298</td>
<td align="center">25</td>
<td>Steel nails; oval head; 30mm x 3mm. Packs of 1000.</td>
<td class="cost">&pound;12.26</td>
<td class="cost">&nbsp;</td>
</tr>
<!-- END ITEMS HERE -->
<tr>
<td colspan="2" class="blanktotal" align="center">(&#3649;&#3611;&#3604;&#3614;&#3633;&#3609;&#3648;&#3592;&#3655;&#3604;&#3619;&#3657;&#3629;&#3618;&#3627;&#3657;&#3634;&#3626;&#3636;&#3610;&#3627;&#3657;&#3634;&#3610;&#3634;&#3607;&#3606;&#3657;&#3623;&#3609;)</td>
<td class="blanktotal"><span class="totals">&#3618;&#3629;&#3604;&#3619;&#3623;&#3617; :</span></td>
<td class="totals">&nbsp;</td>
<td class="totals cost">&nbsp;</td>
</tr>
</tbody>
</table>


<div style="text-align: center; font-style: italic;">Payment terms: payment due in 30 days</div>




</body>
</html>';

?>




<?php
		include_once 'mpdf/vendor/autoload.php';
		
		
		include("mpdf/mpdf.php");
		
		
		/*
		 $mpdf = new mPDF(   '',    // mode - default ''
                '',    // format - A4, for example, default ''
                0,     // font size - default 0
                '',    // default font family
                15,    // margin_left
                15,    // margin right
                58,     // margin top
                60,    // margin bottom
                6,     // margin header
                0,     // margin footer
                'L' );  // L - landscape, P - portrait
		*/
		//$mpdf = new mPDF('c');
		//$mpdf=new mPDF(''); 
		//$mpdf = new mPDF('c','A4','','',20,15,48,25,10,10);
		$mpdf=new mPDF('','A4-P','','' , 20 , 15 , 60 , 25 , 10 , 10 ,'P'); 
		//$stylesheet = file_get_contents('vendor/bootstrap/css/bootstrap.css');
		
		
		$mpdf->SetDisplayMode('fullpage');
	//	$mpdf->list_indent_first_level = 0;  // 1 or 0 - whether to indent the first level of a list
		
		
		
	  // $stylesheet = file_get_contents('css/mpdfstyleA4.css');
     //  $mpdf->WriteHTML($stylesheet,1);	// The parameter 1 tells that this is css/style only and no body/html/text
		
		
		
		
     	
    //    $mpdf->SetHTMLFooter();
	//	$mpdf->allow_charset_conversion=true;
	//	$mpdf->charset_in='UTF-8';
		//$mpdf->WriteHTML($stylesheet,1);
		$mpdf->SetHTMLHeader($header);
		$mpdf->WriteHTML($htmlele);  
		$mpdf->Output(); 
		/* $mpdf->Output('doc/PDF/Quotation_'.$order_id.'_'.$tele.'.pdf','F'); */
?>