@php $generalsetting = \App\GeneralSetting::first(); @endphp

ekhadiindia.com

Tax Invoice/Bill of Supply/Cash Memo


@php @$billing_address = json_decode($data['order_products'][0]->order->billing_address); @endphp @php $shipping_address = json_decode(@$data['order_products'][0]->order->shipping_address); @endphp
Sold By :

{{@$data['seller_address']->name}}

{{@$data['seller_address']->address}}

PAN No: {{@$data['seller_address']->company_pan}}

GST Registration No: {{@$data['seller_address']->gst_no}}

{{ translate('Billing Address') }} :

{{ @$billing_address->name }}

{{ @$billing_address->address }}, {{ @$billing_address->city }}, {{ @$billing_address->country }}

{{ translate('Email') }}: {{ @$billing_address->email }}

{{ translate('Phone') }}: {{ @$billing_address->phone }}

{{ translate('State') }}: {{ @$billing_address->state }}

{{ translate('Postal Code') }}: {{ @$billing_address->postal_code }}

@if(!empty($billing_address->gst_number))

{{ translate('GST Number') }}: {{ @$billing_address->gst_number }}

@else

{{ translate('GST Number') }}: {{ 'N/A' }}

@endif
{{ translate('Shipping Address') }} :

{{ @$shipping_address->name }}

{{ @$shipping_address->address }}, {{ @$shipping_address->city }}, {{ @$shipping_address->country }}

{{ translate('Email') }}: {{ @$shipping_address->email }}

{{ translate('Phone') }}: {{ @$shipping_address->phone }}

{{ translate('State') }}: {{ @$shipping_address->state }}

{{ translate('Postal Code') }}: {{ @$shipping_address->postal_code }}

