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

{{ $company->address }}

PH:{{ $company->phone }}

GST:{{ $company->gst }}


Party {{ $order->creditLedger->name }}
NO @if ($order->accounting_voucher_id != null) {{ $order->accountingVoucher->voucher_number }} @else {{ $order->order_code }} @endif
Date @if ($order->accounting_voucher_id != null) {{ date('d-m-Y', strtotime($order->accountingVoucher->voucher_date)) }} @else {{ date('d-m-Y', strtotime($order->order_date)) }} @endif Time {{ \Carbon\Carbon::parse($order->created_at)->format('h:i A') }}

@foreach ($order->items as $key => $item) @endforeach @if ($order->items->count() < 5) @for ($i = $order->items->count(); $i <= 4; $i++) @endfor @endif
Item Mrp Qty Tax% Rate Amount
{{ $key + 1 }} {{ $item->stockItem->name }} {{ number_format($item->stockItem->getMrp($order->order_date)) }} {{ $item->quantity }} {{ $item->gst_per }} {{ number_format($item->price_inc_tax, 2) }} {{ number_format($item->total, 2) }}
             

Grand Total

{{ number_format($order->amount, 2) }}

@php $items = \App\Models\OrderItem::where('order_id', $order->id) ->join('stock_items', 'stock_items.id', '=', 'order_items.stock_item_id') ->select( 'order_items.gst_per', DB::raw('SUM(order_items.cgst) as cgst'), DB::raw('SUM(order_items.sgst) as sgst'), ) ->groupBy('order_items.gst_per') ->get(); @endphp @foreach ($items as $item) @endforeach
Tax Rate CGST SGST
{{ $item->gst }}% {{ $item->cgst }} {{ $item->sgst }}
@if ($orders->last() != $order)
@endif @endforeach