Merged with master
This commit is contained in:
commit
b6df4e1dc8
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\Controllers\Sales;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Webkul\Admin\Http\Controllers\Controller;
|
||||
use Webkul\Sales\Repositories\OrderRepository as Order;
|
||||
use Webkul\Sales\Repositories\InvoiceRepository as Invoice;
|
||||
|
||||
/**
|
||||
* Sales Invoice controller
|
||||
*
|
||||
* @author Jitendra Singh <jitendra@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* OrderRepository object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
/**
|
||||
* InvoiceRepository object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $invoice;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param Webkul\Sales\Repositories\OrderRepository $order
|
||||
* @param Webkul\Sales\Repositories\InvoiceRepository $invoice
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Invoice $invoice, Order $order)
|
||||
{
|
||||
$this->middleware('admin');
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->order = $order;
|
||||
|
||||
$this->invoice = $invoice;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @param int $orderId
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create($orderId)
|
||||
{
|
||||
$order = $this->order->find($orderId);
|
||||
|
||||
return view($this->_config['view'], compact('order'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param int $orderId
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request, $orderId)
|
||||
{
|
||||
$order = $this->order->find($orderId);
|
||||
|
||||
if(!$order->canInvoice()) {
|
||||
session()->flash('error', 'Order invoice creation is not allowed.');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$this->validate(request(), [
|
||||
'invoice.items.*' => 'required|numeric|min:0',
|
||||
]);
|
||||
|
||||
$data = request()->all();
|
||||
|
||||
$haveProductToInvoice = false;
|
||||
foreach ($data['invoice']['items'] as $itemId => $qty) {
|
||||
if($qty) {
|
||||
$haveProductToInvoice = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$haveProductToInvoice) {
|
||||
session()->flash('error', 'Invoice can not be created without products.');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$this->invoice->create(array_merge($data, ['order_id' => $orderId]));
|
||||
|
||||
session()->flash('success', 'Invoice created successfully.');
|
||||
|
||||
return redirect()->route($this->_config['redirect'], $orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the view for the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function view($id)
|
||||
{
|
||||
$invoice = $this->invoice->find($id);
|
||||
|
||||
return view($this->_config['view'], compact('invoice'));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\Controllers\Sales;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Webkul\Admin\Http\Controllers\Controller;
|
||||
use Webkul\Sales\Repositories\OrderRepository as Order;
|
||||
|
||||
/**
|
||||
* Sales Order controller
|
||||
*
|
||||
* @author Jitendra Singh <jitendra@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class OrderController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* OrderRepository object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param Webkul\Sales\Repositories\OrderRepository $order
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Order $order)
|
||||
{
|
||||
$this->middleware('admin');
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->order = $order;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the view for the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function view($id)
|
||||
{
|
||||
$order = $this->order->find($id);
|
||||
|
||||
return view($this->_config['view'], compact('order'));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\Controllers\Sales;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Webkul\Admin\Http\Controllers\Controller;
|
||||
use Webkul\Sales\Repositories\OrderRepository as Order;
|
||||
use Webkul\Sales\Repositories\ShipmentRepository as Shipment;
|
||||
|
||||
/**
|
||||
* Sales Shipment controller
|
||||
*
|
||||
* @author Jitendra Singh <jitendra@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class ShipmentController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* OrderRepository object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
/**
|
||||
* ShipmentRepository object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $shipment;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param Webkul\Sales\Repositories\OrderRepository $order
|
||||
* @param Webkul\Sales\Repositories\ShipmentRepository $shipment
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Shipment $shipment, Order $order)
|
||||
{
|
||||
$this->middleware('admin');
|
||||
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->order = $order;
|
||||
|
||||
$this->shipment = $shipment;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @param int $orderId
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create($orderId)
|
||||
{
|
||||
$order = $this->order->find($orderId);
|
||||
|
||||
return view($this->_config['view'], compact('order'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param int $orderId
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request, $orderId)
|
||||
{
|
||||
$order = $this->order->find($orderId);
|
||||
|
||||
if(!$order->canShip()) {
|
||||
session()->flash('error', 'Order shipment creation is not allowed.');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$this->validate(request(), [
|
||||
'shipment.carrier_title' => 'required',
|
||||
'shipment.track_number' => 'required',
|
||||
'shipment.items.*' => 'required|numeric|min:0',
|
||||
]);
|
||||
|
||||
$data = request()->all();
|
||||
|
||||
$haveProductToShip = false;
|
||||
foreach ($data['shipment']['items'] as $itemId => $qty) {
|
||||
if($qty) {
|
||||
$haveProductToShip = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$haveProductToShip) {
|
||||
session()->flash('error', 'Shipment can not be created without products.');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$this->shipment->create(array_merge($data, ['order_id' => $orderId]));
|
||||
|
||||
session()->flash('success', 'Shipment created successfully.');
|
||||
|
||||
return redirect()->route($this->_config['redirect'], $orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the view for the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function view($id)
|
||||
{
|
||||
$shipment = $this->shipment->find($id);
|
||||
|
||||
return view($this->_config['view'], compact('shipment'));
|
||||
}
|
||||
}
|
||||
|
|
@ -77,11 +77,53 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'redirect' => 'admin.customer.index'
|
||||
])->name('admin.customer.update');
|
||||
|
||||
// dummy number i.e-1 is used for creating view only
|
||||
// Sales Routes
|
||||
Route::prefix('sales')->group(function () {
|
||||
// Sales Order Routes
|
||||
Route::get('/orders', 'Webkul\Admin\Http\Controllers\Sales\OrderController@index')->defaults('_config', [
|
||||
'view' => 'admin::sales.orders.index'
|
||||
])->name('admin.sales.orders.index');
|
||||
|
||||
Route::get('customer/orders/1', 'Webkul\User\Http\Controllers\UserController@index')->defaults('_config', [
|
||||
'view' => 'admin::customers.orders.order'
|
||||
])->name('admin.customer.orders.order');
|
||||
Route::get('/orders/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@view')->defaults('_config', [
|
||||
'view' => 'admin::sales.orders.view'
|
||||
])->name('admin.sales.orders.view');
|
||||
|
||||
|
||||
// Sales Invoices Routes
|
||||
Route::get('/invoices', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@index')->defaults('_config', [
|
||||
'view' => 'admin::sales.invoices.index'
|
||||
])->name('admin.sales.invoices.index');
|
||||
|
||||
Route::get('/invoices/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@create')->defaults('_config', [
|
||||
'view' => 'admin::sales.invoices.create'
|
||||
])->name('admin.sales.invoices.create');
|
||||
|
||||
Route::post('/invoices/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@store')->defaults('_config', [
|
||||
'redirect' => 'admin.sales.orders.view'
|
||||
])->name('admin.sales.invoices.store');
|
||||
|
||||
Route::get('/invoices/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\InvoiceController@view')->defaults('_config', [
|
||||
'view' => 'admin::sales.invoices.view'
|
||||
])->name('admin.sales.invoices.view');
|
||||
|
||||
|
||||
// Sales Shipments Routes
|
||||
Route::get('/shipments', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@index')->defaults('_config', [
|
||||
'view' => 'admin::sales.shipments.index'
|
||||
])->name('admin.sales.shipments.index');
|
||||
|
||||
Route::get('/shipments/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@create')->defaults('_config', [
|
||||
'view' => 'admin::sales.shipments.create'
|
||||
])->name('admin.sales.shipments.create');
|
||||
|
||||
Route::post('/shipments/create/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@store')->defaults('_config', [
|
||||
'redirect' => 'admin.sales.orders.view'
|
||||
])->name('admin.sales.shipments.store');
|
||||
|
||||
Route::get('/shipments/view/{id}', 'Webkul\Admin\Http\Controllers\Sales\ShipmentController@view')->defaults('_config', [
|
||||
'view' => 'admin::sales.shipments.view'
|
||||
])->name('admin.sales.shipments.view');
|
||||
});
|
||||
|
||||
// Catalog Routes
|
||||
Route::prefix('catalog')->group(function () {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ class EventServiceProvider extends ServiceProvider
|
|||
Event::listen('admin.menu.build', function ($menu) {
|
||||
$menu->add('dashboard', 'Dashboard', 'admin.dashboard.index', 1, 'dashboard-icon');
|
||||
|
||||
$menu->add('sales', 'Sales', 'admin.sales.orders.index', 1, 'sales-icon');
|
||||
|
||||
$menu->add('catalog', 'Catalog', 'admin.catalog.products.index', 3, 'catalog-icon');
|
||||
|
||||
$menu->add('catalog.products', 'Products', 'admin.catalog.products.index', 1);
|
||||
|
|
@ -56,9 +58,7 @@ class EventServiceProvider extends ServiceProvider
|
|||
|
||||
$menu->add('customers.customers', 'Customers', 'admin.customer.index', 1, '');
|
||||
|
||||
$menu->add('customers.orders', 'Orders', 'admin.customer.orders.index', 2, '');
|
||||
|
||||
$menu->add('customers.reviews', 'Review', 'admin.customer.review.index', 3, '');
|
||||
$menu->add('customers.reviews', 'Review', 'admin.customer.review.index', 2, '');
|
||||
|
||||
// $menu->add('customers.blocked_customer', 'Blocked Customers', 'admin.account.edit', 2, '');
|
||||
|
||||
|
|
|
|||
|
|
@ -180,6 +180,10 @@ body {
|
|||
|
||||
.page-action {
|
||||
float: right;
|
||||
|
||||
* {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.control-group {
|
||||
|
|
@ -276,26 +280,327 @@ body {
|
|||
// admin dashboard css ends here
|
||||
|
||||
|
||||
// customer oder css for admin start here
|
||||
// admin dashboard component
|
||||
.dashboard-card {
|
||||
height: 100px;
|
||||
width: 22%;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 5px;
|
||||
|
||||
.order-place-detail {
|
||||
.visitor-content {
|
||||
padding: 15px;
|
||||
|
||||
.order-account-information {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.title {
|
||||
|
||||
span {
|
||||
padding-top:10px;
|
||||
font-size: 14px;
|
||||
color: #A2A2A2;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.data {
|
||||
padding-top: 3px;
|
||||
|
||||
span {
|
||||
font-size: 32px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.6px;
|
||||
|
||||
.address {
|
||||
margin-left: 10px;
|
||||
}
|
||||
img {
|
||||
margin-left: 75px;
|
||||
height: 24px;
|
||||
width:24px;
|
||||
}
|
||||
}
|
||||
|
||||
.payment-shipping{
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.order-products{
|
||||
margin-left: 10px;
|
||||
span.right {
|
||||
padding-top: 12px;
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
color: #8E8E8E;
|
||||
letter-spacing: -0.7px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard-card:nth-last-child(1) {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.dashboard-card:nth-last-child(2) {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.dashboard-card:nth-last-child(3) {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
|
||||
.dashboard-graph {
|
||||
height: 413px;
|
||||
width: 70.5%;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
// customer oder css for admin end here
|
||||
.sale {
|
||||
height: 465px;
|
||||
width: 30.1%;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 2px;
|
||||
|
||||
.top-sale {
|
||||
margin-left: 20px;
|
||||
margin-top: 27px;
|
||||
|
||||
.title {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #A2A2A2;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.sale-info {
|
||||
|
||||
ul {
|
||||
|
||||
li {
|
||||
|
||||
.pro-attribute{
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
|
||||
.pro-img {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
border: 1px solid green;
|
||||
}
|
||||
|
||||
.product-description {
|
||||
margin-left: 15px;
|
||||
margin-top: 8px;
|
||||
width: 75%;
|
||||
|
||||
.product-name {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
|
||||
.right-side {
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.product-info {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.horizontal-rule {
|
||||
border: .5px solid #A2A2A2;
|
||||
opacity: 0.2;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
.horizontal-rule {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sale:nth-last-child(1) {
|
||||
margin-left: 31px;
|
||||
}
|
||||
|
||||
.sale:nth-last-child(2) {
|
||||
margin-left: 31px;
|
||||
}
|
||||
// admin dashboard css ends here
|
||||
|
||||
.performing-category {
|
||||
height: 413px;
|
||||
width: 22%;
|
||||
margin-left: 30px;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 2px;
|
||||
|
||||
.category {
|
||||
margin-left: 20px;
|
||||
margin-top: 20px;
|
||||
|
||||
.title {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #A2A2A2;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.category-info {
|
||||
margin-top: 30px;
|
||||
|
||||
|
||||
ul {
|
||||
|
||||
li {
|
||||
|
||||
.category-list {
|
||||
margin-top: 10px;
|
||||
|
||||
.cat-name {
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.3px;
|
||||
|
||||
}
|
||||
|
||||
.right-side {
|
||||
float: right;
|
||||
margin-right: 12px;
|
||||
margin-top: 10px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.product-info {
|
||||
margin-top: 5px;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
}
|
||||
|
||||
.horizon-rule {
|
||||
margin-top: 8px;
|
||||
border: .7px solid #D8D8D8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
|
||||
.category-list {
|
||||
.horizon-rule {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// customer oder css for admin start here
|
||||
.sale-container {
|
||||
.sale-section {
|
||||
font-size: 16px;
|
||||
|
||||
.secton-title {
|
||||
font-size: 18px;
|
||||
color: #8E8E8E;
|
||||
padding: 15px 0;
|
||||
border-bottom: 1px solid $border-color;
|
||||
}
|
||||
|
||||
.section-content {
|
||||
display: block;
|
||||
padding: 20px 0;
|
||||
|
||||
.row {
|
||||
display: block;
|
||||
padding: 7px 0;
|
||||
|
||||
.title {
|
||||
width: 200px;
|
||||
color: $font-color;
|
||||
letter-spacing: -0.26px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: $font-color;
|
||||
letter-spacing: -0.26px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sale-summary {
|
||||
margin-top: 2%;
|
||||
height: 130px;
|
||||
float: right;
|
||||
|
||||
tr {
|
||||
|
||||
td {
|
||||
padding: 3px 8px;
|
||||
}
|
||||
|
||||
&.bold {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// customer oder css for admin end here
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'common' => [
|
||||
'no-result-found' => 'We couldn\'t find any records.'
|
||||
],
|
||||
'account' => [
|
||||
'header-title' => 'My Account',
|
||||
'save-btn-title' => 'Save',
|
||||
|
|
@ -64,6 +67,81 @@ return [
|
|||
'submit-btn-title' => 'Sign In'
|
||||
]
|
||||
],
|
||||
'sales' => [
|
||||
'orders' => [
|
||||
'title' => 'Orders',
|
||||
'view-title' => 'Order #:order_id',
|
||||
'shipment-btn-title' => 'Ship',
|
||||
'invoice-btn-title' => 'Invoice',
|
||||
'info' => 'Information',
|
||||
'invoices' => 'Invoices',
|
||||
'shipments' => 'Shipments',
|
||||
'order-and-account' => 'Order and Account',
|
||||
'order-info' => 'Order Information',
|
||||
'order-date' => 'Order Date',
|
||||
'order-status' => 'Order Status',
|
||||
'channel' => 'Channel',
|
||||
'customer-name' => 'Customer Name',
|
||||
'email' => 'Email',
|
||||
'contact-number' => 'Contact Number',
|
||||
'account-info' => 'Account Information',
|
||||
'address' => 'Address',
|
||||
'shipping-address' => 'Shipping Address',
|
||||
'billing-address' => 'Billing Address',
|
||||
'payment-and-shipping' => 'Payment and Shipping',
|
||||
'payment-info' => 'Payment Information',
|
||||
'payment-method' => 'Payment Method',
|
||||
'currency' => 'Currency',
|
||||
'shipping-info' => 'Shipping Information',
|
||||
'shipping-method' => 'Shipping Method',
|
||||
'shipping-price' => 'Shipping Price',
|
||||
'products-ordered' => 'Products Ordered',
|
||||
'SKU' => 'SKU',
|
||||
'product-name' => 'Product Name',
|
||||
'qty' => 'Qty',
|
||||
'item-status' => 'Item Status',
|
||||
'price' => 'Price',
|
||||
'total' => 'Total',
|
||||
'subtotal' => 'Subtotal',
|
||||
'shipping-handling' => 'Shipping & Handling',
|
||||
'tax' => 'Tax',
|
||||
'tax-percent' => 'Tax Percent',
|
||||
'tax-amount' => 'Tax Amount',
|
||||
'discount-amount' => 'Discount Amount',
|
||||
'grand-total' => 'Grand Total'
|
||||
],
|
||||
'invoices' => [
|
||||
'id' => 'Id',
|
||||
'date' => 'Invoice Date',
|
||||
'order-id' => 'Order Id',
|
||||
'customer-name' => 'Customer Name',
|
||||
'status' => 'Status',
|
||||
'amount' => 'Amount',
|
||||
'action' => 'Action',
|
||||
'add-title' => 'Create Invoice',
|
||||
'save-btn-title' => 'Save Invoice',
|
||||
'qty' => 'Qty',
|
||||
'qty-ordered' => 'Qty Ordered',
|
||||
'qty-to-invoice' => 'Qty to Invoice',
|
||||
'view-title' => 'Invoice #:invoice_id',
|
||||
],
|
||||
'shipments' => [
|
||||
'id' => 'Id',
|
||||
'date' => 'Shipment Date',
|
||||
'order-id' => 'Order Id',
|
||||
'order-date' => 'Order date',
|
||||
'customer-name' => 'Customer Name',
|
||||
'total-qty' => 'Total Qty',
|
||||
'action' => 'Action',
|
||||
'add-title' => 'Create Shipment',
|
||||
'save-btn-title' => 'Save Shipment',
|
||||
'qty-ordered' => 'Qty Ordered',
|
||||
'qty-to-ship' => 'Qty to Ship',
|
||||
'carrier-title' => 'Carrier Title',
|
||||
'tracking-number' => 'Tracking Number',
|
||||
'view-title' => 'Shipment #:shipment_id',
|
||||
]
|
||||
],
|
||||
'catalog' => [
|
||||
'products' => [
|
||||
'products' => 'Products',
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>Customers</h1>
|
||||
</div>
|
||||
<div class="page-action">
|
||||
<a href="{{ route('admin.users.create') }}" class="btn btn-lg btn-primary">
|
||||
{{ __('Add Customer') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
@ -1,353 +0,0 @@
|
|||
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
|
||||
<div class="order-place-detail">
|
||||
|
||||
<div class="order-account-information">
|
||||
<accordian :title="'Order and Account'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="order-information">
|
||||
<div class="order-info">
|
||||
<span>Order Information <span >
|
||||
<span class="edit">
|
||||
Edit
|
||||
</span>
|
||||
</div>
|
||||
<div class="horizotal-rule"> </div>
|
||||
|
||||
<div class="order-account">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Order Date
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
August 4,2018,9:05:36:AM
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="order-account">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Order Status
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
Pending
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="order-account">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Channel
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
Web Store-en_GB
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="account-information">
|
||||
<div class="account-info">
|
||||
<span>Account Information <span >
|
||||
<span class="edit">
|
||||
Edit
|
||||
</span>
|
||||
</div>
|
||||
<div class="horizotal-rule"> </div>
|
||||
|
||||
<div class="order-account">
|
||||
<div class="left-content">
|
||||
<span >
|
||||
Customer Name
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span class="name">
|
||||
Lee Stoike
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="order-account">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Email
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
lee.stoike@examplemail.com
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="order-account">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Contact Number
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
9876543210
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
</div>
|
||||
|
||||
<div class="address">
|
||||
|
||||
<accordian :title="'Address'" :active="true">
|
||||
|
||||
<div slot="body">
|
||||
|
||||
<div class="address-information">
|
||||
<div class="address-name">
|
||||
<span> Shipping Address <span >
|
||||
<span class="edit">
|
||||
Edit
|
||||
</span>
|
||||
</div>
|
||||
<div class="horizotal-rule"> </div>
|
||||
<div class="address-detail">
|
||||
<span> 0933 Crossing Suite 12B </span>
|
||||
<span> Dallas , Texas <span>
|
||||
<span> United States </span>
|
||||
<span> 75001 </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="address-information">
|
||||
<div class="address-name">
|
||||
<span> Billing Address <span >
|
||||
<span class="edit">
|
||||
Edit
|
||||
</span>
|
||||
</div>
|
||||
<div class="horizotal-rule"> </div>
|
||||
<div class="address-detail">
|
||||
<span> 0933 Crossing Suite 12B </span>
|
||||
<span> Dallas , Texas <span>
|
||||
<span> United States </span>
|
||||
<span> 75001 </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="payment-shipping">
|
||||
<accordian :title="'Payment and Shipping'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="payment-information">
|
||||
<div class="title">
|
||||
<span>Payment Information <span >
|
||||
</div>
|
||||
<div class="horizotal-rule"> </div>
|
||||
|
||||
<div class="payment-info">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Payment Method
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
Bank Wire Transfer
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="payment-info">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Currency
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
US Dollar
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="payment-information">
|
||||
<div class="title">
|
||||
<span> Shipping Information <span >
|
||||
</div>
|
||||
<div class="horizotal-rule"> </div>
|
||||
|
||||
<div class="payment-info">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Shipping Method
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
Flat Rate-Fixed-$10.00
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="payment-info">
|
||||
<div class="left-content">
|
||||
<span>
|
||||
Expected Delivery
|
||||
</span>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<span>
|
||||
3 Days
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
</div>
|
||||
|
||||
<div class="order-products">
|
||||
|
||||
<accordian :title="'Products Ordered'" :active="true">
|
||||
|
||||
<div slot="body">
|
||||
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>SKU</th>
|
||||
<th>Product Name</th>
|
||||
<th>Item Status</th>
|
||||
<th>Price</th>
|
||||
<th>Qty</th>
|
||||
<th>Row total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>PROD124</td>
|
||||
<td>Apple iPhone 7- White-32GB</td>
|
||||
<td>Packed (2)</td>
|
||||
<td>$350.00</td>
|
||||
<td>2</td>
|
||||
<td>$700.00</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PROD128</td>
|
||||
<td>Blue Linen T-Shirt for Men- Small- Red</td>
|
||||
<td>Shipped (2)</td>
|
||||
<td>$45.00</td>
|
||||
<td>2</td>
|
||||
<td>$35.00</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="total">
|
||||
|
||||
<div class="calculate">
|
||||
|
||||
<div class="sub-total">
|
||||
<span class="left">
|
||||
Subtotal
|
||||
</span>
|
||||
<span class="middle">
|
||||
-
|
||||
</span>
|
||||
<span class="right">
|
||||
$805.00
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="ship-handle">
|
||||
<span class="left">
|
||||
Shipping & handling
|
||||
</span>
|
||||
<span class="middle">
|
||||
-
|
||||
</span>
|
||||
<span class="right">
|
||||
$5.00
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="discount">
|
||||
<span class="left">
|
||||
Discounts
|
||||
</span>
|
||||
<span class="middle">
|
||||
-
|
||||
</span>
|
||||
<span class="right">
|
||||
$15.00
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="grand-total">
|
||||
<span class="left">
|
||||
Grand Total
|
||||
</span>
|
||||
<span class="middle">
|
||||
-
|
||||
</span>
|
||||
<span class="right">
|
||||
$15.00
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="due">
|
||||
<span class="left">
|
||||
Total Due
|
||||
</span>
|
||||
<span class="middle">
|
||||
-
|
||||
</span>
|
||||
<span class="right">
|
||||
$15.00
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{{ $address->name }}</br>
|
||||
{{ $address->address1 }}, {{ $address->address2 ? $address->address2 . ',' : '' }} {{ $address->state }}</br>
|
||||
{{ country()->name($address->country) }} {{ $address->postcode }}</br>
|
||||
{{ __('shop::app.checkout.onepage.contact') }} : {{ $address->phone }}
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.invoices.add-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<div class="content full-page">
|
||||
<form method="POST" action="{{ route('admin.sales.invoices.store', $order->id) }}" @submit.prevent="onSubmit">
|
||||
@csrf()
|
||||
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.invoices.add-title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.sales.invoices.save-btn-title') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="sale-container">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.order-and-account') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.order-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.invoices.order-id') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
<a href="{{ route('admin.sales.orders.view', $order->id) }}">#{{ $order->id }}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-date') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->created_at }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-status') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.channel') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->channel_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.account-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.customer-name') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_full_name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.email') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_email }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.address') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.billing-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->billing_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($order->shipping_address)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->shipping_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.payment-and-shipping') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.payment-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.payment-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.currency') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->order_currency_code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->shipping_title }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-price') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->formatBasePrice($order->base_shipping_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.products-ordered') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.orders.SKU') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.product-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.qty-ordered') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.qty-to-invoice') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($order->items as $item)
|
||||
@if ($item->qty_to_invoice > 0)
|
||||
<tr>
|
||||
<td>{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->qty_ordered }}</td>
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has('invoice[items][{{ $item->id }}]') ? 'has-error' : '']">
|
||||
<input type="text" v-validate="'required|numeric|min:0'" class="control" id="invoice[items][{{ $item->id }}]" name="invoice[items][{{ $item->id }}]" value="{{ $item->qty_to_invoice }}"/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('invoice[items][{{ $item->id }}]')">
|
||||
@verbatim
|
||||
{{ errors.first('invoice[items][<?php echo $item->id ?>]') }}
|
||||
@endverbatim
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.invoices.view-title', ['invoice_id' => $invoice->id]) }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<?php $order = $invoice->order; ?>
|
||||
|
||||
<div class="content full-page">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.invoices.view-title', ['invoice_id' => $invoice->id]) }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="sale-container">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.order-and-account') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.order-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.invoices.order-id') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
<a href="{{ route('admin.sales.orders.view', $order->id) }}">#{{ $order->id }}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-date') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->created_at }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-status') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.channel') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->channel_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.account-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.customer-name') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $invoice->address->name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.email') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $invoice->address->email }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.address') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.billing-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->billing_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($order->shipping_address)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->shipping_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.payment-and-shipping') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.payment-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.payment-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.currency') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->order_currency_code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->shipping_title }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-price') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->formatBasePrice($order->base_shipping_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.products-ordered') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.orders.SKU') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.product-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.price') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.qty') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.subtotal') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.tax-amount') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.grand-total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($invoice->items as $item)
|
||||
<tr>
|
||||
<td>{{ $item->child ? $item->child->sku : $item->sku }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_price) }}</td>
|
||||
<td>{{ $item->qty }}</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_total) }}</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_tax_amount) }}</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_total + $item->base_tax_amount) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table class="sale-summary">
|
||||
<tr>
|
||||
<td>{{ __('admin::app.sales.orders.subtotal') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($invoice->base_sub_total) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('admin::app.sales.orders.shipping-handling') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($invoice->base_shipping_amount) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('admin::app.sales.orders.tax') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($invoice->base_tax_amount) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('admin::app.sales.orders.grand-total') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($invoice->base_grand_total) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.orders.title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<div class="content full-page">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.orders.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -0,0 +1,365 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.orders.view-title', ['order_id' => $order->id]) }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="content full-page">
|
||||
|
||||
<div class="page-header">
|
||||
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.orders.view-title', ['order_id' => $order->id]) }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
@if($order->canInvoice())
|
||||
<a href="{{ route('admin.sales.invoices.create', $order->id) }}" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.sales.orders.invoice-btn-title') }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if($order->canShip())
|
||||
<a href="{{ route('admin.sales.shipments.create', $order->id) }}" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.sales.orders.shipment-btn-title') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<tabs>
|
||||
<tab name="{{ __('admin::app.sales.orders.info') }}" :selected="true">
|
||||
<div class="sale-container">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.order-and-account') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.order-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-date') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->created_at }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-status') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.channel') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->channel_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.account-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.customer-name') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_full_name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.email') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_email }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.address') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.billing-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->billing_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($order->shipping_address)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->shipping_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.payment-and-shipping') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.payment-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.payment-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.currency') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->order_currency_code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->shipping_title }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-price') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->formatBasePrice($order->base_shipping_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.products-ordered') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.orders.SKU') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.product-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.price') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.qty') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.item-status') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.subtotal') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.tax-percent') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.tax-amount') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.grand-total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($order->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}
|
||||
</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_price) }}</td>
|
||||
<td>{{ $item->qty_ordered }}</td>
|
||||
<td>Packed (2)</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_total) }}</td>
|
||||
<td>{{ $item->tax_percent }}%</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_tax_amount) }}</td>
|
||||
<td>{{ core()->formatBasePrice($item->base_total + $item->base_tax_amount) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table class="sale-summary">
|
||||
<tr>
|
||||
<td>{{ __('admin::app.sales.orders.subtotal') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($order->base_sub_total) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('admin::app.sales.orders.shipping-handling') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($order->base_shipping_amount) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ __('admin::app.sales.orders.tax') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($order->base_tax_amount) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="bold">
|
||||
<td>{{ __('admin::app.sales.orders.grand-total') }}</td>
|
||||
<td>-</td>
|
||||
<td>{{ core()->formatBasePrice($order->base_grand_total) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</tab>
|
||||
|
||||
<tab name="{{ __('admin::app.sales.orders.invoices') }}">
|
||||
|
||||
<div class="table" style="padding: 20px 0">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.invoices.id') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.date') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.order-id') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.customer-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.status') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.amount') }}</th>
|
||||
<th>{{ __('admin::app.sales.invoices.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($order->invoices as $invoice)
|
||||
<tr>
|
||||
<td>#{{ $invoice->id }}</td>
|
||||
<td>{{ $invoice->created_at }}</td>
|
||||
<td>#{{ $invoice->order->id }}</td>
|
||||
<td>{{ $invoice->address->name }}</td>
|
||||
<td>{{ $invoice->status_label }}</td>
|
||||
<td>{{ core()->formatBasePrice($invoice->base_grand_total) }}</td>
|
||||
<td class="action">
|
||||
<a href="{{ route('admin.sales.invoices.view', $invoice->id) }}">
|
||||
<i class="icon pencil-lg-icon"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if (!$order->invoices->count())
|
||||
<tr>
|
||||
<td class="empty" colspan="7">{{ __('admin::app.common.no-result-found') }}</td>
|
||||
<tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</tab>
|
||||
|
||||
<tab name="{{ __('admin::app.sales.orders.shipments') }}">
|
||||
|
||||
<div class="table" style="padding: 20px 0">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.shipments.id') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.date') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.order-id') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.order-date') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.customer-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.total-qty') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($order->shipments as $shipment)
|
||||
<tr>
|
||||
<td>#{{ $shipment->id }}</td>
|
||||
<td>{{ $shipment->created_at }}</td>
|
||||
<td>#{{ $shipment->order->id }}</td>
|
||||
<td>{{ $shipment->order->created_at }}</td>
|
||||
<td>{{ $shipment->address->name }}</td>
|
||||
<td>{{ $shipment->total_qty }}</td>
|
||||
<td class="action">
|
||||
<a href="{{ route('admin.sales.shipments.view', $shipment->id) }}">
|
||||
<i class="icon pencil-lg-icon"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@if (!$order->shipments->count())
|
||||
<tr>
|
||||
<td class="empty" colspan="7">{{ __('admin::app.common.no-result-found') }}</td>
|
||||
<tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</tab>
|
||||
</tabs>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.shipments.add-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<div class="content full-page">
|
||||
<form method="POST" action="{{ route('admin.sales.shipments.store', $order->id) }}" @submit.prevent="onSubmit">
|
||||
@csrf()
|
||||
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.shipments.add-title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.sales.shipments.save-btn-title') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="sale-container">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.order-and-account') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.order-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.shipments.order-id') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
<a href="{{ route('admin.sales.orders.view', $order->id) }}">#{{ $order->id }}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-date') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->created_at }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-status') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.channel') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->channel_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.account-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.customer-name') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_full_name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.email') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_email }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.address') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.billing-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->billing_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($order->shipping_address)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->shipping_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.payment-and-shipping') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.payment-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.payment-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.currency') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->order_currency_code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->shipping_title }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-price') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->formatBasePrice($order->base_shipping_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipment[carrier_title]') ? 'has-error' : '']" style="margin-top: 40px">
|
||||
<label for="shipment[carrier_title]" class="required">{{ __('admin::app.sales.shipments.carrier-title') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="shipment[carrier_title]" name="shipment[carrier_title]"/>
|
||||
<span class="control-error" v-if="errors.has('shipment[carrier_title]')">
|
||||
@{{ errors.first('shipment[carrier_title]') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipment[track_number]') ? 'has-error' : '']">
|
||||
<label for="shipment[track_number]" class="required">{{ __('admin::app.sales.shipments.tracking-number') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="shipment[track_number]" name="shipment[track_number]"/>
|
||||
<span class="control-error" v-if="errors.has('shipment[track_number]')">
|
||||
@{{ errors.first('shipment[track_number]') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.products-ordered') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.orders.SKU') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.product-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.qty-ordered') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.qty-to-ship') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($order->items as $item)
|
||||
@if ($item->qty_to_ship > 0)
|
||||
<tr>
|
||||
<td>{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->qty_ordered }}</td>
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has('shipment[items][{{ $item->id }}]') ? 'has-error' : '']">
|
||||
<input type="text" v-validate="'required|numeric|min:0'" class="control" id="shipment[items][{{ $item->id }}]" name="shipment[items][{{ $item->id }}]" value="{{ $item->qty_to_ship }}"/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('shipment[items][{{ $item->id }}]')">
|
||||
@verbatim
|
||||
{{ errors.first('shipment[items][<?php echo $item->id ?>]') }}
|
||||
@endverbatim
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -0,0 +1,251 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.shipments.view-title', ['shipment_id' => $shipment->id]) }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<?php $order = $shipment->order; ?>
|
||||
|
||||
<div class="content full-page">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.shipments.view-title', ['shipment_id' => $shipment->id]) }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="sale-container">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.order-and-account') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.order-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.shipments.order-id') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
<a href="{{ route('admin.sales.orders.view', $order->id) }}">#{{ $order->id }}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-date') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->created_at }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-status') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.channel') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->channel_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.account-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.customer-name') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $shipment->address->name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.email') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $shipment->address->email }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.address') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.billing-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->billing_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($order->shipping_address)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->shipping_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.payment-and-shipping') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.payment-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.payment-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.currency') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->order_currency_code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->shipping_title }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-price') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->formatBasePrice($order->base_shipping_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.shipments.carrier-title') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $shipment->carrier_title }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.shipments.tracking-number') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $shipment->track_number }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.products-ordered') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.orders.SKU') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.product-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.qty') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($shipment->items as $item)
|
||||
<tr>
|
||||
<td>{{ $item->sku }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->qty }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -633,17 +633,22 @@ class Cart {
|
|||
|
||||
$cart->grand_total = 0;
|
||||
$cart->base_grand_total = 0;
|
||||
|
||||
$cart->sub_total = 0;
|
||||
$cart->base_sub_total = 0;
|
||||
$cart->sub_total_with_discount = 0;
|
||||
$cart->base_sub_total_with_discount = 0;
|
||||
|
||||
$cart->tax_total = 0;
|
||||
$cart->base_tax_total = 0;
|
||||
|
||||
foreach ($cart->items()->get() as $item) {
|
||||
$cart->grand_total = (float) $cart->grand_total + $item->total;
|
||||
$cart->base_grand_total = (float) $cart->base_grand_total + $item->base_total;
|
||||
|
||||
$cart->sub_total = (float) $cart->sub_total + $item->price * $item->quantity;
|
||||
$cart->base_sub_total = (float) $cart->base_sub_total + $item->base_price * $item->quantity;
|
||||
$cart->sub_total = (float) $cart->sub_total + $item->total;
|
||||
$cart->base_sub_total = (float) $cart->base_sub_total + $item->base_total;
|
||||
|
||||
$cart->tax_total = (float) $cart->tax_total + $item->tax_amount;
|
||||
$cart->base_tax_total = (float) $cart->base_tax_total + $item->base_tax_amount;
|
||||
}
|
||||
|
||||
if($shipping = $cart->selected_shipping_rate) {
|
||||
|
|
@ -880,6 +885,7 @@ class Cart {
|
|||
'customer' => auth()->guard('customer')->check() ? auth()->guard('customer')->user : null,
|
||||
|
||||
'shipping_method' => $data['selected_shipping_rate']['method'],
|
||||
'shipping_title' => $data['selected_shipping_rate']['carrier_title'] . ' - ' . $data['selected_shipping_rate']['method_title'],
|
||||
'shipping_description' => $data['selected_shipping_rate']['method_description'],
|
||||
'shipping_amount' => $data['selected_shipping_rate']['price'],
|
||||
'base_shipping_amount' => $data['selected_shipping_rate']['base_price'],
|
||||
|
|
@ -893,10 +899,14 @@ class Cart {
|
|||
'base_grand_total' => $data['base_grand_total'],
|
||||
'sub_total' => $data['sub_total'],
|
||||
'base_sub_total' => $data['base_sub_total'],
|
||||
'tax_amount' => $data['tax_total'],
|
||||
'base_tax_amount' => $data['base_tax_total'],
|
||||
|
||||
'shipping_address' => array_except($data['shipping_address'], ['id', 'cart_id']),
|
||||
'billing_address' => array_except($data['billing_address'], ['id', 'cart_id']),
|
||||
'payment' => array_except($data['payment'], ['id', 'cart_id']),
|
||||
|
||||
'channel' => core()->getCurrentChannel(),
|
||||
];
|
||||
|
||||
foreach($data['items'] as $item) {
|
||||
|
|
@ -925,6 +935,9 @@ class Cart {
|
|||
'base_price' => $data['base_price'],
|
||||
'total' => $data['total'],
|
||||
'base_total' => $data['base_total'],
|
||||
'tax_percent' => $data['tax_percent'],
|
||||
'tax_amount' => $data['tax_amount'],
|
||||
'base_tax_amount' => $data['base_tax_amount'],
|
||||
'additional' => $data['additional'],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -26,16 +26,24 @@ class CreateCartTable extends Migration
|
|||
$table->integer('items_count')->nullable();
|
||||
$table->decimal('items_qty', 12, 4)->nullable();
|
||||
$table->decimal('exchange_rate', 12, 4)->nullable();
|
||||
|
||||
$table->string('global_currency_code')->nullable();
|
||||
$table->string('base_currency_code')->nullable();
|
||||
$table->string('channel_currency_code')->nullable();
|
||||
$table->string('cart_currency_code')->nullable();
|
||||
|
||||
$table->decimal('grand_total', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_grand_total', 12, 4)->default(0)->nullable();
|
||||
|
||||
$table->decimal('sub_total', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_sub_total', 12, 4)->default(0)->nullable();
|
||||
|
||||
$table->decimal('tax_total', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_tax_total', 12, 4)->default(0)->nullable();
|
||||
|
||||
$table->decimal('sub_total_with_discount', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_sub_total_with_discount', 12, 4)->default(0)->nullable();
|
||||
|
||||
$table->string('checkout_method')->nullable();
|
||||
$table->boolean('is_guest')->nullable();
|
||||
$table->boolean('is_active')->nullable()->default(1);
|
||||
|
|
|
|||
|
|
@ -15,34 +15,44 @@ class CreateCartItemsTable extends Migration
|
|||
{
|
||||
Schema::create('cart_items', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('product_id')->unsigned();
|
||||
$table->foreign('product_id')->references('id')->on('products');
|
||||
$table->integer('quantity')->unsigned()->default(1);
|
||||
$table->integer('cart_id')->unsigned();
|
||||
$table->foreign('cart_id')->references('id')->on('cart')->onDelete('cascade');
|
||||
$table->string('sku')->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->string('name')->nullable();
|
||||
$table->integer('parent_id')->unsigned()->nullable();
|
||||
$table->integer('tax_category_id')->unsigned()->nullable();
|
||||
$table->foreign('tax_category_id')->references('id')->on('tax_categories');
|
||||
$table->string('coupon_code')->nullable();
|
||||
$table->decimal('weight', 12,4)->default(1);
|
||||
$table->decimal('total_weight', 12,4)->default(0);
|
||||
$table->decimal('base_total_weight', 12,4)->default(0);
|
||||
|
||||
$table->decimal('price', 12,4)->default(1);
|
||||
$table->decimal('base_price', 12,4)->default(0);
|
||||
$table->decimal('custom_price', 12,4)->default(0);
|
||||
|
||||
$table->decimal('total', 12,4)->default(0);
|
||||
$table->decimal('base_total', 12,4)->default(0);
|
||||
|
||||
$table->decimal('tax_percent', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('tax_amount', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_tax_amount', 12, 4)->default(0)->nullable();
|
||||
|
||||
$table->decimal('total_with_discount', 12,4)->default(0);
|
||||
$table->decimal('base_total_with_discount', 12,4)->default(0);
|
||||
|
||||
$table->decimal('discount_percent', 12,4)->default(0);
|
||||
$table->decimal('discount_amount', 12,4)->default(0);
|
||||
$table->decimal('base_discount_amount', 12,4)->default(0);
|
||||
$table->boolean('no_discount')->nullable()->default(0);
|
||||
|
||||
$table->boolean('free_shipping')->nullable()->default(0);
|
||||
$table->json('additional')->nullable();
|
||||
|
||||
$table->integer('product_id')->unsigned();
|
||||
$table->foreign('product_id')->references('id')->on('products');
|
||||
$table->integer('cart_id')->unsigned();
|
||||
$table->foreign('cart_id')->references('id')->on('cart')->onDelete('cascade');
|
||||
$table->integer('tax_category_id')->unsigned()->nullable();
|
||||
$table->foreign('tax_category_id')->references('id')->on('tax_categories');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -249,6 +249,9 @@ class Core
|
|||
*/
|
||||
public function currency($amount = 0)
|
||||
{
|
||||
if(is_null($amount))
|
||||
$price = 0;
|
||||
|
||||
$currencyCode = $this->getCurrentCurrency()->code;
|
||||
|
||||
return currency($this->convertPrice($amount), $currencyCode);
|
||||
|
|
@ -262,9 +265,26 @@ class Core
|
|||
*/
|
||||
public function formatPrice($price, $currencyCode)
|
||||
{
|
||||
if(is_null($price))
|
||||
$price = 0;
|
||||
|
||||
return currency($price, $currencyCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format price with base currency symbol
|
||||
*
|
||||
* @param float $price
|
||||
* @return string
|
||||
*/
|
||||
public function formatBasePrice($price)
|
||||
{
|
||||
if(is_null($price))
|
||||
$price = 0;
|
||||
|
||||
return currency($price, $this->getBaseCurrencyCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if current date of the given channel (in the channel timezone) is within the range
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class CreateOrdersTable extends Migration
|
|||
$table->increments('id');
|
||||
$table->string('increment_id');
|
||||
$table->string('status')->nullable();
|
||||
$table->string('channel_name')->nullable();
|
||||
|
||||
$table->boolean('is_guest')->nullable();
|
||||
$table->string('customer_email')->nullable();
|
||||
|
|
@ -24,6 +25,7 @@ class CreateOrdersTable extends Migration
|
|||
$table->string('customer_last_name')->nullable();
|
||||
|
||||
$table->string('shipping_method')->nullable();
|
||||
$table->string('shipping_title')->nullable();
|
||||
$table->string('shipping_description')->nullable();
|
||||
$table->string('coupon_code')->nullable();
|
||||
$table->boolean('is_gift')->default(0);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class CreateShipmentItemsTable extends Migration
|
|||
|
||||
$table->decimal('price', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_price', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('total', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_total', 12, 4)->default(0)->nullable();
|
||||
|
||||
$table->integer('product_id')->unsigned()->nullable();
|
||||
|
|
@ -30,9 +31,6 @@ class CreateShipmentItemsTable extends Migration
|
|||
$table->integer('order_item_id')->unsigned()->nullable();
|
||||
$table->integer('shipment_id')->unsigned();
|
||||
$table->foreign('shipment_id')->references('id')->on('shipments')->onDelete('cascade');
|
||||
$table->integer('parent_id')->unsigned()->nullable();
|
||||
$table->foreign('parent_id')->references('id')->on('shipment_items')->onDelete('cascade');
|
||||
|
||||
$table->json('additional')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,16 +15,11 @@ class CreateInvoicesTable extends Migration
|
|||
{
|
||||
Schema::create('invoices', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('increment_id');
|
||||
$table->string('increment_id')->nullable();
|
||||
$table->string('state')->nullable();
|
||||
$table->boolean('email_sent')->default(0);
|
||||
$table->string('shipping_method')->nullable();
|
||||
$table->string('shipping_description')->nullable();
|
||||
$table->string('coupon_code')->nullable();
|
||||
$table->boolean('is_gift')->default(0);
|
||||
|
||||
$table->integer('total_item_count')->nullable();
|
||||
$table->integer('total_qty_ordered')->nullable();
|
||||
$table->integer('total_qty')->nullable();
|
||||
|
||||
$table->string('base_currency_code')->nullable();
|
||||
$table->string('channel_currency_code')->nullable();
|
||||
|
|
@ -45,11 +40,8 @@ class CreateInvoicesTable extends Migration
|
|||
$table->decimal('discount_amount', 12, 4)->default(0)->nullable();
|
||||
$table->decimal('base_discount_amount', 12, 4)->default(0)->nullable();
|
||||
|
||||
$table->integer('customer_id')->unsigned()->nullable();
|
||||
$table->string('customer_type')->nullable();
|
||||
$table->integer('channel_id')->unsigned()->nullable();
|
||||
$table->string('channel_type')->nullable();
|
||||
$table->foreign('channel_id')->references('id')->on('channels')->onDelete('set null');
|
||||
$table->integer('order_id')->unsigned()->nullable();
|
||||
$table->foreign('order_id')->references('id')->on('orders')->onDelete('cascade');
|
||||
$table->integer('order_address_id')->unsigned()->nullable();
|
||||
$table->foreign('order_address_id')->references('id')->on('order_address')->onDelete('set null');
|
||||
$table->timestamps();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class CreateInvoiceItemsTable extends Migration
|
|||
$table->integer('invoice_id')->unsigned()->nullable();
|
||||
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
|
||||
$table->integer('parent_id')->unsigned()->nullable();
|
||||
$table->foreign('parent_id')->references('id')->on('shipment_items')->onDelete('cascade');
|
||||
$table->foreign('parent_id')->references('id')->on('invoice_items')->onDelete('cascade');
|
||||
|
||||
$table->json('additional')->nullable();
|
||||
$table->timestamps();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,30 @@ use Webkul\Sales\Contracts\Invoice as InvoiceContract;
|
|||
|
||||
class Invoice extends Model implements InvoiceContract
|
||||
{
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
|
||||
protected $statusLabel = [
|
||||
'pending' => 'Pending',
|
||||
'paid' => 'Paid',
|
||||
'refunded' => 'Refunded',
|
||||
];
|
||||
|
||||
/**
|
||||
* Returns the status label from status code
|
||||
*/
|
||||
public function getStatusLabelAttribute()
|
||||
{
|
||||
return isset($this->statusLabel[$this->state]) ? $this->statusLabel[$this->state] : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the order that belongs to the invoice.
|
||||
*/
|
||||
public function order()
|
||||
{
|
||||
return $this->belongsTo(OrderProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the invoice items record associated with the invoice.
|
||||
*/
|
||||
|
|
@ -31,42 +55,10 @@ class Invoice extends Model implements InvoiceContract
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the addresses for the invoice.
|
||||
* Get the addresses for the shipment.
|
||||
*/
|
||||
public function addresses()
|
||||
public function address()
|
||||
{
|
||||
return $this->hasMany(OrderAddressProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the biling address for the invoice.
|
||||
*/
|
||||
public function billing_address()
|
||||
{
|
||||
return $this->addresses()->where('address_type', 'billing');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing address for the invoice.
|
||||
*/
|
||||
public function getBillingAddressAttribute()
|
||||
{
|
||||
return $this->billing_address()->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the shipping address for the invoice.
|
||||
*/
|
||||
public function shipping_address()
|
||||
{
|
||||
return $this->addresses()->where('address_type', 'shipping');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping address for the invoice.
|
||||
*/
|
||||
public function getShippingAddressAttribute()
|
||||
{
|
||||
return $this->shipping_address()->first();
|
||||
return $this->belongsTo(OrderAddressProxy::modelClass(), 'order_address_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@ use Webkul\Sales\Contracts\InvoiceItem as InvoiceItemContract;
|
|||
|
||||
class InvoiceItem extends Model implements InvoiceItemContract
|
||||
{
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Get the invoice record associated with the invoice item.
|
||||
*/
|
||||
|
|
@ -36,6 +38,6 @@ class InvoiceItem extends Model implements InvoiceItemContract
|
|||
*/
|
||||
public function child()
|
||||
{
|
||||
return $this->belongsTo(InvoiceItemProxy::modelClass(), 'parent_id');
|
||||
return $this->hasOne(InvoiceItemProxy::modelClass(), 'parent_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,29 @@ use Webkul\Sales\Contracts\Order as OrderContract;
|
|||
|
||||
class Order extends Model implements OrderContract
|
||||
{
|
||||
protected $guarded = ['id', 'items', 'shipping_address', 'billing_address', 'payment', 'created_at', 'updated_at'];
|
||||
protected $guarded = ['id', 'items', 'shipping_address', 'billing_address', 'channel', 'payment', 'created_at', 'updated_at'];
|
||||
|
||||
protected $statusLabel = [
|
||||
'pending' => 'Pending',
|
||||
'processing' => 'Processing',
|
||||
'canceled' => 'Canceled',
|
||||
'closed' => 'Closed',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the order items record associated with the order.
|
||||
*/
|
||||
public function getCustomerFullNameAttribute() {
|
||||
return $this->customer_first_name . ' ' . $this->customer_last_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the status label from status code
|
||||
*/
|
||||
public function getStatusLabelAttribute()
|
||||
{
|
||||
return $this->statusLabel[$this->status];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the order items record associated with the order.
|
||||
|
|
@ -51,7 +73,7 @@ class Order extends Model implements OrderContract
|
|||
*/
|
||||
public function payment()
|
||||
{
|
||||
return $this->hasMany(OrderPaymentProxy::modelClass());
|
||||
return $this->hasOne(OrderPaymentProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -93,4 +115,32 @@ class Order extends Model implements OrderContract
|
|||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if new shipment is allow or not
|
||||
*/
|
||||
public function canShip()
|
||||
{
|
||||
foreach ($this->items as $item) {
|
||||
if ($item->qty_to_ship > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if new invoice is allow or not
|
||||
*/
|
||||
public function canInvoice()
|
||||
{
|
||||
foreach ($this->items as $item) {
|
||||
if ($item->qty_to_invoice > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,20 @@ class OrderItem extends Model implements OrderItemContract
|
|||
{
|
||||
protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Get remaining qty for shipping.
|
||||
*/
|
||||
public function getQtyToShipAttribute() {
|
||||
return $this->qty_ordered - $this->qty_shipped - $this->qty_refunded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get remaining qty for invoice.
|
||||
*/
|
||||
public function getQtyToInvoiceAttribute() {
|
||||
return $this->qty_ordered - $this->qty_invoiced - $this->qty_refunded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the order record associated with the order item.
|
||||
*/
|
||||
|
|
@ -30,13 +44,27 @@ class OrderItem extends Model implements OrderItemContract
|
|||
*/
|
||||
public function child()
|
||||
{
|
||||
return $this->belongsTo(OrderItemProxy::modelClass(), 'parent_id');
|
||||
return $this->hasOne(OrderItemProxy::modelClass(), 'parent_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the inventories record associated with the order item.
|
||||
*/
|
||||
public function inventories() {
|
||||
return $this->hasMany(CartItemInventoyrProxy::modelClass());
|
||||
return $this->hasMany(CartItemInventoryProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the invoice items record associated with the order item.
|
||||
*/
|
||||
public function invoice_items() {
|
||||
return $this->hasMany(InvoiceItemProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the shipment items record associated with the order item.
|
||||
*/
|
||||
public function shipment_items() {
|
||||
return $this->hasMany(ShipmentItemProxy::modelClass());
|
||||
}
|
||||
}
|
||||
|
|
@ -7,11 +7,21 @@ use Webkul\Sales\Contracts\Shipment as ShipmentContract;
|
|||
|
||||
class Shipment extends Model implements ShipmentContract
|
||||
{
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Get the order that belongs to the invoice.
|
||||
*/
|
||||
public function order()
|
||||
{
|
||||
return $this->belongsTo(OrderProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the shipment items record associated with the shipment.
|
||||
*/
|
||||
public function items() {
|
||||
return $this->hasMany(ShipmentItemProxy::modelClass())->whereNull('parent_id');
|
||||
return $this->hasMany(ShipmentItemProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -25,40 +35,8 @@ class Shipment extends Model implements ShipmentContract
|
|||
/**
|
||||
* Get the addresses for the shipment.
|
||||
*/
|
||||
public function addresses()
|
||||
public function address()
|
||||
{
|
||||
return $this->hasMany(OrderAddressProxy::modelClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the biling address for the shipment.
|
||||
*/
|
||||
public function billing_address()
|
||||
{
|
||||
return $this->addresses()->where('address_type', 'billing');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing address for the shipment.
|
||||
*/
|
||||
public function getBillingAddressAttribute()
|
||||
{
|
||||
return $this->billing_address()->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the shipping address for the shipment.
|
||||
*/
|
||||
public function shipping_address()
|
||||
{
|
||||
return $this->addresses()->where('address_type', 'shipping');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping address for the shipment.
|
||||
*/
|
||||
public function getShippingAddressAttribute()
|
||||
{
|
||||
return $this->shipping_address()->first();
|
||||
return $this->belongsTo(OrderAddressProxy::modelClass(), 'order_address_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,8 @@ use Webkul\Sales\Contracts\ShipmentItem as ShipmentItemContract;
|
|||
|
||||
class ShipmentItem extends Model implements ShipmentItemContract
|
||||
{
|
||||
protected $guarded = ['id', 'child', 'created_at', 'updated_at'];
|
||||
|
||||
/**
|
||||
* Get the shipment record associated with the shipment item.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,266 @@
|
|||
@extends('admin::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.sales.shipments.add-title') }}
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<div class="content full-page">
|
||||
<form method="POST" action="{{ route('admin.sales.shipments.store', $order->id) }}" @submit.prevent="onSubmit">
|
||||
@csrf()
|
||||
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.sales.shipments.add-title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.sales.shipments.save-btn-title') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="sale-container">
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.order-and-account') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.order-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.shipments.order-id') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
<a href="{{ route('admin.sales.orders.view', $order->id) }}">#{{ $order->id }}</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-date') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->created_at }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.order-status') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.channel') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->channel_name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.account-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.customer-name') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_full_name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.email') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->customer_email }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.address') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.billing-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->billing_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($order->shipping_address)
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-address') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
|
||||
@include ('admin::sales.address', ['address' => $order->shipping_address])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.payment-and-shipping') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.payment-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.payment-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.currency') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->order_currency_code }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sale-section">
|
||||
<div class="secton-title">
|
||||
<span>{{ __('admin::app.sales.orders.shipping-info') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="section-content">
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-method') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ $order->shipping_title }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('admin::app.sales.orders.shipping-price') }}
|
||||
</span>
|
||||
|
||||
<span class="value">
|
||||
{{ core()->formatBasePrice($order->base_shipping_amount) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipment[carrier_title]') ? 'has-error' : '']" style="margin-top: 40px">
|
||||
<label for="shipment[carrier_title]" class="required">{{ __('admin::app.sales.shipments.carrier-title') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="shipment[carrier_title]" name="shipment[carrier_title]"/>
|
||||
<span class="control-error" v-if="errors.has('shipment[carrier_title]')">
|
||||
@{{ errors.first('shipment[carrier_title]') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipment[track_number]') ? 'has-error' : '']">
|
||||
<label for="shipment[track_number]" class="required">{{ __('admin::app.sales.shipments.tracking-number') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="shipment[track_number]" name="shipment[track_number]"/>
|
||||
<span class="control-error" v-if="errors.has('shipment[track_number]')">
|
||||
@{{ errors.first('shipment[track_number]') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
<accordian :title="'{{ __('admin::app.sales.orders.products-ordered') }}'" :active="true">
|
||||
<div slot="body">
|
||||
|
||||
<div class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('admin::app.sales.orders.SKU') }}</th>
|
||||
<th>{{ __('admin::app.sales.orders.product-name') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.qty-ordered') }}</th>
|
||||
<th>{{ __('admin::app.sales.shipments.qty-to-ship') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($order->items as $item)
|
||||
@if ($item->qty_to_ship > 0)
|
||||
<tr>
|
||||
<td>{{ $item->type == 'configurable' ? $item->child->sku : $item->sku }}</td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->qty_ordered }}</td>
|
||||
<td>
|
||||
<div class="control-group" :class="[errors.has('shipment[items][{{ $item->id }}]') ? 'has-error' : '']">
|
||||
<input type="text" v-validate="'required|numeric|min:0'" class="control" id="shipment[items][{{ $item->id }}]" name="shipment[items][{{ $item->id }}]" value="{{ $item->qty_to_ship }}"/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('shipment[items][{{ $item->id }}]')">
|
||||
@verbatim
|
||||
{{ errors.first('shipment[items][<?php echo $item->id ?>]') }}
|
||||
@endverbatim
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -3,7 +3,12 @@
|
|||
namespace Webkul\Sales\Repositories;
|
||||
|
||||
use Illuminate\Container\Container as App;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Sales\Repositories\OrderRepository as Order;
|
||||
use Webkul\Sales\Repositories\OrderItemRepository as OrderItem;
|
||||
use Webkul\Sales\Repositories\InvoiceItemRepository as InvoiceItem;
|
||||
|
||||
/**
|
||||
* Invoice Reposotory
|
||||
|
|
@ -14,6 +19,51 @@ use Webkul\Core\Eloquent\Repository;
|
|||
|
||||
class InvoiceRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* OrderRepository object
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
/**
|
||||
* OrderItemRepository object
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $orderItem;
|
||||
|
||||
/**
|
||||
* InvoiceItemRepository object
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $invoiceItem;
|
||||
|
||||
/**
|
||||
* Create a new repository instance.
|
||||
*
|
||||
* @param Webkul\Sales\Repositories\OrderRepository $order
|
||||
* @param Webkul\Sales\Repositories\OrderItemRepository $orderItem
|
||||
* @param Webkul\Sales\Repositories\InvoiceItemRepository $orderItem
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
Order $order,
|
||||
OrderItem $orderItem,
|
||||
InvoiceItem $invoiceItem,
|
||||
App $app
|
||||
)
|
||||
{
|
||||
$this->order = $order;
|
||||
|
||||
$this->orderItem = $orderItem;
|
||||
|
||||
$this->invoiceItem = $invoiceItem;
|
||||
|
||||
parent::__construct($app);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify Model class name
|
||||
*
|
||||
|
|
@ -24,4 +74,142 @@ class InvoiceRepository extends Repository
|
|||
{
|
||||
return 'Webkul\Sales\Contracts\Invoice';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Event::fire('sales.invoice.save.before', $data);
|
||||
|
||||
$order = $this->order->find($data['order_id']);
|
||||
|
||||
$totalQty = array_sum($data['invoice']['items']);
|
||||
|
||||
$invoice = $this->model->create([
|
||||
'order_id' => $order->id,
|
||||
'total_qty' => $totalQty,
|
||||
'base_currency_code' => $order->base_currency_code,
|
||||
'channel_currency_code' => $order->channel_currency_code,
|
||||
'order_currency_code' => $order->order_currency_code,
|
||||
'order_address_id' => $order->billing_address->id,
|
||||
]);
|
||||
|
||||
foreach ($data['invoice']['items'] as $itemId => $qty) {
|
||||
if(!$qty) continue;
|
||||
|
||||
$orderItem = $this->orderItem->find($itemId);
|
||||
|
||||
if($qty > $orderItem->qty_to_invoice)
|
||||
$qty = $orderItem->qty_to_invoice;
|
||||
|
||||
$invoiceItem = $this->invoiceItem->create([
|
||||
'invoice_id' => $invoice->id,
|
||||
'order_item_id' => $orderItem->id,
|
||||
'name' => $orderItem->name,
|
||||
'sku' => $orderItem->sku,
|
||||
'qty' => $qty,
|
||||
'price' => $orderItem->price,
|
||||
'base_price' => $orderItem->base_price,
|
||||
'total' => $orderItem->price * $qty,
|
||||
'base_total' => $orderItem->base_price * $qty,
|
||||
'tax_amount' => ( ($orderItem->tax_amount / $orderItem->qty_ordered) * $qty ),
|
||||
'base_tax_amount' => ( ($orderItem->base_tax_amount / $orderItem->qty_ordered) * $qty ),
|
||||
'product_id' => $orderItem->product_id,
|
||||
'product_type' => $orderItem->product_type,
|
||||
'additional' => $orderItem->additional,
|
||||
]);
|
||||
|
||||
if($orderItem->type == 'configurable' && $orderItem->child) {
|
||||
$childOrderItem = $orderItem->child;
|
||||
|
||||
$invoiceItem->child = $this->invoiceItem->create([
|
||||
'invoice_id' => $invoice->id,
|
||||
'order_item_id' => $childOrderItem->id,
|
||||
'parent_id' => $invoiceItem->id,
|
||||
'name' => $childOrderItem->name,
|
||||
'sku' => $childOrderItem->sku,
|
||||
'qty' => $qty,
|
||||
'price' => $childOrderItem->price,
|
||||
'base_price' => $childOrderItem->base_price,
|
||||
'total' => $childOrderItem->price * $qty,
|
||||
'base_total' => $childOrderItem->base_price * $qty,
|
||||
'tax_amount' => ( ($childOrderItem->tax_amount / $childOrderItem->qty_ordered) * $qty ),
|
||||
'base_tax_amount' => ( ($childOrderItem->base_tax_amount / $childOrderItem->qty_ordered) * $qty ),
|
||||
'product_id' => $childOrderItem->product_id,
|
||||
'product_type' => $childOrderItem->product_type,
|
||||
'additional' => $childOrderItem->additional,
|
||||
]);
|
||||
}
|
||||
|
||||
$this->orderItem->collectTotals($orderItem);
|
||||
}
|
||||
|
||||
$this->collectTotals($invoice);
|
||||
|
||||
$this->order->collectTotals($order);
|
||||
|
||||
$this->order->updateOrderStatus($order->id);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
DB::commit();
|
||||
|
||||
Event::fire('sales.invoice.save.after', $invoice);
|
||||
|
||||
return $invoice;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $invoice
|
||||
* @return mixed
|
||||
*/
|
||||
public function collectTotals($invoice)
|
||||
{
|
||||
$subTotal = $baseSubTotal = 0;
|
||||
$taxAmount = $baseTaxAmount = 0;
|
||||
|
||||
foreach($invoice->items as $invoiceItem) {
|
||||
$subTotal += $invoiceItem->total;
|
||||
$baseSubTotal += $invoiceItem->base_total;
|
||||
|
||||
$taxAmount += $invoiceItem->tax_amount;
|
||||
$baseTaxAmount += $invoiceItem->base_tax_amount;
|
||||
}
|
||||
|
||||
$shippingAmount = $invoice->order->shipping_amount;
|
||||
$baseShippingAmount = $invoice->order->base_shipping_amount;
|
||||
|
||||
if ($invoice->order->shipping_amount) {
|
||||
foreach($invoice->order->invoices as $prevInvoice) {
|
||||
if((float) $prevInvoice->shipping_amount) {
|
||||
$shippingAmount = 0;
|
||||
$baseShippingAmount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$invoice->sub_total = $subTotal;
|
||||
$invoice->base_sub_total = $baseSubTotal;
|
||||
|
||||
$invoice->shipping_amount = $shippingAmount;
|
||||
$invoice->base_shipping_amount = $baseShippingAmount;
|
||||
|
||||
$invoice->tax_amount = $taxAmount;
|
||||
$invoice->base_tax_amount = $baseTaxAmount;
|
||||
|
||||
$invoice->grand_total = $subTotal + $taxAmount + $shippingAmount;
|
||||
$invoice->base_grand_total = $baseSubTotal + $baseTaxAmount + $baseShippingAmount;
|
||||
|
||||
$invoice->save();
|
||||
|
||||
return $invoice;
|
||||
}
|
||||
}
|
||||
|
|
@ -40,4 +40,42 @@ class OrderItemRepository extends Repository
|
|||
|
||||
return $this->model->create($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $orderItem
|
||||
* @return mixed
|
||||
*/
|
||||
public function collectTotals($orderItem)
|
||||
{
|
||||
$qtyShipped = $qtyInvoiced = 0;
|
||||
$totalInvoiced = $baseTotalInvoiced = 0;
|
||||
$taxInvoiced = $baseTaxInvoiced = 0;
|
||||
|
||||
foreach($orderItem->invoice_items as $invoiceItem) {
|
||||
$qtyInvoiced += $invoiceItem->qty;
|
||||
|
||||
$totalInvoiced += $invoiceItem->total;
|
||||
$baseTotalInvoiced += $invoiceItem->base_total;
|
||||
|
||||
$taxInvoiced += $invoiceItem->tax_amount;
|
||||
$baseTaxInvoiced += $invoiceItem->base_tax_amount;
|
||||
}
|
||||
|
||||
foreach($orderItem->shipment_items as $shipmentItem) {
|
||||
$qtyShipped += $shipmentItem->qty;
|
||||
}
|
||||
|
||||
$orderItem->qty_shipped = $qtyShipped;
|
||||
$orderItem->qty_invoiced = $qtyInvoiced;
|
||||
|
||||
$orderItem->total_invoiced = $totalInvoiced;
|
||||
$orderItem->base_total_invoiced = $baseTotalInvoiced;
|
||||
|
||||
$orderItem->tax_amount_invoiced = $taxInvoiced;
|
||||
$orderItem->base_tax_amount_invoiced = $baseTaxInvoiced;
|
||||
|
||||
$orderItem->save();
|
||||
|
||||
return $orderItem;
|
||||
}
|
||||
}
|
||||
|
|
@ -75,13 +75,21 @@ class OrderRepository extends Repository
|
|||
try {
|
||||
Event::fire('checkout.order.save.before', $data);
|
||||
|
||||
if(isset($data['customer']) && $data['customer'] instanceof Model) {
|
||||
if(isset($data['customer']) && $data['customer']) {
|
||||
$data['customer_id'] = $data['customer']->id;
|
||||
$data['customer_type'] = get_class($data['customer']);
|
||||
} else {
|
||||
unset($data['customer']);
|
||||
}
|
||||
|
||||
if(isset($data['channel']) && $data['channel']) {
|
||||
$data['channel_id'] = $data['channel']->id;
|
||||
$data['channel_type'] = get_class($data['channel']);
|
||||
$data['channel_name'] = $data['channel']->name;
|
||||
} else {
|
||||
unset($data['channel']);
|
||||
}
|
||||
|
||||
$data['status'] = core()->getConfigData('paymentmethods.' . $data['payment']['method'] . '.status') ?? 'pending';
|
||||
|
||||
$order = $this->model->create(array_merge($data, ['increment_id' => $this->generateIncrementId()]));
|
||||
|
|
@ -125,4 +133,51 @@ class OrderRepository extends Repository
|
|||
|
||||
return $lastId + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $orderId
|
||||
* @return void
|
||||
*/
|
||||
public function updateOrderStatus(int $orderId)
|
||||
{
|
||||
$order = $this->find($orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $order
|
||||
* @return mixed
|
||||
*/
|
||||
public function collectTotals($order)
|
||||
{
|
||||
$subTotalInvoiced = $baseSubTotalInvoiced = 0;
|
||||
$shippingInvoiced = $baseShippingInvoiced = 0;
|
||||
$taxInvoiced = $baseTaxInvoiced = 0;
|
||||
|
||||
foreach($order->invoices as $invoice) {
|
||||
$subTotalInvoiced += $invoice->sub_total;
|
||||
$baseSubTotalInvoiced += $invoice->base_sub_total;
|
||||
|
||||
$shippingInvoiced += $invoice->shipping_amount;
|
||||
$baseShippingInvoiced += $invoice->base_shipping_amount;
|
||||
|
||||
$taxInvoiced += $invoice->tax_amount;
|
||||
$baseTaxInvoiced += $invoice->base_tax_amount;
|
||||
}
|
||||
|
||||
$order->sub_total_invoiced = $subTotalInvoiced;
|
||||
$order->base_sub_total_invoiced = $baseSubTotalInvoiced;
|
||||
|
||||
$order->shipping_invoiced = $shippingInvoiced;
|
||||
$order->base_shipping_invoiced = $baseShippingInvoiced;
|
||||
|
||||
$order->tax_amount_invoiced = $taxInvoiced;
|
||||
$order->base_tax_amount_invoiced = $baseTaxInvoiced;
|
||||
|
||||
$order->grand_total_invoiced = $subTotalInvoiced + $shippingInvoiced + $taxInvoiced;
|
||||
$order->base_grand_total_invoiced = $baseSubTotalInvoiced + $shippingInvoiced + $baseTaxInvoiced;
|
||||
|
||||
$order->save();
|
||||
|
||||
return $order;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,12 @@
|
|||
namespace Webkul\Sales\Repositories;
|
||||
|
||||
use Illuminate\Container\Container as App;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Core\Eloquent\Repository;
|
||||
use Webkul\Sales\Repositories\OrderRepository as Order;
|
||||
use Webkul\Sales\Repositories\OrderItemRepository as OrderItem;
|
||||
use Webkul\Sales\Repositories\ShipmentItemRepository as ShipmentItem;
|
||||
|
||||
/**
|
||||
* Shipment Reposotory
|
||||
|
|
@ -14,6 +19,51 @@ use Webkul\Core\Eloquent\Repository;
|
|||
|
||||
class ShipmentRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* OrderRepository object
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $order;
|
||||
|
||||
/**
|
||||
* OrderItemRepository object
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $orderItem;
|
||||
|
||||
/**
|
||||
* ShipmentItemRepository object
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $shipmentItem;
|
||||
|
||||
/**
|
||||
* Create a new repository instance.
|
||||
*
|
||||
* @param Webkul\Sales\Repositories\OrderRepository $order
|
||||
* @param Webkul\Sales\Repositories\OrderItemRepository $orderItem
|
||||
* @param Webkul\Sales\Repositories\ShipmentItemRepository $orderItem
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
Order $order,
|
||||
OrderItem $orderItem,
|
||||
ShipmentItem $shipmentItem,
|
||||
App $app
|
||||
)
|
||||
{
|
||||
$this->order = $order;
|
||||
|
||||
$this->orderItem = $orderItem;
|
||||
|
||||
$this->shipmentItem = $shipmentItem;
|
||||
|
||||
parent::__construct($app);
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify Model class name
|
||||
*
|
||||
|
|
@ -24,4 +74,70 @@ class ShipmentRepository extends Repository
|
|||
{
|
||||
return 'Webkul\Sales\Contracts\Shipment';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Event::fire('sales.shipment.save.before', $data);
|
||||
|
||||
$order = $this->order->find($data['order_id']);
|
||||
|
||||
$totalQty = array_sum($data['shipment']['items']);
|
||||
|
||||
$shipment = $this->model->create([
|
||||
'order_id' => $order->id,
|
||||
'total_qty' => $totalQty,
|
||||
'carrier_title' => $data['shipment']['carrier_title'],
|
||||
'track_number' => $data['shipment']['track_number'],
|
||||
'customer_id' => $order->customer_id,
|
||||
'customer_type' => $order->customer_type,
|
||||
'order_address_id' => $order->shipping_address->id,
|
||||
]);
|
||||
|
||||
foreach ($data['shipment']['items'] as $itemId => $qty) {
|
||||
if(!$qty) continue;
|
||||
|
||||
$orderItem = $this->orderItem->find($itemId);
|
||||
|
||||
if($qty > $orderItem->qty_to_ship)
|
||||
$qty = $orderItem->qty_to_ship;
|
||||
|
||||
$shipmentItem = $this->shipmentItem->create([
|
||||
'shipment_id' => $shipment->id,
|
||||
'order_item_id' => $orderItem->id,
|
||||
'name' => $orderItem->name,
|
||||
'sku' => ($orderItem->type == 'configurable' ? $orderItem->child->sku : $orderItem->sku),
|
||||
'qty' => $qty,
|
||||
'weight' => $orderItem->weight * $qty,
|
||||
'price' => $orderItem->price,
|
||||
'base_price' => $orderItem->base_price,
|
||||
'total' => $orderItem->price * $qty,
|
||||
'base_total' => $orderItem->base_price * $qty,
|
||||
'product_id' => $orderItem->product_id,
|
||||
'product_type' => $orderItem->product_type,
|
||||
'additional' => $orderItem->additional,
|
||||
]);
|
||||
|
||||
$this->orderItem->update(['qty_shipped' => $orderItem->qty_shipped + $qty], $orderItem->id);
|
||||
}
|
||||
|
||||
$this->order->updateOrderStatus($order->id);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
DB::commit();
|
||||
|
||||
Event::fire('sales.shipment.save.after', $shipment);
|
||||
|
||||
return $shipment;
|
||||
}
|
||||
}
|
||||
|
|
@ -131,6 +131,7 @@ return [
|
|||
'sub-total' => 'Items',
|
||||
'grand-total' => 'Grand Total',
|
||||
'delivery-charges' => 'Delivery Charges',
|
||||
'tax' => 'Tax',
|
||||
'price' => 'price'
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,13 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if ($cart->base_tax_total)
|
||||
<div class="item-detail">
|
||||
<label>{{ __('shop::app.checkout.total.tax') }}</label>
|
||||
<label class="right">{{ core()->currency($cart->base_tax_total) }}</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="payble-amount">
|
||||
<label>{{ __('shop::app.checkout.total.grand-total') }}</label>
|
||||
<label class="right">{{ core()->currency($cart->grand_total) }}</label>
|
||||
|
|
|
|||
|
|
@ -97,9 +97,15 @@
|
|||
<div class="dropdown-toggle">
|
||||
<div style="display: inline-block; cursor: pointer;">
|
||||
@if($cart->items_qty - intval($cart->items_qty) > 0)
|
||||
<span class="name"><span class="count"> {{ $cart->items_qty }} Products</span>
|
||||
<span class="name">
|
||||
Cart
|
||||
<span class="count"> ({{ $cart->items_qty }})</span>
|
||||
</span>
|
||||
@else
|
||||
<span class="name"><span class="count"> {{ intval($cart->items_qty) }} Products</span>
|
||||
<span class="name">
|
||||
Cart
|
||||
<span class="count"> ({{ intval($cart->items_qty) }})</span>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
|
@ -167,7 +173,7 @@
|
|||
<div class="dropdown-toggle">
|
||||
<div style="display: inline-block; cursor: pointer;">
|
||||
|
||||
<span class="name"><span class="count"> 0 </span>Products</span>
|
||||
<span class="name">Cart<span class="count"> (0) </span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Icon-Sales-Active</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Icon-Sales-Active" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g transform="translate(10.000000, 10.000000)" id="Rectangle-2" stroke="#0041FF" stroke-width="2">
|
||||
<rect x="0" y="16" width="6" height="12"></rect>
|
||||
<rect x="11" y="8" width="6" height="20"></rect>
|
||||
<rect x="22" y="0" width="6" height="28"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 817 B |
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Icon-Sales</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Icon-Sales" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g transform="translate(10.000000, 10.000000)" id="Rectangle-2" stroke="#8E8E8E" stroke-width="2">
|
||||
<rect x="0" y="16" width="6" height="12"></rect>
|
||||
<rect x="11" y="8" width="6" height="20"></rect>
|
||||
<rect x="22" y="0" width="6" height="28"></rect>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 803 B |
|
|
@ -1,5 +1,7 @@
|
|||
Vue.component("flash-wrapper", require("./components/flash-wrapper"));
|
||||
Vue.component("flash", require("./components/flash"));
|
||||
Vue.component("tabs", require("./components/tabs/tabs"));
|
||||
Vue.component("tab", require("./components/tabs/tab"));
|
||||
Vue.component("accordian", require("./components/accordian"));
|
||||
Vue.component("tree-view", require("./components/tree-view/tree-view"));
|
||||
Vue.component("tree-item", require("./components/tree-view/tree-item"));
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
<template>
|
||||
<div v-show="isActive">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
name: {
|
||||
required: true
|
||||
},
|
||||
|
||||
selected: {
|
||||
default: false
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
isActive: false
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.isActive = this.selected;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li v-for="tab in tabs" :class="{ 'active': tab.isActive }" @click="selectTab(tab)">
|
||||
<a>{{ tab.name }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="tabs-content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
tabs: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.tabs = this.$children;
|
||||
},
|
||||
|
||||
methods: {
|
||||
selectTab(selectedTab) {
|
||||
this.tabs.forEach(tab => {
|
||||
tab.isActive = (tab.name == selectedTab.name);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -234,6 +234,10 @@ h2 {
|
|||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&.empty {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
tbody tr:last-child td {
|
||||
|
|
@ -1032,562 +1036,4 @@ h2 {
|
|||
background-image: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// admin dashboard component
|
||||
|
||||
.dashboard-card {
|
||||
height: 100px;
|
||||
width: 22%;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 5px;
|
||||
|
||||
.visitor-content {
|
||||
padding: 15px;
|
||||
|
||||
.title {
|
||||
|
||||
span {
|
||||
padding-top:10px;
|
||||
font-size: 14px;
|
||||
color: #A2A2A2;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.data {
|
||||
padding-top: 3px;
|
||||
|
||||
span {
|
||||
font-size: 32px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.6px;
|
||||
|
||||
img {
|
||||
margin-left: 75px;
|
||||
height: 24px;
|
||||
width:24px;
|
||||
}
|
||||
}
|
||||
|
||||
span.right {
|
||||
padding-top: 12px;
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
color: #8E8E8E;
|
||||
letter-spacing: -0.7px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dashboard-card:nth-last-child(1) {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.dashboard-card:nth-last-child(2) {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.dashboard-card:nth-last-child(3) {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
|
||||
.dashboard-graph {
|
||||
height: 413px;
|
||||
width: 70.5%;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.performing-category {
|
||||
height: 413px;
|
||||
width: 22%;
|
||||
margin-left: 30px;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 2px;
|
||||
|
||||
.category {
|
||||
margin-left: 20px;
|
||||
margin-top: 20px;
|
||||
|
||||
.title {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #A2A2A2;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.category-info {
|
||||
margin-top: 30px;
|
||||
|
||||
|
||||
ul {
|
||||
|
||||
li {
|
||||
|
||||
.category-list {
|
||||
margin-top: 10px;
|
||||
|
||||
.cat-name {
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.3px;
|
||||
|
||||
}
|
||||
|
||||
.right-side {
|
||||
float: right;
|
||||
margin-right: 12px;
|
||||
margin-top: 10px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.product-info {
|
||||
margin-top: 5px;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
}
|
||||
|
||||
.horizon-rule {
|
||||
margin-top: 8px;
|
||||
border: .7px solid #D8D8D8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
|
||||
.category-list {
|
||||
.horizon-rule {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sale {
|
||||
height: 465px;
|
||||
width: 30.1%;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px 2px rgba(0,0,0,0.08);
|
||||
border-radius: 2px;
|
||||
|
||||
.top-sale {
|
||||
margin-left: 20px;
|
||||
margin-top: 27px;
|
||||
|
||||
.title {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #A2A2A2;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.sale-info {
|
||||
|
||||
ul {
|
||||
|
||||
li {
|
||||
|
||||
.pro-attribute{
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
|
||||
.pro-img {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
border: 1px solid green;
|
||||
}
|
||||
|
||||
.product-description {
|
||||
margin-left: 15px;
|
||||
margin-top: 8px;
|
||||
width: 75%;
|
||||
|
||||
.product-name {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
|
||||
.right-side {
|
||||
float: right;
|
||||
margin-top: 10px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.product-info {
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.horizontal-rule {
|
||||
border: .5px solid #A2A2A2;
|
||||
opacity: 0.2;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
.horizontal-rule {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sale:nth-last-child(1) {
|
||||
margin-left: 31px;
|
||||
}
|
||||
|
||||
.sale:nth-last-child(2) {
|
||||
margin-left: 31px;
|
||||
}
|
||||
|
||||
// admin dashboard css ends here
|
||||
|
||||
|
||||
// customer order information for admin css start here
|
||||
|
||||
.order-information {
|
||||
|
||||
.order-info {
|
||||
|
||||
span{
|
||||
font-size: 18px;
|
||||
color: #8E8E8E;
|
||||
letter-spacing: -0.29px;
|
||||
}
|
||||
|
||||
.edit {
|
||||
float :right;
|
||||
font-size: 16px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.29px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.horizotal-rule {
|
||||
width:100%;
|
||||
border:1px solid #A2A2A2;
|
||||
opacity: 0.2;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.order-account{
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
margin-top: 20px;
|
||||
|
||||
.left-content {
|
||||
width: 200px;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.right-content {
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.account-information {
|
||||
margin-top: 30px;
|
||||
|
||||
.account-info {
|
||||
|
||||
span{
|
||||
font-size: 18px;
|
||||
color: #8E8E8E;
|
||||
letter-spacing: -0.29px;
|
||||
}
|
||||
|
||||
.edit {
|
||||
float :right;
|
||||
font-size: 16px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.29px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.horizotal-rule {
|
||||
width:100%;
|
||||
border:1px solid #A2A2A2;
|
||||
opacity: 0.2;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.order-account{
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
margin-top: 20px;
|
||||
|
||||
.left-content {
|
||||
width: 200px;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.right-content {
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #0041FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.address-information {
|
||||
|
||||
.address-name {
|
||||
|
||||
span{
|
||||
font-size: 18px;
|
||||
color: #8E8E8E;
|
||||
letter-spacing: -0.29px;
|
||||
}
|
||||
|
||||
.edit {
|
||||
float :right;
|
||||
font-size: 16px;
|
||||
color: #0041FF;
|
||||
letter-spacing: -0.29px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.horizotal-rule {
|
||||
width:100%;
|
||||
border:1px solid #A2A2A2;
|
||||
opacity: 0.2;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.address-detail{
|
||||
margin-top: 10px;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.address-information:last-child {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.payment-information {
|
||||
|
||||
.title {
|
||||
|
||||
span{
|
||||
font-size: 18px;
|
||||
color: #8E8E8E;
|
||||
letter-spacing: -0.29px;
|
||||
}
|
||||
}
|
||||
|
||||
.horizotal-rule {
|
||||
width:100%;
|
||||
border:1px solid #A2A2A2;
|
||||
opacity: 0.2;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.payment-info{
|
||||
display:flex;
|
||||
flex-direction: row;
|
||||
margin-top: 20px;
|
||||
|
||||
.left-content {
|
||||
width: 200px;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
|
||||
.right-content {
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #3A3A3A;
|
||||
letter-spacing: -0.26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.payment-information:last-child {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.total {
|
||||
margin-top: 2%;
|
||||
height: 130px;
|
||||
|
||||
.calculate {
|
||||
margin-right: 8%;
|
||||
float: right;
|
||||
|
||||
.sub-total {
|
||||
|
||||
span {
|
||||
font-size: 14px; font-size: 14px;
|
||||
color: #3A3A3A;
|
||||
color: #3A3A3A;
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-left: 109px;
|
||||
}
|
||||
|
||||
.middle {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.ship-handle {
|
||||
margin-top: 5px;
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: #3A3A3A;
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.middle {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.discount {
|
||||
margin-top: 5px;
|
||||
|
||||
span {
|
||||
font-size: 14px; font-size: 14px;
|
||||
color: #3A3A3A;
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-left: 98px;
|
||||
}
|
||||
|
||||
.middle {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.grand-total {
|
||||
margin-top: 5px;
|
||||
|
||||
span {
|
||||
font-size: 14px; font-size: 14px;
|
||||
color: #3A3A3A;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-left: 87px;
|
||||
}
|
||||
|
||||
.middle {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.due {
|
||||
margin-top: 5px;
|
||||
|
||||
span {
|
||||
font-size: 14px; font-size: 14px;
|
||||
color: #3A3A3A;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.left {
|
||||
margin-left: 101px;
|
||||
}
|
||||
|
||||
.middle {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// customer order information for admin css end here
|
||||
}
|
||||
|
|
@ -14,6 +14,10 @@
|
|||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Dashboard.svg");
|
||||
}
|
||||
.sales-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Sales.svg");
|
||||
}
|
||||
.catalog-icon {
|
||||
@extend %menu-properties;
|
||||
background-image: url("../images/Icon-Catalog.svg");
|
||||
|
|
@ -179,6 +183,10 @@
|
|||
background-image: url("../images/Icon-Dashboard-Active.svg");
|
||||
}
|
||||
|
||||
.sales-icon {
|
||||
background-image: url("../images/Icon-Sales-Active.svg");
|
||||
}
|
||||
|
||||
.catalog-icon {
|
||||
background-image: url("../images/Icon-Catalog-Active.svg");
|
||||
}
|
||||
|
|
@ -205,6 +213,10 @@
|
|||
background-image: url("../images/Icon-Dashboard-Active.svg");
|
||||
}
|
||||
|
||||
&.sales-icon {
|
||||
background-image: url("../images/Icon-Sales-Active.svg");
|
||||
}
|
||||
|
||||
&.settings-icon {
|
||||
background-image: url("../images/Icon-Settings-Active.svg");
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue