@extends('layouts.app') @section('title') {{'Foreign Requisition Details'}} @endsection @section('content') @php function numberTowords($num) { $ones = array( 1 => "ONE", 2 => "TWO", 3 => "THREE", 4 => "FOUR", 5 => "FIVE", 6 => "SIX", 7 => "SEVEN", 8 => "EIGHT", 9 => "NINE", 10 => "TEN", 11 => "ELEVEN", 12 => "TWELVE", 13 => "THIRTEEN", 14 => "FOURTEEN", 15 => "FIFTEEN", 16 => "SIXTEEN", 17 => "SEVENTEEN", 18 => "EIGHTEEN", 19 => "NINETEEN" ); $tens = array( 1 => "TEN", 2 => "TWENTY", 3 => "THIRTY", 4 => "FORTY", 5 => "FIFTY", 6 => "SIXTY", 7 => "SEVENTY", 8 => "EIGHTY", 9 => "NINETY" ); $hundreds = array( "HUNDRED", "THOUSAND", "MILLION", "BILLION", "TRILLION", "QUARDRILLION" ); $num = number_format($num,2,".",","); $num_arr = explode(".",$num); $wholenum = $num_arr[0]; $decnum = $num_arr[1]; $whole_arr = array_reverse(explode(",",$wholenum)); krsort($whole_arr); $words = ""; foreach($whole_arr as $key => $i) { if($i == 0) { continue; } if($i < 20) { $words .= $ones[intval($i)]; } elseif($i < 100) { if(substr($i,0,1) == 0 && strlen($i) == 3) { $words .= $tens[substr($i,1,1)]; if(substr($i,2,1) != 0) { $words .= " ".$ones[substr($i,2,1)]; } } else { $words .= $tens[substr($i,0,1)]; if(substr($i,1,1) != 0) { $words .= " ".$ones[substr($i,1,1)]; } } } else { // $words .= $ones[substr($i,0,1)]." ".$hundreds[0]; if(substr($i,1,1) != 0 || substr($i,2,1) != 0) { $words .= $ones[substr($i,0,1)]." ".$hundreds[0]; } else { $words .= $ones[substr($i,0,1)]." ".$hundreds[0]; } if(substr($i,1,2) < 20 && substr($i,1,1) != 0) { $words .= " ".$ones[(substr($i,1,2))]; } else { if(substr($i,1,1) != 0) { $words .= " ".$tens[substr($i,1,1)]; } if(substr($i,2,1) != 0) { $words .= " ".$ones[substr($i,2,1)]; } } } if($key > 0) { $words .= " ".$hundreds[$key]." "; } } $words .= " DOLLAR "; if($decnum > 0) { $words .= " AND "; if($decnum < 20) { $words .= $ones[intval($decnum)]; } elseif($decnum < 100) { $words .= $tens[substr($decnum,0,1)]; if(substr($decnum,1,1) != 0) { $words .= " ".$ones[substr($decnum,1,1)]; } } $words .= $subunit??' CENTS ONLY.'; } else{ $words .= "ONLY."; } return $words; } @endphp
|
WPL Requisition No : WPL/R-0{{ $orders_list[0]->id }}
|
||||||||||||||||
|
Requisition Date : {{date('d-m-Y', strtotime($orders_list[0]->txn_date)) }}
|
||||||||||||||||
|
Supplier Name : {{ $orders_list[0]->supplier_id }} - {{ $orders_list[0]->name }}
|
||||||||||||||||
|
Contact Person : {{ $orders_list[0]->person_name }}
|
||||||||||||||||
|
Address : {{ $orders_list[0]->address }}
|
||||||||||||||||
|
Mobile No. : {{ $orders_list[0]->mobile }}
|
||||||||||||||||
| S.L. | ID | Item Name | Unit | Present Stock Qty | Last 2 Years Consumption | Indent Qty | $ Price | Last Purchase $ Rate | Sub Total $ | HS Code | Item Number | LC Number | LC Date | PI Number | PI Date | Country of Origin |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $i }} | {{ $row->product_id }} | {{ $row->product_name }} | {{ $row->pack_type }} | {{ $stock }} | {{ number_format($row->six_month_sales) }} | {{ $row->quantity }} | $ {{ number_format($row->dollar,2) }} | $ {{ number_format($row->last_dollar_price,2) }} | $ {{ number_format($sub_total,2) }} | {{$row->hs_code}} | {{$row->item_number}} | {{$row->lc_number}} | {{$row->lc_date}} | {{$row->pi_number}} | {{$row->pi_date}} | {{$row->country_of_origin}} |
| Total = | {!! number_format($t_stock) !!} | {!! number_format($t_six_month_sales) !!} | {!! number_format($torder_quantity) !!} | $ {{ number_format($grand_total,2) }} | ||||||||||||
| IN WORDS : {!! numberTowords($grand_total) !!} | ||||||||||||||||
| For, | ||||||||||||||||
| Authorized Signatory | ||||||||||||||||