Introduced a new 'requires_note' property to the product object, including its initialization, serialization, and integration in relevant routes. This change ensures the property can be set, retrieved, and properly processed in API requests. It also updates logging to capture changes to this field when editing products.
Added date parameter support for department daily reports, including validation, new functions, and route updates. Improved functionality allows fetching or creating reports for specific dates and prevents duplicate entries for the same date. Introduced a standardized date format within the API.
Ensure department_id is explicitly cast to an integer to prevent potential data type issues. This change improves type consistency and ensures reliability when processing order data.
Introduced GET and POST routes for managing user key-value pairs, restricted for administrative use. Added strict user context verification in `user_key_value_pairs_o` methods to ensure valid `user_id` is selected before operations. This enhances security and maintains data integrity for user-related actions.
Implemented endpoint and logic for deleting product options, ensuring user authentication, parameter validation, and proper logging. Added a delete method in the product options object to permanently remove records.
Implemented `module_action_t` trait to standardize module actions with validation, logging, and execution. Added `module_action_logs_o` for logging module actions and integrated `license_plate_lookup_a` in motorapi for license plate lookup requests. Enhanced error handling to log failed actions and provide detailed feedback.
Introduced a method to calculate department earnings on a given date. Enhanced department object with new properties (dimension, created_at, updated_at) and improved data serialization for flexibility. Updated routes to accommodate these additions for more robust department insights.
Introduced a new method in `department_daily_reports_o` to select the latest daily report for a department. Added a corresponding API route to fetch the latest report details for a given department ID, with appropriate validations and access control measures. Adjusted parameter handling logic to enhance request validation.
Added support for `name`, `created_at`, and `updated_at` fields in product options API response for better data visibility. Updated invoice object logic to conditionally set draft and booked IDs based on `external_id`, improving flexibility and accuracy in handling external integrations.
Introduced functionality for managing department daily reports, including endpoints for creating, updating, listing, and viewing product sales data. Enhanced product handling in reports by adding support for water usage, notes, and detailed product sales metrics. These changes improve tracking and reporting accuracy across departments.
Updated customer search route permission for clarity and introduced new functionality to manage and retrieve department daily reports. Added `department_daily_reports_o` object and associated route for handling reports, including permission checks, logging, and support for pagination.
Introduce the booked_invoice_id property in collected_order_invoices_o for improved invoice management. Optimize performance by avoiding redundant requests to external systems when the booked_invoice_id is already set. Enhance routes to include the booked_invoice_id in relevant responses and ensure a consistent structure for associated data.
The `closed_at` field is now included when serializing order data. This provides additional context regarding the closure state of invoices in the order, enhancing data accessibility and utility.
Added methods to check and retrieve economic invoice draft and booked IDs, improving invoice tracking functionality. Introduced a new method in the economic endpoint to fetch booked invoice details using external IDs. Additionally, updated the object property class to handle integer values during SQL updates.
Added individual getter methods for customer details such as name, email, address, zip code, city, and country in the economic_customer module. Updated the invoices drafts endpoint to use these accessors instead of directly accessing properties. Included an exception throw for failed requests in the endpoint.
Introduced a new endpoint for syncing collected order invoices with E-Conomic via a POST route. Added methods for creating, managing, and closing invoice drafts in E-Conomic. The implementation includes validations, external ID handling, and seamless integration of payment terms and layout configurations.
The `/modules/motorapi/lookup` route has been removed as it is no longer needed. This cleanup reduces codebase clutter and eliminates outdated or redundant functionality.
Introduce methods to generate and retrieve unique external IDs for collected order invoices, ensuring UUID-based uniqueness. Update user route actions to include new functionalities for editing user roles and passwords.
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.