¨4.0.1¨
This commit is contained in:
@@ -26,9 +26,9 @@
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
<script type="module">
|
||||
DataTable.setRoutes('#orders-table .table', {
|
||||
index: '{{ "admin.orders.index" }}',
|
||||
table: '{{ "admin.orders.table" }}',
|
||||
show: '{{ "admin.orders.show" }}',
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="address-information-wrapper">
|
||||
<h3 class="section-title">{{ trans('order::orders.address_information') }}</h3>
|
||||
<h4 class="section-title">{{ trans('order::orders.address_information') }}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="billing-address">
|
||||
<h4 class="pull-left">{{ trans('order::orders.billing_address') }}</h4>
|
||||
<h5 class="pull-left">{{ trans('order::orders.billing_address') }}</h5>
|
||||
|
||||
<span>
|
||||
{{ $order->billing_full_name }}
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="shipping-address">
|
||||
<h4 class="pull-left">{{ trans('order::orders.shipping_address') }}</h4>
|
||||
<h5 class="pull-left">{{ trans('order::orders.shipping_address') }}</h5>
|
||||
|
||||
<span>
|
||||
{{ $order->shipping_full_name }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="items-ordered-wrapper">
|
||||
<h3 class="section-title">{{ trans('order::orders.items_ordered') }}</h3>
|
||||
<h4 class="section-title">{{ trans('order::orders.items_ordered') }}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -25,6 +25,19 @@
|
||||
<a href="{{ route('admin.products.edit', $product->product->id) }}">{{ $product->name }}</a>
|
||||
@endif
|
||||
|
||||
@if ($product->hasAnyVariation())
|
||||
<br>
|
||||
@foreach ($product->variations as $variation)
|
||||
<span>
|
||||
{{ $variation->name }}:
|
||||
|
||||
<span>
|
||||
{{ $variation->values()->first()?->label }}{{ $loop->last ? "" : "," }}
|
||||
</span>
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if ($product->hasAnyOption())
|
||||
<br>
|
||||
@foreach ($product->options as $option)
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h3 class="section-title">{{ trans('order::orders.order_and_account_information') }}</h3>
|
||||
<h4 class="section-title">{{ trans('order::orders.order_and_account_information') }}</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="order clearfix">
|
||||
<h4>{{ trans('order::orders.order_information') }}</h4>
|
||||
<h5>{{ trans('order::orders.order_information') }}</h5>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="account-information">
|
||||
<h4>{{ trans('order::orders.account_information') }}</h4>
|
||||
<h5>{{ trans('order::orders.account_information') }}</h5>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
<script type="module">
|
||||
keypressAction([
|
||||
{ key: 'b', route: "{{ route('admin.orders.index') }}" }
|
||||
]);
|
||||
|
||||
@@ -1,224 +1,243 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ locale() }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>{{ trans('order::print.invoice') }}</title>
|
||||
<title>{{ trans('order::print.invoice') }}</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
|
||||
<link href="{{ v(Module::asset('order:admin/css/print.css')) }}" rel="stylesheet">
|
||||
</head>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
|
||||
|
||||
<body class="{{ is_rtl() ? 'rtl' : 'ltr' }}">
|
||||
<!--[if lt IE 8]>
|
||||
<p>You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a>
|
||||
to improve your experience.</p>
|
||||
<![endif]-->
|
||||
@vite([
|
||||
'Modules/Order/Resources/assets/admin/sass/print.scss',
|
||||
])
|
||||
</head>
|
||||
|
||||
<div class="container">
|
||||
<div class="invoice-wrapper clearfix">
|
||||
<div class="row">
|
||||
<div class="invoice-header clearfix">
|
||||
<div class="col-md-3">
|
||||
<div class="store-name">
|
||||
<h1>{{ setting('store_name') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<body class="{{ is_rtl() ? 'rtl' : 'ltr' }}">
|
||||
<!--[if lt IE 8]>
|
||||
<p>You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a>
|
||||
to improve your experience.</p>
|
||||
<![endif]-->
|
||||
|
||||
<div class="col-md-9 clearfix">
|
||||
<div class="invoice-header-right pull-right">
|
||||
<span class="title">{{ trans('order::print.invoice') }}</span>
|
||||
|
||||
<div class="invoice-info clearfix">
|
||||
<div class="invoice-id">
|
||||
<label for="invoice-id">{{ trans('order::print.invoice_id') }}:</label>
|
||||
<span>#{{ $order->id }}</span>
|
||||
<div class="container">
|
||||
<div class="invoice-wrapper clearfix">
|
||||
<div class="row">
|
||||
<div class="invoice-header clearfix">
|
||||
<div class="col-md-3">
|
||||
<div class="store-name">
|
||||
<h1>{{ setting('store_name') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="invoice-date">
|
||||
<label for="invoice-date">{{ trans('order::print.date') }}:</label>
|
||||
<span>{{ $order->created_at->format('Y / m / d') }}</span>
|
||||
<div class="col-md-9 clearfix">
|
||||
<div class="invoice-header-right pull-right">
|
||||
<span class="title">{{ trans('order::print.invoice') }}</span>
|
||||
|
||||
<div class="invoice-info clearfix">
|
||||
<div class="invoice-id">
|
||||
<label for="invoice-id">{{ trans('order::print.invoice_id') }}:</label>
|
||||
<span>#{{ $order->id }}</span>
|
||||
</div>
|
||||
|
||||
<div class="invoice-date">
|
||||
<label for="invoice-date">{{ trans('order::print.date') }}:</label>
|
||||
<span>{{ $order->created_at->format('Y / m / d') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="invoice-body clearfix">
|
||||
<div class="invoice-details-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-details">
|
||||
<h5>{{ trans('order::print.order_details') }}</h5>
|
||||
<div class="invoice-body clearfix">
|
||||
<div class="invoice-details-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-details">
|
||||
<h5>{{ trans('order::print.order_details') }}</h5>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::print.email') }}:</td>
|
||||
<td>{{ $order->customer_email }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.phone') }}:</td>
|
||||
<td>{{ $order->customer_phone }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->shipping_method)
|
||||
<tr>
|
||||
<td>{{ trans('order::print.shipping_method') }}:</td>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.payment_method') }}:</td>
|
||||
<td>{{ $order->payment_method }}
|
||||
@if($order->payment_method==='Bank Transfer')
|
||||
</br>
|
||||
{{setting('bank_transfer_instructions')}}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-address">
|
||||
<h5>{{ trans('order::print.shipping_address') }}</h5>
|
||||
|
||||
<span>{{ $order->shipping_full_name }}</span>
|
||||
<span>{{ $order->shipping_address_1 }}</span>
|
||||
<span>{{ $order->shipping_address_2 }}</span>
|
||||
<span>{{ $order->shipping_city }}, {{ $order->shipping_state_name }} {{ $order->shipping_zip }}</span>
|
||||
<span>{{ $order->shipping_country_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-address">
|
||||
<h5>{{ trans('order::print.billing_address') }}</h5>
|
||||
|
||||
<span>{{ $order->billing_full_name }}</span>
|
||||
<span>{{ $order->billing_address_1 }}</span>
|
||||
<span>{{ $order->billing_address_2 }}</span>
|
||||
<span>{{ $order->billing_city }}, {{ $order->billing_state_name }} {{ $order->billing_zip }}</span>
|
||||
<span>{{ $order->billing_country_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cart-list">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('order::print.product') }}</th>
|
||||
<th>{{ trans('order::print.unit_price') }}</th>
|
||||
<th>{{ trans('order::print.quantity') }}</th>
|
||||
<th>{{ trans('order::print.line_total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::print.email') }}:</td>
|
||||
<td>{{ $order->customer_email }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.phone') }}:</td>
|
||||
<td>{{ $order->customer_phone }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->shipping_method)
|
||||
@foreach ($order->products as $product)
|
||||
<tr>
|
||||
<td>{{ trans('order::print.shipping_method') }}:</td>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<td>
|
||||
<span>{{ $product->name }}</span>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.payment_method') }}:</td>
|
||||
<td>{{ $order->payment_method }}
|
||||
@if($order->payment_method==='Bank Transfer')
|
||||
</br>
|
||||
{{setting('bank_transfer_instructions')}}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@if ($product->hasAnyVariation())
|
||||
<div class="option">
|
||||
@foreach ($product->variations as $variation)
|
||||
<span>
|
||||
{{ $variation->name }}:
|
||||
|
||||
<span>
|
||||
{{ $variation->values()->first()?->label }}{{ $loop->last ? "" : "," }}
|
||||
</span>
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($product->hasAnyOption())
|
||||
<div class="option">
|
||||
@foreach ($product->options as $option)
|
||||
<span>
|
||||
{{ $option->name }}:
|
||||
|
||||
<span>
|
||||
@if ($option->option->isFieldType())
|
||||
{{ $option->value }}
|
||||
@else
|
||||
{{ $option->values->implode('label', ', ') }}
|
||||
@endif
|
||||
</span>
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.unit_price') }}:</label>
|
||||
<span>{{ $product->unit_price->convert($order->currency, $order->currency_rate)->convert($order->currency, $order->currency_rate)->format($order->currency) }}</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.quantity') }}:</label>
|
||||
<span>{{ $product->qty }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.line_total') }}:</label>
|
||||
<span>{{ $product->line_total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-address">
|
||||
<h5>{{ trans('order::print.shipping_address') }}</h5>
|
||||
|
||||
<span>{{ $order->shipping_full_name }}</span>
|
||||
<span>{{ $order->shipping_address_1 }}</span>
|
||||
<span>{{ $order->shipping_address_2 }}</span>
|
||||
<span>{{ $order->shipping_city }}, {{ $order->shipping_state_name }} {{ $order->shipping_zip }}</span>
|
||||
<span>{{ $order->shipping_country_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="invoice-address">
|
||||
<h5>{{ trans('order::print.billing_address') }}</h5>
|
||||
|
||||
<span>{{ $order->billing_full_name }}</span>
|
||||
<span>{{ $order->billing_address_1 }}</span>
|
||||
<span>{{ $order->billing_address_2 }}</span>
|
||||
<span>{{ $order->billing_city }}, {{ $order->billing_state_name }} {{ $order->billing_zip }}</span>
|
||||
<span>{{ $order->billing_country_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cart-list">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('order::print.product') }}</th>
|
||||
<th>{{ trans('order::print.unit_price') }}</th>
|
||||
<th>{{ trans('order::print.quantity') }}</th>
|
||||
<th>{{ trans('order::print.line_total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($order->products as $product)
|
||||
<div class="total pull-right">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{{ $product->name }}</span>
|
||||
|
||||
@if ($product->hasAnyOption())
|
||||
<div class="option">
|
||||
@foreach ($product->options as $option)
|
||||
<span>
|
||||
{{ $option->name }}:
|
||||
|
||||
<span>
|
||||
@if ($option->option->isFieldType())
|
||||
{{ $option->value }}
|
||||
@else
|
||||
{{ $option->values->implode('label', ', ') }}
|
||||
@endif
|
||||
</span>
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.unit_price') }}:</label>
|
||||
<span>{{ $product->unit_price->convert($order->currency, $order->currency_rate)->convert($order->currency, $order->currency_rate)->format($order->currency) }}</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.quantity') }}:</label>
|
||||
<span>{{ $product->qty }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<label class="visible-xs">{{ trans('order::print.line_total') }}:</label>
|
||||
<span>{{ $product->line_total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</span>
|
||||
</td>
|
||||
<td>{{ trans('order::print.subtotal') }}</td>
|
||||
<td>{{ $order->sub_total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if ($order->hasShippingMethod())
|
||||
<tr>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
<td>{{ $order->shipping_cost->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($order->hasCoupon())
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('order::orders.coupon') }} <span class="coupon-code">({{ $order->coupon->code }})</span>
|
||||
</td>
|
||||
<td>
|
||||
–{{ $order->discount->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@foreach ($order->taxes as $tax)
|
||||
<tr>
|
||||
<td>{{ $tax->name }}</td>
|
||||
<td class="text-right">{{ $tax->order_tax->amount->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.total') }}</td>
|
||||
<td>{{ $order->total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="total pull-right">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ trans('order::print.subtotal') }}</td>
|
||||
<td>{{ $order->sub_total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($order->hasShippingMethod())
|
||||
<tr>
|
||||
<td>{{ $order->shipping_method }}</td>
|
||||
<td>{{ $order->shipping_cost->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($order->hasCoupon())
|
||||
<tr>
|
||||
<td>{{ trans('order::orders.coupon') }} (<span
|
||||
class="coupon-code">{{ $order->coupon->code }}</span>)
|
||||
</td>
|
||||
<td>
|
||||
–{{ $order->discount->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@foreach ($order->taxes as $tax)
|
||||
<tr>
|
||||
<td>{{ $tax->name }}</td>
|
||||
<td class="text-right">{{ $tax->order_tax->amount->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('order::print.total') }}</td>
|
||||
<td>{{ $order->total->convert($order->currency, $order->currency_rate)->format($order->currency) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.print();
|
||||
</script>
|
||||
</body>
|
||||
<script type="module">
|
||||
window.print();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -15,3 +15,10 @@
|
||||
@include('order::admin.orders.partials.order_totals')
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('globals')
|
||||
@vite([
|
||||
'Modules/Order/Resources/assets/admin/sass/main.scss',
|
||||
'Modules/Order/Resources/assets/admin/js/main.js',
|
||||
])
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user