@fin.cx/skr
Version:
SKR03 and SKR04 German accounting standards for double-entry bookkeeping
35 lines (34 loc) • 1.39 kB
TypeScript
import * as plugins from './plugins.js';
import type { TAccountType, TSKRType, IAccountData } from './skr.types.js';
declare const SmartDataDbDoc: typeof plugins.smartdata.SmartDataDbDoc;
export declare class Account extends SmartDataDbDoc<Account, Account> {
id: string;
accountNumber: string;
accountName: string;
accountClass: number;
accountGroup: number;
accountSubgroup: number;
accountType: TAccountType;
skrType: TSKRType;
description: string;
vatRate: number;
balance: number;
debitTotal: number;
creditTotal: number;
isActive: boolean;
isSystemAccount: boolean;
createdAt: Date;
updatedAt: Date;
constructor(data?: Partial<IAccountData>);
static createAccount(data: IAccountData): Promise<Account>;
static getAccountByNumber(accountNumber: string, skrType: TSKRType): Promise<Account | null>;
static getAccountsByClass(accountClass: number, skrType: TSKRType): Promise<Account[]>;
static getAccountsByType(accountType: TAccountType, skrType: TSKRType): Promise<Account[]>;
static searchAccounts(searchTerm: string, skrType?: TSKRType): Promise<Account[]>;
updateBalance(debitAmount?: number, creditAmount?: number): Promise<void>;
deactivate(): Promise<void>;
activate(): Promise<void>;
getNormalBalance(): 'debit' | 'credit';
beforeSave(): Promise<void>;
}
export {};