@if (app('request')->input('print') == 'y') @endif
@foreach ($company as $n => $c)
{{ $c['name'] }}
{{ $c['second_name'] }}
{{ $c['address'] }}
Mobile: {{ $c['mobile'] }}
C.R.: {{ $c['cr'] }}
VAT No.: {{ $c['gstin'] }}
{{ $c['arabic_name'] }}
{{ $c['arabic_second_name'] }}
{{ $c['arabic_address'] }}
Mobile: {{ $c['arabic_mobile'] }}
C.R.: {{ $c['arabic_cr'] }}
VAT No.: {{ $c['arabic_gstin'] }}
TAX INVOICE / فاتورة الضريبة
@foreach ($data as $k => $v) @php $slno = 1; $custname = $v['customer_details']['name']; $cust_arr = explode('?', $custname); $cust = count($cust_arr); $stringvalue = $v['customer_details']['address']; $str_arr = explode('?', $stringvalue); $result = count($str_arr); @endphp
Invoice Number: {{ $v['bill_no'] }}
Date: {{ $v['bill_date'] }}
Customer: @for ($i = 0; $i < $cust; $i++) {{ $cust_arr[$i] }}
@endfor
Address: @for ($i = 0; $i < $result; $i++) {{ $str_arr[$i] }}
@endfor
Telephone: {{ $v['customer_details']['telephone'] }}
VAT No.: {{ $v['customer_details']['gstin'] }}
Payment Terms: {{ $v['payment_mode'] }}
PO No.: {{ $v['ponumber'] }}
Project No.: {{ $v['remarks'] }}
@foreach ($v['sold_items'] as $vv) @php $slno++; @endphp @endforeach
SN
رقم
Description
اسم المنتج
Qty
كمية
Unit Price
وحدة
Taxable Amount
المبلغ الخاضع للضريبة
Tax Rate
معدل الضريبة
Tax Amount
قيمة الضريبة
SubTotal
المجموع الفرعي
@php echo $slno; @endphp
@php $myString = $vv['remarks']; $myArray = explode('?', $myString); $result = count($myArray); @endphp @for ($i = 0; $i < $result; $i++) {{ $myArray[$i] }}
@endfor
{{ $vv['quantity'] }}
{{ $vv['price_per_quantity'] }}
{{ $vv['gtotal'] }}
{{ $vv['tax'] }}
{{ $vv['tax_amount'] }}
{{ $vv['total'] }}
@php if ($v['discount_amount'] == null) { $v['discount_amount'] = '0.00'; } $grandTotal = (float) $v['taxable_amt'] + (float) $v['discount_amount']; $grnd = $grandTotal; if (strpos($grandTotal, '.') !== false) { $grandTotalArray = explode('.', $grandTotal); if (strlen($grandTotalArray[1]) < 2) { $grandTotal = $grandTotalArray[0] . '.' . $grandTotalArray[1] . '0'; } else { $grandTotal = $grandTotalArray[0] . '.' . $grandTotalArray[1]; } } else { $grandTotal = (string) $grandTotal . '.00'; } $en = new NumberFormatter('en', NumberFormatter::SPELLOUT); $enamt = $en->format($v['net_total']); $enamt = ucwords($enamt); $ar = new NumberFormatter('ar', NumberFormatter::SPELLOUT); $aramt = $ar->format($v['net_total']); if (strpos($v['net_total'], '.') !== false && strpos($enamt, 'Point') !== false) { $net = explode('.', $v['net_total']); $enamtArray = explode('Point', $enamt); if ($net[1] === '10') { $amt = 'Ten'; } elseif ($net[1] === '20') { $amt = 'Twenty'; } elseif ($net[1] === '30') { $amt = 'Thirty'; } elseif ($net[1] === '40') { $amt = 'Fourty'; } elseif ($net[1] === '50') { $amt = 'Fifty'; } elseif ($net[1] === '60') { $amt = 'Sixty'; } elseif ($net[1] === '70') { $amt = 'Seventy'; } elseif ($net[1] === '80') { $amt = 'Eighty'; } elseif ($net[1] === '90') { $amt = 'Ninety'; } else { if (strpos($enamtArray[1], 'Zero') !== false) { $amt = $enamtArray[1]; $amt = explode('Zero', $amt); $amt = $amt[1]; } else { $amt = explode('.', $v['net_total']); $amt = $en->format($amt[1]); $amt = ucwords($amt); } } $enamt = $enamtArray[0] . ' Riyals and ' . $amt . ' Halalas Only'; // $arabic = new GoogleTranslate(); // $arabic->setSource('en'); // $arabic->setTarget('ar'); // $arabic = $arabic->translate($enamt); } else { $enamt = $enamt . ' Riyals Only'; } @endphp
{!! QrCode::size(120)->generate($v['qrcode']) !!}
Total (Excluding VAT) / الإجمالي ( باستثناء ضربية القيمة المضافة)
{{ $grandTotal }}
Discount / الخصم
{{ $v['discount_amount'] }}
Total Taxable Amount (Excluding VAT)
(الإجمالي المبلغ الخاضع للضريبة ( باستثناء ضربية القيمة المضافة
{{ $v['taxable_amt'] }}
Total VAT / (15%) الإجمالي ضريبة القيمة المضافة
{{ $v['tax'] }}
Total Due Amount / الإجمالي المبلغ المستحق
{{ $v['net_total'] }}
{{ $enamt }}
@endforeach @endforeach
Received By..................................... Salesman.....................................
{{--
E-mail: alowaisest@gmail.com
Alinma Bank / SA3505000068201406308000
--}}