@if(app('request')->input('print')=="y") @endif
@foreach($data as $k => $v) @php $slno = 1 @endphp
TAX INVOICE
{{ $v['customer_details']['name'] }}
{{ $v['bill_no'] }}
{{ $v['customer_details']['gstin'] }}
{{ $v['bill_date'] }}
@foreach($v['sold_items'] as $vv) @php $slno++ @endphp @endforeach
@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['tax_amount']}}
{{$vv['total']}}
@endforeach
@php $en = new NumberFormatter("en", NumberFormatter::SPELLOUT); $enamt = $en->format($v['net_total']); $ar = new NumberFormatter("ar", NumberFormatter::SPELLOUT); $aramt = $ar->format($v['net_total']); @endphp
SAR: {{ $enamt }}
ريال سعودي: {{ $aramt }}
{{ $v['taxable_amt'] }}
@php if($v['discount_amount']) { $discount = $v['discount_amount']; $net_before_vat = $v['taxable_amt'] - $v['discount_amount']; } else { $discount = 0; $net_before_vat = $v['taxable_amt']; } @endphp
{{ $discount }}
@php $company = "Rabou Al-Rail Trading Est."; $vat = "VAT: 300700571200003"; $date = $v['bill_date']; $d = date('Y/m/d', strtotime($date)); $time = $v['bill_time']; $vatTotal = $v['tax']; $total = $v['net_total']; $qr = $company . "\n" . $vat . "\n" . "Date & Time: " . $d . " " . $time . "\n" . "VAT@15%: " . $vatTotal . "\n" . "Total: " . $total; @endphp {!! QrCode::size(100)->generate($qr); !!}
{{ $net_before_vat }}
{{ $v['tax'] }}
{{ $v['net_total'] }}