diff --git a/application/controllers/Corporate.php b/application/controllers/Corporate.php index c49ce9b..8854017 100644 --- a/application/controllers/Corporate.php +++ b/application/controllers/Corporate.php @@ -369,6 +369,15 @@ class Corporate extends CI_Controller { $insary['ti_amount'] = $amount; $insary['ti_manual'] = $manual; $this->db->insert('airline_invoice',$insary); + + $insert_id = $this->db->insert_id(); + if($insert_id !=''){ + + $this->db->where('td_id', $tdid); + $this->db->update('tmc_data', array('td_gstr2a_match_id' => $gdid)); + } + // $this->upd_tkt_bind($gdid,$tdid); + } } echo $tdid; @@ -421,6 +430,10 @@ class Corporate extends CI_Controller { // $this->db->where('td_id', $value->td_id); // $data = $this->db->update('tmc_data',$uptData); $value->inv = $res_2[0]->invoice_no; + $value->tkt=$res_2[0]->ticket_no; + $value->amt=$res_2[0]->total_inv_value; + $value->tpnr=$res_2[0]->pnr; + $value->tdate=$res_2[0]->invoice_dt; } else{ $value->inv = " "; @@ -515,8 +528,12 @@ class Corporate extends CI_Controller { $res2->td_net_ref = $res1->td_net_ref; if($res1->td_tkt_fare == '') $res1->td_tkt_fare = 0; + if ($value->td_gstr2a_match_id != null && $value->td_gstr2a_match_id != 0) { $variance = $res1->gd_inv_value - $res1->td_tkt_fare; $res2->variance = $variance; + } else { + $variance = "hello"; // Set variance to 0 if td_gstr2a_match_id is null or zero + } if($res1->ti_file_name == ''){ $data['inv_status'] = 0; @@ -590,15 +607,21 @@ class Corporate extends CI_Controller { if($res1->td_tkt_fare == '') $res1->td_tkt_fare = 0; - $variance = $res1->gd_inv_value - $res1->td_tkt_fare; - $res1->variance = $variance; - - if($variance == 0) - $res1->gd_remarks = 'Transaction Matched'; - else if($variance > 0) - $res1->gd_remarks = 'TMC Amount Short'; - else - $res1->gd_remarks = 'Airline Amount Short'; + + if ($res1->td_gstr2a_match_id != null && $res1->td_gstr2a_match_id != 0) { + $variance = $res1->gd_inv_value - $res1->td_tkt_fare; + $res1->variance = $variance; + if ($variance == 0) { + $res1->gd_remarks = 'Transaction Matched'; + } else if ($variance > 0) { + $res1->gd_remarks = 'TMC Amount Short'; + } else { + $res1->gd_remarks = 'Airline Amount Short'; + } +} else { + $variance = 0; // Set variance to 0 if td_gstr2a_match_id is null or zero + $res1->gd_remarks = 'No Match Found'; // Clear gd_remarks if td_gstr2a_match_id is null or zero +} if($res1->ti_file_name == '') $res1->gd_file_status = 'Invoice Missing'; else diff --git a/application/views/corporate/airlineinvoice.php b/application/views/corporate/airlineinvoice.php index b8ed494..f682c1d 100644 --- a/application/views/corporate/airlineinvoice.php +++ b/application/views/corporate/airlineinvoice.php @@ -51,6 +51,9 @@ .left{ } + .form-group { + margin-bottom: -2rem; +} @@ -66,11 +69,11 @@ -
-
+ -
+
diff --git a/application/views/corporate/dashboard.php b/application/views/corporate/dashboard.php index ce2c9ac..54dd22a 100644 --- a/application/views/corporate/dashboard.php +++ b/application/views/corporate/dashboard.php @@ -48,6 +48,9 @@ .cardtop{ margin-top: 1.5rem; } + .mt-5, .my-5 { + margin-top: 1.5rem!important; +} diff --git a/application/views/corporate/dashboard_tmc.php b/application/views/corporate/dashboard_tmc.php index 3fb821b..0244b20 100644 --- a/application/views/corporate/dashboard_tmc.php +++ b/application/views/corporate/dashboard_tmc.php @@ -48,6 +48,9 @@ .cardtop{ margin-top: 1.5rem; } + .mt-5, .my-5 { + margin-top: 1.5rem!important; +} diff --git a/application/views/corporate/gstno.php b/application/views/corporate/gstno.php index bc4f355..97a814c 100644 --- a/application/views/corporate/gstno.php +++ b/application/views/corporate/gstno.php @@ -35,6 +35,13 @@ .required{ color: red; } + .footer +{ + padding-top: 19px; + padding-right: 17px; + padding-bottom: 2px; + padding-left: 17px; +} @@ -50,11 +57,11 @@ -
-
+ -
+
@@ -77,7 +84,7 @@
-
+
GST Nos
diff --git a/application/views/corporate/gstr2a.php b/application/views/corporate/gstr2a.php index 73c70ff..bfa63be 100644 --- a/application/views/corporate/gstr2a.php +++ b/application/views/corporate/gstr2a.php @@ -35,6 +35,16 @@ .required{ color: red; } + .mt-5, .my-5 { + margin-top: 1.5rem!important; +} +.footer +{ + padding-top: 19px; + padding-right: 17px; + padding-bottom: 2px; + padding-left: 17px; +} @@ -50,12 +60,12 @@ -
-
+ -
- +
@@ -74,10 +84,12 @@
+
-
+ +
GSTR2A File Listing
diff --git a/application/views/corporate/gstr2a_recon.php b/application/views/corporate/gstr2a_recon.php index 38557c8..9ac1f73 100644 --- a/application/views/corporate/gstr2a_recon.php +++ b/application/views/corporate/gstr2a_recon.php @@ -36,7 +36,11 @@ - + + + + + @@ -66,14 +121,14 @@ -
-
+ + -
+ -
+ +
+
+

Gstr2a

+
+ +
+
+
+
@@ -108,97 +194,169 @@
--> - -
- +
+ - +    - +    +
+
- +
+
-
-

GSTR@A

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+
@@ -206,9 +364,9 @@
-
+ -
+
@@ -496,6 +654,7 @@ oTable.clear(); var jsonData = JSON.parse(data); console.log(jsonData); + var jd = jsonData.data; var htmlData = ''; var i = 0; @@ -616,7 +775,7 @@ // $('#from').val('01-01-2023'); - oTable = $("#scroll-horizontal-datatable").DataTable({ + oTable = $("#datatable-buttons").DataTable({ lengthChange: !1, // dom: 'Bfrtip', @@ -624,7 +783,7 @@ { extend: "csvHtml5", exportOptions: { - columns: [ 0, 1, 2, 3, 4, 23, 24, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,22] + columns: [ 1, 2, 3, 4,5,8,9,10,12,13,14,15,18,19,20,25 ] } } @@ -657,6 +816,7 @@ $(".dataTables_paginate > .pagination").addClass("pagination-rounded") }, columns : [ + { data: null, defaultContent: '', orderable: false }, { data : "corpname"}, { data : "corpgstin"}, { data : "gd_supplier_name"}, @@ -667,24 +827,28 @@ { data : "gd_doc_type"}, { data : "gd_inv_date"}, { data : "gd_inv_value"}, - { data : "td_tkt_fare"}, - { data : "variance"}, - { data : "gd_rate_perc"}, + { data : "gd_inv_value"}, + { data : "td_tkt"}, +{ data : "td_tkt_fare"}, +{ data: "variance", defaultContent: '' }, + { data : "gd_remarks"}, + { data : "ti_file_name"}, + { data : "gd_taxable_value"}, { data : "gd_integrated_tax"}, { data : "gd_central_tax"}, { data : "gd_state_tax"}, - { data : "gd_remarks"}, - { data : "gd_file_status"}, - { data : "gd_tkt_no"}, - { data : "td_tkt_fare"}, - { data : "ti_file_name"}, + + { data : "gd_integrated_tax"}, + + + - { data : "gd_tkt_no"}, - { data : "td_tkt"}, + { data : "gd_rate_perc"}, + { data : "gd_state_tax"}, { data : "gd_id"} // { data : "c_name"}, // { data : "td_tkt"}, @@ -695,11 +859,12 @@ ], "columnDefs": [ { - "targets": [0,1,2,3,23,6,5,10,22,23], + "targets": [1,2,3,4,24,7,6,11,23,21,24], "visible": false }, + { - "targets": 3, + "targets": 4, "width": "12%", "render": function ( data, type, full, meta ) { if(data == '') @@ -712,22 +877,23 @@ } } }, - { - "targets": 19, - "width": "12%", - "render": function ( data, type, full, meta ) { - if(full['inv'] != " "){ + + // { + // "targets": 20, + // "width": "12%", + // "render": function ( data, type, full, meta ) { + // if(full['inv'] != " "){ - // return ''full['tkt'] != " " ? full['tkt']:full['tpnr']'' - // return ''+full['tkt']+'' - return full['tkt'] != "---" ? full['tkt'] : full['tpnr'] - }else + // // return ''full['tkt'] != " " ? full['tkt']:full['tpnr']'' + // // return ''+full['tkt']+'' + // return full['tkt'] != "---" ? full['tkt'] : full['tpnr'] + // }else - return ''; - } - }, + // return ''; + // } + // }, { - "targets": 6, + "targets": 7, "width": "12%", "render": function ( data, type, full, meta ) { if(data == '') @@ -735,47 +901,48 @@ return data; } }, - { - "targets": 20, - "width": "12%", - "render": function ( data, type, full, meta ) { - if(full['inv'] != " "){ + // { + // "targets": 21, + // "width": "12%", + // "render": function ( data, type, full, meta ) { + // if(full['inv'] != " "){ - return ''+full['amt']+''; - }else - return ''; + // return ''+full['amt']+''; + // }else + // return ''; - } - }, -// { -// "targets": 17, -// "width": 300, -// "render": function ( data, type, full, meta ) { -// if(data == '') -// data = ''; -// return ''; -// } -// }, - { - "targets": 18, - "width": 300, - "render": function ( data, type, full, meta ) { - if(full['inv'] != " "){ - return 'Invoice Received'; - // return('.search').hide(); - } else if (full['ti_recieved'] ==="0") { - return 'Invoice Received (Manual)'; - } - else{ - return 'Invoice Not Received'; + // } + // }, + // { + // "targets": 18, + // "width": 300, + // "render": function ( data, type, full, meta ) { + // if(data == '') + // data = ''; + // return ''+data+'' + + // } + // }, + // { + // "targets": 19, + // "width": 300, + // "render": function ( data, type, full, meta ) { + // if(full['inv'] != " "){ + // return 'Invoice Received'; + // // return('.search').hide(); + // } else if (full['ti_recieved'] ==="0") { + // return 'Invoice Received (Manual)'; + // } + // else{ + // return 'Invoice Not Received'; - } + // } - } - }, + // } + // }, { - "targets": 21, + "targets": 16, "width": 300, "render": function ( data, type, full, meta ) { if(full['inv'] != " "){ @@ -790,19 +957,19 @@ }, - { - "targets": 19, - "width": 300, - "render": function ( data, type, full, meta ) { - if(full['inv'] != " "){ + // { + // "targets": 20, + // "width": 300, + // "render": function ( data, type, full, meta ) { + // if(full['inv'] != " "){ - return '' - }else - return ''; - } - }, + // return '' + // }else + // return ''; + // } + // }, { - "targets": 24, + "targets": 25, "render": function ( data, type, full, meta ) { return '' } @@ -821,13 +988,14 @@ ] }); - oTable.buttons().container().appendTo("#scroll-horizontal-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ + oTable.buttons().container().appendTo("#datatable-buttons_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ pagingType: "full_numbers", drawCallback: function () { $(".dataTables_paginate > .pagination").addClass("pagination-rounded") } }); }); + $('#column_name').selectpicker(); @@ -844,6 +1012,30 @@ oTable.columns(remaining_column).visible(false); }); +// $(document).ready(function() { +// // DataTable initialization and configuration +// var oTable = $("#datatable-buttons").DataTable({ +// // Your DataTable configuration here +// }); + +// // Attach a click event handler to the eye button to open the modal +// $('#toggle-column-modal-button').click(function () { +// $('#columnModal').modal('show'); +// }); + +// // Handle the click event of the "Apply Columns" button in the modal +// $('#applyColumns').click(function() { +// // Loop through all checkboxes and show/hide columns accordingly +// for (var i = 0; i < totalColumns; i++) { +// var isChecked = $('#column' + i).is(':checked'); +// oTable.column(i).visible(isChecked); +// } + +// // Close the modal +// $('#columnModal').modal('hide'); +// }); +// }); + // $('#scroll-horizontal-datatable tbody').on('click', 'tr', function () { // }); @@ -922,7 +1114,7 @@ }) }; - $('#scroll-horizontal-datatable').on('click', 'tbody .tktdelredraw', function () { + $('#datatable-buttons').on('click', 'tbody .tktdelredraw', function () { var rowref = $(this).closest('tr'); var refid = $('#refval').val(); var refgsttkt = $('#refval_gst_tkt').val(); @@ -942,7 +1134,7 @@ }) }) - $('#scroll-horizontal-datatable').on('click', 'tbody .edit_btn', function () { + $('#datatable-buttons').on('click', 'tbody .edit_btn', function () { var rowref = $(this).closest('tr'); // alert($('#refval_gettkts').val()); if($('#refval_gettkts').val() == 'yes'){ @@ -1078,6 +1270,75 @@ } + + + + + + \ No newline at end of file + + + + + + + + + + + +
+
+
+ + + + \ No newline at end of file diff --git a/application/views/corporate/tmc.php b/application/views/corporate/tmc.php index c56f23f..b5fa16e 100644 --- a/application/views/corporate/tmc.php +++ b/application/views/corporate/tmc.php @@ -40,6 +40,13 @@ .required { color: red; } + .footer +{ + padding-top: 24px; + padding-right: 17px; + padding-bottom: 2px; + padding-left: 17px; +} @@ -56,11 +63,11 @@ -
-
+ -
+
@@ -83,7 +90,7 @@
-
+
TMC File Listing
diff --git a/application/views/corporate/tmc_gst_inv.php b/application/views/corporate/tmc_gst_inv.php index 312af32..6068929 100644 --- a/application/views/corporate/tmc_gst_inv.php +++ b/application/views/corporate/tmc_gst_inv.php @@ -51,6 +51,14 @@ .left{ } + .footer +{ + padding-top: 19px; + padding-right: 17px; + padding-bottom: 2px; + padding-left: 17px; +} + @@ -66,11 +74,11 @@ -
-
+ + -
+
@@ -110,7 +118,7 @@ --> -
+ -
-
+ -
-
-
- -
+ +
- - +
+
+ @@ -166,14 +174,14 @@ - + - - - - + + + + - - + - - + + + @@ -305,6 +316,7 @@ + @@ -313,7 +325,7 @@ diff --git a/application/views/corporate/tmc_recon.php b/application/views/corporate/tmc_recon.php index 51df368..1582cdb 100644 --- a/application/views/corporate/tmc_recon.php +++ b/application/views/corporate/tmc_recon.php @@ -34,8 +34,11 @@ - - + .left{ + } + + /* .form-group { + font-size: 11px; + padding: 5px; /* Adjust the padding as needed to decrease the spacing */ + + .table { + font-size: 12px; + border-spacing:0px; + + + } + .table tr, table td { + padding: 5px; /* Adjust the padding as needed to decrease the cell height */ + line-height: 2; + /* Adjust the line-height as needed for tighter cell spacing */ + } + .table tbody{ + position: relative; + overflow: auto; + max-height: 350px; + width: 100%; + + } + .table thead th{ + vertical-align: middle; +} + .dataTables_scrollBody +{ + + max-height: 390px; + width: 1129px; +} +.footer +{ + padding-top: 19px; + padding-right: 17px; + padding-bottom: 2px; + padding-left: 17px; +} +.form-group { + margin-bottom: -2rem; +} +.row +{ + margin-right:-15px; +} +div.dataTables_wrapper div.dataTables_info { + padding-top: 3.85em; + white-space: nowrap; +} +table.dataTable thead>tr>th.sorting_asc, table.dataTable thead>tr>th.sorting_desc, table.dataTable thead>tr>th.sorting, table.dataTable thead>tr>td.sorting_asc, table.dataTable thead>tr>td.sorting_desc, table.dataTable thead>tr>td.sorting { + padding-right: 70px; +} + /* Style the container for the table with a fixed header */ +/* Style the container for the table with a fixed header */ + + + + + @@ -56,125 +119,222 @@
- + - - - + + + -
-
+ + - -
- - -
-
-
-

TMC

-
- -
-
-
-
- + + + + + + - -
-
- -
-
-
+ +
+
+
+

Gstr2a

+
+ +
+
+
+
+
+
+ +
+ +
- - - -    - - -    - -
-
- - -
-
-
- -
- -
- + + + +    + + +    + +
+ +
+ +
+
+
+ -
PASS NAME(TMC) AIRLINE(TMC) SECTOR(TMC)TRAVEL DATE(TMC)TRAVEL DAT(TMC)E TICKET NUMBER(TMC) VALUE (TMC) INV NO (GST)INV NO(INV)PNR NO(INV)TICKET NO(INV)TOTAL (INV)INV NO(GST)PNR NO(GST)TICKET NO(GST)TOTAL (GST)
+
+
+ +
+ + + +
+ + + + +
+
+ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
SEGMENTINV DATETMC INVOICE NOREF NODOC TYPEBILLING ENTITYPASSENGER NAMEAIRLINE CODETICKET NOSECTORCABINCLASSTOTAL TKT FARENET FAREREMARKSACTION + + TICKET NODOC TYPEPASSENGER NAMEAIRLINE CODETOTAL TKT FAREINV NumInv Amt INV DATETMC INVOICE NOBILLING ENTITYBILLING ENTITYSECTORCABINCLASSNET FAREREMARKSACTION
+ -
+
- - +
+
-
+ -
+ + @@ -626,8 +786,10 @@ function() { } $(document).ready(function() { + - oTable = $("#scroll-horizontal-datatable").DataTable({ + oTable = $("#datatable-buttons").DataTable({ + lengthChange: !1, dom: 'Bfrtip', buttons: [ @@ -659,7 +821,7 @@ function() { - scrollX: !0, + scrollX: true, language: { paginate: { previous: "", @@ -670,39 +832,32 @@ function() { $(".dataTables_paginate > .pagination").addClass("pagination-rounded") }, columns : [ - { data : "td_segment"}, - { data : "td_inv_date"}, - { data : "td_gst_inv"}, - { data : "td_gst_inv"}, - { data : "td_doc_type"}, - { data : "td_billing_entity"}, - { data : "td_pax"}, - { data : "td_carrier"}, - { data : "td_tkt"}, - { data : "td_sector"}, - { data : "td_cabin_class"}, - { data : "td_tkt_fare"}, - { data : "td_net"}, - { data : "d_remarks"}, - { data : "td_id"} + { data: null, defaultContent: '', orderable: false }, + { data : "td_tkt"}, + { data : "td_doc_type"}, + { data : "td_pax"}, + { data : "td_segment"}, + { data : "td_tkt_fare"}, + { data : "inv"}, + { data : "amt",defaultContent: ''}, + { data : "tdate", defaultContent: ''}, + { data : "td_gst_inv"}, + { data : "td_billing_entity"}, + { data : "td_carrier"}, + { data : "td_sector"}, + { data : "td_cabin_class"}, + { data : "td_net"}, + { data : "d_remarks"}, + { data : "td_id"} ], "columnDefs": [ { - "targets":3, + "targets":11, "visible": false }, { - "targets": 5, - "width": "12%", - "render": function ( data, type, full, meta ) { - if(data == '') - data = ''; - return data; - } - }, - { - "targets": 6, + "targets":10, "width": "12%", "render": function ( data, type, full, meta ) { if(data == '') @@ -710,8 +865,18 @@ function() { return data; } }, + // { + // "targets":3, + // "width": "12%", + // "render": function ( data, type, full, meta ) { + // if(data == '') + // data = ''; + // return data; + // } + // }, + { - "targets": 13, + "targets": 15, "width": 300, "render": function ( data, type, full, meta ) { console.log(full['inv']); @@ -728,7 +893,7 @@ function() { }, { - "targets": 14, + "targets": 16, "width": 300, "render": function ( data, type, full, meta ) { console.log(full['inv']); @@ -741,11 +906,50 @@ function() { } } }, + { + "targets": 6, + "width": 300, + "render": function (data, type, full, meta) { + // Check if invoice number is available + if (data && data.trim() !== "") { + return '' + data; // Show invoice number + } else { + // Check if GST number is available + var gstNumber = full['ti_gst_nub'] || ''; + if (gstNumber.trim() !== "") { + return ' ' + gstNumber; // Show GST number + } else { + return ''; // Both invoice and GST numbers are empty + } + } + } +}, +{ + "targets": 7, + "width": 300, + "render": function (data, type, full, meta) { + // Check if invoice number is available + if (data && data.trim() !== "") { + return '' + data; // Show invoice number + } else { + // Check if ti_amount is available + var tiAmount = full['ti_amount'] || ''; + if (tiAmount.trim() !== "") { + return ' ' + tiAmount; // Show ti_amount + } else { + return ''; // Both invoice and ti_amount are empty + } + } + } +}, + + ] }); + - oTable.buttons().container().appendTo("#scroll-horizontal-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ + oTable.buttons().container().appendTo("#datatable-buttons_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ pagingType: "full_numbers", drawCallback: function () { $(".dataTables_paginate > .pagination").addClass("pagination-rounded") @@ -860,6 +1064,56 @@ function() { } + + + +