NickelBox/static/js/reports.js

55 lines
1.5 KiB
JavaScript
Raw Normal View History

2018-05-31 16:25:10 -06:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
$(".genrptbtn").click(function () {
setTimeout(function () {
window.location.reload();
}, 1000)
});
$(function () {
$('#startdate').datetimepicker({
format: "MMM D YYYY",
useCurrent: false,
icons: {
time: "fas fa-clock",
date: "fas fa-calendar",
up: "fas fa-arrow-up",
down: "fas fa-arrow-down"
}
});
$('#enddate').datetimepicker({
format: "MMM D YYYY"/*"YYYY-M-DTH:m"*/,
useCurrent: true,
icons: {
time: "fas fa-clock",
date: "fas fa-calendar",
up: "fas fa-arrow-up",
down: "fas fa-arrow-down"
}
});
});
$("#type").change(function () {
switch ($("#type").val()) {
case "cashflow":
$('#date-filter').show('fast');
$('#register-filter').show('fast');
$('#cash-filter').hide('fast');
break;
case "z":
$('#date-filter').hide('fast');
$('#register-filter').show('fast');
$('#cash-filter').show('fast');
break;
default:
$('#date-filter').show('fast');
$('#register-filter').show('fast');
$('#cash-filter').hide('fast');
break;
}
});
$('#cash-filter').hide();