Commit Graph

315 Commits

Author SHA1 Message Date
Christian
ed01f07f86 Release v2.2.49: sag relation tree UX, type dropdown, 12x quick-action modals, email service 2026-03-05 08:41:59 +01:00
Christian
1323320fed Release v2.2.48: sag sale-item fallback and mission webhook ping fixes 2026-03-04 07:40:18 +01:00
Christian
9fc57feda4 Release v2.2.47: webhook GET ping + v2 default API port 2026-03-04 07:22:39 +01:00
Christian
2bd5a3e057 Release v2.2.46: mission schema resilience and repair migration 2026-03-04 07:12:29 +01:00
Christian
4760b8b3c4 Add Mission Control navigation and dashboard option (v2.2.45) 2026-03-04 07:11:06 +01:00
Christian
701cc63375 Hotfix: cleanup legacy v2 containers + auto-expire ringing calls (v2.2.44) 2026-03-04 00:33:12 +01:00
Christian
803b45fab4 Hotfix: add Mission webhook event logging (v2.2.43) 2026-03-03 23:49:24 +01:00
Christian
45d8f4209b Hotfix: Yealink GET webhooks + safer podman deploy checks (v2.2.42) 2026-03-03 23:09:14 +01:00
Christian
91f709f4fe fix(postgres): use POSTGRES_DB in health checks 2026-03-03 22:37:48 +01:00
Christian
dd02701b21 fix(docker): preserve downloaded release source during production build 2026-03-03 22:19:26 +01:00
Christian
8b863a3b68 feat(mission): add Mission Control MVP with realtime webhooks and fullscreen dashboard 2026-03-03 22:12:05 +01:00
Christian
827463d59e Add dedicated SAG email tab with preview and filters 2026-03-03 14:33:53 +01:00
Christian
b80f91fae1 release: v2.2.37
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-03 10:52:53 +01:00
Christian
81cc3a4a9e fix: enhance email threading and extraction logic in sag email handling 2026-03-03 10:42:16 +01:00
Christian
b0a51f1919 release: v2.2.36 helpdesk sag routing 2026-03-02 23:58:56 +01:00
Christian
2d2c7aeb9b fix: template builder AI URL /ai-analyze → /ai/analyze v2.2.35 2026-03-02 15:46:30 +01:00
Christian
bf28e94d6e fix: JSON truncation num_predict 8000 + 5-stage parser + batch-analyze endpoint v2.2.34 2026-03-02 13:48:14 +01:00
Christian
72acca9e8b fix: duplikat link-vendor endpoint + extraction_id reference fix v2.2.33 2026-03-02 13:12:41 +01:00
Christian
4953c82b93 fix: link-vendor opretter minimal extraction hvis ingen findes v2.2.32 2026-03-02 13:12:01 +01:00
Christian
4b2b0ea0f3 fix: PDF iframe størrelse + AI skelner leverandør fra BMC-modtager v2.2.31 2026-03-02 12:59:17 +01:00
Christian
8d29302b01 fix: console logging + robust auto-reprocess med isRetry guard v2.2.30 2026-03-02 09:47:07 +01:00
Christian
8a0dbcd1cc feat: auto-reprocess faktura når panel åbnes uden AI-data v2.2.29 2026-03-02 09:41:06 +01:00
Christian
d561a063f6 fix: vendor pre-fill bruger server-normaliseret llm_data + operator precedence fix v2.2.28 2026-03-02 09:33:50 +01:00
Christian
14ccd5accf fix: llm_response_json already parsed object i split-view modal v2.2.27 2026-03-02 09:22:40 +01:00
Christian
bdf76a2a80 feat: quick opret leverandør split-view panel v2.2.26 2026-03-02 09:09:30 +01:00
Christian
2ed3118c83 fix: exclude OWN_CVR from AI vendor extraction v2.2.25 2026-03-02 09:01:43 +01:00
Christian
aabd9f0069 fix: remove vat_note from extraction_lines INSERT v2.2.24 2026-03-02 08:54:14 +01:00
Christian
5e94fc5e69 fix: wrong table name supplier_invoice_extractions -> extractions v2.2.23 2026-03-02 08:48:03 +01:00
Christian
de59bc8367 fix: add pdfplumber to requirements v2.2.22 2026-03-02 08:44:23 +01:00
Christian
744b405142 fix: vendor info + rerun button on supplier invoices v2.2.21
- Fix get_files_by_status query: LATERAL join to get latest extraction
  per file, returning vendor_name, vendor_match_confidence, total_amount
- Fix renderUnhandledFiles: use best_vendor_name, convert confidence
  0-1 to %, use total_amount field
- Add rerun button for all files (not just failed) via rerunSingleFile()
- rerunSingleFile() calls /reprocess/{file_id} and reloads unhandled tab
- Fix retry_extraction endpoint to actually run extraction immediately
2026-03-02 06:22:33 +01:00
Christian
ea4905ef8a fix: vendor DB lookup after regex/AI extraction v2.2.20
extract_vendor_suggestion now matches found CVR/domain/name against
vendors table for ALL code paths (not just fast path):
- CVR match → score 100
- Domain match → score 80
- Email-domain match → score 75
- Name substring → score 60

