import * as plugins from './plugins.js'; import type { TSKRType, TTransactionStatus, ITransactionData } from './skr.types.js'; export declare class Transaction extends plugins.nosqldb.SmartDataDbDoc { id: string; transactionNumber: string; date: Date; debitAccount: string; creditAccount: string; amount: number; description: string; reference: string; skrType: TSKRType; vatAmount: number; costCenter: string; status: TTransactionStatus; reversalOf: string; reversedBy: string; period: string; fiscalYear: number; createdAt: Date; postedAt: Date | null; createdBy: string; constructor(data?: Partial); private generateTransactionNumber; /** * Retired: wrote a standalone Transaction and moved the accounts' cached * balances. The Transaction collection is a frozen read model. */ static createTransaction(_data: ITransactionData): Promise; static getTransactionById(id: string): Promise; static getTransactionsByAccount(accountNumber: string, skrType: TSKRType): Promise; static getTransactionsByPeriod(period: string, skrType: TSKRType): Promise; static getTransactionsByDateRange(dateFrom: Date, dateTo: Date, skrType: TSKRType): Promise; /** * Retired: posted this instance into the frozen Transaction collection. */ validateAndPost(): Promise; /** * Retired: marked the original 'reversed'. A posted entry is immutable; * a Storno entry reverses it. */ reverseTransaction(): Promise; beforeSave(): Promise; }