UNPKG

@accounter/server

Version:

The test suite is split into three Vitest projects for efficiency and isolation:

14 lines (13 loc) 1.37 kB
import type { LedgerProto, StrictLedgerProto } from '../../../shared/types/index.js'; import type { IGetChargesByIdsResult } from '../../charges/types.js'; import type { IGetDocumentsByChargeIdResult } from '../../documents/types.js'; import type { IGetTransactionsByChargeIdsResult } from '../../transactions/types.js'; import { IGetBalanceCancellationByChargesIdsResult } from '../types.js'; export declare function ledgerEntryFromDocument(context: GraphQLModules.Context, document: IGetDocumentsByChargeIdResult, charge: IGetChargesByIdsResult, ownerId: string, taxCategoryId: string): Promise<StrictLedgerProto>; export declare function ledgerEntryFromMainTransaction(transaction: IGetTransactionsByChargeIdsResult, context: GraphQLModules.Context, chargeId: string, ownerId: string, businessId?: string, gotRelevantDocuments?: boolean): Promise<StrictLedgerProto>; export declare function ledgerEntryFromBalanceCancellation(balanceCancellation: IGetBalanceCancellationByChargesIdsResult, ledgerBalance: Map<string, { amount: number; entityId: string; }>, financialAccountLedgerEntries: StrictLedgerProto[], chargeId: string, ownerId: string, context: GraphQLModules.Context): LedgerProto; export declare function isRefundCharge(description?: string | null): boolean; export declare function getExchangeDates(financialAccountLedgerEntries: LedgerProto[]): Date;