import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID'; import { Amount } from '../../../commonStateTypes/amount'; import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common'; import { Recommendation } from '../../../commonStateTypes/recommendationBase'; import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes'; import { MonthYearPeriodId, ScheduleDaysOfMonth } from '../../../commonStateTypes/timePeriod'; import { AccountBase } from '../../../entity/account/accountState'; import { OneTimeAccrualEdits } from '../../../entity/jeSchedules/jeSchedulesState'; import { JEOneTimeAccrualKey, JEScheduleKey, JEScheduleTransactionKey, ScheduleJournalEntryStatusCodeType, ScheduleTransactionID, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes'; import { VendorBase } from '../../../entity/vendor/vendorState'; import { ZeniDate } from '../../../zeniDayJS'; import { JETransactionLink } from '../../scheduleView/scheduleDetailView/scheduleDetailState'; export declare const toJEScheduleSortKey: (v: string) => "type" | "vendor" | "category" | "class" | "memo" | "jePostingDate" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "remainingMonths" | "totalAmount" | "transactionDate"; export type JEScheduleSortKey = ReturnType; export declare const toJEPageTab: (v: string) => "schedules" | "existing_schedules"; export type JEPageTab = ReturnType; export declare const ALL_JE_PAGE_TABS: readonly JEPageTab[]; export type JESchedulePeriodTabKey = `${JEPageTab}_${MonthYearPeriodId}`; export declare const getJESchedulePeriodTabKey: (selectedPageTab: JEPageTab, monthYearPeriodId: MonthYearPeriodId) => JESchedulePeriodTabKey; export interface JESchedulesViewUIState { createdGroupCollapsed: boolean; pendingGroupCollapsed: boolean; scrollPosition: { scrollTop: number; scrollLeft?: number; } | undefined; searchString: string; selectedJETypeFilter: ScheduleTypes | null; selectedPageTab: JEPageTab; sortKey: JEScheduleSortKey; sortOrder: SortOrder; totalCount: number; limit?: number; } export interface JEScheduleLocalData { jeScheduleID: ID; scheduledJournalEntryID: ID; jeScheduleType?: ScheduleTypes; updatedAccumulatedDepreciationCategoryID?: ID; updatedCategoryId?: ID; updatedClassId?: ID; updatedVendor?: VendorBase; } export interface JESchedulesViewState extends FetchedState { accountSettings: AccountSettingsState; failedJeScheduleTransactionKeysByPeriodAndTab: Record; ignoreStatusById: Record; jeScheduleAccruedKeysByPeriodAndTab: Record; jeScheduleLocalDataById: Record; jeScheduleOneTimeAccrualKeysByPeriodAndTab: Record; jeScheduleTransactionKeysByPeriodAndTab: Record; newSchedule: NewJeScheduleState; oneTimeAccrualActionStatusById: Record; oneTimeAccrualFetchStatusById: Record; oneTimeAccrualLocalDataById: Record; postStatusById: Record; refreshStatus: FetchStateAndError; revertStatusById: Record; uiState: JESchedulesViewUIState; } export interface NewJeDetailLocalData { amount: Amount; jeLink: JETransactionLink; memo: string; postingDate: ZeniDate; postingStatus: ScheduleJournalEntryStatusCodeType; runningBalance: Amount; } export interface NewScheduleLocalData { jeScheduleDetails: NewJeDetailLocalData[]; scheduleType: ScheduleTypes; lastDayOfMonth?: boolean; selectedAccount?: ID; selectedBaseTransactionId?: ScheduleTransactionID; selectedClass?: ID; selectedDate?: ZeniDate; selectedDayOfMonth?: ScheduleDaysOfMonth; selectedJEScheduleKey?: JEScheduleTransactionKey; selectedMonths?: number; selectedVendor?: VendorBase; } export interface NewScheduleLocalDataFixedAssets extends NewScheduleLocalData { assetId?: string; selectedAccumulatedDepreciationCategory?: ID; } /** * The form values for creating a one-time accrual. Not stored in the slice — a one-time accrual is * created in a single POST with no draft/resume step, so this is passed straight through the action * to the payload builder. */ export interface NewOneTimeAccrualLocalData { amount: number; creditAccountId: ID; debitAccountId: ID; memo: string; reverseNextMonth: boolean; serviceMonth: ZeniDate; vendorId: ID; vendorName: string; creditAccountName?: string; debitAccountName?: string; debitClassId?: ID; debitClassName?: string; } export interface SearchTransactionsState extends FetchStateAndError { searchResults: JEScheduleTransactionKey[]; searchString?: string; } export declare const MIN_NEW_SCHEDULE_SEARCH_LENGTH = 2; export interface NewJeScheduleState extends FetchStateAndError { createOneTimeAccrualStatus: FetchStateAndError; newScheduleState: { fixed_assets: NewScheduleLocalDataFixedAssets; prepaid_expenses: NewScheduleLocalData; }; saveStatus: FetchStateAndError; searchTransactions: SearchTransactionsState; selectedDetailScheduleType?: ScheduleTypes; } export interface AccountSettingsLocalData { previousAccruedExpensesAccount: AccountBase[]; previousFixedAssetsAccount: AccountBase[]; previousPrepaidExpensesAccount: AccountBase[]; selectedAccruedExpensesAccountIds: ID[]; selectedFixedAssetsAccountIds: ID[]; selectedPrepaidExpensesAccountIds: ID[]; } export interface AccountSettingsState { accountListFetchState: FetchStateAndError; accruedExpensesAccountIdList: ID[]; accruedExpensesNestedAccountListHierarchy: NestedAccountHierarchyForReport[]; accruedExpensesRecommendations: Recommendation[]; fixedAssetsAccountIdList: ID[]; fixedAssetsNestedAccountListHierarchy: NestedAccountHierarchyForReport[]; fixedAssetsRecommendations: Recommendation[]; hasLoadedAccountSettings: boolean; localData: AccountSettingsLocalData; prepaidExpensesAccountIdList: ID[]; prepaidExpensesNestedAccountListHierarchy: NestedAccountHierarchyForReport[]; prepaidExpensesRecommendations: Recommendation[]; recommendationFetchState: FetchStateAndError; updateFetchState: FetchStateAndError; }