tmc and gst

This commit is contained in:
heama 2023-11-13 15:29:51 +05:30
parent 038a862d61
commit 970c05f86c
42 changed files with 1437 additions and 577 deletions

View File

@ -369,6 +369,15 @@ class Corporate extends CI_Controller {
$insary['ti_amount'] = $amount; $insary['ti_amount'] = $amount;
$insary['ti_manual'] = $manual; $insary['ti_manual'] = $manual;
$this->db->insert('airline_invoice',$insary); $this->db->insert('airline_invoice',$insary);
$insert_id = $this->db->insert_id();
if($insert_id !=''){
$this->db->where('td_id', $tdid);
$this->db->update('tmc_data', array('td_gstr2a_match_id' => $gdid));
}
// $this->upd_tkt_bind($gdid,$tdid);
} }
} }
echo $tdid; echo $tdid;
@ -421,6 +430,10 @@ class Corporate extends CI_Controller {
// $this->db->where('td_id', $value->td_id); // $this->db->where('td_id', $value->td_id);
// $data = $this->db->update('tmc_data',$uptData); // $data = $this->db->update('tmc_data',$uptData);
$value->inv = $res_2[0]->invoice_no; $value->inv = $res_2[0]->invoice_no;
$value->tkt=$res_2[0]->ticket_no;
$value->amt=$res_2[0]->total_inv_value;
$value->tpnr=$res_2[0]->pnr;
$value->tdate=$res_2[0]->invoice_dt;
} }
else{ else{
$value->inv = " "; $value->inv = " ";
@ -515,8 +528,12 @@ class Corporate extends CI_Controller {
$res2->td_net_ref = $res1->td_net_ref; $res2->td_net_ref = $res1->td_net_ref;
if($res1->td_tkt_fare == '') if($res1->td_tkt_fare == '')
$res1->td_tkt_fare = 0; $res1->td_tkt_fare = 0;
if ($value->td_gstr2a_match_id != null && $value->td_gstr2a_match_id != 0) {
$variance = $res1->gd_inv_value - $res1->td_tkt_fare; $variance = $res1->gd_inv_value - $res1->td_tkt_fare;
$res2->variance = $variance; $res2->variance = $variance;
} else {
$variance = "hello"; // Set variance to 0 if td_gstr2a_match_id is null or zero
}
if($res1->ti_file_name == ''){ if($res1->ti_file_name == ''){
$data['inv_status'] = 0; $data['inv_status'] = 0;
@ -590,15 +607,21 @@ class Corporate extends CI_Controller {
if($res1->td_tkt_fare == '') if($res1->td_tkt_fare == '')
$res1->td_tkt_fare = 0; $res1->td_tkt_fare = 0;
$variance = $res1->gd_inv_value - $res1->td_tkt_fare;
$res1->variance = $variance; if ($res1->td_gstr2a_match_id != null && $res1->td_gstr2a_match_id != 0) {
$variance = $res1->gd_inv_value - $res1->td_tkt_fare;
if($variance == 0) $res1->variance = $variance;
$res1->gd_remarks = 'Transaction Matched'; if ($variance == 0) {
else if($variance > 0) $res1->gd_remarks = 'Transaction Matched';
$res1->gd_remarks = 'TMC Amount Short'; } else if ($variance > 0) {
else $res1->gd_remarks = 'TMC Amount Short';
$res1->gd_remarks = 'Airline Amount Short'; } else {
$res1->gd_remarks = 'Airline Amount Short';
}
} 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
}
if($res1->ti_file_name == '') if($res1->ti_file_name == '')
$res1->gd_file_status = 'Invoice Missing'; $res1->gd_file_status = 'Invoice Missing';
else else

View File

@ -51,6 +51,9 @@
.left{ .left{
} }
.form-group {
margin-bottom: -2rem;
}
</style> </style>
</head> </head>
@ -66,11 +69,11 @@
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page">
<div class="content"> <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <!-- <div class="container-fluid"> -->
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row">

View File

@ -48,6 +48,9 @@
.cardtop{ .cardtop{
margin-top: 1.5rem; margin-top: 1.5rem;
} }
.mt-5, .my-5 {
margin-top: 1.5rem!important;
}
</style> </style>
</head> </head>

View File

@ -48,6 +48,9 @@
.cardtop{ .cardtop{
margin-top: 1.5rem; margin-top: 1.5rem;
} }
.mt-5, .my-5 {
margin-top: 1.5rem!important;
}
</style> </style>
</head> </head>

View File

@ -35,6 +35,13 @@
.required{ .required{
color: red; color: red;
} }
.footer
{
padding-top: 19px;
padding-right: 17px;
padding-bottom: 2px;
padding-left: 17px;
}
</style> </style>
</head> </head>
@ -50,11 +57,11 @@
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page">
<div class="content"> <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <!-- <div class="container-fluid"> -->
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row">
@ -77,7 +84,7 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col-md-10"></div> <div class="col-md-10"><h5>GST Nos</h5></div>
<div class="col-md-2"> <div class="col-md-2">
<button style="float:right" type="button" class="btn btn-primary waves-effect waves-light" data-toggle='modal' data-target="#add_modal">Add GST No</button> <button style="float:right" type="button" class="btn btn-primary waves-effect waves-light" data-toggle='modal' data-target="#add_modal">Add GST No</button>
</div> </div>

View File

@ -35,6 +35,16 @@
.required{ .required{
color: red; color: red;
} }
.mt-5, .my-5 {
margin-top: 1.5rem!important;
}
.footer
{
padding-top: 19px;
padding-right: 17px;
padding-bottom: 2px;
padding-left: 17px;
}
</style> </style>
</head> </head>
@ -50,12 +60,12 @@
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page">
<div class="content"> <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <!-- <div class="container-fluid">
-->
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
@ -74,10 +84,12 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col-md-8"></div>
<div class="col-md-8"><h5>GSTR2A File Listing</h5></div>
<div class="col-md-2"> <div class="col-md-2">
<a class="btn btn-primary waves-effect waves-light" style="float:right" href="<?php echo base_url('corporate/gstr2a_sample_download') ?>" target="_blank"><i class="fa fa-download"></i>&nbsp;&nbsp;Sample</a> <a class="btn btn-primary waves-effect waves-light" style="float:right" href="<?php echo base_url('corporate/gstr2a_sample_download') ?>" target="_blank"><i class="fa fa-download"></i>&nbsp;&nbsp;Sample</a>
</div> </div>

View File

@ -36,7 +36,11 @@
<!-- icons --> <!-- icons -->
<link href="<?php echo base_url(); ?>assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <link href="<?php echo base_url(); ?>assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<!-- Include jQuery library -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Include the StickyTableHeaders plugin -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/StickyTableHeaders/0.1.1/jquery.stickytableheaders.min.js"></script>
<style> <style>
.mb25{ .mb25{
margin-bottom: 25px; margin-bottom: 25px;
@ -51,6 +55,57 @@
.left{ .left{
} }
/* .form-group {
font-size: 11px;
padding: 5px;
} */
.table {
font-size: 12px;
border-spacing:0px;
}
.table tr, table td {
padding: 5px;
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;
}
.form-group {
margin-bottom: -2rem;
}
/* Style the container for the table with a fixed header */
/* Style the container for the table with a fixed header */
</style> </style>
</head> </head>
@ -66,14 +121,14 @@
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page"> -->
<div class="content"> <!-- <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid">
<!-- start page title --> <!-- start page title -->
<div class="row"> <!-- <div class="row">
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4 class="page-title">GSTR2A</h4> <h4 class="page-title">GSTR2A</h4>
@ -85,11 +140,42 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
<!-- end page title --> <!-- end page title -->
<!-- <div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:30px;">
<form class="col-md-12" id="formid">
<div class="row">
<div class="col-12"style="margin-bottom:30px;">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">GSTR2A</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">GSTR2A</li>
</ol>
</div>
</div>
</div>
</div> -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Gstr2a</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">Gstr2a</li>
</ol>
</div>
</div>
</div>
</div>
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
@ -108,97 +194,169 @@
</select> </select>
</div> </div>
--> -->
<div class="form-group col-md-4">
<div class="form-group col-md-4">
<label> FROM &nbsp;&nbsp;</label> <label> FROM &nbsp;&nbsp;</label>
<input type="date" id="from" name="from" value="2020-01-01" > <input type="date" id="from" name="from" value="2020-01-01" >
&nbsp;&nbsp; &nbsp;&nbsp;
<label> TO &nbsp;&nbsp;</label> <label> TO &nbsp;&nbsp;</label>
<input type="date" id="TO" name="to" value="2023-01-01" &nbsp;&nbsp;> <input type="date" id="TO" name="to" value="2023-01-01" &nbsp;&nbsp;>
&nbsp;&nbsp; &nbsp;&nbsp;
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label for="inputPassword4" class="col-form-label"></label> <label for="inputPassword4" class="col-form-label"></label>
<button style="margin-top:0px;font-size: 10px;" type="submit" class="btn btn-primary">Submit</button> <button style="margin-top:0px;font-size:10px;" type="submit" class="btn btn-primary">Submit</button><br>
</div> </div>
<div class="col-md-2"></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">CORPORATE NAME</option> <div class="form-group col-md-3" id="hidden-dropdown">
<option value="1">CORPORATE GSTIN</option> <div class="page-title-right">
<option value="2">TRADE/LEGAL NAME OF THE SUPPLIER</option> <ol class="breadcrumb m-0">
<option value="3">SUPPLIER TYPE</option> <!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li> -->
<option selected="selected" value="4">INVOICE NUMBER</option> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li class="breadcrumb-item active">GSTR2A</li>
</ol>
</div>
<!-- <select style="overflow-y:scroll" name="column_name" id="column_name" class="form-control selectpicker" multiple><p>GSTR@A</p>
<option value="1">CORPORATE NAME</option>
<option value="2">CORPORATE GSTIN</option>
<option value="3">TRADE/LEGAL NAME OF THE SUPPLIER</option>
<option value="4">SUPPLIER TYPE</option>
<option selected="selected" value="5">INVOICE NUMBER</option> -->
<!-- <option selected="selected" value="5">MANUAL TICKET NO.</option> <!-- <option selected="selected" value="5">MANUAL TICKET NO.</option>
<option selected="selected" value="6">TICKET NO.</option> --> <option selected="selected" value="6">TICKET NO.</option> -->
<option selected="selected" value="7">DOCUMENT TYPE</option> <!-- <option selected="selected" value="8">DOCUMENT TYPE</option>
<option selected="selected" value="8">INVOICE DATE</option> <option selected="selected" value="9">INVOICE DATE</option>
<option selected="selected" value="9">INVOICE AMT (&#8377;)</option> <option selected="selected" value="10">INVOICE AMT (&#8377;)</option>
<option selected="selected" value="10">TICKET AMT</option> <option selected="selected" value="11">TICKET AMT</option>
<option selected="selected"value="11">VARIANCE</option> <option selected="selected"value="12">VARIANCE</option>
<option selected="selected" value="12">RATE (%)</option> <option selected="selected" value="13">RATE (%)</option>
<option selected="selected" value="13">TAXABLE AMT (&#8377;)</option> <option selected="selected" value="14">TAXABLE AMT (&#8377;)</option>
<option selected="selected"value="14">CENTRAL TAX (&#8377;)</option> <option selected="selected"value="15">CENTRAL TAX (&#8377;)</option>
<option selected="selected" value="15">STATE/UT TAX (&#8377;)</option> <option selected="selected" value="16">STATE/UT TAX (&#8377;)</option>
<option selected="selected" value="17">GSTR2A REMARKS</option> <option selected="selected" value="18">GSTR2A REMARKS</option>
<option selected="selected"value="18">INVOICE REMARKS</option> <option selected="selected"value="19">INVOICE REMARKS</option>
<option selected="selected"value="19">TICKET NUMBER </option> <option selected="selected"value="20">TICKET NUMBER </option>
<option selected="selected"value="20">TICKET AMT</option> <option selected="selected"value="21">TICKET AMT</option>
<option selected="selected"value="21">INVOICE FILE</option> <option selected="selected"value="22">INVOICE FILE</option>
<option selected="selected"value="23">DELETE</option> <option selected="selected"value="24">DELETE</option>
</select> </select> -->
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div class="table-container">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
<!-- <table id="scroll-horizontal-datatable" class="table w-100 nowrap"> -->
<!-- <table id="demo-foo-filtering" class="table table-bordered toggle-circle mb-0" data-page-size="7"> -->
<thead> <thead>
<tr> <tr>
<th>
<button id="toggle-column-modal-button" class="btn btn-link" data-toggle="modal" data-target="#columnModal">
<i class="fa fa-eye"></i>
</button>
<th>CORPORATE NAME</th> <th>CORPORATE NAME</th>
<th>CORPORATE GSTIN</th> <th>CORPORATE GSTIN</th>
<th>Trade/Legal name of the Supplier</th> <th>Trade/Legal name of the Supplier</th>
<th>SUPPLIER TYPE</th> <th>SUPPLIER TYPE</th>
<th>INVOICE NUMBER</th> <th>Doc number</th>
<th>MANUAL TICKET NO.</th> <th>Manual Tkt no.</th>
<th>TICKET NO.</th> <th>Tkt no.</th>
<th>DOCUMENT TYPE</th> <th>Doc Type</th>
<th>INVOICE DATE</th> <th>Doc Date</th>
<th>INVOICE AMT (&#8377;)</th> <th>Doc Amt (&#8377;)</th>
<th>TICKET AMT</th> <th>TKT Amt</th>
<th>VARIANCE</th> <th> Tkt Number</th>
<th>RATE (%)</th>
<th>TAXABLE AMT (&#8377;)</th> <th>Tkt Amt</th>
<th>INTEGRATED TAX (&#8377;)</th> <th>Variance (&#8377;)</th>
<th>CENTRAL TAX (&#8377;)</th> <th hidden>Inv Remarks</th>
<th>STATE/UT TAX (&#8377;)</th> <th>GSTR2A Remarks</th>
<th>GSTR2A REMARKS</th> <th>Inv File</th>
<th>INVOICE REMARKS</th>
<th> TICKET NUMBER</th> <th>Tax Amt</th>
<th>TICKET AMT</th> <th>CGST(&#8377;)</th>
<th>INVOICE FILE</th> <th>SGST(&#8377;)</th>
<th>INVOICE</th> <th>IGST (&#8377;)</th>
<th>MANUAL TKT NO</th> <th>Rate (%)</th>
<th>TKT Amt</th>
<th>Inv</th>
<th>IGST</th>
<!-- <th>TICKET NO</th> --> <!-- <th>TICKET NO</th> -->
<th>DELETE</th>
<!-- <!--
19
--> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<!-- <td></td> -->
</tbody> </tbody>
</table> </table>
</div><div class="modal fade" id="columnModal" tabindex="-1" role="dialog" aria-labelledby="columnModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="columnModalLabel">Select Column to Display</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<label for="selectColumn">Select Column:</label>
<select style="overflow-y:scroll" name="column_name" id="column_name" class="form-control selectpicker" multiple><p>GSTR@A</p>
<option value="1">CORPORATE NAME</option>
<option value="2">CORPORATE GSTIN</option>
<option value="3">TRADE/LEGAL NAME OF THE SUPPLIER</option>
<option value="4">SUPPLIER TYPE</option>
<option selected="selected" value="5">INVOICE NUMBER</option>
<!-- <option selected="selected" value="5">MANUAL TICKET NO.</option>
<option selected="selected" value="6">TICKET NO.</option> -->
<option value="8">DOCUMENT TYPE</option>
<option selected="selected" value="9">INVOICE DATE</option>
<option selected="selected" value="10">INVOICE AMT (&#8377;)</option>
<option selected="selected" value="11">TICKET AMT</option>
<option selected="selected"value="12">VARIANCE</option>
<option selected="selected" value="13">RATE (%)</option>
<option selected="selected" value="14">TAXABLE AMT (&#8377;)</option>
<option selected="selected"value="15">CENTRAL TAX (&#8377;)</option>
<option selected="selected" value="16">STATE/UT TAX (&#8377;)</option>
<option selected="selected" value="18">GSTR2A REMARKS</option>
<option selected="selected"value="19">INVOICE REMARKS</option>
<option selected="selected"value="20">TICKET NUMBER </option>
<option selected="selected"value="21">TICKET AMT</option>
<option selected="selected"value="22">INVOICE FILE</option>
<option selected="selected"value="24">DELETE</option>
<option selected="selected" value="0">Icon for Select Option</option>
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="applyColumn">Apply Column</button>
</div>
</div>
</div>
</div>
</div> <!-- end card body--> </div> <!-- end card body-->
</div> <!-- end card --> </div> <!-- end card -->
@ -206,9 +364,9 @@
</div> </div>
<!-- end row--> <!-- end row-->
</div> <!-- container --> <!-- </div> container -->
</div> <!-- content --> <!-- </div> content -->
<?php include('includes/footer.php'); ?> <?php include('includes/footer.php'); ?>
</div> </div>
@ -496,6 +654,7 @@
oTable.clear(); oTable.clear();
var jsonData = JSON.parse(data); var jsonData = JSON.parse(data);
console.log(jsonData); console.log(jsonData);
var jd = jsonData.data; var jd = jsonData.data;
var htmlData = ''; var htmlData = '';
var i = 0; var i = 0;
@ -616,7 +775,7 @@
// $('#from').val('01-01-2023'); // $('#from').val('01-01-2023');
oTable = $("#scroll-horizontal-datatable").DataTable({ oTable = $("#datatable-buttons").DataTable({
lengthChange: !1, lengthChange: !1,
// dom: 'Bfrtip', // dom: 'Bfrtip',
@ -624,7 +783,7 @@
{ {
extend: "csvHtml5", extend: "csvHtml5",
exportOptions: { exportOptions: {
columns: [ 0, 1, 2, 3, 4, 23, 24, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,22] columns: [ 1, 2, 3, 4,5,8,9,10,12,13,14,15,18,19,20,25 ]
} }
} }
@ -657,6 +816,7 @@
$(".dataTables_paginate > .pagination").addClass("pagination-rounded") $(".dataTables_paginate > .pagination").addClass("pagination-rounded")
}, },
columns : [ columns : [
{ data: null, defaultContent: '', orderable: false },
{ data : "corpname"}, { data : "corpname"},
{ data : "corpgstin"}, { data : "corpgstin"},
{ data : "gd_supplier_name"}, { data : "gd_supplier_name"},
@ -667,24 +827,28 @@
{ data : "gd_doc_type"}, { data : "gd_doc_type"},
{ data : "gd_inv_date"}, { data : "gd_inv_date"},
{ data : "gd_inv_value"}, { data : "gd_inv_value"},
{ data : "td_tkt_fare"}, { data : "gd_inv_value"},
{ data : "variance"}, { data : "td_tkt"},
{ data : "gd_rate_perc"}, { data : "td_tkt_fare"},
{ data: "variance", defaultContent: '' },
{ data : "gd_remarks"},
{ data : "ti_file_name"},
{ data : "gd_taxable_value"}, { data : "gd_taxable_value"},
{ data : "gd_integrated_tax"}, { data : "gd_integrated_tax"},
{ data : "gd_central_tax"}, { data : "gd_central_tax"},
{ data : "gd_state_tax"}, { data : "gd_state_tax"},
{ data : "gd_remarks"},
{ data : "gd_file_status"}, { data : "gd_integrated_tax"},
{ data : "gd_tkt_no"},
{ data : "td_tkt_fare"},
{ data : "ti_file_name"},
{ data : "gd_tkt_no"}, { data : "gd_rate_perc"},
{ data : "td_tkt"}, { data : "gd_state_tax"},
{ data : "gd_id"} { data : "gd_id"}
// { data : "c_name"}, // { data : "c_name"},
// { data : "td_tkt"}, // { data : "td_tkt"},
@ -695,11 +859,12 @@
], ],
"columnDefs": [ "columnDefs": [
{ {
"targets": [0,1,2,3,23,6,5,10,22,23], "targets": [1,2,3,4,24,7,6,11,23,21,24],
"visible": false "visible": false
}, },
{ {
"targets": 3, "targets": 4,
"width": "12%", "width": "12%",
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
if(data == '') if(data == '')
@ -712,22 +877,23 @@
} }
} }
}, },
{
"targets": 19, // {
"width": "12%", // "targets": 20,
"render": function ( data, type, full, meta ) { // "width": "12%",
if(full['inv'] != " "){ // "render": function ( data, type, full, meta ) {
// if(full['inv'] != " "){
// return ''full['tkt'] != " " ? full['tkt']:full['tpnr']'' // // return ''full['tkt'] != " " ? full['tkt']:full['tpnr']''
// return ''+full['tkt']+'' // // return ''+full['tkt']+''
return full['tkt'] != "---" ? full['tkt'] : full['tpnr'] // return full['tkt'] != "---" ? full['tkt'] : full['tpnr']
}else // }else
return '<input type="text" class="form-control search" style="display:inline" id="thisval_'+full['gd_id']+'" value="'+data+'" /><a style="margin-left:5px;margin-right:5px;" class="edit_btn" href="javascript:void(0)" onclick="onblurfn('+full['gd_id']+')"><i class="fa fa-search"></i></a>'; // return '<input type="text" class="form-control search" style="display:inline" id="thisval_'+full['gd_id']+'" value="'+data+'" /><a style="margin-left:5px;margin-right:5px;" class="edit_btn" href="javascript:void(0)" onclick="onblurfn('+full['gd_id']+')"><i class="fa fa-search"></i></a>';
} // }
}, // },
{ {
"targets": 6, "targets": 7,
"width": "12%", "width": "12%",
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
if(data == '') if(data == '')
@ -735,47 +901,48 @@
return data; return data;
} }
}, },
{ // {
"targets": 20, // "targets": 21,
"width": "12%", // "width": "12%",
"render": function ( data, type, full, meta ) { // "render": function ( data, type, full, meta ) {
if(full['inv'] != " "){ // if(full['inv'] != " "){
return ''+full['amt']+''; // return ''+full['amt']+'';
}else // }else
return '<input type="text" class="form-control" style="display:inline" id="thisvalm_'+full['gd_id']+'" value="'+data+'" /><a style="margin-left:5px;margin-right:5px;" class="edit_btn" href="javascript:void(0)" onclick="onblurfn_amt('+full['gd_id']+')"><i class="fa fa-arrow-right"></i></a>'; // return '<input type="text" class="form-control" style="display:inline" id="thisvalm_'+full['gd_id']+'" value="'+data+'" /><a style="margin-left:5px;margin-right:5px;" class="edit_btn" href="javascript:void(0)" onclick="onblurfn_amt('+full['gd_id']+')"><i class="fa fa-arrow-right"></i></a>';
} // }
}, // },
// { // {
// "targets": 17, // "targets": 18,
// "width": 300, // "width": 300,
// "render": function ( data, type, full, meta ) { // "render": function ( data, type, full, meta ) {
// if(data == '') // if(data == '')
// data = ''; // data = '';
// return '<input type="text" class="form-control" data-refid="'+full['gd_id']+'" value="'+data+'" onblur="onblurrfn('+full['gd_id']+',this.value)" />'; // return '<span class="form-control" data-refid="'+full['gd_id']+'">'+data+'</span>'
// }
// }, // }
{ // },
"targets": 18, // {
"width": 300, // "targets": 19,
"render": function ( data, type, full, meta ) { // "width": 300,
if(full['inv'] != " "){ // "render": function ( data, type, full, meta ) {
return 'Invoice Received'; // if(full['inv'] != " "){
// return('.search').hide(); // return 'Invoice Received';
} else if (full['ti_recieved'] ==="0") { // // return('.search').hide();
return 'Invoice Received (Manual)'; // } else if (full['ti_recieved'] ==="0") {
} // return 'Invoice Received (Manual)';
else{ // }
return 'Invoice Not Received'; // else{
// return 'Invoice Not Received';
} // }
} // }
}, // },
{ {
"targets": 21, "targets": 16,
"width": 300, "width": 300,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
if(full['inv'] != " "){ if(full['inv'] != " "){
@ -790,19 +957,19 @@
}, },
{ // {
"targets": 19, // "targets": 20,
"width": 300, // "width": 300,
"render": function ( data, type, full, meta ) { // "render": function ( data, type, full, meta ) {
if(full['inv'] != " "){ // if(full['inv'] != " "){
return '' // return ''
}else // }else
return '<button type="text" class="form-control" data-refid="'+full['gd_id']+'" value="'+data+'" onclick="viewfn('+full['gd_id']+',0)" >View</button>'; // return '<button type="text" class="form-control" data-refid="'+full['gd_id']+'" value="'+data+'" onclick="viewfn('+full['gd_id']+',0)" >View</button>';
} // }
}, // },
{ {
"targets": 24, "targets": 25,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
return '<a onclick="deletegst2rarecon('+data+')" style="font-size:16px;"><i class="fa fa-trash" title="Delete"></i></a>' return '<a onclick="deletegst2rarecon('+data+')" style="font-size:16px;"><i class="fa fa-trash" title="Delete"></i></a>'
} }
@ -821,13 +988,14 @@
] ]
}); });
oTable.buttons().container().appendTo("#scroll-horizontal-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ oTable.buttons().container().appendTo("#datatable-buttons_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({
pagingType: "full_numbers", pagingType: "full_numbers",
drawCallback: function () { drawCallback: function () {
$(".dataTables_paginate > .pagination").addClass("pagination-rounded") $(".dataTables_paginate > .pagination").addClass("pagination-rounded")
} }
}); });
}); });
$('#column_name').selectpicker(); $('#column_name').selectpicker();
@ -844,6 +1012,30 @@
oTable.columns(remaining_column).visible(false); oTable.columns(remaining_column).visible(false);
}); });
// $(document).ready(function() {
// // DataTable initialization and configuration
// var oTable = $("#datatable-buttons").DataTable({
// // Your DataTable configuration here
// });
// // Attach a click event handler to the eye button to open the modal
// $('#toggle-column-modal-button').click(function () {
// $('#columnModal').modal('show');
// });
// // Handle the click event of the "Apply Columns" button in the modal
// $('#applyColumns').click(function() {
// // Loop through all checkboxes and show/hide columns accordingly
// for (var i = 0; i < totalColumns; i++) {
// var isChecked = $('#column' + i).is(':checked');
// oTable.column(i).visible(isChecked);
// }
// // Close the modal
// $('#columnModal').modal('hide');
// });
// });
// $('#scroll-horizontal-datatable tbody').on('click', 'tr', function () { // $('#scroll-horizontal-datatable tbody').on('click', 'tr', function () {
// }); // });
@ -922,7 +1114,7 @@
}) })
}; };
$('#scroll-horizontal-datatable').on('click', 'tbody .tktdelredraw', function () { $('#datatable-buttons').on('click', 'tbody .tktdelredraw', function () {
var rowref = $(this).closest('tr'); var rowref = $(this).closest('tr');
var refid = $('#refval').val(); var refid = $('#refval').val();
var refgsttkt = $('#refval_gst_tkt').val(); var refgsttkt = $('#refval_gst_tkt').val();
@ -942,7 +1134,7 @@
}) })
}) })
$('#scroll-horizontal-datatable').on('click', 'tbody .edit_btn', function () { $('#datatable-buttons').on('click', 'tbody .edit_btn', function () {
var rowref = $(this).closest('tr'); var rowref = $(this).closest('tr');
// alert($('#refval_gettkts').val()); // alert($('#refval_gettkts').val());
if($('#refval_gettkts').val() == 'yes'){ if($('#refval_gettkts').val() == 'yes'){
@ -1078,6 +1270,75 @@
} }
</script> </script>
<script>
// Adjust the width of the table cells to match the header cells
function adjustTableCellWidths() {
const headerCells = document.querySelectorAll('.table-container thead th');
const dataCells = document.querySelectorAll('.table-container tbody tr:first-child td');
for (let i = 0; i < headerCells.length; i++) {
dataCells[i].style.width = headerCells[i].offsetWidth + 'px';
}
}
// Call the adjustTableCellWidths function when the page loads and when the window is resized
window.addEventListener('load', adjustTableCellWidths);
window.addEventListener('resize', adjustTableCellWidths);
</script>
<script>
var oTable;
$(document).ready(function() {
// oTable = $("#datatable-buttons").DataTable({
// Your DataTable configuration here
});
$('#toggle-column-modal-button').click(function() {
$('#columnModal').modal('show');
});
$('#applyColumn').click(function() {
var selectedColumns = $('#column_name').val();
if (selectedColumns && selectedColumns.length > 0) {
// Array of all column indices
var allColumns = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "23"];
// Convert selected column indices to integers
selectedColumns = selectedColumns.map(Number);
// Calculate the remaining columns to hide
var remainingColumns = allColumns.filter(function(column) {
return selectedColumns.indexOf(parseInt(column)) === -1;
});
// Show selected columns and hide remaining columns
oTable.columns(selectedColumns).visible(true);
oTable.columns(remainingColumns).visible(false);
// Close the modal
$('#columnModal').modal('hide');
}
});
});
</script>
<script>
// Set the default value to today
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0'); // January is 0!
var yyyy = today.getFullYear();
var todayFormatted = yyyy + '-' + mm + '-' + dd;
document.getElementById('TO').value = todayFormatted;
</script>
<!-- Long Content Scroll Modal --> <!-- Long Content Scroll Modal -->
<div class="modal fade" id="scrollable-modal" tabindex="-1" role="dialog" <div class="modal fade" id="scrollable-modal" tabindex="-1" role="dialog"
aria-labelledby="scrollableModalTitle" aria-hidden="true"> aria-labelledby="scrollableModalTitle" aria-hidden="true">

View File

@ -1,85 +1,22 @@
<!-- Topbar Start --> <!-- Topbar Start -->
<html>
<head>
<style>
.navbar-custom {
font-size: 11px;
padding: 5px; /* Adjust the padding as needed to decrease the spacing */
}
</style>
</head>
<body>
<div class="navbar-custom" style="background-color: #114E8B;"> <div class="navbar-custom" style="background-color: #114E8B;">
<div class="container-fluid"> <div class="container-fluid">
<ul class="list-unstyled topnav-menu float-right mb-0"> <ul class="list-unstyled topnav-menu float-right mb-0">
<li class="dropdown d-none d-lg-inline-block">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
<i class="fe-maximize noti-icon"></i> <li class="nav-item dropdown">
</a>
</li> <li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<img src="<?php echo base_url(); ?>assets/images/users/avatar-1.jpg" alt="user-image" class="rounded-circle">
<span class="pro-user-name ml-1">
<?php echo $this->session->userdata['recon_sess_i']['u_name']; ?> <i class="mdi mdi-chevron-down"></i>
</span>
</a>
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
<!-- item-->
<div class="dropdown-header noti-title">
<h6 class="text-overflow m-0">Welcome !</h6>
</div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-settings-3-line"></i>
<span>Settings</span>
</a>
<div class="dropdown-divider"></div>
<!-- item-->
<a href="<?php echo base_url('logout'); ?>" class="dropdown-item notify-item">
<i class="ri-logout-box-line"></i>
<span>Logout</span>
</a>
</div>
</li>
<!--
<li class="dropdown notification-list">
<a href="javascript:void(0);" class="nav-link right-bar-toggle waves-effect waves-light">
<i class="fe-settings noti-icon"></i>
</a>
</li>
-->
</ul>
<!-- LOGO -->
<div class="logo-box">
<a href="<?php echo base_url('corporate'); ?>" class="logo logo-dark text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="24">
<!-- <span class="logo-lg-text-light">Minton</span> -->
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="30">
<!-- <span class="logo-lg-text-light">M</span> -->
</span>
</a>
<a href="<?php echo base_url('corporate'); ?>" class="logo logo-light text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="24">
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="30">
</span>
</a>
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- end Topbar -->
<div class="topnav">
<div class="container-fluid">
<nav class="navbar navbar-light navbar-expand-lg topnav-menu">
<div class="collapse navbar-collapse" id="topnav-menu-content">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button" <a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> Files <div class="arrow-down"></div> <i class="ri-dashboard-line mr-1"></i> Files <div class="arrow-down"></div>
@ -110,7 +47,7 @@
<div class="dropdown-menu" aria-labelledby="topnav-dashboard"> <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/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_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> </div>
</li> </li>
<?php if ($this->session->flashdata('corporate_id') != 1) { ?> <?php if ($this->session->flashdata('corporate_id') != 1) { ?>
@ -128,9 +65,79 @@
<!-- <a href="<?php echo site_url('corporate/p_payment_advice'); ?>" class="dropdown-item">Client Upload 2</a>--> <!-- <a href="<?php echo site_url('corporate/p_payment_advice'); ?>" class="dropdown-item">Client Upload 2</a>-->
</div> </div>
</li> </li>
<?php } ?> <?php } ?>
</ul> <!-- end navbar-->
</div> <!-- end .collapsed--> <li class="dropdown notification-list topbar-dropdown">
</nav> <a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
</div> <!-- end container-fluid --> <img src="<?php echo base_url(); ?>assets/images/users/avatar-1.jpg" alt="user-image" class="rounded-circle">
</div> <!-- end topnav--> <span class="pro-user-name ml-1">
<?php echo $this->session->userdata['recon_sess_i']['u_name']; ?> <i class="mdi mdi-chevron-down"></i>
</span>
</a>
<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
<!-- item-->
<div class="dropdown-header noti-title">
<h6 class="text-overflow m-0">Welcome !</h6>
</div>
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<i class="ri-settings-3-line"></i>
<span>Settings</span>
</a>
<div class="dropdown-divider"></div>
<!-- item-->
<a href="<?php echo base_url('logout'); ?>" class="dropdown-item notify-item">
<i class="ri-logout-box-line"></i>
<span>Logout</span>
</a>
</div>
</li>
<li class="dropdown d-none d-lg-inline-block">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
<i class="fe-maximize noti-icon"></i>
</a>
</li>
<!--
<li class="dropdown notification-list">
<a href="javascript:void(0);" class="nav-link right-bar-toggle waves-effect waves-light">
<i class="fe-settings noti-icon"></i>
</a>
</li>
-->
</ul>
<!-- LOGO -->
<div class="logo-box">
<a href="<?php echo base_url('corporate'); ?>" class="logo logo-dark text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="20">
<!-- <span class="logo-lg-text-light">Minton</span> -->
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="20">
<!-- <span class="logo-lg-text-light">M</span> -->
</span>
</a>
<a href="<?php echo base_url('corporate'); ?>" class="logo logo-light text-center">
<span class="logo-sm">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="20">
</span>
<span class="logo-lg">
<img src="<?php echo base_url(); ?>assets/images/tsplogin.png" alt="" height="20">
</span>
</a>
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- end Topbar -->
</body>
</html>

View File

@ -40,6 +40,13 @@
.required { .required {
color: red; color: red;
} }
.footer
{
padding-top: 24px;
padding-right: 17px;
padding-bottom: 2px;
padding-left: 17px;
}
</style> </style>
@ -56,11 +63,11 @@
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page">
<div class="content"> <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <!-- <div class="container-fluid"> -->
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row">
@ -83,7 +90,7 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col-md-8"></div> <div class="col-md-8"><h5>TMC File Listing</h5></div>
<div class="col-md-2"> <div class="col-md-2">
<a class="btn btn-primary waves-effect waves-light" style="float:right" href="<?php echo base_url('corporate/tmc_sample_download') ?>" target="_blank"><i class="fa fa-download"></i>&nbsp;&nbsp;Sample</a> <a class="btn btn-primary waves-effect waves-light" style="float:right" href="<?php echo base_url('corporate/tmc_sample_download') ?>" target="_blank"><i class="fa fa-download"></i>&nbsp;&nbsp;Sample</a>
</div> </div>

View File

@ -51,6 +51,14 @@
.left{ .left{
} }
.footer
{
padding-top: 19px;
padding-right: 17px;
padding-bottom: 2px;
padding-left: 17px;
}
</style> </style>
</head> </head>
@ -66,11 +74,11 @@
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page"> -->
<div class="content"> <!-- <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <!-- <div class="container-fluid"> -->
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row">
@ -110,7 +118,7 @@
--> -->
<input id="fromdate" value="" type="hidden"> <input id="fromdate" value="" type="hidden">
<input id="todate" value="" type="hidden"> <input id="todate" value="" type="hidden">
<div class="form-group col-md-4">
<!-- <label class="col-lg-3 col-form-label">Date</label> <!-- <label class="col-lg-3 col-form-label">Date</label>
<div class="col-lg-12"> <div class="col-lg-12">
<div id="reportrange" class="pull-right form-control"> <div id="reportrange" class="pull-right form-control">
@ -118,20 +126,19 @@
<span></span> <span></span>
</div> </div>
</div> --> </div> -->
</div>
<div class="form-group col-md-2">
<!-- <label for="inputPassword4" class="col-form-label"></label> <!-- <label for="inputPassword4" class="col-form-label"></label>
<button style="margin-top:35px" type="submit" class="btn btn-primary">Submit</button> --> <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> <!-- <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="0">TICKET NO (TMC)</option>
<option value="1">INV NO (GST)</option> <option value="1">INV NO (GST)</option>
<option value="2">INV NO</option> <option value="2">INV NO</option>
<option value="3">PNR NO</option> <option value="3">PNR NO</option>
<option value="4">TICKET NO</option> <option value="4">TICKET NO</option>
<option value="5">TOTAL (INV)</option> <option value="5">TOTAL (INV)</option> -->
<!-- <option value="6">RECIPIENT</option> <!-- <option value="6">RECIPIENT</option>
<option value="7">RECIPIENT GST</option> <option value="7">RECIPIENT GST</option>
<option value="8">INVOICE NUMBER</option> <option value="8">INVOICE NUMBER</option>
@ -151,14 +158,15 @@
<option value="19">TMC INV/CRN NO.-3</option> <option value="19">TMC INV/CRN NO.-3</option>
<option value="20">TMC INV/CRN NO.-4</option> <option value="20">TMC INV/CRN NO.-4</option>
--> -->
</select> <!-- </select> -->
</div>
</div> </div>
</form> </form>
</div> </div>
<div class="table-container">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap"> <table id="scroll-vertical-datatable" class="table dt-responsive nowrap w-100">
<!-- <table id="scroll-horizontal-datatable" class="table w-100 nowrap"> -->
<thead> <thead>
<tr> <tr>
@ -166,14 +174,14 @@
<th>PASS NAME(TMC)</TH> <th>PASS NAME(TMC)</TH>
<TH> AIRLINE(TMC)</TH> <TH> AIRLINE(TMC)</TH>
<TH>SECTOR(TMC)</TH> <TH>SECTOR(TMC)</TH>
<TH>TRAVEL DATE(TMC)</TH> <TH>TRAVEL DAT(TMC)E</TH>
<TH>TICKET NUMBER(TMC)</TH> <TH>TICKET NUMBER(TMC)</TH>
<TH>VALUE (TMC)</TH> <TH>VALUE (TMC)</TH>
<th>INV NO (GST)</th> <th>INV NO (GST)</th>
<th>INV NO(INV)</th> <th>INV NO(GST)</th>
<th>PNR NO(INV)</th> <th>PNR NO(GST)</th>
<th>TICKET NO(INV)</th> <th>TICKET NO(GST)</th>
<th>TOTAL (INV)</th> <th>TOTAL (GST)</th>
<!-- <th>RECIPIENT</th> <!-- <th>RECIPIENT</th>
<th>RECIPIENT GST</th> <th>RECIPIENT GST</th>
<th>INVOICE NUMBER</th> <th>INVOICE NUMBER</th>
@ -203,7 +211,7 @@
<?php foreach ($data as $value){ <?php foreach ($data as $value){
?> ?>
<tr> <tr>
<td><?php echo $value->tmc_tkt; ?></td> <td><?php echo $value->tmc_tkt; ?></td>
<td><?php echo $value->tmc_pax; ?></td> <td><?php echo $value->tmc_pax; ?></td>
<td><?php echo $value->tmc_airline; ?></td> <td><?php echo $value->tmc_airline; ?></td>
<td><?php echo $value->tmc_sector; ?></td> <td><?php echo $value->tmc_sector; ?></td>
@ -243,6 +251,7 @@
</tr> </tr>
<tbody> <tbody>
</table> </table>
</div>
<!-- </thead> <!-- </thead>
<tbody> <tbody>
</tbody> </tbody>
@ -255,11 +264,13 @@
<!-- end row--> <!-- end row-->
</div> <!-- container --> </div> <!-- container -->
<!--
</div> <!-- content --> </div> content -->
<?php include('includes/footer.php'); ?>
</div> <!-- </div>
</div> -->
<?php include('includes/footer.php'); ?>
</div> </div>
@ -305,6 +316,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css"> <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://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 --> <!-- App js -->
<script src="<?php echo base_url(); ?>assets/js/app.min.js"></script> <script src="<?php echo base_url(); ?>assets/js/app.min.js"></script>
@ -313,7 +325,7 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
oTable = $("#scroll-horizontal-datatable").DataTable({ oTable = $("#scroll-vertical-datatable").DataTable({
lengthChange: !1, lengthChange: !1,
// dom: 'Bfrtip', // dom: 'Bfrtip',
@ -343,7 +355,7 @@
//// className: "btn-light" //// className: "btn-light"
//// } //// }
// ], // ],
scrollX: !0, scrollX: !0,
language: { language: {
paginate: { paginate: {
previous: "<i class='mdi mdi-chevron-left'>", previous: "<i class='mdi mdi-chevron-left'>",
@ -352,13 +364,13 @@ scrollX: !0,
} }
}); });
oTable.buttons().container().appendTo("#scroll-horizontal-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ oTable.buttons().container().appendTo("#scroll-vertical-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({
pagingType: "full_numbers", pagingType: "full_numbers",
drawCallback: function () { drawCallback: function () {
$(".dataTables_paginate > .pagination").addClass("pagination-rounded") $(".dataTables_paginate > .pagination").addClass("pagination-rounded")
} }
}); });
}); });
</script> </script>

