Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
VE10-Sanjeev 2025-04-22 06:20:19 +00:00
commit 3552906ead
14 changed files with 359 additions and 177 deletions

View File

@ -545,3 +545,6 @@ $routes->post('updateTrpProductionDetails', 'StockController::updateTrpProductio
$routes->post('updateAbstractDetails','StockController::updateAbstractDetails');
//Reports Module
$routes->get('allReports','Report::allReports');

View File

@ -2033,20 +2033,34 @@ class Payslip extends BaseController
public function leaveReport()
{
$fyr = get_financial_year();
if ($this->request->getMethod() == 'POST') {
$fyr = $this->request->getPost('fyr');
}
// $fiscalYears = get_financial_year_list();
$fiscalYears = get_financial_year_list(date('Y'), 8);
$report = [];
if ($this->request->getMethod(true) === 'POST' && $this->request->getPost('btn_submit')) {
$data['from_date'] = $this->request->getPost('from_date');
$data['to_date'] = $this->request->getPost('to_date');
$data['EmpID'] = $this->request->getPost('emp');
$report = $this->monthlypay_model->leave_report($data['from_date'], $data['to_date'], $data['EmpID']);
}
$data['EmpData'] = $this->monthlypay_model->getActiveEmployee();
$data['data'] = $report;
// dd($data);
// Load the view
$data['fiscalyears'] = $fiscalYears;
$data['selectedfiscalyears'] = $fyr;
$data['leaverecords'] = $this->payroll_model->getEmpDetailsforLeave($fyr);
// echo '<script type="text/javascript">alert("' . $fyr . '")</script>';
$this->global['pageTitle'] = 'Leave Reports';
$this->loadViews("leavereports", $this->global, $data, NULL);
}
function monthwiseLeaveReport($param1,$param2)
{
$EmployeeID = $param1;

View File

@ -1065,11 +1065,11 @@ pm.Status != 'ST030' and pm.Status != 'ST056' and pm.Status != 'ST027' ";
$sql = "SELECT
CASE WHEN MONTH(PODate)>=4 THEN
concat(YEAR(PODate), '-',YEAR(PODate)+1)
ELSE concat(YEAR(PODate)-1,'-', YEAR(PODate)) END AS financial_year
FROM t_purchaseorder_master
GROUP BY financial_year";
CASE WHEN MONTH(PODate)>=4 THEN
concat(YEAR(PODate), '-',YEAR(PODate)+1)
ELSE concat(YEAR(PODate)-1,'-', YEAR(PODate)) END AS financial_year
FROM t_purchaseorder_master
GROUP BY financial_year";
$query = $this->db->query($sql);
return $query->getResult();
}

View File

@ -663,5 +663,45 @@ where Month_Year = ? and att.EmpID in (select EmpID from t_attendance)";
// return [$current];
}
function getActiveEmployee()
{
$array = $this->db->table('t_employee_details')
->select("FirstName,LastName,Gender,EmpID")
->where('IsActive', 1)
->get()
->getResultArray();
return $array;
}
function leave_report($from_date, $to_date, $empID)
{
$builder = $this->db->table('t_monthly_pay_inputs MPI');
$builder->selectSum('MPI.LOP_Days');
$builder->selectSum('MPI.Paid_leave');
$builder->selectSum('MPI.OT_Hrs_Worked');
$builder->selectSum('MPI.OTSalary');
$builder->select('MPI.EmpID, ED.FirstName , ED.LastName');
$builder->join('t_employee_details ED', 'MPI.EmpID = ED.EmpID', 'left');
// Filter by EmpID if set
if (!empty($empID)) {
$builder->where('MPI.EmpID', $empID);
}
// Filter by date range if both dates are provided
if (!empty($from_date) && !empty($to_date)) {
$builder->where("MPI.Month_Year >=", $from_date);
$builder->where("MPI.Month_Year <=", $to_date);
}
$builder->groupBy('MPI.EmpID');
$query = $builder->get();
return $query->getResultArray();
}
}

View File

@ -125,6 +125,7 @@
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-2">
<label for="from_date">

View File

