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

ekhadiindia.com

Tax Invoice/Bill of Supply/Cash Memo

Credit Note
(Original for Recipient)


@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}}
Original Invoice Number : {{@$data['invoice_no']}}
{{ translate('Original Order Date') }} : {{ date('d-m-Y', @$data['order_products'][0]->order->date) }}
Credit Note No : {{@$data['random']}}
{{translate('Credit Note Date') }} : {{ $data['return_date'] }}
@php $Product_tax = 0; $completeOrderGrandTotal = \App\OrderDetail::where('order_id', @$data['order_products'][0]->order->id)->sum('price'); $grandTotal = 0; $shippingPriceFraction = (float)shippingCharge()/(float)$data['no_of_invoice']; $max_tax = array(); $rupees = '– ₹ '; @endphp @foreach($data['order_products'] as $key => $orderDetail) @if(!empty($orderDetail)) @php $max_tax[] = $orderDetail->product->tax; 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 $dicountper = @$data['order_products'][0]->order->coupon_discount/$completeOrderGrandTotal * 100; @endphp @endif @if($completeOrderGrandTotal < minShippingAmount()) @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 {{ number_format((float)@$dicountper, 2, '.', '').' %' }} {{number_format((float)$data['order_products'][0]->order->coupon_discount, 2, '.', '')}}
Handling Charge {!! $rupees.number_format((float)$shippingUniPrice, 2, '.', '') !!} N/A {!! $rupees.number_format((float)$shippingUniPrice, 2, '.', '') !!} {!! @$finalTaxP !!} {!! @$tax_type_lable !!} {!! @$shippinc !!} {{'0%'}} @if(@completeOrderGrandTotal < minShippingAmount()) {{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 < minShippingAmount()) {{ number_format((float)@$Product_tax+($shippingPriceFraction-$shippingUniPrice), 2, '.', '') }} @else {{ number_format((float)@$Product_tax, 2, '.', '') }} @endif – ₹ {{number_format($grandTotal+$shippingprice - @$data['order_products'][0]->order->coupon_discount, 2, '.', '')}}
Total Amount in words: {{AmountInWords(number_format($grandTotal+$shippingprice - @$data['order_products'][0]->order->coupon_discount, 2, '.', ''))}} Only
whether tax is payable under reverse charge-No

Authorized Signatory