{{-- dd($invoice) --}} @php $invoice_items = array_chunk( $invoice->sale_details, 15 ); $count = count($invoice->sale_details); $c=0; @endphp
@foreach($invoice_items as $orders)
{{ ucwords(strtolower($invoice->branch->name)) }}
{{ $invoice->branch->address }}, {{ $invoice->branch->city }}, {{ $invoice->branch->state }}-{{ $invoice->branch->pincode }}
PH:{{ $invoice->branch->phone }}, E-mail : {{ $invoice->branch->email }}
QUOTATION
GSTIN: {{ $invoice->branch->gst }}
Quotation No: {{ $invoice->invoice_no }}
Quotation Date: {{ date("d-m-Y", strtotime($invoice->sale_date)) }}
Reverse Charge(Y/N): N
State: {{ $invoice->customer->state->name }} - State Code: {{ $invoice->customer->state->state_code }}
Bill to Party: {{ $invoice->customer->name }}
{{ $invoice->customer->address }}, {{ $invoice->customer->email }}
{{ $invoice->customer->state->name }}
GSTIN: {{ $invoice->customer->gstin }}
Mobile: {{ $invoice->customer->mobile }}
Transportation Mode:
@php $regno = ''; $driverName = $placeName = $print_diver = $print_site = $print_vehicle = '' ; if(!empty($invoice->site_data)) { $siteData = json_decode($invoice->site_data); $driverName = $siteData->driver; $placeName = $siteData->site; $print_diver = $siteData->printdiver ?? ''; $print_site = $siteData->printsite ?? ''; $print_vehicle = $siteData->printvehicle ?? ''; if($print_diver==0) { $driverName=''; } if($print_site==0) { $placeName=''; } } if(!empty($invoice->vehicle->reg_no)) { if($print_vehicle==0) { $regno=''; } else { $regno = $invoice->vehicle->reg_no; } } @endphp Vehicle No: {{ (!is_null($regno))?$regno:'' }}
Driver Name: {{ (!is_null($driverName))?$driverName:'' }}
Place of Supplay: {{ (!is_null($placeName))?$placeName:'' }}
{!! nl2br($invoice->branch->bank_details) !!}
GPay Accepted 
@foreach($orders as $orderItems) @php $c++; @endphp @endforeach
No Description HSNCode Qty Rate Gross Disc GST% CGST Amt SGST Amt IGST Amt Total
{{ $c }} {{ $orderItems->product->name }} ({{ ucfirst(strtolower($orderItems->product->unit->unit)) }}) {{ $orderItems->product->hsncode }} {{ $orderItems->quantity }} {{ $orderItems->unit_price }} {{ $orderItems->gross_amount }} {{ $orderItems->discount_amount }} {{ $orderItems->cgst }} {{ ($invoice->tax_type == 'IGST')?'0.00':$orderItems->cgst_amount }} {{ ($invoice->tax_type == 'IGST')?'0.00':$orderItems->sgst_amount }} {{ ($invoice->tax_type == 'IGST')?number_format(round($orderItems->cgst_amount + $orderItems->sgst_amount, 2), 2, '.', ''):'0.00' }} {{ $orderItems->item_total }}
Total
{{ collect($orders)->sum('quantity') }}
{{ collect($orders)->sum('gross_amount') }}
{{ collect($orders)->sum('discount_amount') }}
{{ number_format(round(collect($orders)->sum('item_total')), 2, '.', '') }}
@if($invoice->tax_type == 'IGST') @else @endif @if($invoice->tax_type == 'IGST') @else @endif @if($invoice->tax_type == 'IGST') @else @endif @if($invoice->tax_type == 'IGST') @else @endif
GST % Taxable CGST Amt SGST Amt IGST Amt Tax Total
5% 0.00 0.00 {{ number_format((($invoice->tax_5_cgst)?$invoice->tax_5_cgst:'0.00') + (($invoice->tax_5_sgst)?$invoice->tax_5_sgst:'0.00'), 2, '.', '') }}{{ ($invoice->tax_5_cgst)?$invoice->tax_5_cgst:'0.00' }} {{ ($invoice->tax_5_sgst)?$invoice->tax_5_sgst:'0.00' }} 0.00{{ round($invoice->tax_5_cgst + $invoice->tax_5_sgst, 2) }}
12% 0.00 0.00 {{ number_format((($invoice->tax_12_cgst)?$invoice->tax_12_cgst:'0.00') + (($invoice->tax_12_sgst)?$invoice->tax_12_sgst:'0.00'), 2, '.', '') }}{{ ($invoice->tax_12_cgst)?$invoice->tax_12_cgst:'0.00' }} {{ ($invoice->tax_12_sgst)?$invoice->tax_12_sgst:'0.00' }} 0.00{{ round($invoice->tax_12_cgst + $invoice->tax_12_sgst, 2) }}
18% 0.00 0.00 {{ number_format((($invoice->tax_18_cgst)?$invoice->tax_18_cgst:'0.00') + (($invoice->tax_18_sgst)?$invoice->tax_18_sgst:'0.00'), 2, '.', '') }}{{ ($invoice->tax_18_cgst)?$invoice->tax_18_cgst:'0.00' }} {{ ($invoice->tax_18_sgst)?$invoice->tax_18_sgst:'0.00' }} 0.00{{ round($invoice->tax_18_cgst + $invoice->tax_18_sgst, 2) }}
28% 0.00 0.00 {{ number_format((($invoice->tax_28_cgst)?$invoice->tax_28_cgst:'0.00') + (($invoice->tax_28_sgst)?$invoice->tax_28_sgst:'0.00'), 2, '.', '') }}{{ ($invoice->tax_28_cgst)?$invoice->tax_28_cgst:'0.00' }} {{ ($invoice->tax_28_sgst)?$invoice->tax_28_sgst:'0.00' }} 0.00{{ round($invoice->tax_28_cgst + $invoice->tax_28_sgst, 2) }}
Exempted{{ $invoice->tax_0_cgst }}
@if($invoice->tax_type == 'IGST') @else @endif
Taxable Amt:{{ round(collect($orders)->sum('taxable_amount'), 2) }} 
SGST/CGST:0.00 
IGST:{{ round(collect($orders)->sum('cgst_amount') + collect($orders)->sum('sgst_amount'), 2) }} 
SGST:{{ round(collect($orders)->sum('sgst_amount'), 2) }} 
CGST:{{ round(collect($orders)->sum('cgst_amount'), 2) }} 
Bill Discount:{{ $invoice->total_discount_amount }} 
Cash Discount:{{ $invoice->cash_discount }} 
Round Off:{{ $invoice->round_off }} 
Freight Coolie: {{ $invoice->freight_coolie }}Cost Factor: {{ $invoice->cost_factor }}
Other Expense: {{ $invoice->otherexp }}Cess Amt{{ $invoice->cess }}
Grand Total In Words:

DECLARATION : We Declare that this invoice shows the actual price of the goods described and that all particulars are true and correct

Net Amount
{{ number_format(round($invoice->grand_total), 2, '.', ''); }}
For {{ $invoice->branch->name }}
Authorised Signatory
@endforeach