From 0e6ab444d0996702493b51384cf0cafecfe6a71a Mon Sep 17 00:00:00 2001 From: suseendhiran17 <58357088+suseendhiran17@users.noreply.github.com> Date: Thu, 22 Jun 2023 11:46:23 +0530 Subject: [PATCH] susee --- application/controllers/Corporate.php | 22 ++++++++++++ application/models/Corporate_model.php | 1 + application/views/corporate/gstr2a.php | 2 +- application/views/corporate/gstr2a_recon.php | 7 ++-- application/views/corporate/tmc_recon.php | 34 ++++++++++++++---- application/views/tmc/tmc_recon.php | 12 ++++--- ...A-12DWWPD9503H135-Jan-2020-1687412489.xlsx | Bin 0 -> 9647 bytes ...A-12DWWPD9503H135-Jan-2020-1687412703.xlsx | Bin 0 -> 30538 bytes ...2A-12DWWPD9503H135-Jan-2020-1687412967.csv | 1 + ...2A-12DWWPD9503H135-Jan-2020-1687412972.csv | 1 + ...A-12DWWPD9503H135-Jan-2020-1687414025.xlsx | Bin 0 -> 19659 bytes ...A-12DWWPD9503H135-Jun-2020-1687413039.xlsx | Bin 0 -> 19659 bytes .../GSTR2A-TESTNEW-Jan-2023-1687411928.xlsx | Bin 0 -> 9582 bytes .../1/tmc/TMC-TEST-May-2020-1687414188.xlsx | Bin 0 -> 9467 bytes .../4/tmc/TMC-TEST-May-2020-1687412149.xls | Bin 0 -> 5632 bytes 15 files changed, 65 insertions(+), 15 deletions(-) create mode 100644 uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2020-1687412489.xlsx create mode 100644 uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2020-1687412703.xlsx create mode 100644 uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2020-1687412967.csv create mode 100644 uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2020-1687412972.csv create mode 100644 uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2020-1687414025.xlsx create mode 100644 uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jun-2020-1687413039.xlsx create mode 100644 uploads/1/gstr2a/GSTR2A-TESTNEW-Jan-2023-1687411928.xlsx create mode 100644 uploads/1/tmc/TMC-TEST-May-2020-1687414188.xlsx create mode 100644 uploads/4/tmc/TMC-TEST-May-2020-1687412149.xls diff --git a/application/controllers/Corporate.php b/application/controllers/Corporate.php index d9dd049..ac4c4a9 100644 --- a/application/controllers/Corporate.php +++ b/application/controllers/Corporate.php @@ -56,6 +56,13 @@ class Corporate extends CI_Controller { echo json_encode($res); } + public function get_inv_no(){ + $this->checksess(); + $this->load->database('second', TRUE); + $res = $this->db2->get('air_invoice_details')->result(); + echo json_encode($res); + } + public function tmc_dashboard(){ $this->checksess(); $this->load->view('corporate/dashboard_tmc'); @@ -399,6 +406,21 @@ class Corporate extends CI_Controller { // $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 $res = $this->db->query('select * from tmc_data td left join (select *,sum(ti_amount) s_amt from airline_invoice group by ti_tdid) ti on ti.ti_tdid = td.td_id where is_active = 1 and td_inv_date between "'.$fromdate.'" and "'.$todate.'" order by td_id desc'); + // print_r($res);die(); + + foreach ($res->result() as $key => $value) { + // print_r($value);die(); + if ($value) { + $this->load->database('second', TRUE); + $res_2 = $this->db2->where('pnr' , $value->td_tkt)->or_where('ticket_no' , $value->td_tkt)->get('air_invoice_details')->result(); + if(isset($res_2[0])){ + $value->inv = $res_2[0]->invoice_no; + } + else{ + $value->inv = " "; + } + } + } $fres['data'] = array(); $res2 = new stdClass(); foreach($res->result() as $res1){ diff --git a/application/models/Corporate_model.php b/application/models/Corporate_model.php index ee10281..afdbcbf 100644 --- a/application/models/Corporate_model.php +++ b/application/models/Corporate_model.php @@ -111,6 +111,7 @@ class Corporate_model extends CI_Model { function get_gstr2a(){ $con['f_type'] = 'gstr2a'; + $con['is_active'] = '1'; $con['f_corporateid'] = $this->session->userdata['recon_sess_i']['u_corporateid']; $this->db->from('files f'); $this->db->join('corporates c','c.c_id=f.f_corporateid','inner'); diff --git a/application/views/corporate/gstr2a.php b/application/views/corporate/gstr2a.php index cd97945..8f60b4b 100644 --- a/application/views/corporate/gstr2a.php +++ b/application/views/corporate/gstr2a.php @@ -618,7 +618,7 @@ "render": function ( data, type, full, meta ) { // return ' '; - return ` + return ` `; } } diff --git a/application/views/corporate/gstr2a_recon.php b/application/views/corporate/gstr2a_recon.php index 9732e0b..c71c02e 100644 --- a/application/views/corporate/gstr2a_recon.php +++ b/application/views/corporate/gstr2a_recon.php @@ -180,7 +180,7 @@