tmc gst inv
This commit is contained in:
parent
4719ce6c74
commit
f1f7943cb7
@ -455,7 +455,7 @@ class Corporate extends CI_Controller {
|
||||
$data['inv_received'] = 1;
|
||||
$this->db->where('td_id', $res1->ti_tdid);
|
||||
$this->db->update('tmc_data', $data);
|
||||
$res1->d_remarks = 'Invoice Manual Received';
|
||||
$res1->d_remarks = 'Invoice Received(Manual)';
|
||||
}
|
||||
else{
|
||||
$data['inv_received'] = 2;
|
||||
@ -620,7 +620,7 @@ class Corporate extends CI_Controller {
|
||||
}
|
||||
} else {
|
||||
$variance = 0; // Set variance to 0 if td_gstr2a_match_id is null or zero
|
||||
$res1->gd_remarks = 'No Match Found'; // Clear gd_remarks if td_gstr2a_match_id is null or zero
|
||||
$res1->gd_remarks = 'TMC Invoice Missing'; // Clear gd_remarks if td_gstr2a_match_id is null or zero
|
||||
}
|
||||
if($res1->ti_file_name == '')
|
||||
$res1->gd_file_status = 'Invoice Missing';
|
||||
@ -5153,23 +5153,32 @@ public function upload_tmc(){
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
|
||||
public function tmc_gst_inv(){
|
||||
$this->checksess();
|
||||
$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," ","")');
|
||||
$this->db->join('reconciler_test.gstr2a_data', 'air_invoice_details.invoice_no = gstr2a_data.gd_inv_no');
|
||||
$query = $this->db->get();
|
||||
$result['data'] = $query->result();
|
||||
|
||||
|
||||
$from_date = $this->input->post('from_date'); // Retrieve 'from' date from the form
|
||||
$to_date = $this->input->post('to_date');
|
||||
|
||||
$this->load->view('corporate/tmc_gst_inv',$result);
|
||||
}
|
||||
$this->load->database('default', TRUE);
|
||||
$this->db->select('tmc_data.td_tkt as tmc_ticket_no,tmc_data.td_pax as tmc_pax,tmc_data.td_tkt_fare as tmc_tkt_fare,air_invoice_details.total_inv_value as airline_fare,air_invoice_details.ticket_no as airline_ticket_no,air_invoice_details.invoice_no as airline_inv_no,gstr2a_data.gd_inv_value as gst_fare, gstr2a_data.gd_inv_no as gst_invoice_no');
|
||||
$this->db->from('air_invoice_details');
|
||||
$this->db->join('tmc_data', 'air_invoice_details.ticket_no = tmc_data.td_tkt', 'left');
|
||||
$this->db->join('gstr2a_data', 'air_invoice_details.invoice_no = gstr2a_data.gd_inv_no', 'left');
|
||||
|
||||
// Filter data based on the date range
|
||||
$this->db->where("(
|
||||
(gstr2a_data.gd_inv_date BETWEEN '$from_date' AND '$to_date')
|
||||
OR
|
||||
(tmc_data.td_inv_date BETWEEN '$from_date' AND '$to_date')
|
||||
)");
|
||||
|
||||
$query = $this->db->get();
|
||||
$result['data'] = $query->result();
|
||||
|
||||
$this->load->view('corporate/tmc_gst_inv', $result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
|
||||
<a href="<?php echo site_url('corporate/gstr2a_recon'); ?>" class="dropdown-item">GSTR2A</a>
|
||||
<a href="<?php echo site_url('corporate/tmc_recon'); ?>" class="dropdown-item">TMC</a>
|
||||
<!-- <a href="<?php echo site_url('corporate/tmc_gst_inv');?>" class="dropdown-item">DATA RECON</a> -->
|
||||
<a href="<?php echo site_url('corporate/tmc_gst_inv');?>" class="dropdown-item">DATA RECON</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php if ($this->session->flashdata('corporate_id') != 1) { ?>
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<!-- icons -->
|
||||
<link href="<?php echo base_url(); ?>assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
<style>
|
||||
.mb25{
|
||||
margin-bottom: 25px;
|
||||
@ -51,14 +51,72 @@
|
||||
.left{
|
||||
|
||||
}
|
||||
.footer
|
||||
.table tr, table td {
|
||||
padding: 5px; /* Adjust the padding as needed to decrease the cell height */
|
||||
line-height: 2;
|
||||
/* Adjust the line-height as needed for tighter cell spacing */
|
||||
}
|
||||
.table tbody{
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
max-height: 350px;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
.table thead th{
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dataTables_scrollBody
|
||||
{
|
||||
|
||||
max-height: 390px;
|
||||
width: 1129px;
|
||||
}
|
||||
.footer
|
||||
{
|
||||
padding-top: 19px;
|
||||
padding-right: 17px;
|
||||
padding-bottom: 2px;
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
.highlight-gst-inv {
|
||||
background-color: #FFFFFF; /* Light grey for GST Invoice Number */
|
||||
}
|
||||
.highlight-gst-inv_fare {
|
||||
background-color: #FFFFFF; /* Light grey for GST Invoice Number */
|
||||
}
|
||||
|
||||
.highlight-tmc-tkt {
|
||||
background-color: #f0f0f0; /* Lighter grey for TMC Ticket Number */
|
||||
}
|
||||
.highlight-tmc-pax {
|
||||
background-color:#f0f0f0; /* Lighter grey for TMC Ticket Number */
|
||||
}
|
||||
.highlight-tmc-tkt_fare {
|
||||
background-color: #f0f0f0; /* Lighter grey for TMC Ticket Number */
|
||||
}
|
||||
|
||||
.highlight-airline-inv {
|
||||
background-color: #f0f0f0; /* Light grey for Airline Invoice Number */
|
||||
}
|
||||
|
||||
.highlight-airline-tkt {
|
||||
background-color: #f0f0f0; /* Light sandal for Airline Ticket Number */
|
||||
}
|
||||
.highlight-airline-tkt_fare {
|
||||
background-color: #f0f0f0; /* Light sandal for Airline Ticket Number */
|
||||
}
|
||||
|
||||
/* ...your existing styles */
|
||||
.fare-mismatch td {
|
||||
|
||||
color:red; /* Ensures text is readable on dark red background */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@ -74,11 +132,10 @@
|
||||
<!-- Start Page Content here -->
|
||||
<!-- ============================================================== -->
|
||||
|
||||
<!-- <div class="content-page"> -->
|
||||
<!-- <div class="content"> -->
|
||||
|
||||
|
||||
<!-- Start Content-->
|
||||
<!-- <div class="container-fluid"> -->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
@ -102,7 +159,7 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row" style="margin-bottom:20px;">
|
||||
<form class="col-md-12" id="formid">
|
||||
<form method="post" action="<?php echo base_url('corporate/tmc_gst_inv'); ?>">
|
||||
<div class="form-row">
|
||||
<!--
|
||||
<div class="form-group col-md-2">
|
||||
@ -113,25 +170,40 @@
|
||||
// echo '<option>'.$gstno_i->gn_gstno.'</option>';
|
||||
// }
|
||||
?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
-->
|
||||
<input id="fromdate" value="" type="hidden">
|
||||
<input id="todate" value="" type="hidden">
|
||||
|
||||
|
||||
<div class="form-group col-md-5">
|
||||
<label for="from_date">From</label>
|
||||
<input type="date" class="form-control" id="from_date" name="from_date" value="<?php echo isset($_POST['from_date']) ? $_POST['from_date'] : ''; ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-5">
|
||||
<label for="to_date">To</label>
|
||||
|
||||
<input type="date" class="form-control" id="to_date" name="to_date" value="<?php echo isset($_POST['to_date']) ? $_POST['to_date'] : ''; ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="inputPassword4" class="col-form-label"></label>
|
||||
<button style="margin-top:7px;font-size:12px;" type="submit" class="btn btn-primary">Submit</button><br>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <label class="col-lg-3 col-form-label">Date</label>
|
||||
<div class="col-lg-12">
|
||||
<div id="reportrange" class="pull-right form-control">
|
||||
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<!-- <label for="inputPassword4" class="col-form-label"></label>
|
||||
<button style="margin-top:35px" type="submit" class="btn btn-primary">Submit</button> -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
<div class="form-group col-md-4">
|
||||
<!-- <select style="overflow-y:scroll" name="column_name" id="column_name" class="form-control selectpicker" multiple>
|
||||
<option value="0">TICKET NO (TMC)</option>
|
||||
<option value="1">INV NO (GST)</option>
|
||||
@ -159,29 +231,25 @@
|
||||
<option value="20">TMC INV/CRN NO.-4</option>
|
||||
-->
|
||||
<!-- </select> -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-container">
|
||||
<table id="scroll-vertical-datatable" class="table dt-responsive nowrap w-100">
|
||||
<!-- <table id="scroll-horizontal-datatable" class="table w-100 nowrap"> -->
|
||||
|
||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>TICKET NO (TMC)</th>
|
||||
<th>PASS NAME(TMC)</TH>
|
||||
<TH> AIRLINE(TMC)</TH>
|
||||
<TH>SECTOR(TMC)</TH>
|
||||
<TH>TRAVEL DAT(TMC)E</TH>
|
||||
<TH>TICKET NUMBER(TMC)</TH>
|
||||
<TH>VALUE (TMC)</TH>
|
||||
<th>INV NO (GST)</th>
|
||||
<th>INV NO(GST)</th>
|
||||
<th>PNR NO(GST)</th>
|
||||
<th>TICKET NO(GST)</th>
|
||||
<th>TOTAL (GST)</th>
|
||||
|
||||
<th>TMC Pax Name</th>
|
||||
<th>TMC Tkt number</th>
|
||||
<th>TMC Tkt Fare</th>
|
||||
<th>GST Inv Number</th>
|
||||
<th>GST Inv Value</th>
|
||||
<th>Airline Inv Number</th>
|
||||
<th>Airline Tkt Number</th>
|
||||
<th>Airline Tkt Fare</th>
|
||||
<!-- <th>RECIPIENT</th>
|
||||
<th>RECIPIENT GST</th>
|
||||
<th>INVOICE NUMBER</th>
|
||||
@ -206,23 +274,36 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
<?php foreach ($data as $value){
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $value->tmc_tkt; ?></td>
|
||||
<td><?php echo $value->tmc_pax; ?></td>
|
||||
<td><?php echo $value->tmc_airline; ?></td>
|
||||
<td><?php echo $value->tmc_sector; ?></td>
|
||||
<td><?php echo $value->tmc_date; ?></td>
|
||||
<td><?php echo $value->tmc_tkt; ?></td>
|
||||
<?php foreach ($data as $row): ?>
|
||||
<?php
|
||||
// Check if any fare value is empty
|
||||
$anyFareEmpty = empty($row->tmc_tkt_fare) || empty($row->gst_fare) || empty($row->airline_fare);
|
||||
?>
|
||||
<tr <?php if (!$anyFareEmpty && ($row->tmc_tkt_fare != $row->gst_fare || $row->tmc_tkt_fare != $row->airline_fare || $row->gst_fare != $row->airline_fare)) echo 'class="fare-mismatch"'; ?> >
|
||||
<td class="highlight-tmc-pax"><?php echo $row->tmc_pax; ?></td>
|
||||
<td class="highlight-tmc-tkt"><?php echo $row->tmc_ticket_no; ?></td>
|
||||
<td class="highlight-tmc-tkt_fare"><?php echo $row->tmc_tkt_fare; ?></td>
|
||||
<td class="highlight-gst-inv"><?php echo $row->gst_invoice_no; ?></td>
|
||||
<td class="highlight-gst-inv_fare"><?php echo $row->gst_fare; ?></td>
|
||||
<td class="highlight-airline-inv"><?php echo $row->airline_inv_no; ?></td>
|
||||
<td class="highlight-airline-tkt"><?php echo $row->airline_ticket_no; ?></td>
|
||||
<td class="highlight-airline-tkt_fare"><?php echo $row->airline_fare; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!-- <tr>
|
||||
<td><?php echo $value->tmc_pax; ?></td>
|
||||
<td><?php echo $value->tmc_tkt; ?></td>
|
||||
<td><?php echo $value->tmc_ticket_fare; ?></td>
|
||||
<td><?php echo $value->gstr2a_inv; ?></td>
|
||||
<td><?php echo $value->inv_invoice_no; ?></td>
|
||||
<td><?php echo $value->inv_pnr; ?></td>
|
||||
<td><?php echo $value->gstr2a_inv; ?></td>
|
||||
<td><?php echo $value->gstr2a_value; ?></td>
|
||||
<td><?php echo $value->inv_invoice_no; ?></td>
|
||||
<td><?php echo $value->inv_tkt_no; ?></td>
|
||||
<td><?php echo $value->total_values; ?></td>
|
||||
<td><?php echo $value->total_inv_value; ?></td> -->
|
||||
|
||||
<!-- <td><?php echo $value->inv_pnr; ?></td> -->
|
||||
|
||||
|
||||
<!-- <td><?php echo $value->recepient; ?></td>
|
||||
<td><?php echo $value->recepient_gst; ?></td>
|
||||
<td><?php echo $value->invoice_no?></td>
|
||||
@ -243,15 +324,13 @@
|
||||
<td><?php echo $value->extraction_date; ?></td>
|
||||
<td><?php echo $value->batch_id; ?></td>
|
||||
<td><?php echo $value->invdt; ?></td> -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- </thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
@ -264,16 +343,14 @@
|
||||
<!-- end row-->
|
||||
|
||||
</div> <!-- container -->
|
||||
<!--
|
||||
</div> content -->
|
||||
|
||||
</div> <!-- content -->
|
||||
|
||||
|
||||
<!-- </div>
|
||||
</div> -->
|
||||
<?php include('includes/footer.php'); ?>
|
||||
<?php include('includes/footer.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -316,7 +393,6 @@
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/floatthead/2.4.5/jquery.floatThead.min.js"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="<?php echo base_url(); ?>assets/js/app.min.js"></script>
|
||||
@ -325,7 +401,7 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
oTable = $("#scroll-vertical-datatable").DataTable({
|
||||
oTable = $("#scroll-horizontal-datatable").DataTable({
|
||||
lengthChange: !1,
|
||||
|
||||
// dom: 'Bfrtip',
|
||||
@ -333,7 +409,7 @@
|
||||
{
|
||||
extend: "csvHtml5",
|
||||
exportOptions: {
|
||||
columns: [ 0, 1, 2, 3, 4,5]
|
||||
columns: [ 0, 1, 2, 3, 4,5,6,7]
|
||||
}
|
||||
}
|
||||
|
||||
@ -355,7 +431,7 @@
|
||||
//// className: "btn-light"
|
||||
//// }
|
||||
// ],
|
||||
scrollX: !0,
|
||||
scrollX: !0,
|
||||
language: {
|
||||
paginate: {
|
||||
previous: "<i class='mdi mdi-chevron-left'>",
|
||||
@ -364,13 +440,13 @@
|
||||
}
|
||||
});
|
||||
|
||||
oTable.buttons().container().appendTo("#scroll-vertical-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({
|
||||
oTable.buttons().container().appendTo("#scroll-horizontal-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({
|
||||
pagingType: "full_numbers",
|
||||
drawCallback: function () {
|
||||
$(".dataTables_paginate > .pagination").addClass("pagination-rounded")
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -851,8 +851,7 @@ function() {
|
||||
{ data : "td_id"}
|
||||
|
||||
],
|
||||
// "columnDefs": [
|
||||
"columnDefs": [
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets":11,
|
||||
"visible": false
|
||||
@ -881,16 +880,13 @@ function() {
|
||||
"width": 300,
|
||||
"render": function ( data, type, full, meta ) {
|
||||
console.log(full['inv']);
|
||||
if (full['inv'] !=" ") {
|
||||
return 'Invoice Received';
|
||||
} else if (full['ti_recieved'] === "0") {
|
||||
return 'Invoice Received (Manual)';
|
||||
}
|
||||
else{
|
||||
return 'Invoice Not Received';
|
||||
}
|
||||
}
|
||||
|
||||
if (full['inv'] !== " ") {
|
||||
return 'Invoice Received';
|
||||
} else {
|
||||
// Show d_remarks here
|
||||
return full['d_remarks'];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user