</tr>
  <tr>
    <td colspan="3" valign="top" class="print_text" style="border-right:#000000 solid thin;border-bottom:#000000 solid thin;"><B>EXPORT UNDER EPCG LCENCE NO.</B></td>
    <td valign="top" style="border-right:#000000 solid thin;">&nbsp;</td>
    <td valign="top" style="border-right:#000000 solid thin;">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" valign="top" class="print_text" style="border-bottom:#000000 solid thin;border-right:#000000 solid thin;"><b>EXPORT UNDERDEPB SCHEME</b></td>
    <td valign="top" class="print_text" style="border-bottom:#000000 solid thin;border-right:#000000 solid thin;">&nbsp;</td>
    <td valign="top" class="print_text" style="border-bottom:#000000 solid thin;border-right:#000000 solid thin;">&nbsp;</td>
    <td valign="top" class="print_text" style="border-bottom:#000000 solid thin;">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4" valign="top" class="print_text" style="border-bottom:#000000 solid thin;border-right:#000000 solid thin;">Ammount Chargeable (In words) :&nbsp;<b><?php 
echo num_to_wordsDoller($total_amount, 'Doller', 2, 'Cent');
?>
</b></td>
    <td class="print_text" valign="top" style="border-bottom:#000000 solid thin;border-right:#000000 solid thin;"><b>Total Value CFR (USD)</b></td>
    <td align="right" valign="top" style="border-bottom:#000000 solid thin;"><span class="print_text"><b><?php 
echo $total_amount;
?>
</b></span></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr>
   <td colspan="3" valign="top" class="print_text" style="border-right:#000000 solid 1px;border-bottom:#000000 solid 1px;"><B>EXPORT UNDER EPCG LCENCE NO.</B></td>
   <td valign="top" style="border-right:#000000 solid 1px;">&nbsp;</td>
   <td valign="top" style="border-right:#000000 solid 1px;">&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr>
   <td colspan="3" valign="top" class="print_text" style="border-bottom:#000000 solid 1px;border-right:#000000 solid 1px;"><b>EXPORT UNDERDEPB SCHEME</b></td>
   <td valign="top" class="print_text" style="border-bottom:#000000 solid 1px;border-right:#000000 solid 1px;">&nbsp;</td>
   <td valign="top" class="print_text" style="border-bottom:#000000 solid 1px;border-right:#000000 solid 1px;">&nbsp;</td>
   <td valign="top" class="print_text" style="border-bottom:#000000 solid 1px;">&nbsp;</td>
 </tr>
 <tr>
   <td colspan="4" valign="top" class="print_text" style="border-bottom:#000000 solid 1px;border-right:#000000 solid 1px;">Ammount Chargeable (In words) :&nbsp;<b><?=num_to_wordsDoller($total_amount,'Doller', 2, 'Cent')?></b></td>
   <td class="print_text" valign="top" style="border-bottom:#000000 solid 1px;border-right:#000000 solid 1px;"><b>Total Value CFR (USD)</b></td>
   <td align="right" valign="top" style="border-bottom:#000000 solid 1px;"><span class="print_text"><b><?=$total_amount?></b></span></td>
 </tr>
 <tr>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
 </tr>
 <tr>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
Esempio n. 3
0
      }
     ?> 
     		<tr>
             	<td width="50%" align="left" style="border-right:#000000 solid 1px;padding-top:10px;" class="print_text">
                 <b>(Tolerance in Quantity and Amount +/-5%)</b><br/><br/>
                 <b>DELIVERY = </b><br/><br/><br/><br/>
                 </td>
                 <td style="border-right:#000000 solid 1px;">&nbsp;</td>
                 <td style="border-right:#000000 solid 1px;">&nbsp;</td>
                 <td style="border-right:#000000 solid 1px;">&nbsp;</td>
                 <td>&nbsp;</td>
             </tr>
             
             
             <tr>
             	<td class="print_text" colspan="3" style="border-top:#000000 solid 1px;border-right:#000000 solid 1px;" valign="top"><b>Amount Chargeble(in words):&nbsp;<?=num_to_wordsDoller($total_amount,'Doller', 2, 'Cent')?></b></td>
                 <td class="print_text" style="border-top:#000000 solid 1px;border-right:#000000 solid 1px;"><b>Total: USD<br/>CNF</b></td>
                 <td align="right" style="border-top:#000000 solid 1px;padding-right:5px;" valign="top"><span class="print_text"><b><?=$total_amount?></b></span></td>
             </tr>                                     
          </table>
      </td>
 </tr>
 <tr>
 	<td align="right" height="100" style="border-top:#000000 solid 1px;padding-top:10px;" colspan="2">
     	<table cellpadding="0" cellspacing="0" width="100%">
             <tr>
                 <td width="50%" align="left" style="padding-top:10px;" class="print_text">
                 
                 <b><u>Our Bank Details :</u></b><br/>
                 <b><?=$company_bankdetail?></b>
                 </td>
