@foreach ($accountingVouchers as $accountingVoucher) @for ($i = 0; $i < $PrintSettings->paper_print_count; $i++) @php $chunks = $accountingVoucher->items->chunk(15); $pages = count($chunks); @endphp @foreach ($chunks as $chunkIndex => $chunk)

Copy {{ $i + 1 }} | Page: {{ $chunkIndex + 1 }} of {{ $pages }}

@if ($pageLogo != null)

@endif

{{ $company->name }}

{{ $company->address }},{{ $company->pin_code }}
PH: {{ $company->phone }}

@if (Auth::user()->company_profile->fssai_number != null)

FSSAI NO:{{ Auth::user()->company_profile->fssai_number }}

@endif

GST INVOICE

GST NUMBER {{ $company->gst }}
Invoice Number {{ $accountingVoucher->voucher_number }}
Invoice Date {{ Carbon\Carbon::parse($accountingVoucher->voucher_date)->format('d-m-Y') }}
Transportation Mode
Vehicle Number {{ $accountingVoucher->vehicle_no != null ? $accountingVoucher->vehicle_no : $accountingVoucher->remarks }}
Date & Time of Supply {{ $accountingVoucher->date_of_supply != null ? Carbon\Carbon::parse($accountingVoucher->date_of_supply)->format('d-m-Y h:i A') : '-' }}
Details of Receiver(Billed to) Details of Consignee (Shipped to)
Name: {{ $accountingVoucher->customer ? $accountingVoucher->customer->name : $accountingVoucher->debitLedger->name }} @if ($PrintSettings->show_customer_name_in_ship_to) Name @endif @if ($PrintSettings->show_customer_name_in_ship_to) @php $shipToName = $accountingVoucher->shipping_party_name ?? ($accountingVoucher->customer->name ?? $accountingVoucher->debitLedger->name); @endphp {{ $shipToName }} @endif
Address: {{ $accountingVoucher->customer ? $accountingVoucher->customer->address : $accountingVoucher->debitLedger->address }} Address: {{ $accountingVoucher->ship_to_address }}
State: {{ $accountingVoucher->debitLedger->state }}
Mobile: {{ $accountingVoucher->customer ? $accountingVoucher->customer->mobile : $accountingVoucher->debitLedger->mobile_no }}
GST No: {{ $accountingVoucher->debitLedger->gst }}
@if ($PrintSettings->mrp) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @endif @foreach ($chunk as $key => $item) @if ($PrintSettings->mrp) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @endif @endforeach @for($k = $chunk->count(); $k <= 17; $k++) @if ($PrintSettings->mrp) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @endif @endfor @if ($loop->last) @if ($PrintSettings->mrp) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @endif @else @endif
sno Items HSNMRPQty Unit Rate Disc Taxable
Value
CGST SGSTIgstAmount
% Amt % Amt
{{ $key + 1 }} {{ $item->stockItem->name }} @if ($PrintSettings->show_item_description) ({{ $item->stockItem->description }}) @endif {{ $item->stockItem->hsn_code }}{{ number_format($item->stockItem->getMrp($accountingVoucher->voucher_date), 2) }}{{ $item->quantity }} {{ $item->unit->symbol }} {{ number_format($item->price, 2) }} {{ number_format($item->disc_amount, 2) }} {{ number_format($item->taxable_value, 2) }} {{ $item->gst_per / 2 }} {{ number_format($item->cgst, 2) }} {{ $item->gst_per / 2 }} {{ number_format($item->sgst, 2) }}{{ number_format($item->igst, 2) }}{{ number_format($item->total, 2) }}
{{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('disc_amount')) }} {{ number_format($accountingVoucher->items->sum('taxable_value')) }} {{ number_format($accountingVoucher->items->sum('sgst'), 2) }} {{ number_format($accountingVoucher->items->sum('cgst'), 2) }}{{ number_format($accountingVoucher->items->sum('igst'), 2) }} {{ number_format($accountingVoucher->items->sum('total'), 2) }}
mrp) colspan="14" @else colspan="13" @endif style="border-top:1px solid black !important">
@if (!$loop->last)
@endif @endforeach @php $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->amount); @endphp
Invoice Value(In Words)
({{ $words }})
Freight {{ number_format($accountingVoucher->freight, 2) }}
Round off {{ number_format($accountingVoucher->round_off, 2) }}
Certified that the Particulars given above are true and correct Discount {{ number_format($accountingVoucher->discount, 2) }}
Total {{ number_format($accountingVoucher->amount, 2) }}
@if ($PrintSettings->show_item_description == 0) Closing Balance : {{ number_format($accountingVoucher->closing_balance, 2) }} @endif @if ($company->bankLedger != null)
Bank Name : {{ $company->bankLedger->name }} @if ($qr_code != null)

@endif
Branch : {{ $company->bankLedger->branch }}
Acc No : {{ $company->bankLedger->account_number }}
IFSC : {{ $company->bankLedger->ifsc_code }}
@endif
{{ $company->name }} @if ($seal_image != null)

Logo @endif
Authorized Signature
@if ($accountingVouchers->last() != $accountingVoucher && $i == $PrintSettings->paper_print_count - 1)
@endif @if ($i != $PrintSettings->paper_print_count - 1)
@endif @endfor @endforeach