From af98a800a75d3da1126004d765c56cc219dd0a03 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Wed, 4 Jun 2025 21:56:59 +1000 Subject: [PATCH] austax: Display CGT adjustments --- schema.sql | 17 ++++- src/main.ts | 2 + src/pages/HomeView.vue | 4 +- src/plugins/austax/CGTAdjustmentsView.vue | 93 +++++++++++++++++++++++ src/plugins/austax/model.ts | 28 +++++++ 5 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 src/plugins/austax/CGTAdjustmentsView.vue create mode 100644 src/plugins/austax/model.ts diff --git a/schema.sql b/schema.sql index bb1b2dd..4de3748 100644 --- a/schema.sql +++ b/schema.sql @@ -1,5 +1,5 @@ -- DrCr: Web-based double-entry bookkeeping framework --- Copyright (C) 2022–2025 Lee Yingtong Li (RunasSudo) +-- Copyright (C) 2022-2025 Lee Yingtong Li (RunasSudo) -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by @@ -80,6 +80,21 @@ CREATE TABLE transactions ( PRIMARY KEY(id) ); +--------- +-- austax + +CREATE TABLE austax_cgt_cost_adjustments ( + id INTEGER NOT NULL, + quantity INTEGER, + commodity VARCHAR, + account VARCHAR, + acquisition_dt DATETIME, + dt DATETIME, + description VARCHAR, + cost_adjustment INTEGER, + PRIMARY KEY (id) +) + -------- -- Views diff --git a/src/main.ts b/src/main.ts index eefc581..d632f71 100644 --- a/src/main.ts +++ b/src/main.ts @@ -44,6 +44,8 @@ async function initApp() { { path: '/statement-lines/import', name: 'import-statement', component: () => import('./pages/ImportStatementView.vue') }, { path: '/transactions/:account', name: 'transactions', component: () => import('./pages/TransactionsView.vue') }, { path: '/trial-balance', name: 'trial-balance', component: () => import('./reports/TrialBalanceReport.vue') }, + // TODO: Generate this list dynamically + { path: '/austax/cgt-adjustments', name: 'cgt-adjustments', component: () => import('./plugins/austax/CGTAdjustmentsView.vue') }, { path: '/austax/tax-summary', name: 'tax-summary', component: () => import('./plugins/austax/TaxSummaryReport.vue') }, ]; const router = createRouter({ diff --git a/src/pages/HomeView.vue b/src/pages/HomeView.vue index b8453e2..2ed119b 100644 --- a/src/pages/HomeView.vue +++ b/src/pages/HomeView.vue @@ -25,7 +25,9 @@
  • Statement lines
  • Balance assertions
  • Chart of accounts
  • - + + +
  • CGT adjustments
  • diff --git a/src/plugins/austax/CGTAdjustmentsView.vue b/src/plugins/austax/CGTAdjustmentsView.vue new file mode 100644 index 0000000..31d00a2 --- /dev/null +++ b/src/plugins/austax/CGTAdjustmentsView.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/plugins/austax/model.ts b/src/plugins/austax/model.ts new file mode 100644 index 0000000..2906734 --- /dev/null +++ b/src/plugins/austax/model.ts @@ -0,0 +1,28 @@ +/* + DrCr: Web-based double-entry bookkeeping framework + Copyright (C) 2022-2025 Lee Yingtong Li (RunasSudo) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +export interface CGTAdjustment { + id: number | null, + quantity: number, + commodity: string, + account: string, + acquisition_dt: string, + dt: string, + description: string, + cost_adjustment: number, +}