Order Number : {{@$data['order_products'][0]->order->code}}
{{ translate('Order Date') }} : {{ date('d-m-Y', @$data['order_products'][0]->order->date) }}
Invoice Number : {{ substr(@$data['invoice_number'], 0,-4) }}
{{ translate('Invoice Date') }} : {{ date('d-m-Y', @$data['order_products'][0]->order->date) }}
@php $Product_tax = 0; $completeOrderGrandTotal = \App\OrderDetail::where('order_id', @$data['order_products'][0]->order->id)->sum('price'); $grandTotal = 0; $shippingPriceFraction = (float)49/(float)$data['no_of_invoice']; $max_tax = array(); $orderDetailPriceTotal = array(); $rupees = ''; @endphp @foreach($data['order_products'] as $key => $orderDetail) @if(!empty($orderDetail)) @php $max_tax[] = $orderDetail->product->tax; $orderDetailPriceTotal[] = $orderDetail->price; if($billing_address->state == @$data['seller_address']->state) { $unitPrice = ($orderDetail->product->unit_price/(100+$orderDetail->product->tax))*100; $discount = ($orderDetail->product->unit_price*$orderDetail->product->discount)/100; $discountAmout = $orderDetail->product->unit_price-$discount; $grandTotal += $discountAmout*$orderDetail->quantity; $netAmount = $unitPrice*$orderDetail->quantity; $tax_amount = $orderDetail->product->unit_price*$orderDetail->quantity - $netAmount; $Product_tax+= $tax_amount; if($orderDetail->product->tax != "" || $orderDetail->product->tax != '0' || $orderDetail->product->tax != '0.00'){ $tax_type_lable = "

CGST

SGST

"; $taxP = $orderDetail->product->tax/2; $finalTaxP = '

'.$taxP.'%'.'

'.$taxP.'%'.'

'; $tax_amt = $tax_amount/2; $finalTax_amt = '

'. $rupees.number_format((float)@$tax_amt, 2, '.', '').'

'.$rupees.number_format((float)@$tax_amt, 2, '.', '').'

'; }else{ $tax_type_lable = "

N/A

"; $taxP = $orderDetail->product->tax; $finalTaxP = '

'.$taxP.'%'.'

'; $tax_amt = $tax_amount; $finalTax_amt = '

'. $rupees.number_format((float)@$tax_amt, 2, '.', '').'

'; } } else { if($orderDetail->product->tax != "" || $orderDetail->product->tax != '0' || $orderDetail->product->tax != '0.00'){ $tax_type_lable = "

IGST

"; }else{ $tax_type_lable = "

N/A

"; } $unitPrice = ($orderDetail->product->unit_price/(100+$orderDetail->product->tax))*100; $discount = ($orderDetail->product->unit_price*$orderDetail->product->discount)/100; $discountAmout = $orderDetail->product->unit_price-$discount; $grandTotal += $discountAmout*$orderDetail->quantity; $netAmount = $unitPrice*$orderDetail->quantity; $taxP = $orderDetail->product->tax; $finalTaxP = $taxP.'%'; $tax_amount = ($orderDetail->product->unit_price*$orderDetail->quantity - $netAmount); $Product_tax+= $tax_amount; $finalTax_amt = $rupees.number_format((float)@$tax_amount, 2, '.', ''); } @endphp @php if(!empty($orderDetail->variation)){ $productStock = \App\ProductStock::with('product')->where('product_id', $orderDetail->product_id)->where('variant', @$orderDetail->variation)->first(); }else{ $productStock = \App\ProductStock::with('product')->where('product_id', $orderDetail->product_id)->first(); } @endphp @endif @endforeach @if(@$data['order_products'][0]->order->coupon_discount > 0) @php $invoioceCouponDiscount = 663.6; $dicountper = @$invoioceCouponDiscount/665 * 100; if(@$data['order_products'][0]->order->coupon_id != null){ $couponCode = \App\Coupon::where('id', @$data['order_product'][0]->order->coupon_id)->first(); if(!empty($couponCode)){ $coupon_code = $couponCode->code; }else{ $coupon_code = null; } }else{ $coupon_code = null; } @endphp @endif @if($completeOrderGrandTotal < 1000) @else @endif
{{ translate('S. NO') }} {{ translate('Product Name') }} {{ translate('Unit Price') }} {{ translate('Quantity') }} {{ translate('Net Amount') }} {{ translate('Tax Rates') }} {{ translate('Tax Type') }} {{ translate('Tax Amount') }} {{ translate('Discount') }} {{ translate('Total Amount') }}
{{$key+1}} {{ $orderDetail->product->name }}
{{@$orderDetail->variation}}
{{'HSN code: '.@$orderDetail->product->hsn_code }}
{{'SKU: '.@$productStock->sku}}
{!! $rupees.number_format((float)$unitPrice, 2, '.', '') !!} {{ $orderDetail->quantity }} {!! $rupees.number_format((float)@$netAmount, 2, '.', '') !!} {!! @$finalTaxP !!} {!! @$tax_type_lable !!} {!! $finalTax_amt !!} @if($orderDetail->product->discount != '0.00'){{$orderDetail->product->discount.'%'}} @else {{$orderDetail->product->discount.'%'}}@endif {!! $rupees.number_format((float)@$discountAmout*$orderDetail->quantity, 2, '.', '') !!}
Coupon discount @if($coupon_code != null) {{ '('.$coupon_code.')' }} @endif {{ number_format((float)@$dicountper, 2, '.', '').' %' }} {{number_format((float)$invoioceCouponDiscount, 2, '.', '')}}
Shipping & Handling Charge {!! $rupees.number_format((float)$shippingUniPrice, 2, '.', '') !!} N/A {!! $rupees.number_format((float)$shippingUniPrice, 2, '.', '') !!} {!! @$finalTaxP !!} {!! @$tax_type_lable !!} {!! @$shippinc !!} {{'0%'}} @if(@completeOrderGrandTotal < 1000) {{number_format((float)$shippingPriceFraction, 2, '.', '')}} @endif
Handling Charge {!! $rupees.number_format((float)$shippingUniPrice, 2, '.', '') !!} N/A {!! $rupees !!} 0.00 {{'0%'}} N/A {!! $rupees.number_format((float)$shippingUniPrice, 2, '.', '') !!} {{'0%'}} {!! $rupees.'0.00'; !!}
Total Amount @if($completeOrderGrandTotal < 1000) {{ number_format((float)@$Product_tax+($shippingPriceFraction-$shippingUniPrice), 2, '.', '') }} @else {{ number_format((float)@$Product_tax, 2, '.', '') }} @endif {{number_format(1.405 , 2, '.', '')}}
Total Amount in words: {{AmountInWords(number_format(1.405, 2, '.', ''))}} Only
whether tax is payable under reverse charge-No

Authorized Signatory