mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
refactoring: trial balance sheet report. refactoring: general ledger report. refactoring: journal report. refactoring: P&L report.
18 lines
617 B
TypeScript
18 lines
617 B
TypeScript
import { IBalanceSheetQuery } from 'interfaces';
|
|
import TenantRepository from 'repositories/TenantRepository';
|
|
|
|
|
|
export default class JournalRepository extends TenantRepository {
|
|
|
|
balanceSheet(query: IBalanceSheetQuery) {
|
|
|
|
// Accounts dependency graph.
|
|
const accountsGraph = Account.toDependencyGraph(balanceSheetAccounts);
|
|
|
|
// Load all entries that associated to the given accounts.
|
|
const journalEntriesCollected = Account.collectJournalEntries(balanceSheetAccounts);
|
|
|
|
const journalEntries = new JournalPoster(accountsGraph);
|
|
journalEntries.loadEntries(journalEntriesCollected);
|
|
}
|
|
} |