This commit is contained in:
suseendhiran17 2023-06-22 11:46:23 +05:30
parent e3cb3d1294
commit 0e6ab444d0
15 changed files with 65 additions and 15 deletions

View File

@ -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){

View File

@ -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');

View File

@ -618,7 +618,7 @@
"render": function ( data, type, full, meta ) {
// return '<a target="_blank" href="<?php echo base_url('corporate/gstr2a_file_download/'); ?>'+data+'" style="font-size:16px;"><i class="fa fa-download" title="Download file"></i></a> &nbsp;&nbsp;&nbsp;<a target="_blank" href="<?php echo base_url('corporate/gstr2a_valid_download/'); ?>'+data+'" style="font-size:16px;color:green"><i class="fa fa-download" title="Download Valid Records"></i></a>';
return `<a href="javascript:void(0)" onclick="downloadfn('+data+')" style="font-size:16px;"><i class="fa fa-download" title="Download file"></i></a>
return `<a href="javascript:void(0)" onclick="downloadfn(${data})" style="font-size:16px;"><i class="fa fa-download" title="Download file"></i></a>
&nbsp; <a id="${data}" onclick="deletetmc(${data})" style="font-size:16px;"><i class="fa fa-trash" title="Delete"></i></a>`;
}
}

View File

@ -180,7 +180,7 @@
<th>GSTR2A REMARKS</th>
<th>INVOICE REMARKS</th>
<th>INVOICE FILE</th>
<th>Action</th>
<th>ACTION</th>
<th>REFID</th>
<th>REFID</th>
<th>MANUAL TKT NO</th>
@ -762,7 +762,8 @@ function() {
"targets": 25,
// "width": 300,
"render": function ( data, type, full, meta ) {
return '<button type="text" style="border:none;" class="form-control" id="inv_no" data-refid="'+full['gd_inv_no']+'" value="'+full['gd_inv_no']+'" onclick="viewinvfn()" >'+full['gd_inv_no']+'</button>';
console.log(full['gd_id']);
return '<button type="text" style="border:none;" class="form-control" id="'+full['gd_id']+'" data-refid="'+full['gd_inv_no']+'" value="'+full['gd_inv_no']+'" onclick="viewinvfn('+full['gd_id']+')" >'+full['gd_inv_no']+'</button>';
}
}
]
@ -828,7 +829,7 @@ function() {
function viewinvfn(inv_no){
$.ajax({
url:'<?php echo base_url('corporate/get_inv_gst1/') ?>',
data:{inv_no:$('#inv_no').val()},
data:{inv_no:$('#'+inv_no+'').val()},
type:'POST',
success:function(data){
var Pdata = JSON.parse(data);

View File

@ -248,6 +248,8 @@
</div>
<input type="hidden" id="counter" name="counter" value="1" />
<input type="hidden" id="inv_1"/>
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
@ -656,7 +658,8 @@ function() {
{ data : "td_cabin_class"},
{ data : "td_tkt_fare"},
{ data : "d_remarks"},
{ data : "td_id"}
{ data : "td_id"},
{ data : "td_net"}
],
"columnDefs": [
{
@ -693,8 +696,8 @@ function() {
"targets": 14,
"width": 300,
"render": function ( data, type, full, meta ) {
console.log(full['td_tkt']);
return '<button type="text" style="border:none;" class="form-control" id="inv_no" data-refid="'+full['td_tkt']+'" value="'+full['td_tkt']+'" onclick="viewinvfn()" >'+full['gd_inv_no']+'</button>';
console.log(full);
return '<button type="text" style="border:none;" class="form-control" id="'+full['td_id']+'" data-refid="'+full['td_tkt']+'" value="'+full['td_tkt']+'" onclick="viewinvfn(this.value)" >'+full['inv']+'</button>';
}
},
]
@ -738,13 +741,14 @@ function() {
return str1;
}
function viewinvfn(){
function viewinvfn(tkt_no){
$.ajax({
url:'<?php echo base_url('corporate/get_tic_gst1/') ?>',
data:{inv_no:$('#inv_no').val()},
data:{inv_no:tkt_no},
type:'POST',
success:function(data){
var Pdata = JSON.parse(data);
console.log(Pdata,"Pdata");
var modal_data = '';
modal_data= '<div class="row"><div class="col-md-4 col-lg-4"><b>Invoive Date</b><div style="float:right;">:</div></div><div class="col-md-8 col-lg-8">'+Pdata[0]['invdt']+'</div></div>';
delete Pdata[0].sl;
@ -764,6 +768,18 @@ function() {
}
})
};
$(document).ready(function() {
return $.ajax({
url:'<?php echo base_url('corporate/get_inv_no') ?>',
// data:{tk_no:'tk_no'},
type:'POST',
success:function(data){
Pdata = JSON.stringify(data);
$('#inv_1').val(Pdata);
// console.log(JSON.parse($('#inv_1').val()),'3');
}
})
});
function deletetmcrecon(data)
{
@ -799,6 +815,7 @@ function() {
}
}
</script>
<!-- Long Content Scroll Modal -->
<div class="modal fade" id="scrollable-modal" tabindex="-1" role="dialog"
@ -823,4 +840,9 @@ function() {
</div><!-- /.modal -->
</body>
</html>
</html>

View File

@ -661,7 +661,8 @@ function() {
{ data : "td_cabin_class"},
{ data : "td_tkt_fare"},
{ data : "d_remarks"},
{ data : "td_id"}
{ data : "td_id"},
{ data : "td_net"}
],
"columnDefs": [
{
@ -698,8 +699,8 @@ function() {
"targets": 14,
"width": 300,
"render": function ( data, type, full, meta ) {
console.log(full['td_tkt']);
return '<button type="text" style="border:none;" class="form-control" id="inv_no" data-refid="'+full['td_tkt']+'" value="'+full['td_tkt']+'" onclick="viewinvfn()" >'+full['gd_inv_no']+'</button>';
return '<button type="text" style="border:none;" class="form-control" id="'+full['td_id']+'" data-refid="'+full['td_tkt']+'" value="'+full['td_tkt']+'" onclick="viewinvfn(this.value)" >'+full['inv']+'</button>';
}
},
]
@ -743,13 +744,14 @@ function() {
return str1;
}
function viewinvfn(){
function viewinvfn(tkt_no){
$.ajax({
url:'<?php echo base_url('corporate/get_tic_gst1/') ?>',
data:{inv_no:$('#inv_no').val()},
data:{inv_no:tkt_no},
type:'POST',
success:function(data){
var Pdata = JSON.parse(data);
console.log(Pdata,"Pdata");
var modal_data = '';
modal_data= '<div class="row"><div class="col-md-4 col-lg-4"><b>Invoive Date</b><div style="float:right;">:</div></div><div class="col-md-8 col-lg-8">'+Pdata[0]['invdt']+'</div></div>';
delete Pdata[0].sl;

View File

@ -0,0 +1 @@
"CORPORATE NAME","CORPORATE GSTIN","Trade/Legal name of the Supplier","SUPPLIER TYPE","INVOICE NUMBER","MANUAL TKT NO","TICKET NO","DOCUMENT TYPE","INVOICE DATE","INVOICE AMT (₹)","TICKET AMT","VARIANCE","RATE (%)","TACABLE AMT (₹)","INTEGRATED TAX (₹)","CENTRAL TAX (₹)","STATE/UT TAX (₹)","GSTR2A REMARKS","INVOICE REMARKS"
1 CORPORATE NAME CORPORATE GSTIN Trade/Legal name of the Supplier SUPPLIER TYPE INVOICE NUMBER MANUAL TKT NO TICKET NO DOCUMENT TYPE INVOICE DATE INVOICE AMT (₹) TICKET AMT VARIANCE RATE (%) TACABLE AMT (₹) INTEGRATED TAX (₹) CENTRAL TAX (₹) STATE/UT TAX (₹) GSTR2A REMARKS INVOICE REMARKS

View File

@ -0,0 +1 @@
"CORPORATE NAME","CORPORATE GSTIN","Trade/Legal name of the Supplier","SUPPLIER TYPE","INVOICE NUMBER","MANUAL TKT NO","TICKET NO","DOCUMENT TYPE","INVOICE DATE","INVOICE AMT (₹)","TICKET AMT","VARIANCE","RATE (%)","TACABLE AMT (₹)","INTEGRATED TAX (₹)","CENTRAL TAX (₹)","STATE/UT TAX (₹)","GSTR2A REMARKS","INVOICE REMARKS"
1 CORPORATE NAME CORPORATE GSTIN Trade/Legal name of the Supplier SUPPLIER TYPE INVOICE NUMBER MANUAL TKT NO TICKET NO DOCUMENT TYPE INVOICE DATE INVOICE AMT (₹) TICKET AMT VARIANCE RATE (%) TACABLE AMT (₹) INTEGRATED TAX (₹) CENTRAL TAX (₹) STATE/UT TAX (₹) GSTR2A REMARKS INVOICE REMARKS

Binary file not shown.

Binary file not shown.