import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID'; import { Amount } from '../../../commonStateTypes/amount'; import { COABalanceGroupedByPeriod } from '../../../commonStateTypes/coaBalance/coaBalance'; import { TimeframeTick, TimeframeTickWithMetaData } from '../../../commonStateTypes/timeframeTick'; import { AccountBase, AccountLabel, AccountType } from '../../../entity/account/accountState'; import { JEAccruedSchedule, JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector'; import { ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes'; import { AccountListKeyType } from '../../accountList/accountListState'; import { JEScheduleWithBalance, JEScheduledTransactionWithBalance } from './scheduleListBalanceTypes'; export interface ScheduleTotalType { totalAmount: Amount; totalRunningBalances: Amount; } /** * This helper function calculates Total Amount and Total Running balances * for all the JE transactions which can be used to display the totals on the Schedule List page. * @param jeTransactions * @returns */ export declare const getCalculatedScheduleTotals: (jeTransactions: JEScheduledTransaction[]) => ScheduleTotalType; export declare const getCalculatedAccruedScheduleTotal: (jeAccruedSchedule: JEAccruedSchedule[]) => ScheduleTotalType; export declare const getAccountListKeyForSchedules: () => AccountListKeyType; export declare const getAllAccountBase: () => AccountBase; export declare const getAllAccountNested: () => NestedAccountHierarchyForReport; /** * This helper function is to get all possible timeframe * Logic --> Timeframe Range is startDate = (currentDate to 3 months back )and endDate = (currentDate to 9 months ahead) * @param sortedJETransactionView * @param startMonth * @returns */ export declare const getAllTimeframeTicks: (sortedJETransactionView: JEScheduledTransaction[], startMonth: number) => TimeframeTickWithMetaData[]; /** * This helper function is to get all possible timeframe * Logic --> Timeframe Range is startDate = (currentDate to 3 months back )and endDate = (currentDate to 9 months ahead) * @param sortedJETransactionView * @param startMonth * @returns */ export declare const getAllTimeframeTicksForAccrued: (sortedJEAccruedSchedules: JEAccruedSchedule[], startMonth: number) => TimeframeTickWithMetaData[]; /** * This function returns an COABalanceGroupedByPeriod (months, weeks, years, quarters) with an array of COABalances * in which we loop over the totalBalanceTimeframeTicks which is a record of - {'Feb 2023' : [20, 30, 40]} * e.g - { months : { balance, startDate, endDate, type}} * @param allTimeframeTickBalances * @param allTimeframeTicks * @param timeframe * @returns */ export declare const calculateTotalBalanceTimeframeTick: (allTimeframeTickBalances: JEScheduledTransactionWithBalance[], allTimeframeTicks: TimeframeTickWithMetaData[], timeframe: "months") => COABalanceGroupedByPeriod; /** * This function returns an COABalanceGroupedByPeriod (months, weeks, years, quarters) with an array of COABalances * in which we loop over the totalBalanceTimeframeTicks which is a record of - {'Feb 2023' : [20, 30, 40]} * e.g - { months : { balance, startDate, endDate, type}} * @param allTimeframeTickBalances * @param allTimeframeTicks * @param timeframe * @returns */ export declare const calculateTotalBalanceTimeframeTickForAccrued: (allTimeframeTickBalances: JEScheduleWithBalance[], allTimeframeTicks: TimeframeTickWithMetaData[], timeframe: "months") => COABalanceGroupedByPeriod; /** * This function helps us in finding COABalanceGroupedByPeriod for months * @param jeSchedule * @returns */ export declare const calculateCOABalanceGroupedByPeriod: (jeSchedule: JEScheduledTransaction) => COABalanceGroupedByPeriod; /** * This function helps us in finding COABalanceGroupedByPeriod for months * @param jeSchedule * @returns */ export declare const calculateCOABalanceGroupedByPeriodForAccrued: (jeSchedule: JEAccruedSchedule) => COABalanceGroupedByPeriod; /** * Function to get Duration of months out total months Eg 5/12 or 9/12 * @param jeSchedule * @returns */ export declare const getDurationOfMonthOutTotalMonth: (jeSchedule: JEScheduledTransaction) => number; /** * Function to get Duration of months out total months Eg 5/12 or 9/12 * @param jeSchedule * @returns */ export declare const getDurationOfMonthOutTotalMonthForAccrued: (jeSchedule: JEAccruedSchedule) => number; type AccountListTypesPayload = { accountListKey: AccountListKeyType; allowedAccountList: AccountType[]; }; /** * Function to get accountListKey and allowedAccountList for a given tab * @param scheduleType * @returns */ export declare const getAccountsTypesForScheduleList: (scheduleType: ScheduleTypes) => AccountListTypesPayload; export declare const getAccountLabelForScheduleType: (scheduleType: ScheduleTypes) => AccountLabel | undefined; /** * Function to get accountListKey and allowedAccountList for a given tab * @param scheduleType * @returns */ export declare const getAccountsTypesForScheduleEpics: () => AccountListTypesPayload; export declare const getDefaultSelectedTimeframeForScheduleType: (scheduleType: ScheduleTypes) => TimeframeTick; export {};