add column in reports modules

This commit is contained in:
Frank John Begornia
2019-09-27 20:09:24 +08:00
parent 83f0624f07
commit 2680ddc5bd
8 changed files with 98 additions and 46 deletions

View File

@@ -48,7 +48,7 @@
</div>
</div>
<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>
<tr>
<th>Invoice No.</th>
@@ -56,6 +56,15 @@
<th>Price</th>
<th>Quantity</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 class="text-center">Action</th>
</tr>
@@ -68,6 +77,15 @@
<td>{{ $item_order->Price . ' ' . $item_order->Currency }}</td>
<td>{{ $item_order->Quantity }} </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 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>

View File

@@ -549,6 +549,11 @@
padding: 0 15px;
}
}
/* table.dataTable td,table.dataTable th {
padding: 3px 10px;
width: 1px;
white-space: nowrap;
} */
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
@@ -650,45 +655,65 @@
$("#min").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({
scrollX: true,
dom: 'Bfrtip',
buttons: [
{
extend: 'csv',
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",
text: "<i class=\"fa fa-table\"></i> CSV"
text: "<i class=\"fa fa-table\"></i> CSV",
title : function() {
return "ORDER REPORTS";
}
},
{
extend: 'excel',
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",
text: "<i class=\"fa fa-file-excel-o\"></i> Excel"
},
{
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"
}
text: "<i class=\"fa fa-file-excel-o\"></i> Excel",
title : function() {
return "ORDER REPORTS";
}
}
//,
// {
// 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: [
{ targets: 4, type: 'date', visible: false },
{ targets: 5, type: 'date' }
]
],
});
// Event listener to the two range filtering inputs to redraw on input
@@ -820,7 +845,7 @@
}
}else{
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"> ' +
'<img class="img img-responsive product-center image-thumbnails" style="height: 90px;" src="'+event.target.result+'"/> ' +
'</a> ' +
@@ -1836,7 +1861,7 @@
},
success : function(response){
if(response.success){
alert('New item is successfully added.');
alert('New item image(s) is successfully added.');
location.reload();
}else{
$("#new_item_image_response_msg").html("");