Commit Graph
110 Commits
Author SHA1 Message Date
Marcel PeterkauandClaude Sonnet 5 a1719cad5e Handle failed direct debits through the same reminder mechanism
A Rücklastschrift is still the member's own failure to ensure cover or
provide valid bank details, so it belongs in the same escalation ladder
as a regular reminder -- it now occupies whatever level the claim is next
due for, alongside a "Rücklastschrift" preset next to the existing
Mahnstufe presets.

Mahnung vorbereiten no longer lets the board pick a level (it's computed
automatically from what's already been sent, since the sequencing was
already server-enforced) and replaces the single fee field with a small
items table (Beschreibung + Betrag), so a reminder can carry several
charges at once -- e.g. Rücklastschriftgebühr plus Bankgebühr plus Porto
-- each landing on the claim as its own line item instead of one lump
sum under a generic label. The description field offers the configured
standard texts but stays free-editable.

Those standard texts and amounts, plus the dunning levels themselves
(name/fee/deadline), are now configurable from Optionen -> Mahnungen
instead of only being editable by hand-editing repository.json, which
was the case for the whole reminder policy until now. Cleaned up
reminder_fee/failed_debit_fee on contribution rules while at it -- both
were unused leftovers superseded by this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 03:13:04 +02:00
Marcel PeterkauandClaude Sonnet 5 46795fc110 Reword the single-member housekeeper changelog entry so the PR carries a real diff
A prior push mixup (feature/member-contribution-overrides' origin ref had
briefly advanced to include this branch's own "Document the single-member
housekeeper run feature" commit) meant that commit's changelog line already
rode along into dev through PR #17 -- without the actual feature code, which
only exists here. CI's PR gate expects CHANGELOG.json to differ from dev, but
the merged text was already byte-identical, so this branch's PR couldn't pass.
Rewording the entry (adding the actual "Mitgliedsakte" entry point) keeps it
accurate and gives this branch a real changelog diff again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 03:12:44 +02:00
Marcel Peterkau 227ba8b128 Merge branch 'dev' into feature/housekeeper-run-single-member 2026-08-14 23:35:49 +00:00
Git-CI 7144d961c7 ci: bump dev version to 0.1.0-dev11 [skip ci] 2026-08-15 01:30:42 +02:00
Marcel Peterkau 0a70776154 Merge pull request 'Feature/member contribution overrides' (#17) from feature/member-contribution-overrides into dev
Reviewed-on: https://git.hiabuto.net/C3MA/CCMA/pulls/17
Reviewed-by: Matcha <20+matcha@noreply.git.hiabuto.net>
2026-08-14 23:29:05 +00:00
Marcel Peterkau e0125d008f Merge branch 'dev' into feature/member-contribution-overrides 2026-08-14 23:27:30 +00:00
Git-CI 7596f94444 ci: bump dev version to 0.1.0-dev10 [skip ci] 2026-08-15 01:27:15 +02:00
Marcel Peterkau 9cd611aeba Merge branch 'dev' into feature/member-contribution-overrides 2026-08-14 23:25:16 +00:00
Marcel Peterkau 171ba6bf28 Merge pull request 'Feature/allocation amount prefill' (#16) from feature/allocation-amount-prefill into dev
Reviewed-on: https://git.hiabuto.net/C3MA/CCMA/pulls/16
Reviewed-by: Matcha <20+matcha@noreply.git.hiabuto.net>
2026-08-14 23:24:56 +00:00
Marcel PeterkauandClaude Sonnet 5 ee99577b20 Run the housekeeper for a single member, optionally retroactively
Add a "Hausmeister für dieses Mitglied" button to the member view. It
runs every rule scoped to just that member -- e.g. after editing a
contribution override or payment frequency, to recompute their claims on
demand instead of waiting for or triggering a full run over every
member. A checkbox lets the board force retroactive claim creation for
just that one run, without changing the application-wide default
setting.

Housekeeper.run() gained member_id and retroactive_claims parameters.
Scoping to one member skips the asset checks and leaves every other
member's tasks completely untouched, since their rules never ran this
pass and so fall outside the resolved-scope set that
_resolve_stale_tasks uses to decide what to clear.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 00:59:01 +02:00
Marcel PeterkauandClaude Sonnet 5 c07bdff04e Document the single-member housekeeper run feature
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 00:58:10 +02:00
Marcel PeterkauandClaude Sonnet 5 1e29cc1e3d Document allocation prefill and membership fee override features
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 00:58:10 +02:00
Marcel PeterkauandClaude Sonnet 5 2484a1631d Add individually agreed membership fees (contribution overrides)
Members are sometimes given a fee that deviates from the regular
schedule -- e.g. a reduced rate for students -- for a specific period.
Add a per-member "Beitrag" tab where such deviations can be recorded
with a month-granular date range (Ab/Bis), a mandatory reason, and
either a fixed annual amount or a percentage discount off whichever
base rate is in effect at the time.

Data model: ContributionData gets a contribution_overrides list, each
entry validated (month format, Bis >= Ab, non-overlapping ranges per
member, reason required) and CRUD'd through the repository
(record/update/delete/get_contribution_override), consistent with how
donations already work.

Integration: contribution_claims.py now computes each membership-fee
claim's amount month by month instead of a single rate for the whole
billing period, picking up whichever override (if any) covers each
individual month. That handles an override starting or ending mid
period correctly (e.g. a semiannual payer whose discount begins in
March) without changing behavior for members without overrides.
Already-created claims are never recalculated retroactively, matching
how changes to the global contribution rates already behave.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 00:57:51 +02:00
Marcel PeterkauandClaude Sonnet 5 44228dd7dd Document the payment allocation amount prefill in the changelog
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 00:57:32 +02:00
Marcel Peterkau 44af7df8e2 Merge branch 'dev' into feature/allocation-amount-prefill 2026-08-14 22:26:47 +00:00
Git-CI 5cbc5c3aad ci: bump dev version to 0.1.0-dev9 [skip ci] 2026-08-15 00:19:54 +02:00
Marcel Peterkau a91c4ddd24 Merge branch 'dev' into feature/allocation-amount-prefill 2026-08-14 22:18:21 +00:00
Marcel Peterkau 1c26f2ed0a Merge pull request 'Feature/table usability fixes' (#15) from feature/table-usability-fixes into dev
Reviewed-on: https://git.hiabuto.net/C3MA/CCMA/pulls/15
Reviewed-by: Matcha <20+matcha@noreply.git.hiabuto.net>
2026-08-14 22:18:14 +00:00
Marcel Peterkau 222fc1a337 Merge branch 'dev' into feature/allocation-amount-prefill 2026-08-14 22:03:49 +00:00
Marcel Peterkau 9bf62809b7 Merge branch 'dev' into feature/table-usability-fixes 2026-08-14 22:03:08 +00:00
Marcel PeterkauandClaude Sonnet 5 4906db3d55 Prefill the allocation amount when clicking an unallocated claim/donation
Clicking a claim or donation row in the payment allocation table used to
just show "0.00" if nothing was allocated to it yet, requiring the board
to type the amount by hand every time. It now suggests whichever is
smaller: what that claim/donation still has open, or what's left unused
of the payment -- so the common case is click the row, then Zuordnung
setzen, done. Rows that already have an allocation still show their
current value instead, so editing one isn't overwritten by the
suggestion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 00:02:37 +02:00
Marcel PeterkauandClaude Sonnet 5 52904a29b4 Document the table/pane usability tuning and GnuCash import improvements
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:56:51 +02:00
Marcel PeterkauandClaude Sonnet 5 195ae0e228 Replace the GnuCash import checkbox column with native multi-select
Selecting bookings to import now uses the Treeview's own multi-selection
(click, Ctrl+click, Shift+click for ranges) instead of a dedicated
checkbox column that had to be clicked precisely -- more standard and
much faster for marking many rows at once.

Bookings matching an existing payment's date+amount are no longer
blocked from selection; they're still flagged (red row, "Bereits
vorhanden"). If any selected booking is such a duplicate, importing now
asks whether to skip those or instead adopt the booking's description
onto the already-recorded payment. That relabeling is handled by a new
repository.update_payment_reference, which only touches the reference
and gnucash_transaction_id fields, leaving date/amount/allocations
untouched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:43:55 +02:00
Git-CI 3d81a728b1 ci: bump dev version to 0.1.0-dev8 [skip ci] 2026-08-14 23:42:28 +02:00
Marcel Peterkau 7440d18c35 Merge pull request 'Feature/housekeeper dunning rules' (#14) from feature/housekeeper-dunning-rules into dev
Reviewed-on: https://git.hiabuto.net/C3MA/CCMA/pulls/14
Reviewed-by: Matcha <20+matcha@noreply.git.hiabuto.net>
2026-08-14 21:40:48 +00:00
Marcel Peterkau d2f4c9588f Merge branch 'dev' into feature/housekeeper-dunning-rules 2026-08-14 21:40:12 +00:00
Marcel PeterkauandClaude Sonnet 5 e25accd35b Fix column order/widths and sizing in Hausmeister and GnuCash import
Hausmeister: reorder columns to Level, Fällig, Vorgang, Details. Level,
Fällig and Vorgang get a fixed width; only Details stretches to fill the
remaining space.

GnuCash-Import dialog: opens at 80% of the current monitor's size
(monitor-aware via the existing screeninfo-based helpers, not just the
raw/virtual screen size) instead of a fixed 960x640. In its booking
table, Import, Datum, Betrag and Status get a fixed width; Beschreibung
and Memo share the remaining space.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:26:07 +02:00
Git-CI c0486770b8 ci: bump dev version to 0.1.0-dev7 [skip ci] 2026-08-14 23:13:23 +02:00
Marcel PeterkauandClaude Sonnet 5 65bcc9f447 Fix column order/widths and Chronik pane share in the member view
Forderungen: reorder columns to Fällig, Betrag, Status, Forderung.
Zahlungen and Spenden already had the requested order. Across all three
tables, the date/amount-like columns now share one fixed width, the
status column is a third wider (it tends to hold longer label text),
and only the trailing description/reference column stretches to fill
the remaining space.

The Chronik pane now defaults to a third of the member view's width
instead of three fifths, matching the other panes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:11:44 +02:00
Marcel Peterkau 7d3891b39b Merge branch 'dev' into feature/housekeeper-dunning-rules 2026-08-14 21:11:19 +00:00
Marcel Peterkau 241ca69190 Merge pull request 'Feature/claim delete payment create donations' (#13) from feature/claim-delete-payment-create-donations into dev
Reviewed-on: https://git.hiabuto.net/C3MA/CCMA/pulls/13
Reviewed-by: Matcha <20+matcha@noreply.git.hiabuto.net>
2026-08-14 21:11:07 +00:00
Marcel PeterkauandClaude Sonnet 5 ad5aeb74b6 Document the housekeeper dunning/SEPA rule rework in the changelog
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:03:04 +02:00
Marcel PeterkauandClaude Sonnet 5 4e4aa22589 Stop double-reporting overdue claims and add SEPA-specific followup
The claim-status and reminder-due housekeeper rules used to run
independently, so once a claim was both overdue and past its dunning
grace period, both a generic "überfällig" task and a "Mahnung fällig"
task showed up for the same problem. Rules can't see each other's
output, so the fix is to give reminder-due sole ownership of the whole
overdue lifecycle: a plain overdue notice during the grace period, then
either the dunning escalation or a fallback overdue notice (dunning
hold active, or waiting between reminder levels) -- never both at once.
claim-status now only handles claims that aren't overdue yet ("bald
fällig").

Members with an active SEPA mandate get a new sepa_debit_overdue finding
instead of the postal dunning escalation once a claim is past its grace
period, since mailing a Mahnung makes no sense for a member who pays by
direct debit -- the board needs to check/retrigger the debit instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:02:37 +02:00
Marcel PeterkauandClaude Sonnet 5 42cde2a0c8 Remember the last-used GnuCash account per file
AppConfig now keeps a gnucash_last_accounts map (file path -> account
guid). When the import dialog opens a file it already knows, it
auto-selects whichever account was picked last time for that specific
file instead of always defaulting to the first one alphabetically;
picking a different account updates and persists the mapping right away.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:02:37 +02:00
Marcel PeterkauandClaude Sonnet 5 745e634a8b Import payments per member from a GnuCash file
Adds a "Zahlungen importieren" button to the member Zahlungen tab that opens
a dedicated window: point it at a GnuCash file (plain or gzip-compressed
XML, defaults to the file configured in Optionen), pick one of its accounts,
and narrow the account's bookings down with a description-contains filter
and an optional date range.

Each matching booking gets a checkbox to mark it for import as a payment.
Before anything is ticked, bookings are cross-checked against this member's
existing payments by date + amount; a match is highlighted and its checkbox
is refused, so re-importing the same statement can't create a duplicate
payment. Only bookings with a positive amount on the selected account are
offered, since those are the ones that make sense as an incoming payment.

Parsing lives in ccma.services.gnucash_import, independent of the UI, and
is covered by tests against a synthetic GnuCash XML fixture (plain and
gzip-compressed) -- no gnucash/piecash dependency needed since the native
file format is just XML.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:02:37 +02:00
Marcel PeterkauandClaude Sonnet 5 e7a18b5cde Document claim deletion, donations, and payment allocation in the changelog
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 23:02:18 +02:00
Marcel PeterkauandClaude Sonnet 5 4dd625c09f Only list open or already-linked claims/donations in the payment dialog
Show a claim or donation in the Zahlung anlegen/bearbeiten allocation
table only if it still has an open balance, or is already linked to this
payment -- fully settled ones no longer clutter the list.

Visibility is decided from a snapshot taken when the dialog opens (or
when a donation is created inline), not recomputed live, so a row never
disappears just because the user temporarily unassigned it with
"Zuordnung lösen" -- it stays there to add back with "Zuordnung setzen"
until the dialog is saved.

Also fixes a capacity display bug this surfaced: "Maximal zuordenbar"
was computed by mixing the persisted claim/donation balance with the
live, currently-edited allocation amount, so it inflated every time the
amount was changed during a session. It's now computed against a fixed
baseline captured at dialog open, so it stays accurate throughout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 21:28:52 +02:00
Marcel PeterkauandClaude Sonnet 5 a5d9abd59a Allocate open claims and donations directly from the payment dialog
Recording a payment previously meant saving it bare, then separately
opening a claim to allocate money to it. Zahlung anlegen now lists a
member's open claims and donations right in the same dialog with a
select + amount field to assign parts of the payment on the spot, and a
"Neue Spende anlegen" button to create a donation inline and allocate to
it immediately -- covering members who pay more than the membership fee
in one transfer.

Shared the same allocation table in the existing payment-edit dialog so
editing a payment shows and preserves donation allocations too; before
this, saving an edited payment silently dropped any donation allocation
because update_payment only round-tripped claim allocations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 21:22:08 +02:00
Marcel PeterkauandClaude Sonnet 5 42fb4c4224 Allow deleting claims, creating standalone payments, and add a donations tab
Claims could previously only be cancelled (stornieren), which blocks once a
payment is allocated. Add a hard delete that releases any linked
payments/credits back to being unallocated instead of destroying them.

Payments could only be created from within a claim, forcing immediate
allocation. Add a bare payment creation flow in the Zahlungen tab so
incoming transfers can be logged first and allocated later.

Add a per-member Spenden tab (donations, backed by a new donations list on
ContributionData) so amounts paid beyond the membership fee can be tracked
and existing free payments allocated to them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 21:02:51 +02:00
Git-CI a61ea3cb57 ci: bump dev version to 0.1.0-dev6 [skip ci] 2026-07-30 19:45:19 +02:00
Marcel Peterkau aa94145105 Merge pull request 'feature/payment-frequency-per-member' (#12) from feature/payment-frequency-per-member into dev
Reviewed-on: https://git.hiabuto.net/C3MA/CCMA/pulls/12
Reviewed-by: Matcha <matcha@noreply.git.hiabuto.net>
2026-07-30 17:43:09 +00:00
Marcel Peterkau ade92bfe06 Merge branch 'dev' into feature/payment-frequency-per-member 2026-07-30 17:43:00 +00:00
Git-CI 6ac205feb8 ci: bump dev version to 0.1.0-dev5 [skip ci] 2026-07-30 19:42:52 +02:00
Marcel Peterkau 5bacc005f6 Merge branch 'dev' into feature/payment-frequency-per-member 2026-07-30 17:40:45 +00:00
Marcel Peterkau 539859d4c5 Merge pull request 'feat: add application date to members' (#11) from feature/application-date into dev
Reviewed-on: https://git.hiabuto.net/C3MA/CCMA/pulls/11
Reviewed-by: Matcha <matcha@noreply.git.hiabuto.net>
2026-07-30 17:40:34 +00:00
Marcel Peterkau 7a0cdbc04e feat: add application date to members 2026-07-30 19:35:48 +02:00
Marcel Peterkau 6b62263706 Merge branch 'dev' into feature/payment-frequency-per-member 2026-07-30 17:31:49 +00:00
Marcel Peterkau ba3238e61a ui: move payment frequency to banking tab 2026-07-30 19:22:12 +02:00
Marcel Peterkau c3cdf71506 feat: add per-member payment frequencies 2026-07-30 19:17:26 +02:00
Git-CI e3f0a1df86 ci: bump dev version to 0.1.0-dev4 [skip ci] 2026-07-30 19:16:01 +02:00