Frontend auto-links when match_score >= 80 (was only pdf_extraction source).
Shows score reason: CVR-match/domæne-match/navne-match in success toast.

Also: saves newly found CVR to extracted_vendor_cvr so fast path
works on subsequent calls for old emails too.
2026-03-02 00:35:44 +01:00
Christian
09de3c7373 feat: auto-link vendor from PDF extraction, improve vendor suggestion v2.2.19
- extract_vendor_suggestion: fast path if extracted_vendor_cvr already set
  - CVR lookup in vendors table → returns vendor_id if match found
  - source='pdf_extraction' with confidence=0.95
- Frontend quickCreateVendor:
  - If vendor_id returned → auto-link without modal (no manual input needed)
  - New source label '📄 PDF-faktura' for pdf_extraction source
- Added execute_query_single import to emails router
2026-03-02 00:26:23 +01:00
Christian
c6d310e96d feat: analyze PDF attachments for invoice extraction v2.2.18
- email_analysis_service: extract PDF text from attachments as PRIMARY source
  - _build_invoice_extraction_context: reads PDF bytes (in-memory or DB)
  - _extract_pdf_texts_from_attachments: pdfplumber on in-memory bytes
  - _get_attachment_texts_from_db: fallback to content_data/file_path
  - _build_extraction_prompt: comprehensive schema (vendor, CVR, lines, dates)
  - num_predict 300→3000, timeout 30→120s, format=json
- email_processor_service: _update_extracted_fields saves vendor_name, CVR, invoice_date
- migration 140: extracted_vendor_name, extracted_vendor_cvr, extracted_invoice_date columns

Sender (forwarder/external bookkeeper) is now ignored for vendor detection.
The actual invoice PDF determines vendor/amounts/lines.
2026-03-02 00:17:41 +01:00
Christian
3d24987365 fix: use execute_query_single for duplicate checksum check v2.2.17
Fixes 'list indices must be integers or slices, not str' error when
uploading a duplicate file. execute_query returns a list, so accessing
existing_file['file_id'] caused TypeError. Now uses execute_query_single
which returns a single dict row.
2026-03-02 00:05:24 +01:00
Christian
2fc8a1adce fix: remove service_healthy depends_on condition (podman-compose compat) v2.2.16 2026-03-01 23:30:46 +01:00
Christian
aa7b0894af fix: MAX_FILE_SIZE_MB → EMAIL_MAX_UPLOAD_SIZE_MB in supplier invoice upload v2.2.15 2026-03-01 20:15:40 +01:00
Christian
3978dae692 fix: BACKUP_STORAGE_PATH→/app/data/backups + container_name STACK_NAME + pdf extension v2.2.14 2026-03-01 20:06:02 +01:00
Christian
c5aa31b825 fix: container_name uses STACK_NAME + ALLOWED_EXTENSIONS CSV parsing v2.2.13 2026-03-01 20:01:11 +01:00
Christian
84c837f303 fix: store PDF bytes in DB (content_data) + re-save existing email attachments v2.2.11 2026-03-01 16:36:05 +01:00
Christian
eb0dad8a10 fix: read body_html + resolve relative file paths for PDF extraction 2026-03-01 16:03:07 +01:00
Christian
14e1c87a4c fix: dedicated footer parser + debug logging for PDF text extraction 2026-03-01 15:51:45 +01:00
Christian
04acdecb91 fix: extract address/company from invoice footer dash-format (KONI Accounting style) 2026-03-01 12:22:14 +01:00
Christian
a8970701ab fix: massively improved vendor info extraction (CVR/address/phone/domain) 2026-03-01 12:04:53 +01:00
Christian
07584b1b0c feat: quick-create customer/vendor from unknown email sender 2026-03-01 11:24:06 +01:00
Christian
14b13b8239 fix: migration 138 use string-concat EXECUTE, no nested dollar-quoting 2026-03-01 03:05:34 +01:00
Christian
a33da15550 fix: migration 138 nested dollar-quote bug for integer column 2026-03-01 02:59:26 +01:00
Christian
8d7d32571a Release v2.2.4: AI prompt test feature + updateto.sh path fix 2026-03-01 02:56:38 +01:00
Christian
abd5014eb0 Release v2.2.3: migration 138 integer compatibility hotfix 2026-02-22 03:35:56 +01:00
Christian
e772311a86 Release v2.2.2: sync safety hardening 2026-02-22 03:27:40 +01:00
Christian
bef5c20c83 feat: Implement AI-powered Case Analysis Service and QuickCreate Modal
- Added CaseAnalysisService for analyzing case text using Ollama LLM.
- Integrated AI analysis into the QuickCreate modal for automatic case creation.
- Created HTML structure for QuickCreate modal with dynamic fields for title, description, customer, priority, technician, and tags.
- Implemented customer search functionality with debounce for efficient querying.
- Added priority field to sag_sager table with migration for consistency in case management.
- Introduced caching mechanism in CaseAnalysisService to optimize repeated analyses.
- Enhanced error handling and user feedback in the QuickCreate modal.
2026-02-20 07:10:06 +01:00