View File

@ -34,8 +34,11 @@
<!-- icons --> <!-- icons -->
<link href="<?php echo base_url(); ?>assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <link href="<?php echo base_url(); ?>assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
<!-- Include the StickyTableHeaders plugin -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/StickyTableHeaders/0.1.1/jquery.stickytableheaders.min.js"></script>
<style>
.mb25{ .mb25{
margin-bottom: 25px; margin-bottom: 25px;
} }
@ -45,10 +48,70 @@
#bs-select-1{ #bs-select-1{
max-height: 150px !important; max-height: 150px !important;
overflow-y: auto !important; overflow-y: auto !important;
} }
</style> .left{
}
/* .form-group {
font-size: 11px;
padding: 5px; /* Adjust the padding as needed to decrease the spacing */
.table {
font-size: 12px;
border-spacing:0px;
}
.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;
}
.form-group {
margin-bottom: -2rem;
}
.row
{
margin-right:-15px;
}
div.dataTables_wrapper div.dataTables_info {
padding-top: 3.85em;
white-space: nowrap;
}
table.dataTable thead>tr>th.sorting_asc, table.dataTable thead>tr>th.sorting_desc, table.dataTable thead>tr>th.sorting, table.dataTable thead>tr>td.sorting_asc, table.dataTable thead>tr>td.sorting_desc, table.dataTable thead>tr>td.sorting {
padding-right: 70px;
}
/* Style the container for the table with a fixed header */
/* Style the container for the table with a fixed header */
</style>
</head> </head>
<body class="loading" data-layout-mode="horizontal" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'> <body class="loading" data-layout-mode="horizontal" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'>
@ -56,125 +119,222 @@
<!-- Begin page --> <!-- Begin page -->
<div id="wrapper"> <div id="wrapper">
<?php include('includes/top_nav.php'); ?> <?php include('includes/top_nav.php'); ?>
<!-- ============================================================== --> <!-- ============================================================== -->
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page"> -->
<div class="content"> <!-- <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid">
<!-- start page title --> <!-- start page title -->
<div class="row"> <!-- <div class="row">
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4 class="page-title">TMC</h4> <h4 class="page-title">GSTR2A</h4>
<div class="page-title-right"> <div class="page-title-right">
<ol class="breadcrumb m-0"> <ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li> <li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">TMC</li> <li class="breadcrumb-item active">GSTR2A</li>
</ol> </ol>
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
<!-- end page title --> <!-- end page title -->
<!-- <div class="row">
<div class="card"> <div class="col-12">
<div class="card-body"> <div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:20px;">
<form class="col-md-12" id="formid"> <div class="row" style="margin-bottom:30px;">
<div class="form-row"> <form class="col-md-12" id="formid">
<div class="row">
<div class="col-12"style="margin-bottom:30px;">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">GSTR2A</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">GSTR2A</li>
</ol>
</div>
</div>
</div>
</div> -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Gstr2a</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">Gstr2a</li>
</ol>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:20px;">
<form class="col-md-12" id="formid">
<div class="form-row">
<!-- <!--
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label for="inputEmail4" class="col-form-label">GST No</label> <label for="inputEmail4" class="col-form-label">GST No</label>
<select name="gst_no" class="form-control"> <select name="gst_no" class="form-control">
<?php <?php
// foreach($gstno_list->result() as $gstno_i){ // foreach($gstno_list->result() as $gstno_i){
// echo '<option>'.$gstno_i->gn_gstno.'</option>'; // echo '<option>'.$gstno_i->gn_gstno.'</option>';
// } // }
?> ?>
</select> </select>
</div> </div>
--> -->
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label> FROM &nbsp;&nbsp;</label> <label> FROM &nbsp;&nbsp;</label>
<input type="date" id="from" name="from" value="2020-01-01" > <input type="date" id="from" name="from" value="2020-01-01" >
&nbsp;&nbsp; &nbsp;&nbsp;
<label> TO &nbsp;&nbsp;</label> <label> TO &nbsp;&nbsp;</label>
<input type="date" id="TO" name="to" value="2023-01-01" &nbsp;&nbsp;> <input type="date" id="TO" name="to" value="2023-01-01" &nbsp;&nbsp;>
&nbsp;&nbsp; &nbsp;&nbsp;
</div> </div>
<div class="form-group col-md-2">
<label for="inputPassword4" class="col-form-label"></label> <div class="form-group col-md-2">
<button style="margin-top:0px;font-size: 10px;" type="submit" class="btn btn-primary">Submit</button> <label for="inputPassword4" class="col-form-label"></label>
</div> <button style="margin-top:0px;font-size:10px;" type="submit" class="btn btn-primary">Submit</button><br>
<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 selected="selected" value="0">SEGMENT</option>
<option selected="selected" value="1">INV DATE </option>
<option selected="selected" value="2">TMC INVOICE NO</option>
<!-- <option selected="selected" value="3">REF NO</option> -->
<option selected="selected" value="4">DOC TYPE</option>
<option selected="selected"value="5">BILLING ENTITY</option>
<option selected="selected" value="6">PASSENGER NAME</option>
<option selected="selected"value="7">AIRLINE CODE</option>
<option selected="selected"value="8">TICKET NO</option>
<option selected="selected"value="9">SECTOR</option>
<option selected="selected"value="10">CABINCLASS</option>
<option selected="selected"value="11">TOTAL TKT FARE</option>
<option selected="selected"value="12">REMARKS</option>
<option selected="selected"value="13">ACTION</option>
</select>
</div>
</div>
</form>
</div> </div>
<div class="col-md-2"></div>
<table id="scroll-horizontal-datatable" class="table w-100 nowrap"> <div class="form-group col-md-3" id="hidden-dropdown">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li> -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li class="breadcrumb-item active">TMC</li>
</ol>
</div>
<!-- <select style="overflow-y:scroll" name="column_name" id="column_name" class="form-control selectpicker" multiple><p>GSTR@A</p>
<option value="1">CORPORATE NAME</option>
<option value="2">CORPORATE GSTIN</option>
<option value="3">TRADE/LEGAL NAME OF THE SUPPLIER</option>
<option value="4">SUPPLIER TYPE</option>
<option selected="selected" value="5">INVOICE NUMBER</option> -->
<!-- <option selected="selected" value="5">MANUAL TICKET NO.</option>
<option selected="selected" value="6">TICKET NO.</option> -->
<!-- <option selected="selected" value="8">DOCUMENT TYPE</option>
<option selected="selected" value="9">INVOICE DATE</option>
<option selected="selected" value="10">INVOICE AMT (&#8377;)</option>
<option selected="selected" value="11">TICKET AMT</option>
<option selected="selected"value="12">VARIANCE</option>
<option selected="selected" value="13">RATE (%)</option>
<option selected="selected" value="14">TAXABLE AMT (&#8377;)</option>
<option selected="selected"value="15">CENTRAL TAX (&#8377;)</option>
<option selected="selected" value="16">STATE/UT TAX (&#8377;)</option>
<option selected="selected" value="18">GSTR2A REMARKS</option>
<option selected="selected"value="19">INVOICE REMARKS</option>
<option selected="selected"value="20">TICKET NUMBER </option>
<option selected="selected"value="21">TICKET AMT</option>
<option selected="selected"value="22">INVOICE FILE</option>
<option selected="selected"value="24">DELETE</option>
</select> -->
</div>
</div>
</form>
</div>
<div class="table-container">
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
<!--
<table id="scroll-horizontal-datatable" class="table w-100 nowrap"> -->
<thead> <thead>
<tr> <tr>
<th>SEGMENT</th> <th>
<th>INV DATE</th> <button id="toggle-column-modal-button" class="btn btn-link" data-toggle="modal" data-target="#columnModal">
<th>TMC INVOICE NO</th> <i class="fa fa-eye"></i> </button>
<th>REF NO</th> <th>TICKET NO</th>
<th>DOC TYPE</th> <th>DOC TYPE</th>
<th>BILLING ENTITY</th> <th>PASSENGER NAME</th>
<th>PASSENGER NAME</th> <th>AIRLINE CODE</th>
<th>AIRLINE CODE</th> <th>TOTAL TKT FARE</th>
<th>TICKET NO</th> <th>INV Num</th>
<th>SECTOR</th> <th>Inv Amt </th>
<th>CABINCLASS</th> <th>INV DATE</th>
<th>TOTAL TKT FARE</th> <th>TMC INVOICE NO</th>
<th>NET FARE</th> <th>BILLING ENTITY</th>
<th>REMARKS</th> <th>BILLING ENTITY</th>
<th>ACTION</th> <th>SECTOR</th>
<th>CABINCLASS</th>
<th>NET FARE</th>
<th>REMARKS</th>
<th>ACTION</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
<div class="modal fade" id="columnModal" tabindex="-1" role="dialog" aria-labelledby="columnModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="columnModalLabel">Select Column to Display</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<label for="selectColumn">Select Column:</label>
<select style="overflow-y:scroll" name="column_name" id="column_name" class="form-control selectpicker" multiple>
<option selected="selected" value="1">SEGMENT</option>
<option selected="selected" value="2">INV DATE </option>
<option selected="selected" value="3">TMC INVOICE NO</option>
<!-- <option selected="selected" value="3">REF NO</option> -->
<option selected="selected" value="5">DOC TYPE</option>
<option selected="selected"value="6">BILLING ENTITY</option>
<option selected="selected" value="7">PASSENGER NAME</option>
<option selected="selected"value="8">AIRLINE CODE</option>
<option selected="selected"value="9">TICKET NO</option>
<option selected="selected"value="10">SECTOR</option>
<option selected="selected"value="11">CABINCLASS</option>
<option selected="selected"value="12">TOTAL TKT FARE</option>
<option selected="selected"value="13">REMARKS</option>
<option selected="selected"value="14">ACTION</option>
<option selected="selected" value="0">Icon for Select Option</option>
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="applyColumn">Apply Column</button>
</div>
</div>
</div>
</div>
</div> <!-- end card body--> </div> <!-- end card body-->
</div> <!-- end card --> </div> <!-- end card -->
<!-- end col--> </div><!-- end col-->
</div>
<!-- end row--> <!-- end row-->
</div> <!-- container --> <!-- </div> container -->
</div> <!-- content --> <!-- </div> content -->
<input type="hidden" id="refval" /> <input type="hidden" id="refval" />
<input type="hidden" id="refval_gst_tkt" /> <input type="hidden" id="refval_gst_tkt" />
<?php include('includes/footer.php'); ?> <?php include('includes/footer.php'); ?>
@ -626,8 +786,10 @@ function() {
} }
$(document).ready(function() { $(document).ready(function() {
oTable = $("#scroll-horizontal-datatable").DataTable({ oTable = $("#datatable-buttons").DataTable({
lengthChange: !1, lengthChange: !1,
dom: 'Bfrtip', dom: 'Bfrtip',
buttons: [ buttons: [
@ -659,7 +821,7 @@ function() {
scrollX: !0, scrollX: true,
language: { language: {
paginate: { paginate: {
previous: "<i class='mdi mdi-chevron-left'>", previous: "<i class='mdi mdi-chevron-left'>",
@ -670,39 +832,32 @@ function() {
$(".dataTables_paginate > .pagination").addClass("pagination-rounded") $(".dataTables_paginate > .pagination").addClass("pagination-rounded")
}, },
columns : [ columns : [
{ data : "td_segment"}, { data: null, defaultContent: '', orderable: false },
{ data : "td_inv_date"}, { data : "td_tkt"},
{ data : "td_gst_inv"}, { data : "td_doc_type"},
{ data : "td_gst_inv"}, { data : "td_pax"},
{ data : "td_doc_type"}, { data : "td_segment"},
{ data : "td_billing_entity"}, { data : "td_tkt_fare"},
{ data : "td_pax"}, { data : "inv"},
{ data : "td_carrier"}, { data : "amt",defaultContent: ''},
{ data : "td_tkt"}, { data : "tdate", defaultContent: ''},
{ data : "td_sector"}, { data : "td_gst_inv"},
{ data : "td_cabin_class"}, { data : "td_billing_entity"},
{ data : "td_tkt_fare"}, { data : "td_carrier"},
{ data : "td_net"}, { data : "td_sector"},
{ data : "d_remarks"}, { data : "td_cabin_class"},
{ data : "td_id"} { data : "td_net"},
{ data : "d_remarks"},
{ data : "td_id"}
], ],
"columnDefs": [ "columnDefs": [
{ {
"targets":3, "targets":11,
"visible": false "visible": false
}, },
{ {
"targets": 5, "targets":10,
"width": "12%",
"render": function ( data, type, full, meta ) {
if(data == '')
data = '';
return data;
}
},
{
"targets": 6,
"width": "12%", "width": "12%",
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
if(data == '') if(data == '')
@ -710,8 +865,18 @@ function() {
return data; return data;
} }
}, },
// {
// "targets":3,
// "width": "12%",
// "render": function ( data, type, full, meta ) {
// if(data == '')
// data = '';
// return data;
// }
// },
{ {
"targets": 13, "targets": 15,
"width": 300, "width": 300,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
console.log(full['inv']); console.log(full['inv']);
@ -728,7 +893,7 @@ function() {
}, },
{ {
"targets": 14, "targets": 16,
"width": 300, "width": 300,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
console.log(full['inv']); console.log(full['inv']);
@ -741,11 +906,50 @@ function() {
} }
} }
}, },
{
"targets": 6,
"width": 300,
"render": function (data, type, full, meta) {
// Check if invoice number is available
if (data && data.trim() !== "") {
return '' + data; // Show invoice number
} else {
// Check if GST number is available
var gstNumber = full['ti_gst_nub'] || '';
if (gstNumber.trim() !== "") {
return ' ' + gstNumber; // Show GST number
} else {
return ''; // Both invoice and GST numbers are empty
}
}
}
},
{
"targets": 7,
"width": 300,
"render": function (data, type, full, meta) {
// Check if invoice number is available
if (data && data.trim() !== "") {
return '' + data; // Show invoice number
} else {
// Check if ti_amount is available
var tiAmount = full['ti_amount'] || '';
if (tiAmount.trim() !== "") {
return ' ' + tiAmount; // Show ti_amount
} else {
return ''; // Both invoice and ti_amount are empty
}
}
}
},
] ]
}); });
oTable.buttons().container().appendTo("#scroll-horizontal-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ oTable.buttons().container().appendTo("#datatable-buttons_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({
pagingType: "full_numbers", pagingType: "full_numbers",
drawCallback: function () { drawCallback: function () {
$(".dataTables_paginate > .pagination").addClass("pagination-rounded") $(".dataTables_paginate > .pagination").addClass("pagination-rounded")
@ -860,6 +1064,56 @@ function() {
} }
</script> </script>
<script>
var oTable;
$(document).ready(function() {
// oTable = $("#datatable-buttons").DataTable({
// Your DataTable configuration here
});
$('#toggle-column-modal-button').click(function() {
$('#columnModal').modal('show');
});
$('#applyColumn').click(function() {
var selectedColumns = $('#column_name').val();
if (selectedColumns && selectedColumns.length > 0) {
// Array of all column indices
var allColumns = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"];
// Convert selected column indices to integers
selectedColumns = selectedColumns.map(Number);
// Calculate the remaining columns to hide
var remainingColumns = allColumns.filter(function(column) {
return selectedColumns.indexOf(parseInt(column)) === -1;
});
// Show selected columns and hide remaining columns
oTable.columns(selectedColumns).visible(true);
oTable.columns(remainingColumns).visible(false);
// Close the modal
$('#columnModal').modal('hide');
}
});
</script>
<script>
// Set the default value to today
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0'); // January is 0!
var yyyy = today.getFullYear();
var todayFormatted = yyyy + '-' + mm + '-' + dd;
document.getElementById('TO').value = todayFormatted;
</script>
<!-- Long Content Scroll Modal --> <!-- Long Content Scroll Modal -->
<div class="modal fade" id="scrollable-modal" tabindex="-1" role="dialog" <div class="modal fade" id="scrollable-modal" tabindex="-1" role="dialog"
aria-labelledby="scrollableModalTitle" aria-hidden="true"> aria-labelledby="scrollableModalTitle" aria-hidden="true">

View File

@ -48,6 +48,9 @@
.cardtop{ .cardtop{
margin-top: 1.5rem; margin-top: 1.5rem;
} }
.mt-5, .my-5 {
margin-top: 1.5rem!important;
}
</style> </style>
</head> </head>

View File

@ -1,8 +1,37 @@
<!-- Topbar Start --> <!-- Topbar Start -->
<div class="navbar-custom" style="background-color: #114E8B;"> <html>
<head>
<style>
.navbar-custom {
font-size: 11px;
padding: 5px; /* Adjust the padding as needed to decrease the spacing */
}
</style>
<div class="navbar-custom" style="background-color: #114E8B;">
<div class="container-fluid"> <div class="container-fluid">
<ul class="list-unstyled topnav-menu float-right mb-0"> <ul class="list-unstyled topnav-menu float-right mb-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> Files <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
<a href="<?php echo site_url('tmc/dashboard'); ?>" class="dropdown-item">Dashboard</a>
<a href="<?php echo site_url('tmc/tmc'); ?>" class="dropdown-item">TMC</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-pages-line mr-1"></i> Reconciliation <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
<a href="<?php echo site_url('tmc/tmc_recon'); ?>" class="dropdown-item">TMC</a>
</div>
</li>
<li class="dropdown d-none d-lg-inline-block"> <li class="dropdown d-none d-lg-inline-block">
<a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#"> <a class="nav-link dropdown-toggle arrow-none waves-effect waves-light" data-toggle="fullscreen" href="#">
<i class="fe-maximize noti-icon"></i> <i class="fe-maximize noti-icon"></i>
@ -76,33 +105,6 @@
</div> </div>
<!-- end Topbar --> <!-- end Topbar -->
<div class="topnav">
<div class="container-fluid"> </head>
<nav class="navbar navbar-light navbar-expand-lg topnav-menu"> </html>
<div class="collapse navbar-collapse" id="topnav-menu-content">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> Files <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
<a href="<?php echo site_url('tmc/dashboard'); ?>" class="dropdown-item">Dashboard</a>
<a href="<?php echo site_url('tmc/tmc'); ?>" class="dropdown-item">TMC</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-pages-line mr-1"></i> Reconciliation <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
<a href="<?php echo site_url('tmc/tmc_recon'); ?>" class="dropdown-item">TMC</a>
</div>
</li>
</ul> <!-- end navbar-->
</div> <!-- end .collapsed-->
</nav>
</div> <!-- end container-fluid -->
</div> <!-- end topnav-->

View File

@ -40,6 +40,13 @@
.required { .required {
color: red; color: red;
} }
.footer
{
padding-top: 24px;
padding-right: 17px;
padding-bottom: 2px;
padding-left: 17px;
}
</style> </style>
@ -56,11 +63,11 @@
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page">
<div class="content"> <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid"> <!-- <div class="container-fluid"> -->
<!-- start page title --> <!-- start page title -->
<div class="row"> <div class="row">
@ -83,7 +90,7 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
<div class="col-md-8"></div> <div class="col-md-8"><h5>TMC File Listing</h5></div>
<div class="col-md-2"> <div class="col-md-2">
<a class="btn btn-primary waves-effect waves-light" style="float:right" href="<?php echo base_url('corporate/tmc_sample_download') ?>" target="_blank"><i class="fa fa-download"></i>&nbsp;&nbsp;Sample</a> <a class="btn btn-primary waves-effect waves-light" style="float:right" href="<?php echo base_url('corporate/tmc_sample_download') ?>" target="_blank"><i class="fa fa-download"></i>&nbsp;&nbsp;Sample</a>
</div> </div>
@ -155,11 +162,11 @@
<div class="form-group"> <div class="form-group">
<div class="row"> <div class="row">
<div class="col-md-6 mb25"> <div class="col-md-4 mb25">
<label>Agent<span class="required">*</span></label> <label>Agent<span class="required">*</span></label>
<input value="testagent" onkeyup="this.value = this.value.toUpperCase();" required type="text" name="usr[f_agent]" id="" class="form-control" /> <input value="testagent" onkeyup="this.value = this.value.toUpperCase();" required type="text" name="usr[f_agent]" id="" class="form-control" />
</div> </div>
<div class="col-md-6 mb25"> <div class="col-md-4 mb25">
<label>Year<span class="required">*</span></label> <label>Year<span class="required">*</span></label>
<select required id="yearselect" class="form-control" name="usr[f_year]" onchange="showmonths(this.value)"> <select required id="yearselect" class="form-control" name="usr[f_year]" onchange="showmonths(this.value)">
<option value="">Select Year</option> <option value="">Select Year</option>
@ -171,7 +178,7 @@
?> ?>
</select> </select>
</div> </div>
<div id="curyear" class="col-md-6 mb25"> <div id="curyear" class="col-md-4 mb25">
<label>Month<span class="required">*</span></label> <label>Month<span class="required">*</span></label>
<select id="scuryear" name="usr[f_month]" class="form-control"> <select id="scuryear" name="usr[f_month]" class="form-control">
<option value="">Select</option> <option value="">Select</option>
@ -200,7 +207,7 @@
?> ?>
</select> </select>
</div> </div>
<div class="col-md-6 mb25"> <div class="col-md-7">
<label>File<span class="required">*</span></label> <label>File<span class="required">*</span></label>
<input required type="file" name="tmc_file" /> <input required type="file" name="tmc_file" />
</div> </div>

View File

@ -34,8 +34,11 @@
<!-- icons --> <!-- icons -->
<link href="<?php echo base_url(); ?>assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <link href="<?php echo base_url(); ?>assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
<!-- Include the StickyTableHeaders plugin -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/StickyTableHeaders/0.1.1/jquery.stickytableheaders.min.js"></script>
<style>
.mb25{ .mb25{
margin-bottom: 25px; margin-bottom: 25px;
} }
@ -45,10 +48,70 @@
#bs-select-1{ #bs-select-1{
max-height: 150px !important; max-height: 150px !important;
overflow-y: auto !important; overflow-y: auto !important;
} }
</style> .left{
}
/* .form-group {
font-size: 11px;
padding: 5px; /* Adjust the padding as needed to decrease the spacing */
.table {
font-size: 12px;
border-spacing:0px;
}
.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;
}
.form-group {
margin-bottom: -2rem;
}
.row
{
margin-right:-15px;
}
div.dataTables_wrapper div.dataTables_info {
padding-top: 3.85em;
white-space: nowrap;
}
table.dataTable thead>tr>th.sorting_asc, table.dataTable thead>tr>th.sorting_desc, table.dataTable thead>tr>th.sorting, table.dataTable thead>tr>td.sorting_asc, table.dataTable thead>tr>td.sorting_desc, table.dataTable thead>tr>td.sorting {
padding-right: 70px;
}
/* Style the container for the table with a fixed header */
/* Style the container for the table with a fixed header */
</style>
</head> </head>
<body class="loading" data-layout-mode="horizontal" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'> <body class="loading" data-layout-mode="horizontal" data-layout='{"mode": "light", "width": "fluid", "menuPosition": "fixed", "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": true}'>
@ -56,125 +119,222 @@
<!-- Begin page --> <!-- Begin page -->
<div id="wrapper"> <div id="wrapper">
<?php include('includes/top_nav.php'); ?> <?php include('includes/top_nav.php'); ?>
<!-- ============================================================== --> <!-- ============================================================== -->
<!-- Start Page Content here --> <!-- Start Page Content here -->
<!-- ============================================================== --> <!-- ============================================================== -->
<div class="content-page"> <!-- <div class="content-page"> -->
<div class="content"> <!-- <div class="content"> -->
<!-- Start Content--> <!-- Start Content-->
<div class="container-fluid">
<!-- start page title --> <!-- start page title -->
<div class="row"> <!-- <div class="row">
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4 class="page-title">TMC</h4> <h4 class="page-title">GSTR2A</h4>
<div class="page-title-right"> <div class="page-title-right">
<ol class="breadcrumb m-0"> <ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li> <li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">TMC</li> <li class="breadcrumb-item active">GSTR2A</li>
</ol> </ol>
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
<!-- end page title --> <!-- end page title -->
<!-- <div class="row">
<div class="card"> <div class="col-12">
<div class="card-body"> <div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:20px;">
<form class="col-md-12" id="formid"> <div class="row" style="margin-bottom:30px;">
<div class="form-row"> <form class="col-md-12" id="formid">
<div class="row">
<div class="col-12"style="margin-bottom:30px;">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">GSTR2A</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">GSTR2A</li>
</ol>
</div>
</div>
</div>
</div> -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Gstr2a</h4>
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li>
<li class="breadcrumb-item active">Gstr2a</li>
</ol>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="row" style="margin-bottom:20px;">
<form class="col-md-12" id="formid">
<div class="form-row">
<!-- <!--
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label for="inputEmail4" class="col-form-label">GST No</label> <label for="inputEmail4" class="col-form-label">GST No</label>
<select name="gst_no" class="form-control"> <select name="gst_no" class="form-control">
<?php <?php
// foreach($gstno_list->result() as $gstno_i){ // foreach($gstno_list->result() as $gstno_i){
// echo '<option>'.$gstno_i->gn_gstno.'</option>'; // echo '<option>'.$gstno_i->gn_gstno.'</option>';
// } // }
?> ?>
</select> </select>
</div> </div>
--> -->
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label> FROM &nbsp;&nbsp;</label> <label> FROM &nbsp;&nbsp;</label>
<input type="date" id="from" name="from" value="2020-01-01" > <input type="date" id="from" name="from" value="2020-01-01" >
&nbsp;&nbsp; &nbsp;&nbsp;
<label> TO &nbsp;&nbsp;</label> <label> TO &nbsp;&nbsp;</label>
<input type="date" id="TO" name="to" value="2023-01-01" &nbsp;&nbsp;> <input type="date" id="TO" name="to" value="2023-01-01" &nbsp;&nbsp;>
&nbsp;&nbsp; &nbsp;&nbsp;
</div> </div>
<div class="form-group col-md-2">
<label for="inputPassword4" class="col-form-label"></label> <div class="form-group col-md-2">
<button style="margin-top:0px;font-size: 10px;" type="submit" class="btn btn-primary">Submit</button> <label for="inputPassword4" class="col-form-label"></label>
</div> <button style="margin-top:0px;font-size:10px;" type="submit" class="btn btn-primary">Submit</button><br>
<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 selected="selected" value="0">SEGMENT</option>
<option selected="selected" value="1">INV DATE </option>
<option selected="selected" value="2">TMC INVOICE NO</option>
<!-- <option selected="selected" value="3">REF NO</option> -->
<option selected="selected" value="4">DOC TYPE</option>
<option selected="selected"value="5">BILLING ENTITY</option>
<option selected="selected" value="6">PASSENGER NAME</option>
<option selected="selected"value="7">AIRLINE CODE</option>
<option selected="selected"value="8">TICKET NO</option>
<option selected="selected"value="9">SECTOR</option>
<option selected="selected"value="10">CABINCLASS</option>
<option selected="selected"value="11">TOTAL TKT FARE</option>
<option selected="selected"value="12">REMARKS</option>
<option selected="selected"value="13">ACTION</option>
</select>
</div>
</div>
</form>
</div> </div>
<div class="col-md-2"></div>
<table id="scroll-horizontal-datatable" class="table w-100 nowrap"> <div class="form-group col-md-3" id="hidden-dropdown">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Reconciliation</a></li> -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li class="breadcrumb-item active">TMC</li>
</ol>
</div>
<!-- <select style="overflow-y:scroll" name="column_name" id="column_name" class="form-control selectpicker" multiple><p>GSTR@A</p>
<option value="1">CORPORATE NAME</option>
<option value="2">CORPORATE GSTIN</option>
<option value="3">TRADE/LEGAL NAME OF THE SUPPLIER</option>
<option value="4">SUPPLIER TYPE</option>
<option selected="selected" value="5">INVOICE NUMBER</option> -->
<!-- <option selected="selected" value="5">MANUAL TICKET NO.</option>
<option selected="selected" value="6">TICKET NO.</option> -->
<!-- <option selected="selected" value="8">DOCUMENT TYPE</option>
<option selected="selected" value="9">INVOICE DATE</option>
<option selected="selected" value="10">INVOICE AMT (&#8377;)</option>
<option selected="selected" value="11">TICKET AMT</option>
<option selected="selected"value="12">VARIANCE</option>
<option selected="selected" value="13">RATE (%)</option>
<option selected="selected" value="14">TAXABLE AMT (&#8377;)</option>
<option selected="selected"value="15">CENTRAL TAX (&#8377;)</option>
<option selected="selected" value="16">STATE/UT TAX (&#8377;)</option>
<option selected="selected" value="18">GSTR2A REMARKS</option>
<option selected="selected"value="19">INVOICE REMARKS</option>
<option selected="selected"value="20">TICKET NUMBER </option>
<option selected="selected"value="21">TICKET AMT</option>
<option selected="selected"value="22">INVOICE FILE</option>
<option selected="selected"value="24">DELETE</option>
</select> -->
</div>
</div>
</form>
</div>
<div class="table-container">
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
<!--
<table id="scroll-horizontal-datatable" class="table w-100 nowrap"> -->
<thead> <thead>
<tr> <tr>
<th>SEGMENT</th> <th>
<th>INV DATE</th> <button id="toggle-column-modal-button" class="btn btn-link" data-toggle="modal" data-target="#columnModal">
<th>TMC INVOICE NO</th> <i class="fa fa-eye"></i> </button>
<th>REF NO</th> <th>TICKET NO</th>
<th>DOC TYPE</th> <th>DOC TYPE</th>
<th>BILLING ENTITY</th> <th>PASSENGER NAME</th>
<th>PASSENGER NAME</th> <th>AIRLINE CODE</th>
<th>AIRLINE CODE</th> <th>TOTAL TKT FARE</th>
<th>TICKET NO</th> <th>INV Num</th>
<th>SECTOR</th> <th>Inv Amt </th>
<th>CABINCLASS</th> <th>INV DATE</th>
<th>TOTAL TKT FARE</th> <th>TMC INVOICE NO</th>
<th>NET FARE</th> <th>BILLING ENTITY</th>
<th>REMARKS</th> <th>BILLING ENTITY</th>
<th>ACTION</th> <th>SECTOR</th>
<th>CABINCLASS</th>
<th>NET FARE</th>
<th>REMARKS</th>
<th>ACTION</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
<div class="modal fade" id="columnModal" tabindex="-1" role="dialog" aria-labelledby="columnModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="columnModalLabel">Select Column to Display</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<label for="selectColumn">Select Column:</label>
<select style="overflow-y:scroll" name="column_name" id="column_name" class="form-control selectpicker" multiple>
<option selected="selected" value="1">SEGMENT</option>
<option selected="selected" value="2">INV DATE </option>
<option selected="selected" value="3">TMC INVOICE NO</option>
<!-- <option selected="selected" value="3">REF NO</option> -->
<option selected="selected" value="5">DOC TYPE</option>
<option selected="selected"value="6">BILLING ENTITY</option>
<option selected="selected" value="7">PASSENGER NAME</option>
<option selected="selected"value="8">AIRLINE CODE</option>
<option selected="selected"value="9">TICKET NO</option>
<option selected="selected"value="10">SECTOR</option>
<option selected="selected"value="11">CABINCLASS</option>
<option selected="selected"value="12">TOTAL TKT FARE</option>
<option selected="selected"value="13">REMARKS</option>
<option selected="selected"value="14">ACTION</option>
<option selected="selected" value="0">Icon for Select Option</option>
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="applyColumn">Apply Column</button>
</div>
</div>
</div>
</div>
</div> <!-- end card body--> </div> <!-- end card body-->
</div> <!-- end card --> </div> <!-- end card -->
<!-- end col--> </div><!-- end col-->
</div>
<!-- end row--> <!-- end row-->
</div> <!-- container --> <!-- </div> container -->
</div> <!-- content --> <!-- </div> content -->
<input type="hidden" id="refval" /> <input type="hidden" id="refval" />
<input type="hidden" id="refval_gst_tkt" /> <input type="hidden" id="refval_gst_tkt" />
<?php include('includes/footer.php'); ?> <?php include('includes/footer.php'); ?>
@ -626,8 +786,10 @@ function() {
} }
$(document).ready(function() { $(document).ready(function() {
oTable = $("#scroll-horizontal-datatable").DataTable({ oTable = $("#datatable-buttons").DataTable({
lengthChange: !1, lengthChange: !1,
dom: 'Bfrtip', dom: 'Bfrtip',
buttons: [ buttons: [
@ -659,7 +821,7 @@ function() {
scrollX: !0, scrollX: true,
language: { language: {
paginate: { paginate: {
previous: "<i class='mdi mdi-chevron-left'>", previous: "<i class='mdi mdi-chevron-left'>",
@ -670,39 +832,33 @@ function() {
$(".dataTables_paginate > .pagination").addClass("pagination-rounded") $(".dataTables_paginate > .pagination").addClass("pagination-rounded")
}, },
columns : [ columns : [
{ data : "td_segment"}, { data: null, defaultContent: '', orderable: false },
{ data : "td_inv_date"}, { data : "td_tkt"},
{ data : "td_gst_inv"}, { data : "td_doc_type"},
{ data : "td_gst_inv"}, { data : "td_pax"},
{ data : "td_doc_type"}, { data : "td_segment"},
{ data : "td_billing_entity"}, { data : "td_tkt_fare"},
{ data : "td_pax"}, { data : "inv"},
{ data : "td_carrier"}, { data : "amt",defaultContent: ''},
{ data : "td_tkt"}, { data : "tdate", defaultContent: ''},
{ data : "td_sector"}, { data : "td_gst_inv"},
{ data : "td_cabin_class"}, { data : "td_billing_entity"},
{ data : "td_tkt_fare"}, { data : "td_carrier"},
{ data : "td_net"}, { data : "td_sector"},
{ data : "d_remarks"}, { data : "td_cabin_class"},
{ data : "td_id"} { data : "td_net"},
{ data : "d_remarks"},
{ data : "td_id"}
], ],
"columnDefs": [ // "columnDefs": [
"columnDefs": [
{ {
"targets":3, "targets":11,
"visible": false "visible": false
}, },
{ {
"targets": 5, "targets":10,
"width": "12%",
"render": function ( data, type, full, meta ) {
if(data == '')
data = '';
return data;
}
},
{
"targets": 6,
"width": "12%", "width": "12%",
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
if(data == '') if(data == '')
@ -710,8 +866,18 @@ function() {
return data; return data;
} }
}, },
// {
// "targets":3,
// "width": "12%",
// "render": function ( data, type, full, meta ) {
// if(data == '')
// data = '';
// return data;
// }
// },
{ {
"targets": 13, "targets": 15,
"width": 300, "width": 300,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
console.log(full['inv']); console.log(full['inv']);
@ -728,7 +894,7 @@ function() {
}, },
{ {
"targets": 14, "targets": 16,
"width": 300, "width": 300,
"render": function ( data, type, full, meta ) { "render": function ( data, type, full, meta ) {
console.log(full['inv']); console.log(full['inv']);
@ -741,11 +907,50 @@ function() {
} }
} }
}, },
{
"targets": 6,
"width": 300,
"render": function (data, type, full, meta) {
// Check if invoice number is available
if (data && data.trim() !== "") {
return '' + data; // Show invoice number
} else {
// Check if GST number is available
var gstNumber = full['ti_gst_nub'] || '';
if (gstNumber.trim() !== "") {
return ' ' + gstNumber; // Show GST number
} else {
return ''; // Both invoice and GST numbers are empty
}
}
}
},
{
"targets": 7,
"width": 300,
"render": function (data, type, full, meta) {
// Check if invoice number is available
if (data && data.trim() !== "") {
return '' + data; // Show invoice number
} else {
// Check if ti_amount is available
var tiAmount = full['ti_amount'] || '';
if (tiAmount.trim() !== "") {
return ' ' + tiAmount; // Show ti_amount
} else {
return ''; // Both invoice and ti_amount are empty
}
}
}
},
] ]
}); });
oTable.buttons().container().appendTo("#scroll-horizontal-datatable_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({ oTable.buttons().container().appendTo("#datatable-buttons_wrapper .col-md-6:eq(0)"), $("#alternative-page-datatable").DataTable({
pagingType: "full_numbers", pagingType: "full_numbers",
drawCallback: function () { drawCallback: function () {
$(".dataTables_paginate > .pagination").addClass("pagination-rounded") $(".dataTables_paginate > .pagination").addClass("pagination-rounded")
@ -792,7 +997,8 @@ function() {
var Pdata = JSON.parse(data); var Pdata = JSON.parse(data);
console.log(Pdata,"Pdata"); console.log(Pdata,"Pdata");
var modal_data = ''; 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>'; 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]['invoice_dt']+'</div></div>';
delete Pdata[0].sno;
delete Pdata[0].sl; delete Pdata[0].sl;
delete Pdata[0].invoice_dt; delete Pdata[0].invoice_dt;
delete Pdata[0].invdt; delete Pdata[0].invdt;
@ -859,6 +1065,56 @@ function() {
} }
</script> </script>
<script>
var oTable;
$(document).ready(function() {
// oTable = $("#datatable-buttons").DataTable({
// Your DataTable configuration here
});
$('#toggle-column-modal-button').click(function() {
$('#columnModal').modal('show');
});
$('#applyColumn').click(function() {
var selectedColumns = $('#column_name').val();
if (selectedColumns && selectedColumns.length > 0) {
// Array of all column indices
var allColumns = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"];
// Convert selected column indices to integers
selectedColumns = selectedColumns.map(Number);
// Calculate the remaining columns to hide
var remainingColumns = allColumns.filter(function(column) {
return selectedColumns.indexOf(parseInt(column)) === -1;
});
// Show selected columns and hide remaining columns
oTable.columns(selectedColumns).visible(true);
oTable.columns(remainingColumns).visible(false);
// Close the modal
$('#columnModal').modal('hide');
}
});
</script>
<script>
// Set the default value to today
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0'); // January is 0!
var yyyy = today.getFullYear();
var todayFormatted = yyyy + '-' + mm + '-' + dd;
document.getElementById('TO').value = todayFormatted;
</script>
<!-- Long Content Scroll Modal --> <!-- Long Content Scroll Modal -->
<div class="modal fade" id="scrollable-modal" tabindex="-1" role="dialog" <div class="modal fade" id="scrollable-modal" tabindex="-1" role="dialog"
aria-labelledby="scrollableModalTitle" aria-hidden="true"> aria-labelledby="scrollableModalTitle" aria-hidden="true">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.