@foreach ($orders as $order)

GSTIN: {{ $company->gst }}

@if ($print_type == 'proforma')

PROFORMA INVOICE

@else

ORDER DETAILS

@endif

Original Copy

{{ $company->name }}


{{ $company->address }}
Phone: {{ $company->phone }} Email: {{ $company->email }}

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

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

To, {{ $order->debitLedger->name }}
Ph: {{ $order->debitLedger->mobile_no }} GSTIN : {{ $order->debitLedger->gst }} Address : {{ $order->debitLedger->address }} {{-- Ph: {{ $order->debitLedger->mobile_no }} GSTIN : {{ $order->debitLedger->gst }} Address : {{ $order->debitLedger->address }} --}}
@foreach ($order->items as $key => $item) @endforeach
SN Description of Goods HSN/SAC
Code
MRP Qty Unit Price Gross
Amount
Dis
%
Disc
Amt
Taxable
Amt
Tax
%
GST
Amount
Amount
{{ $key + 1 }} {{ $item->stockItem->name }} @if ($item->variant_id != null)
({{ $item->variant->name }}) @endif @if ($item->remarks != null)
({{ $item->remarks }}) @endif
{{ $item->stockItem->hsn_code }} {{ number_format($item->stockItem->getMrp($order->order_date), 2) }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ number_format($item->price, 2) }} {{ number_format($item->gross_value, 2) }} {{ number_format($item->disc_percentage, 2) }} {{ $item->disc_amount }} {{ $item->taxable_value }} {{ $item->gst_per }} {{ number_format($item->cgst + $item->sgst + $item->igst, 2) }} {{ number_format($item->total, 2) }}
{{ $order->items->sum('quantity') }} {{ number_format($order->items->sum('gross_value'), 2) }} {{ number_format($order->items->sum('taxable_value'), 2) }} {{ number_format($order->items->sum('cgst') + $order->items->sum('sgst') + $order->items->sum('igst'), 2) }} {{ number_format($order->items->sum('total'), 2) }}
Add : Rounded Off (+) {{ $order->round_off }}
Discount : (-) {{ $order->discount ?? 0 }}
Previous Balance : {{ $order->previousBalance }} {{ $order->previousBalanceDrCr }} GRAND TOTAL {{ $order->amount }}
For {{ $company->name }}
@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.igst) as igst'), \DB::raw('SUM(order_items.taxable_value) as taxable_value'), ) ->groupBy('stock_items.hsn_code', 'order_items.gst_per') ->get(); // @dd($hsn_codes); @endphp @foreach ($hsn_codes as $hsn_code) @endforeach
HSN/SAC Taxable Amt. CGST Amt. SGST Amt. Igst
{{ $hsn_code->hsn_code }} {{ number_format($hsn_code->taxable_value, 2) }} {{ number_format($hsn_code->cgst) }} {{ number_format($hsn_code->sgst) }} {{ number_format($hsn_code->igst) }}
Authorised Signatory
@if ($company->bankLedger != null) @if (Auth::user()->company_profile->terms_conditions != null) @endif @if (Auth::user()->company_profile->terms_conditions == null) @endif

Terms And Conditions
{!! Auth::user()->company_profile->terms_conditions !!}
company_profile->terms_conditions != null) width="30%" style="border: 1px solid #000; border-top: none;" @else width="40%" @endif>
Bank Name : {{ $company->bankLedger->name }}
Branch : {{ $company->bankLedger->branch }}
Acc No : {{ $company->bankLedger->account_number }}
IFSC : {{ $company->bankLedger->ifsc_code }}
@endif
@if ($orders->last() != $order)
@endif @endforeach