Welcome !
+0
+Total Tickets
+0
+Invoice Received
+0
+Invoice Pending
+0
+Mismatch
+diff --git a/application/config/database.php b/application/config/database.php index d6e1301..6aab8d6 100644 --- a/application/config/database.php +++ b/application/config/database.php @@ -94,3 +94,26 @@ $db['default'] = array( 'failover' => array(), 'save_queries' => TRUE ); + + +$db['second'] = array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'root', + 'password' => '', + 'database' => 'gst1', + 'dbdriver' => 'mysqli', + 'dbprefix' => '', + 'pconnect' => FALSE, + 'db_debug' => (ENVIRONMENT !== 'production'), + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8', + 'dbcollat' => 'utf8_general_ci', + 'swap_pre' => '', + 'encrypt' => FALSE, + 'compress' => FALSE, + 'stricton' => FALSE, + 'failover' => array(), + 'save_queries' => TRUE +); \ No newline at end of file diff --git a/application/controllers/Corporate.php b/application/controllers/Corporate.php index a317d4c..d9dd049 100644 --- a/application/controllers/Corporate.php +++ b/application/controllers/Corporate.php @@ -23,7 +23,7 @@ class Corporate extends CI_Controller { { parent::__construct(); $this->load->model('Corporate_model','corp'); - + $this->db2 = $this->load->database('second', TRUE); // $c_id = $this->session->userdata['recon_sess_i']['u_corporateid']; // $this->db->select('payment'); // $this->db->from('corporates'); @@ -42,9 +42,23 @@ class Corporate extends CI_Controller { $this->load->view('corporate/dashboard'); } + public function get_inv_gst1(){ + $this->checksess(); + $this->load->database('second', TRUE); + $res = $this->db2->where('invoice_no' , $this->input->post('inv_no'))->get('air_invoice_details')->result(); + echo json_encode($res); + } + + public function get_tic_gst1(){ + $this->checksess(); + $this->load->database('second', TRUE); + $res = $this->db2->where('pnr' , $this->input->post('inv_no'))->or_where('ticket_no' , $this->input->post('inv_no'))->get('air_invoice_details')->result(); + echo json_encode($res); + } + public function tmc_dashboard(){ $this->checksess(); - $this->load->view('corporate/tmc'); + $this->load->view('corporate/dashboard_tmc'); } public function get_alike_tkts($gid = null){ diff --git a/application/views/corporate/dashboard_tmc.php b/application/views/corporate/dashboard_tmc.php new file mode 100644 index 0000000..38f97ac --- /dev/null +++ b/application/views/corporate/dashboard_tmc.php @@ -0,0 +1,763 @@ + + +
+ +Total Tickets
+Invoice Received
+Invoice Pending
+Mismatch
+