mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
check whether the billing cycle is chosen when set custom date range or backward/forward the date range
This commit is contained in:
@@ -617,8 +617,9 @@ import {
|
||||
getShiftedDateRangeAndDateType,
|
||||
getShiftedDateRangeAndDateTypeForBillingCycle,
|
||||
getDateTypeByDateRange,
|
||||
getDateRangeByBillingCycleDateType,
|
||||
getDateTypeByBillingCycleDateRange,
|
||||
getDateRangeByDateType,
|
||||
getDateRangeByBillingCycleDateType,
|
||||
getRecentDateRangeType,
|
||||
isDateRangeMatchOneMonth
|
||||
} from '@/lib/datetime.js';
|
||||
@@ -1213,8 +1214,8 @@ export default {
|
||||
|
||||
let newDateRange = null;
|
||||
|
||||
if (datetimeConstants.allBillingCycleDateRangesMap[this.query.dateType]) {
|
||||
newDateRange = getShiftedDateRangeAndDateTypeForBillingCycle(this.query.dateType, scale, this.firstDayOfWeek, this.accountsStore.getAccountStatementDate(this.query.accountIds));
|
||||
if (datetimeConstants.allBillingCycleDateRangesMap[this.query.dateType] || this.query.dateType === this.allDateRanges.Custom.type) {
|
||||
newDateRange = getShiftedDateRangeAndDateTypeForBillingCycle(startTime, endTime, scale, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal, this.accountsStore.getAccountStatementDate(this.query.accountIds));
|
||||
}
|
||||
|
||||
if (!newDateRange) {
|
||||
@@ -1279,7 +1280,11 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
const dateType = getDateTypeByDateRange(minTime, maxTime, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal);
|
||||
let dateType = getDateTypeByBillingCycleDateRange(minTime, maxTime, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal, this.accountsStore.getAccountStatementDate(this.query.accountIds));
|
||||
|
||||
if (!dateType) {
|
||||
dateType = getDateTypeByDateRange(minTime, maxTime, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal);
|
||||
}
|
||||
|
||||
if (this.query.dateType === dateType && this.query.maxTime === maxTime && this.query.minTime === minTime) {
|
||||
this.showCustomDateRangeDialog = false;
|
||||
|
||||
@@ -542,6 +542,7 @@ import {
|
||||
getShiftedDateRangeAndDateType,
|
||||
getShiftedDateRangeAndDateTypeForBillingCycle,
|
||||
getDateTypeByDateRange,
|
||||
getDateTypeByBillingCycleDateRange,
|
||||
getDateRangeByDateType,
|
||||
getDateRangeByBillingCycleDateType
|
||||
} from '@/lib/datetime.js';
|
||||
@@ -909,7 +910,11 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
const dateType = getDateTypeByDateRange(minTime, maxTime, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal);
|
||||
let dateType = getDateTypeByBillingCycleDateRange(minTime, maxTime, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal, this.accountsStore.getAccountStatementDate(this.query.accountIds));
|
||||
|
||||
if (!dateType) {
|
||||
dateType = getDateTypeByDateRange(minTime, maxTime, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal);
|
||||
}
|
||||
|
||||
const changed = this.transactionsStore.updateTransactionListFilter({
|
||||
dateType: dateType,
|
||||
@@ -1117,8 +1122,8 @@ export default {
|
||||
|
||||
let newDateRange = null;
|
||||
|
||||
if (datetimeConstants.allBillingCycleDateRangesMap[this.query.dateType]) {
|
||||
newDateRange = getShiftedDateRangeAndDateTypeForBillingCycle(this.query.dateType, scale, this.firstDayOfWeek, this.accountsStore.getAccountStatementDate(this.query.accountIds));
|
||||
if (datetimeConstants.allBillingCycleDateRangesMap[this.query.dateType] || this.query.dateType === this.allDateRanges.Custom.type) {
|
||||
newDateRange = getShiftedDateRangeAndDateTypeForBillingCycle(minTime, maxTime, scale, this.firstDayOfWeek, datetimeConstants.allDateRangeScenes.Normal, this.accountsStore.getAccountStatementDate(this.query.accountIds));
|
||||
}
|
||||
|
||||
if (!newDateRange) {
|
||||
|
||||
Reference in New Issue
Block a user