@php $rupees = ''; $packageInfo = \App\ShipmentPackage::with('order')->with('seller')->with('user')->with('shop')->where('id', $id)->first(); foreach (json_decode($packageInfo->order_detail_id) as $key => $value) { $orderDetail = \App\OrderDetail::where('id', $value)->first(); $orderInvoice[] = $orderDetail->order_invoice; } foreach (json_decode($packageInfo->packed_qty) as $key => $value) { $qty[] = $value; } $orderinvoice = substr($orderInvoice[0], 0, -4); $invoiceDate = date('d-m-Y', strtotime($packageInfo->order->created_at)); @endphp

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

{{ translate('Payment Mode: Prepaid') }}

{{ translate('SHIP TO') }} :-

{{json_decode($packageInfo->order->shipping_address)->name}}

{{json_decode($packageInfo->order->shipping_address)->address}}

{{json_decode($packageInfo->order->shipping_address)->state}}

{{json_decode($packageInfo->order->shipping_address)->city.'-'.json_decode($packageInfo->order->shipping_address)->postal_code}}

Contact Number: {{json_decode($packageInfo->order->shipping_address)->phone}}

{{ translate('FROM/RETURN') }} :-

If undelivearble, please return to:

{{$packageInfo->shop->name}}

{{$packageInfo->shop->address}}

{{$packageInfo->shop->state}}

{{$packageInfo->shop->city.'-'.$packageInfo->shop->postal_code}}

Contact Number: {{$packageInfo->user->phone}}

Order Date: {{ date('d-m-Y', $packageInfo->order->date)}}

Invoice #: {{$orderinvoice}}

AWB Number #: {{$packageInfo->awb_number}}

GST Number: {{$packageInfo->shop->gst_no}}

Order # : {{$packageInfo->order->code}}

barcode
{{ translate('Product Details') }} :-

@php $totalAmount = 0; $totalQty = 0; $orderGrandTotal = \App\OrderDetail::where('order_id', $packageInfo->order_id)->sum('price'); $TotalSeller = \App\OrderDetail::where('order_id', $packageInfo->order_id)->count(); $Product_tax = 0; $grandTotal = 0; $max_tax = array(); @endphp @forelse(json_decode($packageInfo->order_detail_id) as $key => $value) @php $orderDetail = \App\OrderDetail::where('id', $value)->first(); $orderInfo = \App\Order::where('id', $orderDetail->order_id)->first(); $productSku = \App\ProductStock::where('variant', $orderDetail->variation)->first(); $totalAmount += $orderDetail->price * $qty[$key] / @$orderDetail->quantity; $totalQty += $orderDetail->quantity; @$totalQtyAmount = $orderDetail->price * $qty[$key] / @$orderDetail->quantity; @$totalPackedQty += $qty[$key]; @$billing_address = json_decode($orderInfo->billing_address); $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* $qty[$key]; $tax_amount = $orderDetail->product->unit_price* $qty[$key] - $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* $qty[$key]; $netAmount = $unitPrice* $qty[$key]; $taxP = $orderDetail->product->tax; $finalTaxP = $taxP.'%'; $tax_amount = ($orderDetail->product->unit_price* $qty[$key] - $netAmount); $Product_tax+= $tax_amount; $finalTax_amt = $rupees.number_format((float)@$tax_amount, 2, '.', ''); } @endphp @empty @endforelse @php if($orderGrandTotal >= 1000){ $shippingprice = 0; }else{ $shippingprice = 49; } $finalShippengCharge = $shippingprice / $TotalSeller; $productDisCountAmount = @$packageInfo->order->coupon_discount / $totalQty; $finalDisCountAmount = @$productDisCountAmount * $totalPackedQty; $finalPrice = $totalAmount + $finalShippengCharge - $finalDisCountAmount; @endphp
{{ translate('Description') }} {{ translate('Unit Price') }} {{ translate('Quantity') }} {{ translate('Net Amount') }} {{ translate('Tax Rate') }} {{ translate('Tax Type') }} {{ translate('Tax Amount') }} {{ translate('Total Amount') }}
{{ $orderDetail->product->name }}
{{@$productSku->sku}}
HSN# {{$orderDetail->product->hsn_code}}
{!! $rupees.number_format((float)$unitPrice, 2, '.', '') !!} {{ $qty[$key] }} {!! $rupees.number_format((float)@$netAmount, 2, '.', '') !!} {!! @$finalTaxP !!} {!! @$tax_type_lable !!} {!! $finalTax_amt !!} {!! $rupees.number_format((float)@$totalQtyAmount , 2, '.', '') !!}
No Data Found

Handling Charge : {!! $rupees.number_format((float)@$finalShippengCharge, 2, '.', '') !!}

Discount Amount : {!! $rupees.number_format((float)@$finalDisCountAmount, 2, '.', '') !!}

Total : {!! $rupees.number_format((float)@$finalPrice, 2, '.', '') !!}

Total Amount in words: {{AmountInWords(number_format($finalPrice, 2, '.', ''))}} Only

Dimensions: (CM)
Weight: (GM)
{{number_format((float)@$packageInfo->length, 4, '.', '')}} * {{number_format((float)@$packageInfo->breadth, 4, '.', '')}} * {{number_format((float)@$packageInfo->height, 4, '.', '')}}
{{number_format((float)@$packageInfo->actual_weight, 4, '.', '')}}
@if($packageInfo->shipment_service == "Xpressbees") Xpressbees
@else Ecom Express 1001
@endif
barcode
{{$packageInfo->awb_number}}
Prices are inclusive of all applicable taxes