@foreach ($orders as $order)
@if ($pageLogo != null) Logo @endif

{{ $company->name }}

{{ $company->address }}

Email: {{ $company->email }}

Phone: {{ $company->phone }}

State: {{ $company->state }}

State Code: {{ $company->state_code }}

GSTIN : {{ $company->gst }}

Tax is payable on Reverse Charge : (Yes / No)

Order No : {{ $order->order_code }}

Order Date : {{ \Carbon\Carbon::parse($order->order_date)->format('d M Y') }}

Order Details

{{--

CREDIT BILL

--}}
{{--

Original for Receipient

Duplicate for Supplier
/ Transport

Triplicate for Supplier

--}}

Mrs.    {{ $order->debitLedger->name }}

{{ $order->debitLedger->address }}

State : {{ $order->debitLedger->state }}                           State Code:{{ $order->debitLedger->state_code }}

GST : {{ $order->debitLedger->gst }}

Phone : {{ $order->debitLedger->mobile_no }}

Shipping Address

{{ $order->shipping_address }}

@if ($order->items()->sum('igst') > 0) @else @endif @if ($order->items()->sum('igst') == 0) @endif @foreach ($order->items as $key => $item) @if ($order->items()->sum('igst') > 0) @else @endif @endforeach @for ($i = $order->items()->count(); $i <= 20; $i++) @if ($order->items()->sum('igst') > 0) @else @endif @endfor @if ($order->items()->sum('igst') > 0) @else @endif
items()->sum('igst') == 0) rowspan="2" @endif>s no items()->sum('igst') == 0) rowspan="2" @endif>HSN items()->sum('igst') == 0) rowspan="2" @endif>Product items()->sum('igst') == 0) rowspan="2" @endif>Qty items()->sum('igst') == 0) rowspan="2" @endif>Unit items()->sum('igst') == 0) rowspan="2" @endif>Unit
Price
items()->sum('igst') == 0) rowspan="2" @endif>Amount items()->sum('igst') == 0) rowspan="2" @endif>Disc items()->sum('igst') == 0) rowspan="2" @endif width="70px">TaxableGst % IGSTCGST SGSTitems()->sum('igst') == 0) rowspan="2" @endif width="70px">Total
Rate Amt Rate Amt
{{ $key + 1 }} {{ $item->stockItem->hsn_code }} {{ $item->stockItem->name }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ number_format($item->price, 2) }} {{ number_format($item->gross_value, 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->cgst, 2) }} {{ $item->gst_per / 2 }} {{ number_format($item->sgst, 2) }}{{ number_format($item->total, 2) }}
 
{{ $order->items->sum('quantity') }} {{ number_format($order->items->sum('gross_value'), 2) }} {{ number_format($order->items->sum('disc_amount'), 2) }} {{ number_format($order->items->sum('taxable_value'), 2) }} {{ number_format($order->items->sum('igst'), 2) }}{{ number_format($order->items->sum('cgst'), 2) }} {{ number_format($order->items->sum('sgst'), 2) }}{{ number_format($order->items->sum('total'), 2) }}
@php $gstItems = \App\Models\OrderItem::where('order_id', $order->id) ->select( 'gst_per', DB::raw('SUM(taxable_value) as TaxableValue'), DB::raw('SUM(total) as Total'), ) ->groupBy('gst_per') ->get(); $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($order->amount); @endphp
@foreach ($gstItems as $gstItem) [GST Summary : {{ $gstItem->gst_per }} of {{ $gstItem->TaxableValue }}  =  {{ $gstItem->Total }} ]
@endforeach Grand Total In Words
({{ $words }})
@if ($order->freight > 0) @endif
Discount : {{ $order->discount }}
Freight: {{ $order->freight }}
Round Off: {{ $order->round_off }}
Grand Total : {{ $order->amount }}
Bank Details:{{ $company->bankLedger->name }} , {{ $company->bankLedger->branch }}
Account No: {{ $company->bankLedger->account_number }} ,   IFSC Code: {{ $company->bankLedger->ifsc_code }}
For : {{ $company->name }}

Authorised Signatory
@if ($orders->last() != $order)
@endif @endforeach