@if ($PrintSettings->letterpad_with_heading == 0) @endif @foreach ($accountingVouchers as $accountingVoucher) @for ($i = 0; $i < $PrintSettings->paper_print_count; $i++)
@if ($PrintSettings->letterpad_print_format) @if ($PrintSettings->letterpad_with_heading == 0)

GST INVOICE

@else
@if ($pageLogo != null)

@else

{{ $company->name }}

@endif

{{ $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

@endif
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 Reciever(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) @else @endif @if (!$accountingVoucher->items()->sum('igst') > 0) @endif @foreach ($accountingVoucher->items as $key => $item) @if ($PrintSettings->mrp) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @else @endif @endforeach @if ($accountingVoucher->items->count() < 6) @if ($PrintSettings->mrp) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @else @endif @endif @if ($PrintSettings->mrp) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @else @endif
items()->sum('igst') > 0) rowspan="2" @endif>sno items()->sum('igst') > 0) rowspan="2" @endif>Items items()->sum('igst') > 0)rowspan="2" @endif>HSNitems()->sum('igst') > 0) rowspan="2" @endif>MRPitems()->sum('igst') > 0) rowspan="2" @endif>Qty items()->sum('igst') > 0) rowspan="2" @endif>Unit items()->sum('igst') > 0) rowspan="2" @endif>Rate items()->sum('igst') > 0) rowspan="2" @endif>Disc items()->sum('igst') > 0) rowspan="2" @endif>Taxable
Value
Gst
%
IgstCGST SGSTitems()->sum('igst') > 0) rowspan="2" @endif>Amount
% 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 }} {{ number_format($item->igst, 2) }}{{ $item->gst_per / 2 }} {{ number_format($item->sgst, 2) }} {{ $item->gst_per / 2 }} {{ number_format($item->cgst, 2) }}{{ number_format($item->total, 2) }}
letterpad_print_format) style="height: 100px;border-left:1px solid black" @else style="height: 200px;border-left:1px solid black" @endif>
{{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('disc_amount')) }} {{ number_format($accountingVoucher->items->sum('taxable_value')) }}{{ number_format($accountingVoucher->items->sum('igst'), 2) }} {{ number_format($accountingVoucher->items->sum('sgst'), 2) }} {{ number_format($accountingVoucher->items->sum('cgst'), 2) }}{{ number_format($accountingVoucher->items->sum('total'), 2) }}
@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
{{-- Normal Table --}} @else
Bill To
@if ($accountingVoucher->customer != null) {{ $accountingVoucher->customer->name }} @else{{ $accountingVoucher->debitLedger->name }} @endif
Address:{{ $accountingVoucher->debitLedger->address }}
GSTIN:{{ $accountingVoucher->debitLedger->gst }} State:{{ $accountingVoucher->debitLedger->state }}
Mobile: @if ($accountingVoucher->customer != null) {{ $accountingVoucher->customer->mobile }} @else {{ $accountingVoucher->debitLedger->mobile_no }} @endif
Ship To
{{ $accountingVoucher->debitLedger->name }}
Address:{{ $accountingVoucher->ship_to_address }}
@if ($company->show_remarks && $accountingVoucher->remarks != null) @endif
Invoice No : {{ $accountingVoucher->voucher_number }}
Invoice Date: {{ Carbon\Carbon::parse($accountingVoucher->voucher_date)->format('d-m-Y') }}
Remarks: {{ $accountingVoucher->remarks }}
@foreach ($accountingVoucher->items as $key => $item) @endforeach @if ($accountingVoucher->items->count() < 6) @endif
S.NO Items HSN Qty Unit Rate Amount
{{ $key + 1 }} {{ $item->stockItem->name }} {{ $item->stockItem->hsn_code }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ $item->price }} {{ $item->taxable_value }}
Cgst {{ number_format($accountingVoucher->items->sum('cgst'), 2) }}
Cgst {{ number_format($accountingVoucher->items->sum('sgst'), 2) }}
Total {{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('total'), 2) }}

@php $hsn_codes = $accountingVoucher ->items() ->join('stock_items', 'accounting_voucher_items.stock_item_id', '=', 'stock_items.id') ->select( 'stock_items.hsn_code', 'accounting_voucher_items.gst_per', \DB::raw('SUM(accounting_voucher_items.cgst) as cgst'), \DB::raw('SUM(accounting_voucher_items.sgst) as sgst'), \DB::raw('SUM(accounting_voucher_items.taxable_value) as taxable_value'), ) ->groupBy('stock_items.hsn_code', 'accounting_voucher_items.gst_per') ->get(); @endphp @foreach ($hsn_codes as $hsn_code) @endforeach
HSN/SAC Taxable Value CGST SGST Total Tax Amount
Rate Amount Rate Amount
{{ $hsn_code->hsn_code }} {{ $hsn_code->taxable_value }} {{ $hsn_code->gst_per / 2 }}% {{ $hsn_code->cgst }} {{ $hsn_code->gst_per / 2 }}% {{ $hsn_code->sgst }} {{ $hsn_code->cgst + $hsn_code->sgst }}
Total {{ number_format($accountingVoucher->items->sum('cgst'), 2) }} {{ number_format($accountingVoucher->items->sum('sgst'), 2) }} {{ number_format($accountingVoucher->items->sum('cgst') + $accountingVoucher->items->sum('sgst'), 2) }}

@php $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->items->sum('total')); @endphp
Total Amount (in words)
{{ $words }}

Terms and Conditions
{!! $company->terms_conditions !!}
@endif
@if ($accountingVouchers->last() != $accountingVoucher && $i == $PrintSettings->paper_print_count - 1)
@endif @if ($i != $PrintSettings->paper_print_count - 1)
@endif @endfor @endforeach