+
+
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | No |
- Date/Time |
- ImportCode |
- Status |
- Action |
-
-
-
-
-
- | =$i + 1?> |
- =date("Y-m-d H:i:s", strtotime($item['created_at']))?> |
- =$item['importcode']?> |
-
-
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | No |
+ Date/Time |
+ ImportCode |
+ Status |
+ Action |
+
+
+
+
+
+ | = $i + 1 ?> |
+ = date("Y-m-d H:i:s", strtotime($item['created_at'])) ?> |
+ = $item['importcode'] ?> |
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
+
+ $('#tbl_his').DataTable({
+
+ "processing": true,
+ "serverSide": false,
+ "lengthChange": true,
+ "lengthMenu": [10, 20, 50, 100],
+ "pageLength": 10,
+ "columns": [{
+ "orderable": true
+ },
+ {
+ "orderable": true
+ },
+ {
+ "orderable": true
+ },
+ {
+ "orderable": true
+ },
+ {
+ "orderable": false
+ },
+ ],
+ oLanguage: {
+ oAria: {
+ sSortAscending: ": activate to sort column ascending",
+ sSortDescending: ": activate to sort column descending"
+ },
+ oPaginate: {
+ sFirst: "First",
+ sLast: "Last",
+ sNext: "Next",
+ sPrevious: "Previous"
+ },
+ sEmptyTable: "No data available in table",
+ sInfo: "Showing _START_ to _END_ of _TOTAL_ entries",
+ sInfoEmpty: "Showing 0 to 0 of 0 entries",
+ sInfoFiltered: "(filtered from _MAX_ total entries)",
+ sInfoPostFix: "",
+ sDecimal: "",
+ sThousands: ",",
+ sLengthMenu: "_MENU_",
+ sLoadingRecords: "Loading...",
+ sProcessing: "Processing...",
+ sSearch: "Search:",
+ sSearchPlaceholder: "",
+ sUrl: "",
+ sZeroRecords: "No matching records found"
+ },
+ // "ajax": {
+ // "url": "/loadGoodsDestroyed",
+ // "type": "POST",
+ // "dataType": "json",
+ // "dataSrc": "data",
+ // "data": {start_date: start_date, end_date: end_date}
+ // },
+ // "columns": [
+ // {"data": "name"},
+ // {"data": "status"},
+ // {"data": "count"},
+ // {"data": "price"},
+ // {"data": "consumer"},
+ // {"data": "date"}
+ // ]
+ });
+
+ function onCancelHis(id) {
+ Swal.fire({
+ title: 'Cancel Confirm!',
+ text: "Do you want to cancel import his?",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonText: 'Confirm',
+ cancelButtonText: 'Cancel',
+ }).then((result) => {
+ if (result.isConfirmed) {
+ $.ajax({
+ url: 'cancel_import_his.php',
+ type: 'POST',
+ data: {
+ his_id: id
+ },
+ beforeSend: function() {
+ $('#ajax_preloader').fadeIn();
+ },
+ error: function() {
+ $('#ajax_preloader').fadeOut();
+ showWarningAlert("Server Error");
+ },
+ success: function(data) {
+ $('#ajax_preloader').fadeOut();
+
+ if (data.indexOf("success") > -1) {
+ showSuccessPopup("Your operation successed!", function() {
+ location.reload();
+ });
+ } else {
+ showWarningAlert("Server Error.")
+ }
+ }
+ })
+ }
+ });
+ }
+
-