tmc and gst

This commit is contained in:
heama 2023-11-15 11:12:38 +05:30
parent 970c05f86c
commit 4053fbe180
6 changed files with 24 additions and 8 deletions

View File

@ -23,7 +23,7 @@ class Corporate extends CI_Controller {
{
parent::__construct();
$this->load->model('Corporate_model','corp');
$this->db2 = $this->load->database('second', TRUE);
$this->db2 = $this->load->database('default', TRUE);
// $c_id = $this->session->userdata['recon_sess_i']['u_corporateid'];
// $this->db->select('payment');
// $this->db->from('corporates');
@ -44,21 +44,21 @@ class Corporate extends CI_Controller {
public function get_inv_gst1(){
$this->checksess();
$this->load->database('second', TRUE);
$this->load->database('default', 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);
$this->load->database('default', 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 get_inv_no(){
$this->checksess();
$this->load->database('second', TRUE);
$this->load->database('default', TRUE);
$res = $this->db2->get('air_invoice_details')->result();
echo json_encode($res);
}
@ -423,7 +423,7 @@ class Corporate extends CI_Controller {
foreach ($res->result() as $key => $value) {
// print_r($value);die();
if ($value) {
$this->load->database('second', TRUE);
$this->load->database('default', 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;
@ -486,7 +486,7 @@ class Corporate extends CI_Controller {
foreach ($res->result() as $key => $value) {
// print_r($value);die();
if ($value) {
$this->load->database('second', TRUE);
$this->load->database('default', 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;
@ -1306,7 +1306,7 @@ class Corporate extends CI_Controller {
public function airlineinvoice()
{
$this->load->database('second', TRUE);
$this->load->database('default', TRUE);
$res['data']= $this->db2->get('air_invoice_details')->result();
@ -5156,7 +5156,7 @@ public function upload_tmc(){
public function tmc_gst_inv(){
$this->checksess();
$this->load->database('second', TRUE);
$this->load->database('default', TRUE);
$this->db->select('tmc_data.td_pax as tmc_pax,tmc_data.td_airline_pnr as tmc_airline,tmc_data.td_sector as tmc_sector,tmc_data.td_inv_date as tmc_date,tmc_data.td_tkt_fare as tmc_ticket_fare , gstr2a_data.gd_inv_value as gstr2a_value , tmc_data.td_tkt_fare as tmc_ticket_fare , REPLACE(tmc_data.td_tkt," ","") as tmc_tkt , REPLACE(tmc_data.td_pnr," ","") as tmc_pnr , REPLACE(gstr2a_data.gd_inv_no, " ", "") as gstr2a_inv , invoice_no as inv_invoice_no , pnr as inv_pnr , ticket_no as inv_tkt_no , total_values');
$this->db->from('gst1.air_invoice_details');
$this->db->join('reconciler_test.tmc_data', 'replace(tmc_data.td_tkt," ","") = replace(air_invoice_details.ticket_no," ","") or replace(tmc_data.td_pnr," ","") = replace(air_invoice_details.pnr," ","")');

View File

@ -0,0 +1,16 @@
"","CORPORATE NAME","CORPORATE GSTIN","Trade/Legal name of the Supplier","SUPPLIER TYPE","TKT Amt","Inv","Tkt no.","Doc Type","Doc Date","Doc Amt (₹)","TKT Amt","Tkt Number","Tkt Amt","Variance (₹)","Inv Remarks","GSTR2A Remarks","Inv File","Tax Amt","Rate (%)",""
"432","test","test","AIRLINE","","","432","MSBNTQ","INV","01-02-2023","2500","2500","MSBNTQ","14556","-12056","Airline Amount Short","","2381","119","5",""
"433","test","test","AIRLINE","","51.5","433","DMKNUS","INV","01-02-2023","2809","2809","DMKNUS","7861","-5052","Airline Amount Short","","2057","","5",""
"434","test","test","AIRLINE","","106","434","Y5C7HC","CRN","02-02-2023","5098","5098","Y5C7HC","-5104","10202","TMC Amount Short","","4319","","5",""
"435","test","test","AIRLINE","","","435","098 1095270855","INV","02-02-2023","300","300","098 1095270855","3510","-3210","Airline Amount Short","","254","46","5",""
"435","test","test","AIRLINE","","","435","MV5BYX","INV","02-02-2023","300","300","MV5BYX","300","0","Transaction Matched","","254","46","5",""
"436","test","test","AIRLINE","","","436","228 1186541205","INV","02-02-2023","10575","10575","228 1186541205","10575","0","Transaction Matched","","9570","485","5",""
"437","test","test","AIRLINE","","","437","","INV","02-02-2023","5859","5859","","0","null","No Match Found","","4790","246","5",""
"438","test","test","AIRLINE","","112","438","","INV","03-02-2023","5374","5374","","0","null","No Match Found","","4370","","5",""
"439","test","test","AIRLINE","","","439","228 6749498957","INV","03-02-2023","9828","9828","228 6749498957","5374","4454","TMC Amount Short","","8570","435","5",""
"440","test","test","AIRLINE","","745","440","","INV","03-02-2023","34943","34943","","0","null","No Match Found","","33453","","5",""
"441","test","test","AIRLINE","","","441","OZSHQF","INV","10-02-2023","7460","7460","OZSHQF","7460","0","Transaction Matched","","6437","321.86","5",""
"442","test","test","AIRLINE","","","442","QSWWRD","INV","10-02-2023","2900","2900","QSWWRD","21740","-18840","Airline Amount Short","","2720","180","5",""
"443","test","test","AIRLINE","","167","443","IZ29SB","INV","14-02-2023","7655","7655","IZ29SB","7665","-10","Airline Amount Short","","6802","","5",""
"444","test","test","AIRLINE","","","444","","INV","14-02-2023","3510","3510","","0","null","No Match Found","","2813","149","5",""
"446","test","test","AIRLINE","","","446","","INV","15-02-2023","3510","3510","","0","null","No Match Found","","2813","149","5",""
1 CORPORATE NAME CORPORATE GSTIN Trade/Legal name of the Supplier SUPPLIER TYPE TKT Amt Inv Tkt no. Doc Type Doc Date Doc Amt (₹) TKT Amt Tkt Number Tkt Amt Variance (₹) Inv Remarks GSTR2A Remarks Inv File Tax Amt Rate (%)
2 432 test test AIRLINE 432 MSBNTQ INV 01-02-2023 2500 2500 MSBNTQ 14556 -12056 Airline Amount Short 2381 119 5
3 433 test test AIRLINE 51.5 433 DMKNUS INV 01-02-2023 2809 2809 DMKNUS 7861 -5052 Airline Amount Short 2057 5
4 434 test test AIRLINE 106 434 Y5C7HC CRN 02-02-2023 5098 5098 Y5C7HC -5104 10202 TMC Amount Short 4319 5
5 435 test test AIRLINE 435 098 1095270855 INV 02-02-2023 300 300 098 1095270855 3510 -3210 Airline Amount Short 254 46 5
6 435 test test AIRLINE 435 MV5BYX INV 02-02-2023 300 300 MV5BYX 300 0 Transaction Matched 254 46 5
7 436 test test AIRLINE 436 228 1186541205 INV 02-02-2023 10575 10575 228 1186541205 10575 0 Transaction Matched 9570 485 5
8 437 test test AIRLINE 437 INV 02-02-2023 5859 5859 0 null No Match Found 4790 246 5
9 438 test test AIRLINE 112 438 INV 03-02-2023 5374 5374 0 null No Match Found 4370 5
10 439 test test AIRLINE 439 228 6749498957 INV 03-02-2023 9828 9828 228 6749498957 5374 4454 TMC Amount Short 8570 435 5
11 440 test test AIRLINE 745 440 INV 03-02-2023 34943 34943 0 null No Match Found 33453 5
12 441 test test AIRLINE 441 OZSHQF INV 10-02-2023 7460 7460 OZSHQF 7460 0 Transaction Matched 6437 321.86 5
13 442 test test AIRLINE 442 QSWWRD INV 10-02-2023 2900 2900 QSWWRD 21740 -18840 Airline Amount Short 2720 180 5
14 443 test test AIRLINE 167 443 IZ29SB INV 14-02-2023 7655 7655 IZ29SB 7665 -10 Airline Amount Short 6802 5
15 444 test test AIRLINE 444 INV 14-02-2023 3510 3510 0 null No Match Found 2813 149 5
16 446 test test AIRLINE 446 INV 15-02-2023 3510 3510 0 null No Match Found 2813 149 5

Binary file not shown.