From 10c4d85fa28998b6d1eb675c37eb8ead56723fa7 Mon Sep 17 00:00:00 2001 From: heama Date: Thu, 20 Jul 2023 17:08:55 +0530 Subject: [PATCH] dashboard heama --- application/controllers/Tmc.php | 5 +- application/views/corporate/dashboard.php | 43 +++++++------ application/views/corporate/dashboard_tmc.php | 24 ++++--- application/views/corporate/tmc_recon.php | 40 ++++++------ application/views/tmc/dashboard.php | 28 ++++----- application/views/tmc/tmc_recon.php | 62 +++++++++++-------- 6 files changed, 110 insertions(+), 92 deletions(-) diff --git a/application/controllers/Tmc.php b/application/controllers/Tmc.php index 505d5a0..a104442 100644 --- a/application/controllers/Tmc.php +++ b/application/controllers/Tmc.php @@ -81,8 +81,9 @@ class Tmc extends CI_Controller { public function gen_tmc_recon(){ $this->checksess(); - $fromdate = $this->input->post('fromdate'); - $todate = $this->input->post('todate'); + $fromdate = $this->input->post('from'); + + $todate = $this->input->post('to'); // if($gid) // $res = $this->db->query('select *,am_code as supplier_code from gstr2a_data gd left join (select *,group_concat(td_gst_inv) g_td_gst_inv,sum(td_net) td_net_ref from tmc_data where td_show_status = 1 group by td_tkt) td on gd.gd_id=td.td_gstr2a_match_id left join airline_master am on am.am_name=gd.gd_supplier_type where gd_id = "'.$gid.'"'); // else diff --git a/application/views/corporate/dashboard.php b/application/views/corporate/dashboard.php index 8a46776..a5aa454 100644 --- a/application/views/corporate/dashboard.php +++ b/application/views/corporate/dashboard.php @@ -81,24 +81,27 @@
-
- - - -
- - -
-
- - -
-
-
-
- - -
+
+ + +
+    + +      +    + + +
+
+ + +
+
+
+
+ + +
@@ -461,8 +464,8 @@ e.preventDefault(); datesArr = []; datesArr1 = []; // console.log($('#reportrange').val(),"data"); -var startDate = new Date($('#fromdate').val()); -var endDate = new Date($('#todate').val()); +var startDate = new Date($('#from').val()); +var endDate = new Date($('#to').val()); while (startDate <= endDate) { var dateString = startDate.toLocaleDateString('en-GB'); diff --git a/application/views/corporate/dashboard_tmc.php b/application/views/corporate/dashboard_tmc.php index 38f97ac..00dc6bc 100644 --- a/application/views/corporate/dashboard_tmc.php +++ b/application/views/corporate/dashboard_tmc.php @@ -82,21 +82,25 @@
- - - + +
- +    + +      +    + +
-
- +
+
-
+
- +
@@ -460,8 +464,8 @@ e.preventDefault(); datesArr = []; datesArr1 = []; // console.log($('#reportrange').val(),"data"); -var startDate = new Date($('#fromdate').val()); -var endDate = new Date($('#todate').val()); +var startDate = new Date($('#from').val()); +var endDate = new Date($('#to').val()); while (startDate <= endDate) { var dateString = startDate.toLocaleDateString('en-GB'); diff --git a/application/views/corporate/tmc_recon.php b/application/views/corporate/tmc_recon.php index fbdb195..91be5b0 100644 --- a/application/views/corporate/tmc_recon.php +++ b/application/views/corporate/tmc_recon.php @@ -111,18 +111,14 @@    -
-
- -
-
+
-
+
'+ '
'+ @@ -588,16 +585,16 @@ function() { netttl += parseInt(pdata[i].ti_amount); var fname = pdata[i].ti_file_name.split('___'); htmlData += '
'+ - '
'+ + '
'+ ''+ '
'+ - '
'+ + '
'+ ''+pdata[i].ti_amount+''+ '
'+ - '
'+ + '
'+ '
'+ '
'+ - '
'; + '
'; if(pdata[i].gd_id == '') htmlData += ''; else @@ -608,9 +605,9 @@ function() { }); htmlData += '
'+ - '
Total'+ + '
Total'+ '
'+ - '
'+ + '
'+ ''+netttl+''+ '
'+ '
'; @@ -651,13 +648,14 @@ function() { // extend: "excelHtml5", // className: "btn-light" // } -//// , { -//// extend: "print", -//// className: "btn-light" -//// }, { -//// extend: "pdf", -//// className: "btn-light" -//// } +// // , { +// // extend: "print", +// // className: "btn-light" +// // }, { +// // extend: "pdf", +// // className: "btn-light" +// // } + diff --git a/application/views/tmc/dashboard.php b/application/views/tmc/dashboard.php index 2bfe209..4e18f3c 100644 --- a/application/views/tmc/dashboard.php +++ b/application/views/tmc/dashboard.php @@ -82,24 +82,23 @@
- - - +
- - - - + + +    +    +
-
+
-
- - +
+ +
@@ -462,9 +461,10 @@ $('#formid').submit(function(e){ e.preventDefault(); datesArr = []; datesArr1 = []; -// console.log($('#reportrange').val(),"data"); -var startDate = new Date($('#fromdate').val()); -var endDate = new Date($('#todate').val()); + +var startDate = new Date($('#from').val()); +alert($('#from').val()); +var endDate = new Date($('#to').val()); while (startDate <= endDate) { var dateString = startDate.toLocaleDateString('en-GB'); diff --git a/application/views/tmc/tmc_recon.php b/application/views/tmc/tmc_recon.php index 855f933..cc94081 100644 --- a/application/views/tmc/tmc_recon.php +++ b/application/views/tmc/tmc_recon.php @@ -103,36 +103,42 @@
--> - - +
- + +   + +      + + + +
-
- +
+
- +
-
+
@@ -524,17 +530,22 @@ function() { return [date.getFullYear(), mnth, day].join("-"); } - $('#formid').submit(function(e){ + $('#formid').submit(function(e){ e.preventDefault(); - fromdate_for_deleterow = convert($("#fromdate").val()); - todate_for_deleterow = convert($("#todate").val()); + + + console.log($("#from").val()); + console.log($('#formid').serialize()); $.ajax({ url:'', type:'POST', - data:{ "fromdate" : convert($("#fromdate").val()) , "todate" : convert($("#todate").val()) }, + data:$('#formid').serialize(), + success:function(data){ + oTable.clear(); var jsonData = JSON.parse(data); + console.log(jsonData); var jd = jsonData.data; var htmlData = ''; var i = 0; @@ -548,6 +559,7 @@ function() { }) }) + function viewfn(tdid,ref){ $('#tmc_ref').val(tdid); $.ajax({ @@ -724,9 +736,9 @@ function() { var remaining_column = all_column.filter(function(obj) { return remove_column.indexOf(obj) == -1; }); - oTable.columns(remove_column).visible(false); + oTable.columns(remove_column).visible(true); - oTable.columns(remaining_column).visible(true); + oTable.columns(remaining_column).visible(false); });