@if ($PrintSettings->letterpad_with_heading == 0) @endif @foreach ($orders as $order)
@if ($PrintSettings->letterpad_print_format) @if ($PrintSettings->letterpad_with_heading == 0)

ORDER DETAILS

@else
@if ($qr_code != null)

@endif

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

ORDER DETAILS

@endif
GST NUMBER {{ $company->gst }}
Order Number {{ $order->order_code }}
Order Date {{ Carbon\Carbon::parse($order->order_date)->format('d-m-Y') }}
Transportation Mode
Vehicle Number {{ $order->vehicle_no ?? '-' }}
Date & Time of Supply
Details of Reciever(Billed to) Details of Consignee (Shipped to)
Name : {{ $order->debitLedger->name }} Name : {{ $order->debitLedger->name }}
Address :{{ $order->debitLedger->address }} Address :{{ $order->shipping_address }}
State {{ $order->debitLedger->state }}
Mobile:{{ $order->debitLedger->mobile_no }}
GST No:{{ $order->debitLedger->gst }}
@foreach ($order->items as $key => $item) @endforeach @if ($order->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>
{{ $order->items->sum('quantity') }} {{ number_format($order->items->sum('disc_amount')) }} {{ number_format($order->items->sum('taxable_value')) }} {{ number_format($order->items->sum('sgst'), 2) }} {{ number_format($order->items->sum('cgst'), 2) }} {{ number_format($order->items->sum('igst'), 2) }} {{ number_format($order->items->sum('total'), 2) }}
@php $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($order->amount); @endphp
Invoice Value(In Words)
({{ $words }})
Freight {{ number_format($order->freight, 2) }}
Round off {{ number_format($order->round_off, 2) }}
Certified that the Particulars given above are true and correct Discount {{ number_format($order->discount, 2) }}
Total {{ number_format($order->amount, 2) }}
Closing Balance : {{ number_format($order->closing_balance, 2) }} {{ $company->name }}
Authorised Signatory
{{-- Normal Table --}} @else
Bill To
{{ $order->debitLedger->name }}
Address:{{ $order->debitLedger->address }}
GSTIN:{{ $order->debitLedger->gst }} State:{{ $order->debitLedger->state }}
Mobile: {{ $order->debitLedger->mobile_no }}
Ship To
{{ $order->debitLedger->name }}
Address:{{ $order->shipping_address }}
@if ($company->show_remarks && $order->remarks != null) @endif
Order No: {{ $order->order_code }}
Order Date: {{ Carbon\Carbon::parse($order->order_date)->format('d-m-Y') }}
Remarks: {{ $order->remarks }}
@foreach ($order->items as $key => $item) @endforeach @if ($order->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($order->items->sum('cgst'), 2) }}
Sgst {{ number_format($order->items->sum('sgst'), 2) }}
Total {{ $order->items->sum('quantity') }} {{ number_format($order->items->sum('total'), 2) }}

@php $hsn_codes = $order ->items() ->join('stock_items', 'order_items.stock_item_id', '=', 'stock_items.id') ->select( 'stock_items.hsn_code', 'order_items.gst_per', \DB::raw('SUM(order_items.cgst) as cgst'), \DB::raw('SUM(order_items.sgst) as sgst'), \DB::raw('SUM(order_items.taxable_value) as taxable_value'), ) ->groupBy('stock_items.hsn_code', 'order_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($order->items->sum('cgst'), 2) }} {{ number_format($order->items->sum('sgst'), 2) }} {{ number_format($order->items->sum('cgst') + $order->items->sum('sgst'), 2) }}

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

Terms and Conditions
{!! $company->terms_conditions !!}
@endif
@if ($orders->last() != $order)
@endif @endforeach