Esempio n. 4
0
    function num_to_wordsDoller($number, $real_name, $decimal_digit, $decimal_name){
        $res = '';
        $real = 0;
        $decimal = 0;

        if($number == 0)
            return 'Zero'.(($real_name == '')?'':' '.$real_name);
        if($number >= 0){
            $real = floor($number);
            $decimal = round($number - $real, $decimal_digit);
        }else{
            $real = ceil($number) * (-1);
            $number = abs($number);
            $decimal = $number - $real;
        }
        $decimal = (int)str_replace('.','',$decimal);
		$unit_name[0] = '';
        $unit_name[1] = 'thousand';
        $unit_name[2] = 'million';
        $unit_name[3] = 'billion';
        $unit_name[4] = 'trillion';

        $packet = array();	

        $number = strrev($real);
        $packet = str_split($number,3);

        for($i=0;$i<count($packet);$i++){
            $tmp = strrev($packet[$i]);
            $unit = $unit_name[$i];
            if((int)$tmp == 0)
                continue;
            $tmp_res = '';
            if(strlen($tmp) >= 2){
                $tmp_proc = substr($tmp,-2);
                switch($tmp_proc){
                    case '10':
                        $tmp_res = 'ten';
                        break;
                    case '11':
                        $tmp_res = 'eleven';
                        break;
                    case '12':
                        $tmp_res = 'twelve';
                        break;
                    case '13':
                        $tmp_res = 'thirteen';
                        break;
                    case '15':
                        $tmp_res = 'fifteen';
                        break;
                    case '20':
                        $tmp_res = 'twenty';
                        break;
                    case '30':
                        $tmp_res = 'thirty';
                        break;
                    case '40':
                        $tmp_res = 'forty';
                        break;
                    case '50':
                        $tmp_res = 'fifty';
                        break;
                    case '70':
                        $tmp_res = 'seventy';
                        break;
                    case '80':
                        $tmp_res = 'eighty';
                        break;
                    default:
                        $tmp_begin = substr($tmp_proc,0,1);
                        $tmp_end = substr($tmp_proc,1,1);

                        if($tmp_begin == '1')
                            $tmp_res = get_num_name1($tmp_end).'teen';
                        elseif($tmp_begin == '0')
                            $tmp_res = get_num_name1($tmp_end);
                        elseif($tmp_end == '0')
                            $tmp_res = get_num_name1($tmp_begin).'ty';
                        else{
                            if($tmp_begin == '2')
                                $tmp_res = 'twenty';
                            elseif($tmp_begin == '3')
                                $tmp_res = 'thirty';
                            elseif($tmp_begin == '4')
                                $tmp_res = 'forty';
                            elseif($tmp_begin == '5')
                                $tmp_res = 'fifty';
                            elseif($tmp_begin == '6')
                                $tmp_res = 'sixty';
                            elseif($tmp_begin == '7')
                                $tmp_res = 'seventy';
                            elseif($tmp_begin == '8')
                                $tmp_res = 'eighty';
                            elseif($tmp_begin == '9')
                                $tmp_res = 'ninety';

                            $tmp_res = $tmp_res.' '.get_num_name1($tmp_end);
                        }
                        break;
                }

                if(strlen($tmp) == 3){
                    $tmp_begin = substr($tmp,0,1);

                    $space = '';
                    if(substr($tmp_res,0,1) != ' ' && $tmp_res != '')
                        $space = ' ';

                    if($tmp_begin != 0){
                        if($tmp_begin != '0'){
                            if($tmp_res != '')
                                $tmp_res = 'and'.$space.$tmp_res;
                        }
                        $tmp_res = get_num_name1($tmp_begin).' hundred'.$space.$tmp_res;
                    }
                }
            }else
                $tmp_res = get_num_name1($tmp);
            $space = '';
            if(substr($res,0,1) != ' ' && $res != '')
                $space = ' ';
            $res = $tmp_res.' '.$unit.$space.$res;
        }

        $space = '';
        if(substr($res,-1) != ' ' && $res != '')
            $space = ' ';

        $res .= $space.$real_name.(($real > 1 && $real_name != '')?'s':'');

        if($decimal > 0)
            $res .= ' '.num_to_wordsDoller($decimal, '', 0, '').' '.$decimal_name.(($decimal > 1 && $decimal_name != '')?'s':'');
        return ucfirst($res);
    }