Commit Graph

24 Commits

Author SHA1 Message Date
Christian
ccb7714779 feat: Implement tracking of billed Hub order ID for time entries and update related services 2026-01-08 18:57:04 +01:00
Christian
3195afe460 fix: Only use case_no from vtiger_data, never parse from vtiger_id (v1.3.116) 2026-01-05 17:17:46 +01:00
Christian
1ebb1fa2cd fix: Never use time descriptions as case title, only contact+date fallback (v1.3.111) 2026-01-05 16:52:58 +01:00
Christian
d99d542a24 fix: Use contact name + date as case title fallback (v1.3.110) 2026-01-05 16:44:18 +01:00
Christian
1e45ec70bf fix: Better case title fallback logic - use descriptions or 'Arbejde' (v1.3.109) 2026-01-05 16:43:16 +01:00
Christian
11f9e97c1d fix: Use case_no from vtiger_data for order case numbers (v1.3.108) 2026-01-05 16:34:13 +01:00
Christian
24a517a10c Fix: Brug fuldt case ID (ikke kun sidste 4 cifre) + auto-link kunder efter vTiger sync 2026-01-05 10:56:32 +01:00
Christian
68eb1d31d1 Fix: Bedre case title fallback og klarere fejlbesked for manglende customer linking 2026-01-05 10:42:57 +01:00
Christian
8100432079 Vis case titel fra vTiger i fakturalinje beskrivelse 2026-01-02 15:27:46 +01:00
Christian
ffbaf6190a Fjern oprundingsinfo fra fakturalinje beskrivelse 2026-01-02 15:17:46 +01:00
Christian
acc89d9f09 Fix: Fjern dato-mønstre fra fakturalinjer + vis oprunding i minutter 2026-01-02 15:12:05 +01:00
Christian
0dd24c6420 fix: better error handling for order generation (v1.3.62)
- Added more specific error message when customer not found
- Added debug logging to check customer object type
- Changed error from 'Customer not found' to include customer_id
- Helps diagnose 'string indices must be integers' error
2025-12-24 09:39:31 +01:00
Christian
a98a5784b7 Fix: Return single order object ved cancel_order (ikke list)
BUG FIX:
- execute_query returnerer list, men TModuleOrder(**updated) forventede dict
- TypeError: argument after ** must be a mapping, not list
- Changed til updated[0] for at få første row
- Dette er den SIDSTE execute_query/execute_query_single bug i order_service.py

ERROR: TModuleOrder() argument after ** must be a mapping, not list
  → return TModuleOrder(**updated)
  → updated er list, skal være dict
2025-12-23 00:46:38 +01:00
Christian
0fdf4549d6 Fix: Tilføj RETURNING id til order INSERT statements
CRITICAL BUG FIX:
- execute_insert() kalder cursor.fetchone() men INSERT havde ingen RETURNING clause
- Forårsagede '500: no results to fetch' ved order oprettelse
- Tilføjet RETURNING id til:
  * tmodule_orders INSERT (linje 222)
  * tmodule_order_lines INSERT (linje 240)
- Opdateret database.py docstring til at gøre RETURNING requirement klart

ERROR: ProgrammingError - no results to fetch
  → INSERT INTO tmodule_orders ... VALUES (...)
  → Manglede RETURNING id
2025-12-23 00:29:25 +01:00
Christian
718de1a6bd Fix: Remove hourly_rate query from customers table (kolonne eksisterer ikke)
BUG FIX:
- _get_hourly_rate() tried to query hourly_rate from customers table
- customers table har ikke hourly_rate kolonne
- Forårsagede '500: no results to fetch' fejl ved order oprettelse
- Changed execute_query_single → execute_query for tmodule_customers check
- Removed hub customer rate check (ikke relevant)
- Falls back til default rate fra settings

ERROR: SELECT hourly_rate FROM customers WHERE id = 512
       → column 'hourly_rate' does not exist
2025-12-23 00:23:01 +01:00
Christian
0205516422 Cleanup: Fjernet duplikat order check i cancel_order 2025-12-22 22:20:20 +01:00
Christian
dd23312731 Fix: Flere steder i order_service brugte execute_query_single forkert 2025-12-22 17:13:10 +01:00
Christian
0d9af55dfc Fix: Timetracking ordre generering brugte execute_query_single i stedet for execute_query 2025-12-22 16:57:52 +01:00
Christian
0502a7b080 feat: Implement central tagging system with CRUD operations, entity tagging, and workflow management
- Added API endpoints for tag management (create, read, update, delete).
- Implemented entity tagging functionality to associate tags with various entities.
- Created workflow management for tag-triggered actions.
- Developed frontend views for tag administration using FastAPI and Jinja2.
- Designed HTML template for tag management interface with Bootstrap styling.
- Added JavaScript for tag picker component with keyboard shortcuts and dynamic tag filtering.
- Created database migration scripts for tags, entity_tags, and tag_workflows tables.
- Included default tags for initial setup in the database.
2025-12-17 07:56:33 +01:00
Christian
fadf7258de feat: Implement internal comments for customer subscriptions with database support 2025-12-16 22:07:20 +01:00
Christian
ffb3d335bc feat: Add Simply-CRM integration setup documentation and configuration details
docs: Create vTiger & Simply-CRM integration setup guide with credential requirements

feat: Implement ticket system enhancements including relations, calendar events, templates, and AI suggestions

refactor: Update ticket system migration to include audit logging and enhanced email metadata
2025-12-16 15:36:11 +01:00
Christian
8791e34f4e feat: Implement email processing system with scheduler, fetching, classification, and rule matching
- Added EmailProcessorService to orchestrate email workflow: fetching, saving, classifying, and matching rules.
- Introduced EmailScheduler for background processing of emails every 5 minutes.
- Developed EmailService to handle email fetching from IMAP and Microsoft Graph API.
- Created database migration for email system, including tables for email messages, rules, attachments, and analysis.
- Implemented AI classification and extraction for invoices and time confirmations.
- Added logging for better traceability and error handling throughout the email processing pipeline.
2025-12-11 02:31:29 +01:00
Christian
a230071632 feat: Add customer time pricing management page with dynamic features
- Implemented a new HTML page for managing customer time pricing with Bootstrap styling.
- Added navigation and responsive design elements.
- Integrated JavaScript for loading customer data, editing rates, and handling modals for time entries and order creation.
- Included theme toggle functionality and statistics display for customer rates.
- Enhanced user experience with toast notifications for actions performed.

docs: Create e-conomic Write Mode guide

- Added comprehensive documentation for exporting approved time entries to e-conomic as draft orders.
- Detailed safety flags for write operations, including read-only and dry-run modes.
- Provided activation steps, error handling, and best practices for using the e-conomic integration.

migrations: Add user_company field to contacts and e-conomic customer number to customers

- Created migration to add user_company field to contacts for better organization tracking.
- Added e-conomic customer number field to tmodule_customers for invoice export synchronization.
2025-12-10 18:29:13 +01:00
Christian
34555d1e36 feat(timetracking): Implement time tracking module with frontend views, HTML templates, and database migrations
- Added FastAPI router for time tracking views including dashboard, wizard, and orders.
- Created HTML templates for the time tracking wizard with responsive design and Bootstrap integration.
- Developed SQL migration script for the time tracking module, including tables for customers, cases, time entries, orders, and audit logs.
- Introduced a script to list all registered routes, focusing on time tracking routes.
- Added test script to verify route registration and specifically check for time tracking routes.
2025-12-09 22:46:30 +01:00