From 272410e24786f44aaba86db89d2efa4c658ea41b Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 3 Jul 2026 09:01:20 +0200 Subject: [PATCH 1/2] chore: bump version to v0.2.8 and update release docs Covers the computation review and centralisation merged in #158: capacity time-off bug fix, quarterly tax revenue consistency fix, quarter boundary and TimeOff date-expansion centralisation. Co-Authored-By: Claude Sonnet 4.6 --- PROJECTS.md | 2 +- app/my_practice/version.py | 2 +- docker-compose.prod.yml | 2 +- docs/CHANGELOG.md | 10 ++++++++++ docs/FEATURES.md | 3 ++- prod.py | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/PROJECTS.md b/PROJECTS.md index 73cbbdc..0b285c5 100644 --- a/PROJECTS.md +++ b/PROJECTS.md @@ -1,7 +1,7 @@ # πŸ“‹ Projekte - Payments System **Status**: Production-ready -**Last Updated**: 2026-06-29 +**Last Updated**: 2026-07-03 ## πŸ” Recent Activity diff --git a/app/my_practice/version.py b/app/my_practice/version.py index 7edfe22..f867766 100644 --- a/app/my_practice/version.py +++ b/app/my_practice/version.py @@ -1 +1 @@ -VERSION = "v0.2.7" +VERSION = "v0.2.8" diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 98edf13..7ecd4ee 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -16,7 +16,7 @@ services: retries: 5 django: - image: ghcr.io/dholbach/my-practice:v0.2.7 + image: ghcr.io/dholbach/my-practice:v0.2.8 container_name: my-practice-django restart: unless-stopped ports: diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7ac5dd8..147d669 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,16 @@ Major features and milestones in chronological order. +## 2026-07-03 β€” v0.2.8 patch release + +- **Bug fix β€” capacity calculation**: Weighted capacity now correctly applies time off for periods spanning the 2023-08-01 capacity change (10h/week β†’ 20h/week). Previously the `available_working_days` argument was silently ignored in that branch, causing time-off periods to have no effect on capacity for spanning periods; utilisation figures in quarter-trend and annual views were overstated. +- **Bug fix β€” quarterly tax revenue**: `tax_quarter_overview` and the dashboard tax widget now use the same paid-date rule as the year summary (`RevenueCalculator.build_paid_date_range_filter` β€” invoice-date fallback when `paid_date` is NULL). Previously invoices with no `paid_date` appeared in the year total but in no quarter. All four quarters now sum exactly to the year total; regression test added. +- **Centralisation**: Quarter boundaries (`DateRangeHelper.get_quarter_range` / `get_quarter_for_date`) replace three separate hand-rolled implementations across tax_views, dashboard_widgets, and practice_analysis. +- **Centralisation**: `_timeoff_dates_for_year()` module function in `practice_days.py` replaces three identical private methods across `PracticeDayCalculator`, `HomeOfficeDayCalculator`, and `WorkdayAuditCalculator`. +- **Centralisation**: Capacity monitoring widget now delegates month session-hours and revenue to `count_session_hours` / `RevenueCalculator.get_month_revenue`, ensuring paid-date consistency across all views. +- **Tests**: New `test_capacity_helpers.py`; expanded `test_date_helpers.py` (quarter helpers); `TaxQuarterOverviewConsistencyTest` in `test_views_tax.py`. +- **Docstring fix**: `DateRangeHelper.count_working_days` example corrected (had referenced a Saturday as a Friday). + ## 2026-07-01 β€” v0.2.7 patch release - **Dashboard redesign** (P-117): Replaced chart-heavy dashboard with an operational cockpit β€” stats strip (year revenue, profit, outstanding, time off), two-pane console (Heute agenda + Diese Woche focus on the left; Braucht Aktion queue on the right), quick-action buttons (+ Neue Rechnung / + Neue Klient:in). diff --git a/docs/FEATURES.md b/docs/FEATURES.md index d99dba2..e1519dc 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -105,7 +105,7 @@ Complete feature list for the Therapy Practice Management System. - βœ… Period-based analysis (Month/Quarter/Half-Year/Year/Custom) - βœ… Client classification and activity tracking - βœ… Capacity planning with working days calculation -- βœ… Time-off integration and capacity impact +- βœ… Time-off integration and capacity impact β€” correctly applied across the 2023-08 capacity change (10h β†’ 20h/week) - βœ… Smart insights generation (8 insight types) - βœ… 4-quarter historical trends - βœ… Active client ratio tracking @@ -116,6 +116,7 @@ Complete feature list for the Therapy Practice Management System. ### Reports - βœ… Tax Year Summary (SteuererklΓ€rung) - βœ… Tax Year Summary: Home-Office-Pauschale (calendar-based non-practice weekdays minus holidays/time off), deduction row in Gewinn, improved link contrast +- βœ… Tax quarter overview: all four quarters now sum exactly to the year total β€” invoices with no `paid_date` fall into their `invoice_date` quarter (same fallback rule as the year summary) - βœ… Revenue Report with filters - βœ… Client detail reports - βœ… Session reconciliation report diff --git a/prod.py b/prod.py index ba5dad2..cad27ea 100755 --- a/prod.py +++ b/prod.py @@ -12,7 +12,7 @@ import time import urllib.request -VERSION = "v0.2.7" # updated each release β€” keeps prod.py and docker-compose.prod.yml in sync +VERSION = "v0.2.8" # updated each release β€” keeps prod.py and docker-compose.prod.yml in sync COMPOSE_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "docker-compose.prod.yml") COMPOSE = ["docker", "compose", "-f", COMPOSE_FILE] From 3be1bd4a2fe8407999634f9de5265500436228f9 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 3 Jul 2026 11:37:31 +0200 Subject: [PATCH 2/2] docs: remove personal setup detail from FEATURES.md capacity entry Co-Authored-By: Claude Sonnet 4.6 --- docs/FEATURES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/FEATURES.md b/docs/FEATURES.md index e1519dc..1ec09b7 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -105,7 +105,7 @@ Complete feature list for the Therapy Practice Management System. - βœ… Period-based analysis (Month/Quarter/Half-Year/Year/Custom) - βœ… Client classification and activity tracking - βœ… Capacity planning with working days calculation -- βœ… Time-off integration and capacity impact β€” correctly applied across the 2023-08 capacity change (10h β†’ 20h/week) +- βœ… Time-off integration and capacity impact - βœ… Smart insights generation (8 insight types) - βœ… 4-quarter historical trends - βœ… Active client ratio tracking