@foreach ($accountingVouchers as $accountingVoucher) @php $chunks = $accountingVoucher->items->chunk(19); $pages = count($chunks); @endphp @foreach ($chunks as $chunkIndex => $chunk) @if($pageLogo != null) @endif
barcode

{{ $company->name }}

{{ $company->address }}
Email: {{ $company->email }}
Phone: {{ $company->phone }}
GSTIN: {{ $company->gst }},State : {{ $company->state }}- Code: {{ $company->state_code }}
Page: {{ $chunkIndex + 1 }} of {{ $pages }}
@if ($accountingVoucher->einvoice != null)
@if ($accountingVoucher->ewayBill != null) @endif
IRN :  {{ $accountingVoucher->einvoice->irn }}
Ack No :  {{ $accountingVoucher->einvoice->ack_no }}
Ack Date :  {{ date('d-m-Y', strtotime($accountingVoucher->einvoice->ack_dt)) }}
E-Way Bill No :  {{ $accountingVoucher->ewayBill ? $accountingVoucher->ewayBill->ewayBillNo : '' }}
E-Way Bill Date :  {{ $accountingVoucher->ewayBill ? $accountingVoucher->ewayBill->ewayBillDate : '' }}
E-Way Bill Valid Till :  {{ $accountingVoucher->ewayBill ? $accountingVoucher->ewayBill->validUpto : '' }}
@if ($accountingVoucher->einvoice) @php $qrCodeData = $accountingVoucher->einvoice->signed_QRCode; $qrImage = QrCode::format('svg')->size(150)->generate($qrCodeData); $qrImageBase64 = base64_encode($qrImage); @endphp QR Code @endif
@endif

Tax Invoice

Name

:  {{ $accountingVoucher->debitLedger->legal_name != null ? $accountingVoucher->debitLedger->legal_name : $accountingVoucher->debitLedger->name }}

INV No

:  {{ $accountingVoucher->voucher_number }}

Address :  {{ $accountingVoucher->debitLedger->address }} Date :  {{ date('d-m-Y', strtotime($accountingVoucher->voucher_date)) }}
Phone No :  {{ $accountingVoucher->debitLedger->mobile_no }} SMAN :  {{ $accountingVoucher->user ? $accountingVoucher->user->name : '' }}
GSTIN
:  {{ $accountingVoucher->debitLedger->gst }} ,  {{ $accountingVoucher->debitLedger->state }} - {{ $accountingVoucher->debitLedger->state_code }}
Route :  {{ $accountingVoucher->debitLedger ? ($accountingVoucher->debitLedger->route ? $accountingVoucher->debitLedger->route->name : '') : '' }}
@if ($accountingVoucher->items->sum('disc_amount') > 0) @endif @foreach ($chunk as $key => $item) @if ($accountingVoucher->items->sum('disc_amount') > 0) @endif @endforeach @for ($i = count($chunk); $i < 10; $i++) @if ($accountingVoucher->items->sum('disc_amount') > 0) @endif @endfor @if ($loop->last) @if ($accountingVoucher->items->sum('disc_amount') > 0) @endif @else @endif
NO DESCRIPTION HSN UNIT RATE QTY G.VALUEDIS
%
GST
%
TAXAMT NETVAL
{{ $key + 1 }} {{ $item->stockItem->name }} {{ $item->stockItem->hsn_code }} {{ $item->unit->symbol }} {{ number_format($item->price, 2) }} {{ $item->quantity }} {{ number_format($item->gross_value, 2) }} {{ $item->disc_percentage }}{{ $item->gst_per }} {{ number_format($item->cgst + $item->sgst + +$item->igst + $item->cess, 2) }} {{ number_format($item->total, 2) }}
 

Total

{{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('gross_value'), 2) }} {{ number_format($accountingVoucher->items->sum('igst') + $accountingVoucher->items->sum('cgst') + $accountingVoucher->items->sum('sgst') + $accountingVoucher->items->sum('cess'), 2) }} {{ number_format($accountingVoucher->items->sum('total'), 2) }}
items->sum('disc_amount') > 0) colspan="11" @else colspan="10" @endif style="border-top:1px solid black !important">
@if (!$loop->last)
@endif @endforeach @php $taxDetails = $accountingVoucher ->items() ->select( 'gst_per', \DB::raw('SUM(cgst) as cgst'), \DB::raw('SUM(sgst) as sgst'), \DB::raw('SUM(igst) as igst'), \DB::raw('SUM(taxable_value) as taxable_value'), ) ->groupBy('gst_per') ->get(); $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->amount); @endphp
@if ($taxDetails->sum('igst') > 0) @else @endif @foreach ($taxDetails as $taxDetail) @if ($taxDetail->igst > 0) @else @endif @endforeach @if ($accountingVoucher->items->sum('igst') > 0) @else @endif
TAX VALUEIGSTCGST SGSTTOT.TAX
Taxable  {{ $taxDetail->gst_per }}% {{ number_format($taxDetail->taxable_value, 2) }}{{ number_format($taxDetail->igst, 2) }}{{ number_format($taxDetail->cgst, 2) }} {{ number_format($taxDetail->sgst, 2) }}{{ number_format($taxDetail->igst + $taxDetail->cgst + $taxDetail->sgst, 2) }}
TOTAL {{ number_format($accountingVoucher->items->sum('taxable_value'), 2) }}{{ number_format($accountingVoucher->items->sum('igst'), 2) }}{{ number_format($accountingVoucher->items->sum('cgst'), 2) }} {{ number_format($accountingVoucher->items->sum('sgst'), 2) }}{{ number_format($accountingVoucher->items->sum('igst') + $accountingVoucher->items->sum('cgst') + $accountingVoucher->items->sum('sgst'), 2) }}
Round Off : {{ number_format($accountingVoucher->round_off, 2) }}
@if ($accountingVoucher->discount != 0) Discount : {{ number_format($accountingVoucher->discount, 2) }}
@endif @if ($accountingVoucher->freight != 0) Freight : {{ number_format($accountingVoucher->freight, 2) }}
@endif
In Words : {{ $words }}

AMOUNT : {{ number_format($accountingVoucher->amount, 2) }}

@if ($company->bankLedger != null) {{-- --}} {{-- --}} {{-- --}}
OUR BANK DETAILS
Name : {{ $company->bankLedger->name }} @if($qr_code != null) @endif
Branch : {{ $company->bankLedger->branch }}
IFSC : {{ $company->bankLedger->ifsc_code }}
Account NO : {{ $company->bankLedger->account_number }}
@endif
DECLARATION :
Certified that the particulars given above are true and correct.
FOR: {{ $company->name }}

AUTHORIZED SIGNATORY
Remarks : {{ $accountingVoucher->remarks }} Printed Date: {{ \Carbon\Carbon::now()->format('d M Y') }} Time: {{ \Carbon\Carbon::now('Asia/Kolkata')->format('h:i A') }}
@if ($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach