{!! Theme::section('theme/user.purchase.menu',['page'=>'products']) !!}
{!! Theme::section('theme/user.purchase.purchase-sub-menu',['subpage'=>'products']) !!}
@if(count($orders)>0)
{!! $orders->appends(request()->except('page'))->render() !!}
@else
{{ trans('mytransactions.no-data-found') }} @endif
| {{trans('mytransactions.order-details')}} | Cost | {{ trans('mytransactions.seller') }} | Logistics |
|---|---|---|---|
|
@if($dtlsIndex === 0)
{{ trans('mytransactions.transaction-id') }}: {{$order->transaction_id}} {{ trans('mytransactions.date') }}: {{date("d F, Y",strtotime($order->created_at))}} @endif @if($dtls->product) @php $product = $dtls->product; $productUrl = ''; if (!empty($business) && !empty($business->slug)) { $productUrl = URL::route('store', ['slug' => $business->slug])."/product/".$product->id; } else { $productUrl = \URL::route('productbuy',['id'=>$product->id]); } @endphp @if(!empty($product->image1)) {{$product->product_name}} @if(!empty($dtls->product_size)) ({{$dtls->product_size}}) @endif @if(!empty($dtls->product_color)) {{$dtls->product_color}} @endif Quantity: {{$dtls->quantity}} @else Item #{{$dtls->id ?? ''}} @endif |
@php
$qty = (float) preg_replace('/[^0-9.\-]/', '', (string) ($dtls->quantity ?? 0));
$unitPrice = (float) preg_replace('/[^0-9.\-]/', '', (string) ($dtls->price ?? 0));
$discountPerc = (float) preg_replace('/[^0-9.\-]/', '', (string) ($dtls->discount ?? 0));
$lineTotalAfter = (float) preg_replace('/[^0-9.\-]/', '', (string) ($dtls->amount ?? 0));
$lineShipping = (float) preg_replace('/[^0-9.\-]/', '', (string) ($dtls->shipping_cost ?? 0));
$lineSubtotal = round($unitPrice * $qty, 2);
$lineDiscount = 0.0;
if ($discountPerc > 0 && $lineSubtotal > 0) {
$lineDiscount = round(($discountPerc / 100) * $lineSubtotal, 2);
}
$itemTaxLines = [];
$lineTaxTotal = 0.0;
if (!empty($orderTaxCandidates) && $lineTotalAfter > 0) {
foreach ($orderTaxCandidates as $candidate) {
$perc = (float) ($candidate['perc'] ?? 0);
if ($perc > 0) {
$title = trim((string) ($candidate['title'] ?? ''));
$title = $title !== '' ? $title : trans('mytransactions.tax');
$percLabel = rtrim(rtrim(number_format($perc, 2, '.', ''), '0'), '.');
$amount = round(($lineTotalAfter * $perc / 100), 2);
if ($amount > 0) {
$itemTaxLines[] = ['title' => $title, 'perc_label' => $percLabel, 'amount' => $amount];
$lineTaxTotal = round($lineTaxTotal + $amount, 2);
}
}
}
}
$lineGrandTotal = round($lineTotalAfter + $lineTaxTotal + max(0.0, $lineShipping), 2);
@endphp
Price: Per Unit: {!! $currencyIcon !!} {{number_format($unitPrice, 2, '.', ',')}} Qty: {{number_format($qty, 0, '.', ',')}} Subtotal: {!! $currencyIcon !!} {{number_format($lineSubtotal, 2, '.', ',')}} @if($lineDiscount > 0) Discount ({{$discountPerc}}%): - {!! $currencyIcon !!} {{number_format($lineDiscount, 2, '.', ',')}} @endif @if(!empty($itemTaxLines)) @foreach($itemTaxLines as $line) {{$line['title']}} ({{$line['perc_label']}}%): {!! $currencyIcon !!} {{number_format($line['amount'], 2, '.', ',')}} @endforeach @endif @if($lineShipping > 0) {{ trans('mytransactions.shipping') }}: {!! $currencyIcon !!} {{number_format($lineShipping, 2, '.', ',')}} @endif Total: {!! $currencyIcon !!} {{number_format($lineGrandTotal, 2, '.', ',')}} |
@if($dtlsIndex === 0)
@if($businessName)
{{$businessName}}
@endif
@if(!empty($business))
@php
$storeAddr1 = trim((string) ($business->address_1 ?? ($business->address ?? '')));
$storeCity = trim((string) ($business->city ?? ''));
$storeZip = trim((string) ($business->zip ?? ($business->postal_code ?? '')));
$storeState = trim((string) ($business->state ?? ''));
$storeCountry = trim((string) ($business->country ?? ''));
$storePhone = trim((string) ($business->phone ?? ($business->mobile ?? '')));
@endphp
@if($storeAddr1 || $storeCity || $storeState || $storeCountry || $storeZip || $storePhone)
Seller/Store address @if($storeAddr1){{$storeAddr1}}@endif @if($storeCity){{$storeCity}}@endif @if($storeZip){{$storeCity ? ',' : ''}} {{$storeZip}}@endif @if($storeState){{$storeState}}@endif @if($storeCountry){{$storeState ? ',' : ''}} {{$storeCountry}}@endif @if($storePhone) {{ trans('mytransactions.cell') }}: {{$storePhone}}@endif @endif @endif |
@if($shippingService !== '')
Shipping Method: {{ e($shippingService) }} @endif @if(!empty($trackingItems)) @foreach($trackingItems as $tIndex => $tRow) @if($tIndex > 0)@endif Tracking No: {{ e($tRow['tracking']) }} {{ trans('mytransactions.track-package') }} @endforeach @endif@if((int) $order->delivery_option === 1) {{ trans('mytransactions.pickup') }} @if($isValidOrderDateTime) {{ trans('mytransactions.date') }}: {{date("d F Y",strtotime($orderDateTime))}} {{ trans('mytransactions.time') }}: {{date("H:i A",strtotime($orderDateTime))}} @endif {{ trans('mytransactions.cell') }}: {{$order->mobile}} @if(!empty($order->picked_by)) {{ trans('mytransactions.picked-by') }}: {{$order->picked_by}} @if(!empty($order->picked_date) && $order->picked_date !== '0000-00-00 00:00:00' && strtotime($order->picked_date)) {{ trans('mytransactions.date') }}: {{date("d F Y",strtotime($order->picked_date))}} {{ trans('mytransactions.time') }}: {{date("H:i A",strtotime($order->picked_date))}} @endif @endif @else @if($isValidOrderDateTime) {{ trans('mytransactions.date') }}: {{date("d F Y",strtotime($orderDateTime))}} {{ trans('mytransactions.time') }}: {{date("H:i A",strtotime($orderDateTime))}} @endif Buyer Shipping Address: {{$order->full_name}}@if($order->address_1){{$order->address_1}} @endif @if($order->city){{$order->city}},@endif {{$order->zip}} @if($order->state){{$order->state}},@endif {{$order->country}} {{ trans('mytransactions.cell') }}: {{$order->mobile}} @endif |
@endif
|
Order Total: {!! $currencyIcon !!}{{ number_format($orderAmountSaved, 2, '.', ',') }} |
|||
|
{{ trans('mytransactions.transaction-id') }}: {{$order->transaction_id}} {{ trans('mytransactions.date') }}: {{date("d F, Y",strtotime($order->created_at))}} No products found for this order. |
- | - | - |
| {{ trans('mytransactions.no-data-found') }} | |||
{{ trans('mytransactions.no-data-found') }} @endif