@if ($PrintSettings->letterpad_with_heading == 0) @endif @foreach ($accountingVouchers as $accountingVoucher)
@if ($PrintSettings->letterpad_print_format) @if ($PrintSettings->letterpad_with_heading == 0)

GST INVOICE

@else
@if ($qr_code != null)

@endif

{{ $company->name }}

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

DELIVERY CHALLAN

@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 ?? '-' }}
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 }} Name {{ $accountingVoucher->customer ? $accountingVoucher->customer->name : $accountingVoucher->debitLedger->name }}
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 }}
@foreach ($accountingVoucher->items as $key => $item) @endforeach @if ($accountingVoucher->items->count() < 6) @endif
sno Items HSN Qty Unit Rate Disc Taxable
Value
CGST SGST Igst Amount
% Amt % Amt
{{ $key + 1 }} {{ $item->stockItem->name }} {{ $item->stockItem->hsn_code }} {{ $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) }}
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('sgst'), 2) }} {{ number_format($accountingVoucher->items->sum('cgst'), 2) }} {{ number_format($accountingVoucher->items->sum('igst'), 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) }}
Closing Balance : {{ number_format($accountingVoucher->closing_balance, 2) }} {{ $company->name }}
Authorised Signatory
{{-- 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() ->select( 'accounting_voucher_items.gst_per', 'stock_items.hsn_code', \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 / 2 }}% {{ $hsn_code->cgst }} {{ $hsn_code->gst / 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)
@endif @endforeach