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

@@ -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("");