| 1 |
import { get } from "../../api"; |
| 2 |
import type { AccountTreeNode } from "../../charts/hierarchy"; |
| 3 |
import { _ } from "../../i18n"; |
| 4 |
import { getURLFilters } from "../../stores/filters"; |
| 5 |
import { Route } from "../route"; |
| 6 |
import BalanceSheet from "./BalanceSheet.svelte"; |
| 7 |
import IncomeStatement from "./IncomeStatement.svelte"; |
| 8 |
import TrialBalance from "./TrialBalance.svelte"; |
| 9 |
|
| 10 |
export interface TreeReportProps { |
| 11 |
charts: unknown; |
| 12 |
trees: AccountTreeNode[]; |
| 13 |
date_range: { begin: Date; end: Date } | null; |
| 14 |
} |
| 15 |
|
| 16 |
export const income_statement = new Route( |
| 17 |
"income_statement", |
| 18 |
IncomeStatement, |
| 19 |
async (url) => get("income_statement", getURLFilters(url)), |
| 20 |
() => _("Income Statement"), |
| 21 |
); |
| 22 |
|
| 23 |
export const balance_sheet = new Route( |
| 24 |
"balance_sheet", |
| 25 |
BalanceSheet, |
| 26 |
async (url) => get("balance_sheet", getURLFilters(url)), |
| 27 |
() => _("Balance Sheet"), |
| 28 |
); |
| 29 |
|
| 30 |
export const trial_balance = new Route( |
| 31 |
"trial_balance", |
| 32 |
TrialBalance, |
| 33 |
async (url) => get("trial_balance", getURLFilters(url)), |
| 34 |
() => _("Trial Balance"), |
| 35 |
); |