add column in reports modules
This commit is contained in:
@@ -957,13 +957,24 @@ class DesignerController extends Controller {
|
|||||||
public function addNewRow(Request $request){
|
public function addNewRow(Request $request){
|
||||||
|
|
||||||
$post = $request->all();
|
$post = $request->all();
|
||||||
|
$TeamStoreModel = new TeamStoreModel;
|
||||||
|
$newDesignerModel = new DesignerModel;
|
||||||
|
|
||||||
$trCount = $post['itemCount'];
|
$trCount = $post['itemCount'];
|
||||||
$tempCode = $post['tempCode'];
|
$tempCode = $post['tempCode'];
|
||||||
|
$avalable_sizes = $post['avalable_sizes'];
|
||||||
|
|
||||||
$newDesignerModel = new DesignerModel;
|
|
||||||
$jersey_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'JERSEY');
|
|
||||||
$shorts_sizes = $newDesignerModel->getAvailableSizes($tempCode, 'SHORTS');
|
|
||||||
|
|
||||||
|
$x = explode(",", $avalable_sizes );
|
||||||
|
foreach($x as $s){
|
||||||
|
$h[] = $TeamStoreModel->getSizesByBracket($s);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($h as $d){
|
||||||
|
foreach($d as $g){
|
||||||
|
$sizes_array[] = $g;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="<?php echo 'table-tr-' . $trCount ?>">
|
<tr class="<?php echo 'table-tr-' . $trCount ?>">
|
||||||
@@ -985,8 +996,8 @@ class DesignerController extends Controller {
|
|||||||
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" id="<?php echo 'order_jersey_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
|
<select class="form-control input-sm order-size roster-input" name="order_jersey_size[]" id="<?php echo 'order_jersey_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
|
||||||
<option value="none">none</option>
|
<option value="none">none</option>
|
||||||
<?php
|
<?php
|
||||||
foreach($jersey_sizes as $j_size){
|
foreach($sizes_array as $j_size){
|
||||||
echo '<option value="'.$j_size.'">'.$j_size.'</option>';
|
echo '<option value="'.$j_size->Size.'">'.$j_size->Size.'</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -996,8 +1007,8 @@ class DesignerController extends Controller {
|
|||||||
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" id="<?php echo 'order_shorts_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
|
<select class="form-control input-sm order-size roster-input" name="order_shorts_size[]" id="<?php echo 'order_shorts_size_' . $trCount ?>" data-row-number="<?php echo $trCount ?>">
|
||||||
<option value="none">none</option>
|
<option value="none">none</option>
|
||||||
<?php
|
<?php
|
||||||
foreach($shorts_sizes as $s_size){
|
foreach($sizes_array as $s_size){
|
||||||
echo '<option value="'.$s_size.'">'.$s_size.'</option>';
|
echo '<option value="'.$s_size->Size.'">'.$s_size->Size.'</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -1007,6 +1018,7 @@ class DesignerController extends Controller {
|
|||||||
<button type="button" class="btn btn-danger btn-sm removeRow btn-roster-action"removeRow data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
|
<button type="button" class="btn btn-danger btn-sm removeRow btn-roster-action"removeRow data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="addnew-btn-tbl-row">
|
<tr id="addnew-btn-tbl-row">
|
||||||
<td colspan="4" ><button type="button" id="addNewRow" class="btn btn-link btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
|
<td colspan="4" ><button type="button" id="addNewRow" class="btn btn-link btn-sm pull-left" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i> Add Row</button></td>
|
||||||
|
|||||||
@@ -203,8 +203,6 @@ class TeamStoreController extends Controller {
|
|||||||
|
|
||||||
if($product_array[0]->ProductAvailableQty != null){
|
if($product_array[0]->ProductAvailableQty != null){
|
||||||
$soldQty = $m->getSoldQty($product_array[0]->Id);
|
$soldQty = $m->getSoldQty($product_array[0]->Id);
|
||||||
// var_dump($soldQty);
|
|
||||||
// echo $product_array[0]->ProductAvailableQty;
|
|
||||||
$availableQty = $product_array[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
|
$availableQty = $product_array[0]->ProductAvailableQty - $soldQty[0]->SoldQty;
|
||||||
}else{
|
}else{
|
||||||
// echo 'no qty';
|
// echo 'no qty';
|
||||||
@@ -224,13 +222,7 @@ class TeamStoreController extends Controller {
|
|||||||
|
|
||||||
public function login(Request $request)
|
public function login(Request $request)
|
||||||
{
|
{
|
||||||
// [0]->StoreUrl != $store_array[0]->StoreUrl
|
return view('teamstore-sublayouts.login');
|
||||||
// if($request->session()->get('teamstore_data_array') != null){
|
|
||||||
// return redirect('teamstore/'.$request->session()->get('teamstore_data_array')[0]->StoreUrl);
|
|
||||||
// }else{
|
|
||||||
return view('teamstore-sublayouts.login');
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearSession(Request $request)
|
public function clearSession(Request $request)
|
||||||
|
|||||||
@@ -641,6 +641,7 @@ class UserController extends Controller {
|
|||||||
$post = $request->all();
|
$post = $request->all();
|
||||||
// var_dump($post['imgupload']);
|
// var_dump($post['imgupload']);
|
||||||
$UserModel = new UserModel;
|
$UserModel = new UserModel;
|
||||||
|
$newTeamStoreModel = new TeamStoreModel;
|
||||||
$getYear = date('y');
|
$getYear = date('y');
|
||||||
|
|
||||||
$store_id = Auth::user()->store_id;
|
$store_id = Auth::user()->store_id;
|
||||||
@@ -652,7 +653,7 @@ class UserController extends Controller {
|
|||||||
$itemDescription = $post['itemDescription'];
|
$itemDescription = $post['itemDescription'];
|
||||||
$itemPrice = $post['itemPrice'];
|
$itemPrice = $post['itemPrice'];
|
||||||
$itemForm = $post['itemForm'];
|
$itemForm = $post['itemForm'];
|
||||||
$itemUrl = $store_arrayp[0]->StoreUrl . '-' . $post['itemUrl'];
|
$itemUrl = $store_array[0]->StoreUrl . '-' . $post['itemUrl'];
|
||||||
$itemPrivacy = $post['itemPrivacy'];
|
$itemPrivacy = $post['itemPrivacy'];
|
||||||
$available_size = implode(",", $_POST['available_size']);
|
$available_size = implode(",", $_POST['available_size']);
|
||||||
|
|
||||||
|
|||||||
@@ -161,8 +161,9 @@ class UserModel extends Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function selectStoreOrders($store_id){
|
function selectStoreOrders($store_id){
|
||||||
$i = DB::table('orders')->select('orders.*', 'payment_details.InvoiceNumber', 'payment_details.Currency')
|
$i = DB::table('orders')->select('orders.*', 'payment_details.InvoiceNumber', 'payment_details.Currency', 'payment_details.Payer_Email', 'payment_details.Payer_Firstname', 'payment_details.Payer_Lastname', 'shipping_addresses.*')
|
||||||
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
|
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
|
||||||
|
->leftjoin('shipping_addresses', 'shipping_addresses.PaymentDetail_Id','=','payment_details.Id')
|
||||||
->where('orders.StoreId', $store_id)
|
->where('orders.StoreId', $store_id)
|
||||||
->orderby('orders.DateCreated', 'DESC')
|
->orderby('orders.DateCreated', 'DESC')
|
||||||
->get();
|
->get();
|
||||||
|
|||||||
@@ -397,6 +397,8 @@
|
|||||||
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ adding of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ adding of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
$(document).on('button click', '#addNewRow', function(){
|
$(document).on('button click', '#addNewRow', function(){
|
||||||
var TemplateCode = $('#template_code').val();
|
var TemplateCode = $('#template_code').val();
|
||||||
|
var avalable_sizes = $('#avalable_sizes').val();
|
||||||
|
|
||||||
// console.log(TemplateCode)
|
// console.log(TemplateCode)
|
||||||
var orderCounterValue = $('#orderCounterValue').val();
|
var orderCounterValue = $('#orderCounterValue').val();
|
||||||
var numi = document.getElementById('orderCounterValue');
|
var numi = document.getElementById('orderCounterValue');
|
||||||
@@ -409,7 +411,8 @@
|
|||||||
data:{
|
data:{
|
||||||
|
|
||||||
itemCount : num,
|
itemCount : num,
|
||||||
tempCode : TemplateCode
|
tempCode : TemplateCode,
|
||||||
|
avalable_sizes : avalable_sizes
|
||||||
},
|
},
|
||||||
|
|
||||||
dataType: "html", //expect html to be returned
|
dataType: "html", //expect html to be returned
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
|
<input type="hidden" name="product_price" id="product_price" value="{{ $product_array[0]->ProductPrice }}">
|
||||||
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
|
<input type="hidden" name="price_holder" id="price_holder" value="{{ $product_array[0]->ProductPrice }}">
|
||||||
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
|
<input type="hidden" name="template_code" id="template_code" value="{{ $product_array[0]->TemplateCode }}">
|
||||||
|
<input type="hidden" name="avalable_sizes" id="avalable_sizes" value="{{ $product_array[0]->AvailableSizes }}">
|
||||||
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
|
<input type="hidden" name="store_url" id="store_url" value="{{ $store_array[0]->StoreUrl }}">
|
||||||
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
|
<input type="hidden" name="store_id" id="store_id" value="{{ $store_array[0]->Id }}">
|
||||||
|
|
||||||
@@ -72,7 +73,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<table class="table table-bordered" id="tbl_store_orders">
|
<table class="table table-bordered table-condensed nowrap" id="tbl_store_orders">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Invoice No.</th>
|
<th>Invoice No.</th>
|
||||||
@@ -56,6 +56,15 @@
|
|||||||
<th>Price</th>
|
<th>Price</th>
|
||||||
<th>Quantity</th>
|
<th>Quantity</th>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
|
<th>Payer Email</th>
|
||||||
|
<th>Payer Fullname</th>
|
||||||
|
<th>Recipient Name</th>
|
||||||
|
<th>Address Line 1</th>
|
||||||
|
<th>Address Line 2</th>
|
||||||
|
<th>City</th>
|
||||||
|
<th>State</th>
|
||||||
|
<th>Postal Code</th>
|
||||||
|
<th>Country Code</th>
|
||||||
<th>Date Ordered</th>
|
<th>Date Ordered</th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -68,6 +77,15 @@
|
|||||||
<td>{{ $item_order->Price . ' ' . $item_order->Currency }}</td>
|
<td>{{ $item_order->Price . ' ' . $item_order->Currency }}</td>
|
||||||
<td>{{ $item_order->Quantity }} </td>
|
<td>{{ $item_order->Quantity }} </td>
|
||||||
<td>{{ date('Y/m/d', strtotime($item_order->DateCreated)) }}</td>
|
<td>{{ date('Y/m/d', strtotime($item_order->DateCreated)) }}</td>
|
||||||
|
<td>{{ $item_order->Payer_Email }} </td>
|
||||||
|
<td>{{ $item_order->Payer_Firstname . ' ' . $item_order->Payer_Lastname }} </td>
|
||||||
|
<td>{{ $item_order->recipient_name }} </td>
|
||||||
|
<td>{{ $item_order->line1 }} </td>
|
||||||
|
<td>{{ $item_order->line2 }} </td>
|
||||||
|
<td>{{ $item_order->city }} </td>
|
||||||
|
<td>{{ $item_order->state }} </td>
|
||||||
|
<td>{{ $item_order->postal_code }} </td>
|
||||||
|
<td>{{ $item_order->country_code }} </td>
|
||||||
<td>{{ date('F j, Y g:i a', strtotime($item_order->DateCreated)) }}</td>
|
<td>{{ date('F j, Y g:i a', strtotime($item_order->DateCreated)) }}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="#" data-pid="{{ $item_order->ProductId }}" data-id="{{ $item_order->Id }}" data-ck="{{ $item_order->CartKey }}" class="btn btn-default btn-xs btn-order-item-details">View Details</a>
|
<a href="#" data-pid="{{ $item_order->ProductId }}" data-id="{{ $item_order->Id }}" data-ck="{{ $item_order->CartKey }}" class="btn btn-default btn-xs btn-order-item-details">View Details</a>
|
||||||
|
|||||||
@@ -549,6 +549,11 @@
|
|||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* table.dataTable td,table.dataTable th {
|
||||||
|
padding: 3px 10px;
|
||||||
|
width: 1px;
|
||||||
|
white-space: nowrap;
|
||||||
|
} */
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
@@ -650,45 +655,65 @@
|
|||||||
$("#min").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
$("#min").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
||||||
$("#max").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
$("#max").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
||||||
var table = $('#tbl_store_orders').DataTable({
|
var table = $('#tbl_store_orders').DataTable({
|
||||||
|
scrollX: true,
|
||||||
dom: 'Bfrtip',
|
dom: 'Bfrtip',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: [ 0, 1, 2, 3, 5 ]
|
columns: [ 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
|
||||||
},
|
},
|
||||||
className : "btn btn-default",
|
className : "btn btn-default",
|
||||||
text: "<i class=\"fa fa-table\"></i> CSV"
|
text: "<i class=\"fa fa-table\"></i> CSV",
|
||||||
|
title : function() {
|
||||||
|
return "ORDER REPORTS";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'excel',
|
extend: 'excel',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: [ 0, 1, 2, 3, 5 ]
|
columns: [ 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
|
||||||
},
|
},
|
||||||
className : "btn btn-default",
|
className : "btn btn-default",
|
||||||
text: "<i class=\"fa fa-file-excel-o\"></i> Excel"
|
text: "<i class=\"fa fa-file-excel-o\"></i> Excel",
|
||||||
},
|
title : function() {
|
||||||
{
|
return "ORDER REPORTS";
|
||||||
extend: 'pdf',
|
}
|
||||||
exportOptions: {
|
|
||||||
columns: [ 0, 1, 2, 3, 5 ]
|
|
||||||
},
|
|
||||||
className : "btn btn-default",
|
|
||||||
text: "<i class=\"fa fa-file-pdf-o\"></i> PDF"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
extend: 'print',
|
|
||||||
exportOptions: {
|
|
||||||
columns: [ 0, 1, 2, 3, 5 ]
|
|
||||||
},
|
|
||||||
className : "btn btn-default",
|
|
||||||
text : "<i class=\"fa fa-print\"></i> Print"
|
|
||||||
}
|
}
|
||||||
|
//,
|
||||||
|
// {
|
||||||
|
// extend: 'pdf',
|
||||||
|
// exportOptions: {
|
||||||
|
// columns: [ 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
|
||||||
|
// },
|
||||||
|
// className : "btn btn-default",
|
||||||
|
// text: "<i class=\"fa fa-file-pdf-o\"></i> PDF",
|
||||||
|
// orientation: 'landscape',
|
||||||
|
// pageSize: 'LEGAL',
|
||||||
|
// title : function() {
|
||||||
|
// return "ORDER REPORTS";
|
||||||
|
// }
|
||||||
|
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// extend: 'print',
|
||||||
|
// exportOptions: {
|
||||||
|
// columns: [ 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ]
|
||||||
|
// },
|
||||||
|
// className : "btn btn-default",
|
||||||
|
// text : "<i class=\"fa fa-print\"></i> Print",
|
||||||
|
// orientation: 'landscape',
|
||||||
|
// pageSize: 'LEGAL',
|
||||||
|
// title : function() {
|
||||||
|
// return "ORDER REPORTS";
|
||||||
|
// }
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{ targets: 4, type: 'date', visible: false },
|
{ targets: 4, type: 'date', visible: false },
|
||||||
{ targets: 5, type: 'date' }
|
{ targets: 5, type: 'date' }
|
||||||
]
|
],
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Event listener to the two range filtering inputs to redraw on input
|
// Event listener to the two range filtering inputs to redraw on input
|
||||||
@@ -820,7 +845,7 @@
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
reader.onload = function(event) {
|
reader.onload = function(event) {
|
||||||
$( ".small-preview-thumb" ).prepend('<li>' +
|
$( ".small-preview-thumb" ).prepend('<li class="col-sm-3 col-xs-3"> ' +
|
||||||
'<a class="text-center thumbnail a_thumbnail"> ' +
|
'<a class="text-center thumbnail a_thumbnail"> ' +
|
||||||
'<img class="img img-responsive product-center image-thumbnails" style="height: 90px;" src="'+event.target.result+'"/> ' +
|
'<img class="img img-responsive product-center image-thumbnails" style="height: 90px;" src="'+event.target.result+'"/> ' +
|
||||||
'</a> ' +
|
'</a> ' +
|
||||||
@@ -1836,7 +1861,7 @@
|
|||||||
},
|
},
|
||||||
success : function(response){
|
success : function(response){
|
||||||
if(response.success){
|
if(response.success){
|
||||||
alert('New item is successfully added.');
|
alert('New item image(s) is successfully added.');
|
||||||
location.reload();
|
location.reload();
|
||||||
}else{
|
}else{
|
||||||
$("#new_item_image_response_msg").html("");
|
$("#new_item_image_response_msg").html("");
|
||||||
|
|||||||
Reference in New Issue
Block a user