updated column in orders module

This commit is contained in:
franknstayn
2019-11-18 18:08:30 +08:00
parent e480e7bcb6
commit f42a900e3d
5 changed files with 12 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ class AdminController extends Controller
public function orders(){
$AdminModel = new AdminModel;
$array_payment_details = $AdminModel->selectPaymentDetails('All', null);
// var_dump($array_payment_details);
return view('admin_pages.orders')
->with('array_payment_details', $array_payment_details);
}

View File

@@ -53,15 +53,12 @@ Route::group(['middleware' => 'auth'], function () {
Route::post('post/remove-store-access', 'admin\AdminController@removeStoreAccess');
Route::post('post/save-new-store-owner', 'admin\AdminController@saveNewStoreOwner');
// Download Routes /////////////////
Route::get('orders/download/tshirt/{ck}/{id}', 'admin\AdminController@downloadPrintFile_tshirt');
Route::get('orders/download/jersey/{ck}/{id}', 'admin\AdminController@downloadPrintFile_jersey');
// End Download Routes /////////////
});
});
Route::auth();

View File

@@ -16,8 +16,13 @@ class AdminModel extends Model
->get();
}else{
$i = DB::table('payment_details')
->orderby('Id', 'ASC')
$i = DB::table('payment_details')
->leftjoin('orders', 'payment_details.CartKey', '=', 'orders.CartKey')
->leftjoin('teamstores', 'teamstores.Id', '=', 'orders.StoreId')
->select('payment_details.*', 'orders.StoreId', 'teamstores.StoreName')
->where("payment_details.CartKey", "!=", null)
->groupby('orders.CartKey')
->orderby('payment_details.Id', 'ASC')
->get();
}

View File

@@ -9,7 +9,7 @@
<img src="{{ asset('/bower_components/admin-lte/dist/img/user2-160x160.jpg') }}" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<p>Frank John Begornia</p>
<p> {{ Auth::user()->name }} </p>
<!-- Status -->
<a href="#">Administrator</a>
</div>

View File

@@ -26,6 +26,7 @@
<table id="orders_table" class="table table-bordered table-hover">
<thead>
<tr>
<th>Store</th>
<th>Invoice #</th>
<th>Currency</th>
<th>Tax</th>
@@ -38,6 +39,7 @@
<tbody>
@foreach($array_payment_details as $pd_row)
<tr>
<td>{{ $pd_row->StoreName }}</td>
<td>{{ $pd_row->InvoiceNumber }}</td>
<td>{{ $pd_row->Currency }}</td>
<td>{{ $pd_row->Tax }}</td>