Introduced methods to manage, assign, and retrieve invoice collections for orders and users. Enhanced the system to support flexible invoice grouping, including per-order logic and automated assignment to open or newly created invoice collections.
Introduced GET and POST endpoints for collected order invoices, enabling listing and creation functionalities for authorized users. Added a new database object to handle invoice-related operations and validations. Included utility functions to enforce parameter requirements and data integrity.
Ensure the filter is set before validating its value against allowed options. This prevents potential undefined index errors when filters are not provided.
Removed unnecessary array key access for permissions in the loop. This improves code readability and ensures the permission object is directly passed without intermediate referencing.
Introduced a method to clone groups with their permissions and added a corresponding API endpoint for role cloning. Adjusted existing permission methods to ensure consistent behavior and naming, swapping the implementation of add/remove permissions. Improved permission fetching logic for cleaner data handling.
This update introduces functionalities for managing roles, permissions, and access control across departments. Key additions include methods for filtering, restricting, and handling user permissions, as well as new APIs for assigning/removing permissions to/from roles. Access to resources like orders, bookings, and plate scans is now securely tied to department-specific permissions.
Enhanced the order items functionality to include a related item ID. This involved adding a new property, updating methods to handle the related item ID, and ensuring appropriate validation and sanitation in the API routes. Also improved input sanitization for motorapi lookups to prevent SQL injection risks.
Added support for extracting the token from JSON-formatted request bodies (`php://input`). This ensures compatibility with clients sending tokens in the request payload alongside other existing methods.
Previously, only tokens from headers or GET parameters were accepted. This update adds support for tokens sent via POST parameters, ensuring compatibility with more request types and improving flexibility for clients.
Introduced vehicle type handling in `motorapi` with a helper class. Integrated recommended order logic based on vehicle plate and order history, enhancing order and department route functionality.
This update introduces new endpoints for managing Stripe terminal readers, locations, and department-specific configurations. It also adds support for creating, updating, and retrieving department variables along with enhanced validation, logging, and permission checks. These updates improve integration and expand functionality for Stripe and department-related operations.
Introduced a new `stripe_endpoint_readers` class to handle terminal readers, with a `list` method to retrieve all reader data. Integrated this endpoint into Stripe module routes and updated dependencies to support terminal-related
This update enhances the filtering capabilities by including 'corporateIdentificationNumber' in the list of supported properties for search. It improves the flexibility of customer queries and ensures better alignment with user needs.
Changed the execution interval of `SyncUserEconomicCustomerDiscounts` from 10 minutes to 1 minute. This ensures more frequent updates and improves data synchronization accuracy.
Clarified the purpose of the 'get_user_id' route by specifying that it retrieves the user ID from the e-conomic customer number. This improves code readability and developer understanding.
The 'permissions' field has been omitted from the worker status API response payload. This ensures a more streamlined response and avoids exposing unnecessary data. The change does not affect the functionality of the API.
Introduced a new "backup" task that runs every 12 hours. The task uses the backup_store class to create backups and handles exceptions gracefully by logging errors. This ensures regular backups and improves system reliability.
Introduce classes `groups_o` and `groups_permissions_o` for managing roles and permissions. Add new routes `rolesRoute` and `permissionsRoute` to handle role and permission-related operations. Enhance `users_o` with the `getGroup` method and update `db_object_t` for improved table handling and pagination support.
This update introduces explicit permission definitions for various route handlers across multiple routes. These changes enhance clarity and allow for more granular control over route access based on defined permissions. The updates ensure better manageability and scalability of endpoint permissions.
Added support for defining and registering permissions for API routes. Updated methods across the router and route traits to accommodate permission details, enabling better access control. Enhanced department license plate lookup with session validation and additional endpoints.
Introduced caching functionality to improve efficiency and reduce redundant API calls for license plate lookups. Added methods to check and retrieve cached entries while ensuring proper validation. Enhanced error handling for invalid responses and updated related routes and interfaces accordingly.
Introduce a function to aggregate unfulfilled bookings by department. Replace individual Slack notifications with a single summary per department, improving efficiency and reducing redundant calls.
Introduced functionality for creating and managing invoices using Stripe APIs, replacing the previous payment link system. Added customer account creation and retrieval, invoice line-item handling, and extended database object structures to support invoices. Updated order routing to include Stripe customer and invoice details.
Introduced a new configuration variable `stripe_economic_customer_number_c` to handle the Economic customer number for invoicing. Updated the Stripe module to include this variable in initialization and allow updates. This enhancement enables better integration with invoicing workflows.
Introduced MailerSend as an email provider with essential configuration options, including API key management and "reply-to" support. Enhanced email functionality by implementing a modular template system (header, footer, and content) for both text and HTML formats. Updated the existing email infrastructure to handle Stripe invoice notifications via MailerSend with conditional fallback planned for default SMTP services.
Added new library dependencies, including `beberlei/assert`, `illuminate/collections`, `mailersend/mailersend`, and others, to `composer.lock`. These updates ensure compatibility and improve functionality by integrating the latest versions of required packages.
Added a helper class `economic_customer` to standardize customer data handling within the Economic API. Introduced a new route, `/modules/economic/customer`, for retrieving customers using their customer number. Updated `economic` class to integrate the helper and support streamlined customer operations.
Include a docblock with a link to the Stripe API customer creation docs. This provides developers with quick access to relevant documentation, improving code clarity and usability.
This commit introduces a comprehensive Stripe module with support for managing customers, products, prices, and payment links. It also includes endpoint routes, helpers, and database updates to support Stripe operations, such as creating and retrieving entities or handling payment workflows. Additionally, a stripe module was integrated into existing routes and objects to enable seamless interaction with Stripe APIs.
Included `stripe/stripe-php` library (v16.5.1) in the project for handling Stripe API interactions. Updated both `composer.json` and `composer.lock` to reflect the new dependency.
Implemented MotorAPI lookup functionality with proper validation and logging. Added Economic products endpoint for fetching product details. Enhanced route parameter validation with length constraints and improved response handling for objects.
Introduced the MotorAPI module, including its configuration classes, interface, and integration with the router. The configuration supports enabling, managing API tokens, and daily request limits. Added support for fetching and updating MotorAPI settings via new API routes.
Previously, the absence of a discountPercentage caused issues. The code now uses a default value of 0 to ensure stability and prevent potential errors when the discount is not set.
Introduce endpoints for managing product options and department categories, including listing, creating, editing, and deleting functionalities. Updated related objects and traits to support new operations, including added array serialization methods and improved query handling for better flexibility.
Implemented endpoints to list and import customers from the Economic API, including query filtering, pagination, and validation. Added supporting trait methods, database functions, and error handling. Expanded the user object for Economic integration and introduced utilities for type checking and parameter extraction.
Refactored database methods to improve code readability, reusability, and error handling. Introduced input validation helper functions and parsing capabilities for objects with optional callbacks. Added new routes for handling categories and improved product-related functionality to align with the new architecture.
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.
Implemented server, database, and environment backups with configurable modules. Introduced new routes and configuration classes for backups alongside improved zip and S3 storage. Replaced PHPMailer with a cURL-based email service for streamlined message sending.
Introduced a backup system managing database and metadata files using Minio/S3, alongside routes for handling these. Integrated PHPMailer for robust email functionalities, including configuration testing and SMTP handling. Updated Dockerfile, composer dependencies, and minor code improvements to support new features.
Introduce an email configuration module to manage SMTP settings, including encryption, host, username, and more. Implement functionality for retrieving invoice PDFs, storing them, and providing secure download links. Added relevant endpoint, routes, and helper methods to support these features.
Introduce reCAPTCHA integration with validation and configuration handling. Update Economic module to include layout management and dynamic configuration via API. Added traits for managing module settings and encapsulated new endpoint routes for expanded functionality.
Introduced a new POST endpoint `/invoices/draft/close` to allow closing of draft invoices, enforcing user authentication and permissions. Refactored and reorganized route and utility methods to improve readability and maintainability, including restoring `match_route` and restructuring `fromRequest`. Removed unused methods for cleaner code.
Introduced functionality to fetch all user keys with associated data. Implemented new endpoints for deleting user bookings and retrieving user IDs, alongside permission checks and validation. Minor adjustments made for better error handling and improved debug logging behavior.
This route was unused and marked with a TODO for removal. Its deletion simplifies the code and eliminates unnecessary maintenance for an unused endpoint.
Added functionality to retrieve and list pending orders, as well as improved invoice draft management based on customer preferences (e.g., invoice per order). Simplified error handling and removed redundant operations in economic invoice logic.
Introduced endpoints and routes for managing draft invoices, enabling retrieval and updates. Extended object handling to include filters for deleted entries and added custom parsing for pagination results. Refactored code for improved structure and consistency.
Refactored the invoice retrieval to handle pagination for both drafts and booked invoices, ensuring all results are fetched when exceeding the limit. Added a new route for vehicle plate lookup, allowing retrieval of order history for a specified vehicle plate. Implemented the corresponding database query method in `orders_o`.
Standardize line formatting by prefixing notes and references with '#'. Refactor handling of registration numbers and discounts for improved clarity. Ensure empty lines are added for better visual separation in invoices.
Introduced new endpoints and methods to incorporate draft invoice data into economic statistics. This includes calculating totals across various timeframes and aggregations by departments. Updated routes and traits to support these additions, ensuring seamless integration with the existing economic module.