mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
add server to monorepo.
This commit is contained in:
55
packages/server/src/interfaces/Journal.ts
Normal file
55
packages/server/src/interfaces/Journal.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
export interface IJournalEntry {
|
||||
id: number;
|
||||
index?: number;
|
||||
|
||||
date: Date;
|
||||
credit: number;
|
||||
debit: number;
|
||||
account: number;
|
||||
referenceType: string;
|
||||
referenceId: number;
|
||||
|
||||
referenceTypeFormatted: string;
|
||||
|
||||
itemId?: number;
|
||||
transactionNumber?: string;
|
||||
referenceNumber?: string;
|
||||
|
||||
transactionType?: string;
|
||||
note?: string;
|
||||
userId?: number;
|
||||
contactType?: string;
|
||||
contactId?: number;
|
||||
branchId: number;
|
||||
}
|
||||
|
||||
export interface IJournalPoster {
|
||||
entries: IJournalEntry[];
|
||||
|
||||
credit(entry: IJournalEntry): void;
|
||||
debit(entry: IJournalEntry): void;
|
||||
|
||||
removeEntries(ids: number[]): void;
|
||||
|
||||
saveEntries(): void;
|
||||
saveBalance(): void;
|
||||
deleteEntries(): void;
|
||||
|
||||
getAccountBalance(
|
||||
accountId: number,
|
||||
closingDate?: Date | string,
|
||||
dateType?: string
|
||||
): number;
|
||||
getAccountEntries(accountId: number): IJournalEntry[];
|
||||
}
|
||||
|
||||
export type TEntryType = 'credit' | 'debit';
|
||||
|
||||
export interface IAccountChange {
|
||||
credit: number;
|
||||
debit: number;
|
||||
}
|
||||
|
||||
export interface IAccountsChange {
|
||||
[key: string]: IAccountChange;
|
||||
}
|
||||
Reference in New Issue
Block a user