Untitled
unknown
plain_text
2 years ago
909 B
7
Indexable
function monthly_report(from_date = '', to_date = '', user_id = '') {
$.ajax({
url: 'filter_monthly_report.php',
method: 'POST',
data: {
'action': 'monthly_report',
'from_date': from_date,
'to_date': to_date,
'user_id': user_id
},
success: function(response) {
$('#printable').html(response);
}
});
}
$(document).ready(function() {
// Attach click event to the "Monthly Report" link
$('.nav-reports').click(function(e) {
// Prevent the default link behavior
e.preventDefault();
// Get the current date range or set your desired date range
var fromDate = '2024-01-01';
var toDate = '2024-12-31';
// Call the monthly_report function with date parameters
monthly_report(fromDate, toDate);
});
});Editor is loading...
Leave a Comment