- Save cover email body as DMS document with new 'email' context type
- Show email body separately from attachments in email detail view
- Add per-category DMS document assignment in quarterly confirmation
(Studiennachweis, Einkommenssituation, Vermögenssituation)
- Add VERSION file and context processor for automatic version display
- Add MCP server, agent system, import/export, and new migrations
- Update compose files and production environment template
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactors the Berichte section from a single hardcoded Jahresbericht into
a modular report-building system. Jahresbericht now uses PDFGenerator for
corporate identity (logo, colors, headers/footers, cover page). 8 reusable
section templates can be freely combined. 6 predefined report templates
(Jahres-, Destinatär-, Grundstücks-, Finanz-, Förder-, Pachtbericht) with
HTML preview and PDF export. New Bericht-Baukasten UI lets users compose
custom reports from individual sections.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When an ALKIS identifier is set on a Land record, the button links to
ogc-api.nrw.de detail view instead of the imprecise TIM-Online search.
Falls back to TIM-Online when no ALKIS number is present.
Closes STI-57
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add DokumentDatei, EmailEingang, Verwaltungskosten, and
GeschichteSeite to post-restore verification table checks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Display linked PDFs/documents in the edit form with download links
- Fix "Details ansehen" button to link to detail page
- Redirect edit save to detail page instead of list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New detail view at /geschaeftsfuehrung/verwaltungskosten/<pk>/
showing invoice data, status, linked DMS documents, and emails
- Status change form in sidebar for quick workflow updates
- Link Verwaltungskosten list items to detail page
- Update email detail to link to VK detail instead of edit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- DMS edit view: add Destinatär, Land, Pächter, Verpachtung dropdowns
so documents can be assigned to entities after upload
- Geschichte: add M2M dokumente field on GeschichteSeite model
- Geschichte form: checkboxes to select/link Stiftungsgeschichte docs
- Geschichte detail: show linked documents in sidebar with download
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename DestinataerEmailEingang → EmailEingang with category support
(destinataer, rechnung, land_pacht, stiftungsgeschichte, allgemein)
- Add invoice capture workflow: create Verwaltungskosten from email,
link DMS documents as invoice attachments, track payment status
- Add Stiftungsgeschichte email category with auto-detection patterns
(Ahnenforschung, Genealogie, Chronik, etc.) and DMS integration
- Update poll_emails task with category detection and DMS context mapping
- Show available history documents in Geschichte editor sidebar
- Consolidate DMS views, remove legacy dokument templates
- Update all detail/form templates for DMS document linking
- Add deploy.sh script and streamline compose.yml
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- When manually assigning an email to a Destinatär, also update
associated DokumentLink records so attachments appear in the
Destinatär's Dokumente tab
- Add email delete functionality (view, URL, buttons in list and detail)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Paperless-ngx post_document returns a task UUID string, not a document
ID directly. The code assumed it was a dict and called .get() on a
string, causing AttributeError. Now polls the task status endpoint to
retrieve the actual integer document ID.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 120s IMAP socket timeout (was unlimited, could hang on large emails)
- Increase Paperless upload timeout from 60s to 300s for large attachments
- Increase manual poll UI timeout from 60s to 300s
- Show error count in UI when emails fail to process
- Log warning when attachment payload is empty/corrupted
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Email settings page at /administration/email/ with IMAP config form
- Connection test button to verify IMAP connectivity
- Sidebar link "E-Mail Eingang" for quick access
- AppConfiguration model extended with email category and password type
- init_config command includes IMAP default settings
- DB-based IMAP config with env var fallback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The manual "Jetzt abrufen" button now runs synchronously and searches all
emails from the last 30 days instead of only unread ones. This fixes the
issue where already-read emails in IMAP were invisible to the poll task.
Duplicate detection (by sender+date+subject) prevents re-imports.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces the old multi-card layout (1368 lines) with a compact, modern
tabbed interface (Stammdaten | Nachweise | Zahlungen | Timeline | Dokumente | Notizen).
All information is now accessible from one page without excessive clicking.
- Add timeline events to destinataer_detail view (merged from timeline view logic)
- Compact profile header with avatar initials, status badges, key contact info
- Inline editing preserved with table-based layout for cleaner data display
- Tab state persisted in URL hash for bookmarkable deep links
- Dropdown menu for less-used actions (export, archive, delete)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The redirect() calls in email_eingang_poll_trigger and email_eingang_detail
were missing the 'stiftung:' namespace prefix, causing NoReverseMatch errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add migrate_to_landverpachtung management command that converts
old Land-level pacht fields (aktueller_paechter, pachtbeginn, etc.)
into proper LandVerpachtung records
- Fix SyntaxError in system.py (fancy Unicode quotes in f-strings)
- Ran migration: 1 LandVerpachtung record created for Jens Bodden
The old system stored pacht data directly on the Land model.
The new LandVerpachtung model supports multiple leases per Land.
The verpachtung_list view queries LandVerpachtung, which was empty.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make Destinatär names clickable in list view (link to detail page)
- Nachweis-Board: auto-create missing VierteljahresNachweis records
for active Destinatäre when viewing a year (fixes missing Q1 2026)
- Add archive/deactivate toggle for Destinatäre (button on detail page)
with AuditLog entry and confirmation dialog
- Default Destinatär list to show active only (filter preset to "Aktiv")
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Paechter model's reverse relation from LandVerpachtung uses
related_name='neue_verpachtungen', not the default 'landverpachtung'.
Fixed the annotate() query in top_paechter section of paechter_workflow view.
The Land model's ForeignKey from LandAbrechnung uses related_name='abrechnungen',
not the default 'landabrechnung'. Fixed the exclude() query in paechter_workflow view.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The nachweis_board.html template used a get_item filter that was never
defined. Added it to help_tags.py and loaded the tag library in the template.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Alle bestehenden, nicht commiteten Änderungen als Ausgangsbasis für den
vision-2026 Branch übernommen (Veranstaltungsmodul, Serienbrief, etc.).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Neues System zur automatischen Verarbeitung eingehender E-Mails von
Destinatären. IMAP-Polling alle 15 Minuten via Celery Beat, automatische
Zuordnung zu Destinatären anhand der E-Mail-Adresse, Upload von Anhängen
zu Paperless-NGX.
Umfasst:
- DestinataerEmailEingang Model mit Status-Tracking
- Celery Task für IMAP-Polling und Paperless-Integration
- Web-UI (Liste + Detail) mit Such- und Filterfunktion
- Admin-Interface mit Bulk-Actions
- Agent-Dokumentation (SysAdmin, RentmeisterAI)
- Dev-Environment Modernisierung (docker compose v2)
Reviewed by: SysAdmin (STI-15), RentmeisterAI (STI-16)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add @login_required decorator to home view function
- Ensures all views now require user authentication
- Prevents unauthorized access to homepage and dashboard
- Part of comprehensive authentication security implementation
- Add verwaltungskosten_delete view with confirmation page
- Add delete URL route and template
- Fix template action buttons to use proper URLs for edit/delete
- Include audit logging for deletions
- Add comprehensive delete confirmation with entry details
- Remove non-functional details button from action group
- Replace raw field objects with bound fields in get_permission_groups()
- Bound fields render properly as HTML checkboxes in templates
- Fixes display of Django field object strings instead of actual form inputs
- Rights management system now shows proper checkboxes with permission names
- Add fallback permission object when Permission.DoesNotExist
- Create proper display name from field_name for missing permissions
- Prevents raw Django field objects from being displayed in template
- Remove dashboard view from urls.py and views.py
- Delete dashboard.html template
- Remove dashboard navigation link from base.html
- Replace all dashboard redirects with home redirects in views.py
- Update all breadcrumb links from 'Dashboard' to 'Home' in templates
- Update German text from 'Dashboard' to 'Startseite' in auth templates
- Update 'Zurück zum Dashboard' links to 'Zurück zur Startseite'
The dashboard was redundant with the home page functionality.
All navigation now directs users to the main home page instead.
System check passes without issues after removal.
- Fixed signals.py which contained two signal handlers creating duplicate transactions
- Removed broken signal handler that created transactions without referenz
- Keep only the proper signal handler with PAY- referenz and duplicate prevention
- This resolves the issue where payments were deducted twice from account balance
- Cleaned up malformed docstring and signal structure in signals.py
The issue was that payments were processed by both:
1. Broken signal handler (empty referenz) - creating first transaction
2. Proper signal handler (PAY- referenz) - creating second transaction
Now only the proper handler runs, preventing double balance deduction.
- Implement automated payment tracking with Django signals
- Fix duplicate transaction creation with unique referenz system
- Add calendar system with CRUD operations and event management
- Reorganize navigation menu (rename sections, move admin functions)
- Replace Geschichte editor with EasyMDE markdown editor
- Add management commands for balance reconciliation
- Create missing transactions for previously paid payments
- Ensure account balances accurately reflect all payment activity
Features added:
- Calendar entries creation and administration via menu
- Payment status tracking with automatic balance updates
- Duplicate prevention for payment transactions
- Markdown editor with live preview for Geschichte pages
- Database reconciliation tools for payment/balance sync
Bug fixes:
- Resolved IntegrityError on payment status changes
- Fixed missing account balance updates for paid payments
- Prevented duplicate balance deductions on re-saves
- Corrected menu structure and admin function placement
🆕 NEW FEATURES:
- Wiki-style Geschichte (History) section with rich text editor
- Image upload support for history pages
- Quill.js rich text editor with formatting options
- Slug-based URLs for SEO-friendly history pages
- Image galleries with descriptions and alt-text support
🔧 MODELS:
- GeschichteSeite: Main history pages with rich content
- GeschichteBild: Image attachments for history pages
- Auto-generated slugs, sorting, publishing controls
📝 TEMPLATES:
- geschichte/liste.html: Card-based overview of all history pages
- geschichte/detail.html: Full page view with image gallery
- geschichte/form.html: Rich text editor for creating/editing pages
- geschichte/bild_form.html: Image upload interface
🎨 UI IMPROVEMENTS:
- Reorganized navigation menu into logical groups:
* Menschen & Finanzen (People & Finance)
* Immobilien & Land (Real Estate & Land)
* Verwaltung (Administration)
* Geschichte (History)
- More compact menu design saving horizontal space
- Better grouping with dropdown headers
🛠️ TECHNICAL:
- Rich text editor with Quill.js integration
- Image upload with validation and optimization
- Permission-based access controls
- Responsive design for all screen sizes
- Proper breadcrumb navigation
- Auto-slug generation from titles
- Changed from disabled DateInput to readonly TextInput for auto-generated payments
- Uses German date format (dd.mm.yyyy) for better user experience
- Added visual styling to indicate readonly state
- Preserves original date value through clean() method
- Set initial value for disabled faellig_am field in auto-generated payments
- Explicitly set widget value attribute to display current date
- Ensures the field shows the correct date even when disabled
- Changed readonly to disabled for faellig_am field in auto-generated payments
- Added clean method to preserve original due date for auto-generated payments
- This prevents validation errors when editing auto-generated quarterly payments
- Added empfaenger_iban, empfaenger_name, verwendungszweck to DestinataerUnterstuetzungForm
- Made faellig_am read-only for automatically generated quarterly payments
- Added proper placeholders for transfer data fields
- Template already supports these fields in Überweisungsdaten section
- Q1: Due December 15 (previous year)
- Q2: Due March 15
- Q3: Due June 15
- Q4: Due September 15
Added new management command fix_quarterly_payment_schedule to update existing payments
Document Submission (twice yearly):
- Q1 & Q2 documents: Due March 15 (Spring semester)
- Q3 & Q4 documents: Due September 15 (Fall semester)
Payment Schedule (quarterly):
- Q1 payments: Due March 15
- Q2 payments: Due June 15
- Q3 payments: Due September 15
- Q4 payments: Due September 15 (aligned with Fall semester docs)
This gives the desired Q4 payment due date of 15.09.2025 while maintaining
quarterly payment frequency and semester-based document submissions.
BREAKING CHANGE: Payment due dates now follow advance payment schedule:
- Q1 payments: Due December 15 of previous year
- Q2 payments: Due March 15 of same year
- Q3 payments: Due June 15 of same year
- Q4 payments: Due September 15 of same year
Changes:
- Updated create_quarterly_support_payment() to use advance schedule
- Enhanced diagnostic commands to check advance payment dates
- Added fix_advance_payment_dates command for comprehensive fixes
- Updated fix_q4_payment_dates to correct Q4 from 31.12 to 15.09
This aligns with semester-based document submissions while maintaining
the advance payment system where payments are made before each quarter.
This migration will automatically run during deployment and update
all existing quarterly confirmation deadlines to the new semester-based system:
- Q1: March 15 (Spring semester primary submission)
- Q2: June 15 (auto-approved when Q1 approved)
- Q3: September 15 (Fall semester primary submission)
- Q4: December 15 (auto-approved when Q3 approved)
No manual intervention required on VPS - GitHub Action will deploy and migrate automatically.