Commit Graph
20 Commits
Author SHA1 Message Date
Jeppe Bundgaard dc79352f40 Add unit tests for vehicle search metadata alignment and extend API fixtures for vehicle and order item creation. Refactor booking and route handling logic for booked vehicle searches. 2026-04-13 21:42:37 +02:00
Jeppe Bundgaard b45e270fed Skip transactions not included in invoicing
- Updated `customer_vehicles_o` to exclude transactions not marked for invoicing during processing.
2025-12-01 13:20:07 +01:00
Jeppe Bundgaard ed8a6454a6 Introduce subscription fallback mechanisms for vehicles with no transactions
- Added `attemptSubscriptionFallbacks` method in `InvoicingPeriodRoute` to handle vehicle subscription fallbacks through department-based strategies.
- Enhanced `customer_vehicles_o` with `getLastTransactions` for retrieving recent transactions.
- Updated `users_o` to support nullable return type for `getDefaultDepartment`.
2025-10-01 15:30:56 +02:00
Jeppe Bundgaard 86acc3a183 Add invoicing distribution endpoints and subscription processing features
- Introduced new endpoints for invoicing distribution: `/superuser/invoicing/period/distribution/fixed-pricing` and `/superuser/invoicing/period/distribution/wash-subscriptions`.
- Enhanced `customer_vehicles_o` with `getSubscriptionAppliedTransactionsFromList` method for transaction filtering based on subscriptions.
- Added `getNetAmountForOrderItemsOriginal` to `orders_o` for calculating the original net amount of order items.
- Introduced parsing utilities for department-based aggregation in invoicing.
- Extended `products_o` with `getSubscriptionMonthlyPrice` to calculate subscription pricing.
- Added `getFieldsWhereIn` to `db_object_t` for advanced database querying.
2025-10-01 10:21:58 +02:00
Jeppe Bundgaard 5b00e47276 Add /vehicles/status route to retrieve vehicle status details
- Introduced a new route `/vehicles/status` to provide detailed vehicle status, including verification, booking, and last order information.
- Added `getLastOrderByPlate` method in `customer_vehicles_o` to retrieve the last order for a vehicle plate.
- Implemented validation for registration number and optional department parameter.
- Enhanced response with multiple status indicators like `verified`, `known`, `booked`, and `card`.
2025-09-15 11:58:32 +02:00
Jeppe Bundgaard fb28c7a7df Remove unused delete method from customer_vehicles_o class 2025-07-15 10:52:17 +02:00
Jepp9350 1bcd15fa2f Enhance customer_vehicles_o: add asArray caching with expiration, implement cache invalidation in object changes, and improve vehicle update flow with cache management. 2025-06-26 12:33:38 +02:00
Jepp9350 29aa63bb08 Add vehicle type handling in customer_vehicles_o, including vehicle type retrieval, setting, and creation in XLVask. Extend route logic to support vehicle type updates and auto-start on LPR configurations, incorporating enhanced validation and permission checks. Refactor and streamline helper classes for consistency and functionality expansion. 2025-06-19 15:01:22 +02:00
Jepp9350 75e3efcb89 Introduce xlvask_helper base class and refactor XLVask helper classes to extend it. Add methods for XLVask vehicle checks and retrievals, enhance vehicle caching functionality, and update helper class instantiation logic. 2025-06-19 11:06:53 +02:00
Jepp9350 27e8c558a4 Add getPlateReferenceIfExists in customer_vehicles_o, refine order creation logic to include plate references, enable usage synchronization in XLVask tasks, and introduce xlvask_parser_special_s_be_front. 2025-06-12 12:14:20 +02:00
Jepp9350 d65d49b31e Add support for retrieving and displaying customer details
Enhanced plate scans to include customer name and vehicle type. Introduced a method in `customer_vehicles_o` for fetching vehicle details by plate and adjusted `users_o` to manage display names more effectively.
2025-05-20 14:01:29 +02:00
Jepp9350 e3d67acd07 Allow vehicle type to be unset and improve related checks
Updated logic to allow vehicle type to be set to 0 and handle related subscription behavior. Added safeguards to prevent setting subscriptions when type is unset. Introduced `isPlateSeenBefore` in `orders_o` and enhanced `plateScansRoute` to include `seen_before` data.
2025-05-06 16:36:24 +02:00
Jepp9350 45faa7c56a Add 'barred' status to customer and vehicle data
Introduced the 'barred' property to identify barred customers and vehicles. Updated relevant classes, methods, and API endpoints to handle this new field. Enhanced plate scans to include the barred status for vehicles based on customer association.
2025-05-06 12:14:21 +02:00
Jepp9350 b1ba8a2e34 Add support for vehicle reference field
Introduce a new "reference" field for vehicles to allow storing and validating additional information. Updates include parameter handling, validation, and database integration for creating, modifying, and retrieving the "reference" field.
2025-05-06 09:09:17 +02:00
Jepp9350 29e76b58d8 Fix and enhance order processing with improved data handling
Set proper timestamps for collected invoices and added `getLastOrderId` for vehicles. Streamlined order fetching logic by fixing parameter usage, refining customer and order item retrieval, and improving type casting in multiple methods.
2025-04-29 15:22:26 +02:00
Jepp9350 6cc5e6bbf0 Add custom routes, subscription features, and refactor orders
Introduced a new POST route for collected vehicle subscription invoices and enhanced responses with wash subscription transactions. Refactored order handling by adding department-based pricing logic and simplifying reusable methods. Various minor improvements include exception handling, input validation, and updated permissions.
2025-04-28 14:24:11 +02:00
Jepp9350 e140c3242f Add default addons functionality to customer vehicles
Introduced a method to automatically add default addons to customer vehicles based on predefined product IDs. Updated the vehicle creation workflow to include the addition of these default addons. Adjusted type casting and comments for better clarity and functionality.
2025-04-24 12:40:27 +02:00
Jepp9350 1a71da0526 Refactor vehicle management and add vehicle add-on functionality.
This update refactors vehicle-related routes to include consistent endpoints, enhanced functionality, and stricter permission checks. It introduces vehicle add-on management with toggling and retrieval APIs, enabling detailed customization and user control. Additionally, the new `asArray` methods and updated logic improve data handling and validation.
2025-04-09 09:02:17 +02:00
Jepp9350 c240bbd94f Refactor database object trait and improve data handling
Added `delete`, `restore`, and other utility methods to enhance CRUD operations, including support for soft deletes. Introduced `objectChanged` hooks across objects for better cache or event handling, ensuring scalability and maintainability. Refactored and standardized object property handling while restructuring related methods.
2025-02-12 09:23:35 +01:00
Jepp9350 707df910b0 Refactor: migrate files 2025-01-29 14:27:44 +01:00