balance sheet

This commit is contained in:
2024-10-24 22:27:29 -07:00
parent f9d02e4798
commit 864ecec1b2
4 changed files with 28 additions and 6 deletions

View File

@@ -161,6 +161,23 @@ const getFourWeekPeriods = endDate => {
return periods;
};
const withLastYear = (date) => {
if (!date) {
date= new Date()
} else {
date = parseMMDDYYYY(date)
}
const originalYear = date.getFullYear();
const priorYear = originalYear - 1;
// Create new Date objects for both years
const originalDate = new Date(originalYear, date.getMonth(), date.getDate());
const priorYearDate = new Date(priorYear, date.getMonth(), date.getDate());
return [formatDateMMDDYYYY(originalDate), formatDateMMDDYYYY(priorYearDate)];
}
initMultiDatepicker = function(elem, startingValue) {
const modalParent = elem.closest('#modal-content');
if (modalParent) {