/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/document" />
/// <reference types="lodash" />
/// <reference types="mongoose/types/aggregate" />
/// <reference types="mongoose/types/callback" />
/// <reference types="mongoose/types/collection" />
/// <reference types="mongoose/types/connection" />
/// <reference types="mongoose/types/cursor" />
/// <reference types="mongoose/types/document" />
/// <reference types="mongoose/types/error" />
/// <reference types="mongoose/types/expressions" />
/// <reference types="mongoose/types/helpers" />
/// <reference types="mongoose/types/middlewares" />
/// <reference types="mongoose/types/indexes" />
/// <reference types="mongoose/types/models" />
/// <reference types="mongoose/types/mongooseoptions" />
/// <reference types="mongoose/types/pipelinestage" />
/// <reference types="mongoose/types/populate" />
/// <reference types="mongoose/types/query" />
/// <reference types="mongoose/types/schemaoptions" />
/// <reference types="mongoose/types/schematypes" />
/// <reference types="mongoose/types/session" />
/// <reference types="mongoose/types/types" />
/// <reference types="mongoose/types/utility" />
/// <reference types="mongoose/types/validation" />
/// <reference types="mongoose/types/virtuals" />
/// <reference types="mongoose" />
/// <reference types="mongoose/types/inferschematype" />
import dayjs from 'dayjs';
import { ILoanStatementTransactionDoc, ILoanStatementTransactionWithId } from '../models/LoanStatementTransaction.model';
import { ELedgerReportType } from '../db/loan-statement.db';
import { FinancialIndexesService } from './financial-indexes.service';
import { LoanTransactionsService } from './loan-transactions.service';
import { LoanStatementStatusService, SelectablePeriod } from './loan-statement-status.service';
import { LoanChargesService } from './loan-charges.service';
import { LoanPaymentsService } from './loan-payments.service';
import { LoanStatementBalanceService } from './loan-statement-balance.service';
import { TermLoanService } from './term-loan.service';
import { UploadsService } from './uploads.service';
import { LoanStatementEffectsService } from './loan-statement-effects.service';
export interface IStatementPeriod {
    start: dayjs.Dayjs;
    end: dayjs.Dayjs;
}
export declare class LoanStatementService {
    private readonly financialIndexesService;
    private readonly loanChargesService;
    private readonly loanPaymentsService;
    private readonly loanStatementBalanceService;
    private readonly loanStatementStatusService;
    private readonly loanTransactionsService;
    private readonly termLoanService;
    private readonly uploadsService;
    private readonly getLoanStatementEffectsService;
    constructor(financialIndexesService: FinancialIndexesService, loanChargesService: LoanChargesService, loanPaymentsService: LoanPaymentsService, loanStatementBalanceService: LoanStatementBalanceService, loanStatementStatusService: LoanStatementStatusService, loanTransactionsService: LoanTransactionsService, termLoanService: TermLoanService, uploadsService: UploadsService, getLoanStatementEffectsService: () => LoanStatementEffectsService);
    private getGroupedData;
    getTransactionById(transactionId: string): Promise<import("mongoose").FlattenMaps<ILoanStatementTransactionDoc> & Required<{
        _id: import("mongoose").Types.ObjectId;
    }>>;
    getFirstStatementTransaction(productId: string): Promise<ILoanStatementTransactionDoc>;
    getBorrowerWithPeriods(borrowerId: string, period: {
        selectedPeriod: string;
        selectedStart: Date;
        selectedEnd: Date;
    }, splitPeriods?: boolean): Promise<any[]>;
    getPeriods(selectedPeriod: string, productId: string): Promise<IStatementPeriod[]>;
    getDays(period: {
        start: dayjs.Dayjs;
        end: dayjs.Dayjs;
    }): string[];
    calculateBorrowerStatement(borrowerId: string, selectedPeriod: SelectablePeriod): Promise<void>;
    recalculateAllProducts(): Promise<void>;
    calculateAllBorrowers(): Promise<void>;
    calculateProductStatement(productId: string, periods: IStatementPeriod[]): Promise<void>;
    useFloatingBalance(productId: string): Promise<boolean>;
    calculateStatement(productId: string, period: IStatementPeriod, statementDate?: Date): Promise<void>;
    reorderStatementForDate(productId: string, date: Date): Promise<void>;
    getBalancesDaily(productId: string, period: {
        start: Date;
        end: Date;
    }): Promise<{
        balance: number;
        floatedBalance: number;
        day: string;
    }[]>;
    private calculateDisbursementFee;
    cleanProductStatement(productId: string, statementDate: Date): Promise<void>;
    cleanProductAllStatements(chargesId: string[]): Promise<void>;
    getProductStatementPdfData(productId: string, start: string, end: string): Promise<{
        groupedData: {
            INTEREST_FEE: number;
            ADMIN_FEE: number;
            UNUSED_LINE_FEE: number;
            WIRE_FEE: number;
            ANNUAL_LINE_FEE: number;
        };
        otherStatements: any[];
        totalAmount: number;
        transactions: import("../models/LoanTransaction.model").ILoanTransactionViewWithBank[];
    }>;
    getProductShortStatementRepresentation(productId: string, start: string, end: string): Promise<any[][]>;
    createStatementTransaction(transaction: Partial<ILoanStatementTransactionWithId>): Promise<void>;
    updateStatementTransaction(transaction: Partial<ILoanStatementTransactionWithId>): Promise<void>;
    saveLoanTransaction(transaction: Partial<ILoanStatementTransactionWithId>): Promise<void>;
    deleteStatementTransaction(transactionId: string): Promise<void>;
    addBalancesToStatements(transactionDocs: ILoanStatementTransactionDoc[]): Promise<{
        floatedBalance: number;
        _id: import("mongoose").Types.ObjectId;
        createdAt: Date;
        updatedAt: Date;
        order: number;
        date: Date;
        chargeId: import("mongoose").Types.ObjectId;
        amount: number;
        amountPaid?: number;
        balance?: number;
        isSystem: boolean;
        memo: string;
        settlementCode?: string;
        userId?: string;
        isEditable?: boolean;
        __v?: any;
        $locals: Record<string, unknown>;
        $op: "save" | "validate" | "remove";
        $where: Record<string, unknown>;
        baseModelName?: string;
        collection: import("mongoose").Collection<import("bson").Document>;
        db: import("mongoose").Connection;
        errors?: import("mongoose").Error.ValidationError;
        id?: any;
        isNew: boolean;
        schema: import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
            [x: string]: unknown;
        }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
            [x: string]: unknown;
        }>> & import("mongoose").FlatRecord<{
            [x: string]: unknown;
        }> & Required<{
            _id: unknown;
        }>>;
    }[]>;
    getLastTransactionOrder(transaction: Partial<ILoanStatementTransactionDoc>, onlySystem?: boolean): Promise<number>;
    getPreviousTransaction(transaction: ILoanStatementTransactionDoc): Promise<ILoanStatementTransactionDoc>;
    getTransactionsFromDate(productId: string, startDate: Date): Promise<ILoanStatementTransactionDoc[]>;
    getTransactionsForPeriod(productId: string, period: {
        start: Date;
        end: Date;
    }): Promise<ILoanStatementTransactionDoc[]>;
    recalculateAllBalances(borrowerIds: string[], userId: string): Promise<void>;
    recalculateAllStatements(selectedPeriod: SelectablePeriod, borrowerIds: string[]): Promise<void>;
    recalculateAllTermLoans(borrowerIds: string[]): Promise<void>;
    getStatementBorrowersTransactions(start: string, end: string, selectedPeriod: string, selectedBorrowerIds: string[], ledgerType: ELedgerReportType): Promise<{
        transactions: ({
            borrowerCode: string;
            type: string;
            chargeCode: string;
            PLCode: string;
            productCode: string;
            productName: string;
            info: string;
            title: string;
            amount: string;
            statementAmount: string;
        } | import("lodash").Omit<import("../db/reports.db").ILedgerReportRow, "balance" | "floatedBalance">)[];
    }[]>;
    getBorrowerComplianceData(borrowerId: string, date: Date): Promise<{
        productTotals: {
            [productId: string]: number;
        };
        total: number;
        totalPaid: number;
        dueDate: any;
        revolverBalance: number;
        termBalance: number;
    }>;
    private getOutstandingStatements;
    getOutstandingStatementsExcel(borrowerIds: string[], selectedDate: Date, fullMonth: boolean): Promise<any>;
    getBorrowerProductTotals(borrowerId: string): Promise<{
        productTotals: {
            [productId: string]: number;
        };
        total: number;
        totalPaid: number;
        dueDate: any;
        revolverBalance: number;
        termBalance: number;
    }>;
    getProductsTotals(productIds: string[]): Promise<{
        [productId: string]: number;
    }>;
    private getAccruedStatement;
    calculateAccruedStatementForBBC(bbcDateId: string): Promise<number>;
    calculateAccruedStatementForBorrower(borrowerId: string): Promise<number>;
}
