diff --git a/application/controllers/Admin.php b/application/controllers/Admin.php
index 59585cb..da95af6 100644
--- a/application/controllers/Admin.php
+++ b/application/controllers/Admin.php
@@ -53,7 +53,9 @@ class Admin extends CI_Controller {
public function add_corpdetail(){
$this->checksess();
- $data = $this->input->post('usr');
+ $data = $this->input->post();
+
+ $data = $data['usr'];
$con['c_code'] = $data['c_code'];
$echk = $this->admin->get_corp($con);
if($echk->num_rows()>0){
@@ -66,10 +68,20 @@ class Admin extends CI_Controller {
echo 3; exit;
}
else{
+ // unset($data['payment']);
$data['c_createdby'] = $this->session->userdata['recon_sess_i']['u_id'];
$data['c_createdon'] = date('Y-m-d H:i:s',time());
- $this->db->insert('corporates',$data);
- echo 1; exit;
+ // echo json_encode($data);
+ try {
+ $this->db->insert('corporates',$data);
+ echo 1; exit;
+
+ } catch (Exception $e) {
+
+ log_message('error', 'Exception occurred: ' . $e->getMessage());
+ show_error('An error occurred. Please try again later.');
+ }
+
}
}
}
diff --git a/application/controllers/Corporate.php b/application/controllers/Corporate.php
index 55ef48c..bff6518 100644
--- a/application/controllers/Corporate.php
+++ b/application/controllers/Corporate.php
@@ -24,13 +24,13 @@ 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');
- // $this->db->where('c_id', intval($c_id));
- // $query = $this->db->get();
- // $cor_id = $this->session->set_flashdata('corporate_id', $query->result()[0]->payment);
- //force_ssl();
+ $c_id = $this->session->userdata['recon_sess_i']['u_corporateid'];
+ $this->db->select('payment');
+ $this->db->from('corporates');
+ $this->db->where('c_id', intval($c_id));
+ $query = $this->db->get();
+ $cor_id = $this->session->set_flashdata('corporate_id', $query->result()[0]->payment);
+ // force_ssl();
}
public function index(){
@@ -417,6 +417,9 @@ class Corporate extends CI_Controller {
$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])){
+ // $uptData['inv_received'] = 1;
+ // $this->db->where('td_id', $value->td_id);
+ // $data = $this->db->update('tmc_data',$uptData);
$value->inv = $res_2[0]->invoice_no;
}
else{
@@ -467,6 +470,22 @@ class Corporate extends CI_Controller {
else
$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 left join airline_invoice ai on gd.gd_id=ai.ti_gdid or gd.gd_inv_no=ai.ti_gst_nub where gd.is_active = 1 and gd_inv_date between "'.$fromdate.'" and "'.$todate.'" order by gd_id desc');
// $res = $this->db->query('select * from gstr2a_data gd left join (select *,group_concat(td_gst_inv) g_td_gst_inv from tmc_data group by td_tkt) td on gd.gd_tkt_no=td.td_tkt where gd_inv_date between "'.$fromdate.'" and "'.$todate.'"');
+ foreach ($res->result() as $key => $value) {
+ // print_r($value);die();
+ if ($value) {
+ $this->load->database('second', TRUE);
+ $res_2 = $this->db2->where('invoice_no' , $value->gd_inv_no)->get('air_invoice_details')->result();
+ if(isset($res_2[0])){
+ // $uptData['inv_received'] = 1;
+ // $this->db->where('td_id', $value->td_id);
+ // $data = $this->db->update('tmc_data',$uptData);
+ $value->inv = $res_2[0]->invoice_no;
+ }
+ else{
+ $value->inv = " ";
+ }
+ }
+ }
$fres['data'] = array();
$res2 = new stdClass();
if($gid){
@@ -1884,6 +1903,7 @@ class Corporate extends CI_Controller {
force_download('Payment_Advice_Sample.xlsx', $pth);
}
+
public function p_tmc_sample_download(){
$this->checksess();
$this->load->helper('download');
diff --git a/application/views/admin/corporates.php b/application/views/admin/corporates.php
index 75c59d8..96c42a0 100644
--- a/application/views/admin/corporates.php
+++ b/application/views/admin/corporates.php
@@ -337,12 +337,15 @@
$("#usrforma").submit(function(e) {
e.preventDefault(); // avoid to execute the actual submit of the form.
var form = $(this);
+ console.log(form.serialize());
$.ajax({
+
type: "POST",
url: '',
data: form.serialize(), // serializes the form's elements.
success: function(data)
{
+ // console.log(JSON.parse(data));
if(data == 1){
$('#addclose').trigger('click');
usrforma.reset();
@@ -359,7 +362,8 @@
alert('Request failed. Kindly try after sometime');
}
},
- error:function(){
+ error:function(err){
+ console.log(err);
alert('Request failed. Kindly try after sometime');
}
});
diff --git a/application/views/corporate/gstr2a_recon.php b/application/views/corporate/gstr2a_recon.php
index a63eed4..5f8ab5d 100644
--- a/application/views/corporate/gstr2a_recon.php
+++ b/application/views/corporate/gstr2a_recon.php
@@ -188,7 +188,7 @@
REFID |
SEARCH |
MANUAL TKT NO |
- TICKET NO |
+
INVOICE |
@@ -737,6 +737,16 @@ function() {
// return '';
// }
// },
+{
+ "targets": 18,
+ "width": 300,
+ "render": function ( data, type, full, meta ) {
+ if(full['inv'] == " ")
+ return 'Invoice Missing';
+ else
+ return 'Invoice Received';
+ }
+ },
{
"targets": 19,
"width": 300,
@@ -757,16 +767,15 @@ function() {
{
"targets": 22,
"render": function ( data, type, full, meta ) {
- return '' +
- ' '
+ return ''
}
},
{
- "targets": 25,
+ "targets": 24,
// "width": 300,
"render": function ( data, type, full, meta ) {
console.log(full['gd_id']);
- return '';
+ return '';
}
}
]
diff --git a/application/views/corporate/tmc.php b/application/views/corporate/tmc.php
index e38645f..45ac437 100644
--- a/application/views/corporate/tmc.php
+++ b/application/views/corporate/tmc.php
@@ -1,5 +1,5 @@
-
+
@@ -530,7 +530,7 @@
});
$("#usrforma").submit(function(e) {
- // alert('sdd')
+ console.log("aaaaaaaa");
$('#loading1').show();
$('#submit1').hide();
e.preventDefault(); // avoid to execute the actual submit of the form.
@@ -545,11 +545,9 @@
cache: false,
async: false,
success: function(data) {
- console.log(data);
$('#loading1').hide();
$('#submit1').show();
var pdata = JSON.parse(data);
- console.log(pdata);
if (pdata.status == 1) {
$('#addclose').trigger('click');
usrforma.reset();
diff --git a/application/views/corporate/tmc_gst_inv.php b/application/views/corporate/tmc_gst_inv.php
index 8807623..3044bf0 100644
--- a/application/views/corporate/tmc_gst_inv.php
+++ b/application/views/corporate/tmc_gst_inv.php
@@ -228,7 +228,7 @@
inv_tkt_no; ?> |
tmc_ticket_fare === $value->gstr2a_value && $value->tmc_ticket_fare === $value->total_values)
+ if ($value->tmc_ticket_fare == $value->gstr2a_value && $value->tmc_ticket_fare == $value->total_values)
{ ?>
total_values; ?> |
View
- `;
+ return ``;
}
},
{
diff --git a/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2022-1690954373.xlsx b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2022-1690954373.xlsx
new file mode 100644
index 0000000..08dc579
Binary files /dev/null and b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2022-1690954373.xlsx differ
diff --git a/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1690953760.xlsx b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1690953760.xlsx
new file mode 100644
index 0000000..030ab43
Binary files /dev/null and b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1690953760.xlsx differ
diff --git a/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1690976486.xlsx b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1690976486.xlsx
new file mode 100644
index 0000000..8695859
Binary files /dev/null and b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1690976486.xlsx differ
diff --git a/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1691038813.xlsx b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1691038813.xlsx
new file mode 100644
index 0000000..8695859
Binary files /dev/null and b/uploads/1/gstr2a/GSTR2A-12DWWPD9503H135-Jan-2023-1691038813.xlsx differ
diff --git a/uploads/1/tmc/TMC-testagent-May-2020-1690891799.xlsx b/uploads/1/tmc/TMC-testagent-May-2020-1690891799.xlsx
new file mode 100644
index 0000000..b6b657e
Binary files /dev/null and b/uploads/1/tmc/TMC-testagent-May-2020-1690891799.xlsx differ
diff --git a/uploads/1/tmc/TMC-testagent-May-2020-1691038541.xlsx b/uploads/1/tmc/TMC-testagent-May-2020-1691038541.xlsx
new file mode 100644
index 0000000..42e9c72
Binary files /dev/null and b/uploads/1/tmc/TMC-testagent-May-2020-1691038541.xlsx differ
diff --git a/uploads/4/gstr2a/GSTR2A-12DWWPD9503H1Z4-Jan-2023-1690955205.xlsx b/uploads/4/gstr2a/GSTR2A-12DWWPD9503H1Z4-Jan-2023-1690955205.xlsx
new file mode 100644
index 0000000..6aef2aa
Binary files /dev/null and b/uploads/4/gstr2a/GSTR2A-12DWWPD9503H1Z4-Jan-2023-1690955205.xlsx differ
diff --git a/uploads/4/tmc/TMC-testagent-May-2020-1690951219.xlsx b/uploads/4/tmc/TMC-testagent-May-2020-1690951219.xlsx
new file mode 100644
index 0000000..42e9c72
Binary files /dev/null and b/uploads/4/tmc/TMC-testagent-May-2020-1690951219.xlsx differ
diff --git a/uploads/5/tmc/TMC-testagent-May-2020-1690969670.xlsx b/uploads/5/tmc/TMC-testagent-May-2020-1690969670.xlsx
new file mode 100644
index 0000000..42e9c72
Binary files /dev/null and b/uploads/5/tmc/TMC-testagent-May-2020-1690969670.xlsx differ
diff --git a/uploads/6/gstr2a/GSTR2A-12DWWPD9503H1Z5-Jan-2023-1690973295.xlsx b/uploads/6/gstr2a/GSTR2A-12DWWPD9503H1Z5-Jan-2023-1690973295.xlsx
new file mode 100644
index 0000000..8695859
Binary files /dev/null and b/uploads/6/gstr2a/GSTR2A-12DWWPD9503H1Z5-Jan-2023-1690973295.xlsx differ
diff --git a/uploads/7/gstr2a/GSTR2A-12DWWPD9503H1Z0-Jan-2023-1690973423.xlsx b/uploads/7/gstr2a/GSTR2A-12DWWPD9503H1Z0-Jan-2023-1690973423.xlsx
new file mode 100644
index 0000000..8695859
Binary files /dev/null and b/uploads/7/gstr2a/GSTR2A-12DWWPD9503H1Z0-Jan-2023-1690973423.xlsx differ
diff --git a/uploads/7/gstr2a/GSTR2A-12DWWPD9503H1Z0-Jan-2023-1690973457.xlsx b/uploads/7/gstr2a/GSTR2A-12DWWPD9503H1Z0-Jan-2023-1690973457.xlsx
new file mode 100644
index 0000000..8695859
Binary files /dev/null and b/uploads/7/gstr2a/GSTR2A-12DWWPD9503H1Z0-Jan-2023-1690973457.xlsx differ