@accounter/server
Version:
13 lines (12 loc) • 1.29 kB
TypeScript
import type { IGetDocumentsByChargeIdResult } from '../../documents/types';
import type { IGetTransactionsByChargeIdsResult } from '../../transactions/types.js';
import type { LedgerProto, StrictLedgerProto } from '../../../shared/types/index.js';
import { IGetBalanceCancellationByChargesIdsResult } from '../types.js';
export declare function ledgerEntryFromDocument(document: IGetDocumentsByChargeIdResult, context: GraphQLModules.Context, chargeId: string, 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: StrictLedgerProto[]): Date;