@ -157,9 +157,9 @@ if (!empty($master)) {
<?php echo $index; ?>
</td>
<?php if($con->Config_ID === 'C023'){ ?>
<td>
<td class="config-value-td" data-key="<?php echo $con->Key; ?>">
<a
class="config-category"
class="config-category "
data-value="<?php echo $con->ConfigValue;?>"
data-key="<?php echo $con->Key; ?>"
style="cursor: pointer;">
@ -168,7 +168,7 @@ if (!empty($master)) {
</a>
</td>
<?php }else{ ?>
<td><?php echo $con->ConfigValue; ?></td>
<td class="config-value-td" data-key="<?php echo $con->Key; ?>"><?php echo $con->ConfigValue; ?></td>
<?php } ?>
<td>
@ -422,8 +422,6 @@ if (!empty($master)) {
},
success: function(data) {
console.log(data);
if (data.length > 0) {
if (data[0]?.isActive == 1) {
@ -509,15 +507,17 @@ if (!empty($master)) {
var id = $(this).data('id');
var key = $(this).data('key');
var code = $(this).data('code');
var configValue = $(this).data('configvalue');
var configValue = $(this).attr('data-configvalue');
console.log(configValue);
$('#key').val(key);
$('#Config_ID').val(code);
$('#configValue').val(configValue);
$('#EditConfiguration').modal('show');
});
@ -541,7 +541,25 @@ if (!empty($master)) {
success: function(response) {
if (response.status) {
alert('Config Value updated successfully');
location.reload();
let key = $('#key').val();
let configValue = $("#configValue").val();
let configId = $('#Config_ID').val();
if (configId === "C023") {
$(`#configtable tbody tr td.config-value-td a[data-key="${key}"]`).text(configValue);
} else {
$(`#configtable tbody tr td.config-value-td[data-key="${key}"]`).text(configValue);
}
$(`#configtable tbody tr td a.editConfigurationBtn[data-key="${key}"]`).attr('data-configvalue', configValue);
$("#configValue").val(" ");
$('#EditConfiguration').modal('hide');
} else {
alert('Failed to update Config Value');
}

View File

@ -1001,10 +1001,18 @@ $(function () {
<?php }?>
<!-- report generation -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-report-generation" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-file"></i> Reports
</a>
<div class="dropdown-menu" aria-labelledby="topnav-report-generation">
<a class="dropdown-item" href="<?= base_url('reports') ?>">All Reports</a>
</div>
</li>
</ul> <!-- end navbar-->
</div> <!-- end .collapsed-->

View File

@ -1,17 +1,37 @@
<script src="<?php echo base_url() ?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<style type="text/css">
.num {
<script>
$(document).ready(function() {
$("#emp").select2();
});
</script>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
table{
width:auto;
}
.dataTables_filter input {
padding: 4px;
}
.dataTables_filter {
/* width: 50%; */
float: right;
text-align: right;
}
</style>
<style>
.dataTables_empty {
text-align: center !important;
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
/* float: right; */
}
</style>
@ -22,97 +42,132 @@
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb mt-2 mb-2.5">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">HR</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Leave</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">Leave</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title">
<center>Leave Report <?php if (!empty($selectedfiscalyears)) {
echo " ( " . $selectedfiscalyears . " )";
} ?></center>
</h4>
<h4 class="page-title"><b> Reports </b></h4>
</li>
</ol>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form action="<?php echo base_url() ?>leavereports" method="POST" id="searchList">
<div class="row" style="padding: 18px 26px;">
<div class="col-md-3" style="margin: 10px 0px;">
<?php if (!empty($fiscalyears)) {
foreach ($fiscalyears as $fy):
$options[$fy] = $fy;
endforeach;
}
echo form_dropdown('fyr', $options, set_value('fyr', $selectedfiscalyears), 'id="fyr"', 'class="form-control select2"'); ?>
</div>
<!-- <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> -->
<div class="col-md-3">
<input type="button" value="View Report" class="btn btn-success" id="report">
</div>
</div>
</form>
<div class="card-body">
<table id="leavelistings" class="table dt-responsive nowrap w-100">
<form method="post" action="<?php echo base_url("leavereports"); ?>">
<div class="form-group">
<div class="row">
<div class="col-2">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="min-date" class="form-control datepicker" autocomplete="off" value="<?php if(isset($from_date)){ echo $from_date; } ?>">
</div>
</div>
<div class="col-2">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="max-date" class="form-control datepicker" autocomplete="off" value="<?php if(isset($to_date)){ echo $to_date; } ?>">
</div>
</div>
<div class="col-4">
<label for="emp">
<?php echo 'emp'; ?>
</label>
<select class="form-control" id="emp" name="emp">
<option value="">Select Emplayee</option>
<?php
foreach ($EmpData as $val): { ?>
<option <?php if(isset($EmpID) && ($EmpID == $val['EmpID'])){ echo 'selected'; } ?> value="<?php echo $val['EmpID']; ?>"><?php echo $val['FirstName'].' '.$val['LastName']; ?></option>
<?php }
endforeach; ?>
</select>
</div>
<div class="col-4">
</div>
<div class="col-md-8"></div>
<div class="col-md-4 text-right">
<input type="button" class="btn btn-danger m-2" value="Reset" onclick="window.location.href='<?= base_url('leavereports') ?>';">
<input type="submit" class="btn btn-success m-2" name="btn_submit" value="View Report">
</div>
</div>
</div>
<div class="form-group has-feedback">
</div>
</form>
<table id="cc" class="table table-bordered table-hover wrap" style="background-color:#fff;width: 100% !important;">
<thead>
<tr>
<th>S.No</th>
<th>Employee Name</th>
<!-- <th>Total Work in Days</th> -->
<th>Leave Taken</th>
<th>Paid Leave Taken</th>
<th>Emplayee Name</th>
<th align="right">LOP Days</th>
<th align="right">Paid Leaves</th>
<th align="right">Total Leaves</th>
</tr>
</thead>
<tbody>
<?php
$base = base_url();
if (!empty($leaverecords)) {
$index = 0;
foreach ($leaverecords as $rec) {
$index++;
?>
<tr>
<td><?php echo $index; ?></td>
<?php if ((int)$rec->NoofAbsentDays != 0) { ?>
<td><?php echo '<a title="View Monthwise Details" href="' . $base . 'leavemonthlyreports/' . $rec->EmpID . '/' . $selectedfiscalyears . '">' . $rec->EmpID . '-' . $rec->FullName . '</a>'; ?></td>
<?php } else { ?>
<td><?php echo $rec->EmpID . '-' . $rec->FullName; ?></td>
<?php } ?>
<?php if (!empty($data)) { foreach ($data as $value) { ?>
<!-- Main invoice row -->
<tr>
<!-- <td style="text-align:right;"><?php // if (!empty($rec->NoofWorkedDays)) { echo number_format((int)$rec->NoofWorkedDays, 0, '.', ''); } else { echo "0"; }
?></td> -->
<td style="text-align:left;"><?php if (!empty($rec->NoofAbsentDays)) {
echo number_format((int)$rec->NoofAbsentDays, 0, '.', '');
} else {
echo "0";
} ?></td>
<td style="text-align:left;"><?php if (!empty($rec->NoofPaidLeaveDays)) {
echo number_format((int)$rec->NoofPaidLeaveDays, 0, '.', '');
} else {
echo "0";
} ?></td>
</tr>
<?php
}
} // else {
?>
<!-- <tr>
<td colspan="4" style="text-align:center;">No data found</td>
</tr> -->
<?php
// }
?>
<td><?php echo $value['FirstName'].' '.$value['LastName'] ?></td>
<td align="right"><?php echo $value['LOP_Days'] ?></td>
<td align="right"><?php echo $value['Paid_leave'] ?></td>
<td align="right"><?php echo ($value['LOP_Days']+$value['Paid_leave']) ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot width="100%">
<!-- <tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td style="text-align:right"><strong><?php {echo number_format(0, 2, '.', ','); }?></strong></td>
<td style="text-align:right"><strong><?php {echo number_format(0, 2, '.', ','); }?></strong></td>
</td>
</tr> -->
</tfoot>
<?php
}
?>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
@ -122,47 +177,78 @@
</div> <!-- container -->
</div> <!-- content -->
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function() {
$('#leavelistings').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"aaSorting": [
[0, "asc"]
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Initialize the DataTable
var table = $('#cc').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv' // Export buttons
],
"info": true,
"autoWidth": true,
"language": {
"emptyTable": "No data found"
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
ordering : false,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
$('#report').click(function() {
$("#searchList").submit();
$('#mySelect').on('change', function() {
table
.column(4)
.search(this.value)
.draw();
});
$(document).ready(function() {
$('#fyr').addClass('form-control');
})
</script>
<script type="text/javascript">
// var name = "<?php // echo 'Leave Report for ' . $selectedfiscalyears;
?>";
// $("#leavelistings").tableExport({
// bootstrap: true,
// separator: ",",
// headings: true,
// buttonContent: "Export",
// addClass: "",
// defaultClass: "btn",
// defaultTheme: "btn-default",
// type: "csv",
// fileName: name,
// position: "bottom",
// stripQuotes: true
// });
$(function() {
var dateFormat = 'mm-yyyy';
// Initialize min-date (Start Date)
var from = $("#min-date").datepicker({
format: dateFormat,
autoclose: true,
todayHighlight: true,
clearBtn: true,
orientation: 'bottom',
minViewMode: 1 // Month view only
}).on('changeDate', function(e) {
to.datepicker('setStartDate', e.date);
});
// Initialize max-date (End Date)
var to = $("#max-date").datepicker({
format: dateFormat,
autoclose: true,
todayHighlight: true,
clearBtn: true,
orientation: 'bottom',
minViewMode: 1 // Month view only
}).on('changeDate', function(e) {
from.datepicker('setEndDate', e.date);
});
});
</script>

View File

@ -26,7 +26,7 @@
</div>
<div class="col-md-3">
<h4><span class="fa fa-shopping-cart">&nbsp; Purchase </span></h4>
<p class="uk-text-meta uk-margin-remove">Purchase</p>
<a href="<?php echo base_url(); ?>Report_purchase" target="_blank"><p class="uk-text uk-margin-remove">Purchase</p></a>
<p class="uk-text-meta uk-margin-remove">Year Wise</p>
<a href="<?php echo base_url(); ?>Report_pending_purchase" target="_blank"><p class="uk-text uk-margin-remove">Pending</p></a>
<p class="uk-text-meta uk-margin-remove">Purchase Supplier - Wise</p>

View File

@ -365,9 +365,7 @@
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
class="form-control "
data-provide="datepicker"
data-date-format="M-yyyy"
data-date-min-view-mode="1" readonly>
readonly>
</div>
@ -1713,8 +1711,7 @@
$('#changeMonthForm').submit();
});
$(document).ready(function(){
$('#month').datepicker({
$('#month').datepicker({
format: 'M-yyyy',
viewMode: 'months',
minViewMode: 'months',
@ -1723,7 +1720,6 @@
startDate: new Date(2025, 0), // Jan is month 0
endDate: new Date() // current date as max
});
})

View File

@ -327,9 +327,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
<input type="text" name="month" id="month" value="<?php echo "$datefordropdown" ?>"
class="form-control "
data-provide="datepicker"
data-date-format="M-yyyy"
data-date-min-view-mode="1" readonly>
readonly>
</div>
@ -1585,11 +1583,23 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
<!-- onchange of month submit will happen -->
<script>
$(document).ready(function() {
$('#month').change(function() {
$('#changeMonthForm').submit();
})
})
$(document).on('change', '#month', function() {
$('#changeMonthForm').submit();
});
$('#month').datepicker({
format: 'M-yyyy',
viewMode: 'months',
minViewMode: 'months',
autoclose: true,
orientation: 'bottom',
startDate: new Date(2025, 0), // Jan is month 0
endDate: new Date() // current date as max
});
</script>
<script>

View File

@ -362,9 +362,7 @@
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
class="form-control "
data-provide="datepicker"
data-date-format="M-yyyy"
data-date-min-view-mode="1" readonly
readonly
style="max-width: 175px;">
</div>
@ -992,13 +990,10 @@
<script>
$('#month').change(function() {
$('#changeMonthForm').submit();
})
$(document).ready(function() {
$('#month').datepicker({
$('#month').datepicker({
format: 'M-yyyy',
viewMode: 'months',
minViewMode: 'months',
@ -1006,9 +1001,15 @@
orientation: 'bottom',
startDate: new Date(2025, 0), // Jan is month 0
endDate: new Date() // current date as max
}).on('focus', function() {
$(this).datepicker('show'); // Ensure it opens on focus
});
$('#month').change(function() {
$('#changeMonthForm').submit();
})
});
</script>

View File

@ -315,6 +315,8 @@
display: none;
}
</style>
@ -1216,7 +1218,7 @@ $timeOtions[] = "12:00 AM";
$summary['ebReading'] += is_numeric($trpProductionDetail['ebReading']) ? $trpProductionDetail['ebReading'] : 0;
$summary['ebReadingPerUnitTon'] += is_numeric($trpProductionDetail['ebReadingPerUnitTon']) ? $trpProductionDetail['ebReadingPerUnitTon'] : 0;
$summary['noOfEbReadingDays'] += is_numeric($trpProductionDetail['ebReading'])
&& $trpProductionDetail['ebReading'] != 0 ? 1 : 0 ;
&& $trpProductionDetail['ebReading'] != 0 ? 1 : 0 ;
$summary['workingPersonEngineers'] += is_numeric($trpProductionDetail['workingPersonEngineers']) ? $trpProductionDetail['workingPersonEngineers'] : 0;
$summary['workingPersonSupervisiors'] += is_numeric($trpProductionDetail['workingPersonSupervisiors']) ? $trpProductionDetail['workingPersonSupervisiors'] : 0;
$summary['workingPersonOperators'] += is_numeric($trpProductionDetail['workingPersonOperators']) ? $trpProductionDetail['workingPersonOperators'] : 0;
@ -1445,7 +1447,7 @@ $timeOtions[] = "12:00 AM";
<!-- td:eq(38) -->
<td class="celda_normal ebReadingPerUnitTon"
data-id="footer ebReadingPerUnitTon">
<?= number_format($summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] ?? 1 ),2) ?>
<?= number_format($summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] == 0 ? 1 : $summary['noOfEbReadingDays'] ),2) ?>
</td>
<!-- workingPersonEngineers -->
@ -1705,7 +1707,7 @@ $timeOtions[] = "12:00 AM";
[
'absDate' => $trpAbstract["Power Consumption"]['date'],
'absParticulars' => "Power Consumption",
'absRunningHrs' => $summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] ?? 1 ) == 0 ? " " : number_format($summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] ?? 1 ),2),
'absRunningHrs' => $summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] == 0 ? 1 : $summary['noOfEbReadingDays'] ) == 0 ? " " : number_format($summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] == 0 ? 1 : $summary['noOfEbReadingDays'] ),2),
'absPerHour' => "",
'absOpeningStock' => (int)$trpAbstract["Power Consumption"]['opening_stock'] == 0 ? " " : (int)$trpAbstract["Power Consumption"]['opening_stock'],
'absReceipt' => '',
@ -1865,7 +1867,7 @@ $timeOtions[] = "12:00 AM";
[
'absParticulars' => "Power Consumption",
'absRunningHrs' => $summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] ?? 1 ) == 0 ? " " : number_format($summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] ?? 1 ) , 2),
'absRunningHrs' => $summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] == 0 ? 1 : $summary['noOfEbReadingDays'] ) == 0 ? " " : number_format($summary['ebReadingPerUnitTon'] / ($summary['noOfEbReadingDays'] == 0 ? 1 : $summary['noOfEbReadingDays'] ) , 2),
'absPerHour' => "",
'absOpeningStock' => '',
'absReceipt' => '',

View File

@ -353,9 +353,7 @@
<input type="text" name="month" id="month" value="<?php echo "$month" ?>"
class="form-control "
data-provide="datepicker"
data-date-format="M-yyyy"
data-date-min-view-mode="1" readonly
readonly
style="max-width: 175px;">
</div>
@ -1035,13 +1033,11 @@
</script>
<script>
$('#month').change(function() {
$('#changeMonthForm').submit();
})
$(document).ready(function() {
$('#month').datepicker({
$('#month').datepicker({
format: 'M-yyyy',
viewMode: 'months',
minViewMode: 'months',
@ -1052,7 +1048,14 @@
}).on('focus', function() {
$(this).datepicker('show'); // Ensure it opens on focus
});
$('#month').change(function() {
$('#changeMonthForm').submit();
})
});
</script>