Introduced support for forced pricing in `addItemToOrder` and added stricter validation for array inputs in SQL queries. Enhanced JSON handling in type validation and improved code reuse with new objects. Added new endpoint `/modules/xlvask/related-orders` to fetch related orders by wash IDs.
Introduced a new `wash_id` property to the `orders_o` object and updated related order handling logic. Implemented functionality to restrict users to only list their own orders if they lack permissions to view all orders. Updated permissions and adjusted queries accordingly.
Upgraded multiple dependencies to their latest versions to ensure compatibility, address bug fixes, and incorporate new features. Notable updates include `aws/aws-sdk-php`, `guzzlehttp/guzzle`, `illuminate/*`, and several others.
Introduce methods to initialize a GraphServiceClient and ClientCredentialContext, leveraging configuration values for authentication. This enables interaction with Microsoft Graph API in a structured and secure manner.
This commit introduces the Entra module, enabling configuration management and handling callbacks for Microsoft's authorization. It includes new classes, routes, and configuration variables to support integration, ensuring flexibility and logging support for related operations.
Reassign the customer number to a variable before reuse, improving code readability and reducing redundant calls to the value method. This change streamlines object property creation and simplifies maintainability.
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.
Introduced a new `po_number` property in `collected_order_invoices_o` and updated related methods to handle it. Added `userInvoicesRoute` to manage user invoice APIs with GET and PUT endpoints for listing and updating invoices. Updated `microsoft/microsoft-graph` dependency to version `^2.8`.
This update incorporates the 'product' parameter into the department time bookings API, supporting its addition, update, and validation processes. Additionally, composer dependencies are updated with several new libraries, enhancing functionality and compatibility.
Introduced endpoints for fetching and setting department variables in `superuserDepartmentRoute`. Enhanced `getDepartmentOptions` to filter by specific positive variables. Updated SMS notifications and booking forms to utilize department variables for improved flexibility.
Implemented management of department time bookings, including API routes, objects, and logic for opening hours, types, and entries. Enhanced the gateway API to handle optional empty recipient handling.
Introduced xlvask module with request handling, endpoints, and route mappings. Implemented functionalities to fetch usage logs, vehicles, and customers from the API, along with basic authentication support. Includes error handling and configuration setup for seamless integration.
Introduce the xlvask module, including classes for configuration variables (enabled, username, password) and main functionality. Integrated xlvask into the app by adding GET/POST API routes for managing its configuration.
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.
Replaced `created_at` with `closed_at` to accurately set the timestamp when closing collected order invoices. This ensures the correct date is applied during the invoice update process.
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.
Introduced a new OpenAPI v1 specification for XLVask within the services/nginx/app/modules directory. This includes detailed endpoint definitions for Customers, Vehicles, UsageLog, and associated schemas like Customer, Vehicle, and others. The API specification will facilitate integration and validation for related services.
Added documentation topics for API endpoints related to `/Customers` and `/Vehicles` with GET, POST, PUT, and DELETE methods. Included a general API Reference topic and updated redirection rules for removed structure pages.
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.
Introduced a check to apply fixed pricing for customers with predefined rates. This ensures that customer-specific fixed prices override default prices before adding invoices to E-Conomic. The change improves pricing consistency and accuracy for eligible customers.
Introduced functionality to handle fixed prices for collected order invoices, allowing customer-specific pricing overrides. Added a new route and methods to integrate fixed pricing logic, modify invoice items, and ensure proper data management in E-Conomic. Adjusted discount calculations to accommodate cases where final price is zero.
Introduced methods to add, delete, and check user attributes. Updated the user object initialization to set default attributes (`invoiceAllOrdersIndividually` and `restrictTankCleaning`). Removed redundant definitions of these methods to avoid duplication.
Introduce routes for managing customer fixed pricing, including retrieval, creation, and deletion. Create `customer_fixed_pricing_o` object to handle database operations for fixed pricing data. This change enables structured handling of fixed pricing-related logic and functionality.
Introduce the closed_at field to track closure dates for order invoices. Updated validation, processing logic, and database integration to ensure correct handling of the new field. Adjusted related routes to pass and store the closed_at value where applicable.
Introduced two new endpoints: one for listing unknown customer vehicles and another for fetching customer suggestions based on a vehicle registration. These changes include authentication, input validation, and proper logging for each new route.
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.
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.
Replaced 'charge_order_stripe' with a more general 'charge_order' permission check in the Stripe payment intent endpoint. This ensures consistent permission handling across payment modules.
Introduced a method to handle the removal of vehicle subscription transactions from invoice collections. Refactored references to a hardcoded cashier ID by using a class property for better maintainability. This ensures a cleaner and more dynamic transaction-handling process.
Commented out the transaction creation step for bookings to prevent unnecessary or redundant transactions. This ensures the booking process focuses solely on wash certificate completion and status updates without altering the transactional state.
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.
Updated default values for department IDs to prevent null issues and ensure proper handling of optional fields. Adjusted logic to skip non-invoiceable items and corrected department validation to avoid invalid entries. Improved overall robustness and consistency in invoice-related operations.
Added a `visible` property to manage department visibility. Updated routes, traits, and objects to filter out non-visible departments and restrict access to internal system departments for end-users. This improves data security and enhances control over information exposure.
Introduced support for user email and phone management, including phone country code and email validation. Added API endpoints for email change and password validation to enhance account security features. Updated Stripe processor logic for better external ID handling.
Add recipient validation to the SMS gateway API to ensure no empty recipient arrays are processed. Enhance department SMS notification logic by dynamically retrieving phone numbers and logging failures for improved error tracking. Simplify SMS delivery flag logic for better readability.
Ensure proper type casting for 'id' parameter and validate its length for consistency. Address potential type mismatch in department access check with explicit casting. These changes improve data integrity and robustness of the delete operation.
Renamed `phone_number` field to `phone` across the codebase for consistency and simplicity. Introduced a new endpoint to update department notification SMS, supporting edits to fields like `label`, `phone_country_code`, `phone`, and `enabled`.
Introduced logic to handle free subscription addons by setting their price to zero based on a predefined list. Updated affected areas to apply this change consistently when adding or modifying order items. This ensures correct pricing and aligns with business rules for these products.
Introduced `economicPaymentTermsRoute` and `economic_payment_terms_endpoint` to handle fetching payment terms from the economic API. Updated the `economic` class to include the new payment terms endpoint. Logging and session validation were also implemented for enhanced traceability and security.
Introduce a new POST endpoint to handle adding collected order invoices to Stripe, with necessary validations and logging. Extend `collected_order_invoices_o` to include Stripe integration, fetching details of Stripe payment intents when applicable.
Introduced methods to handle Stripe payment capture and updated related classes and endpoints. Refactored constants for payment processors and integrated order collections to reflect Stripe payments. Ensured robust error handling and session validation for payment operations.
Added support for including customer name, department name, and parsed services in `asArray()` method. Introduced functionality for creating transactions, linking bookings to orders, and properly handling related services. Improved department daily report handling and removed unnecessary fields.
Update the SQL query to fetch 'val' alongside 'user_id' and modify the logic to skip rows with empty 'val'. This ensures only relevant data is processed, improving data integrity and correctness.
Previously, the country and currency fields could return null if not explicitly set. This update ensures that 'Ukendt' is returned as the default country and 'DKK' as the default currency when no value is provided, enhancing data consistency.
Revised a string constant for transaction purposes to improve clarity. Added fallback values for address, zip code, and city in customer data methods to ensure defaults are returned when data is missing. These changes enhance robustness and readability.
Added functionality to handle vehicle subscriptions in invoices, including validation and item visibility. Introduced department notification SMS capability with endpoints for creating, retrieving, and deleting SMS records. Enhanced invoice drafting logic to exclude items not flagged for inclusion in invoices.
Updated the SMS sending logic to improve validation and handling of recipients in `gatewayapi.php`. Refactored notification conditions in `bookings_o.php` to ensure proper fallback mechanisms. Additionally, included a new booking notification email template in `email.php`.
The unused permission check was commented out, so it has been fully removed to simplify the code. This change maintains the existing functionality while cleaning up redundant code.
Changed the hardcoded booking ID from 434 to 477 in pdfGeneratorRoute.php to align with the correct data. Also, updated the wash certificate template image to reflect the new design or content requirements.
Simplified the loop by removing the special-case handling for the first order. Adjusted variable usage to improve clarity and ensure proper assignment. This streamlines the creation of invoice collections for orders.
Refactored notification methods to handle Slack, SMS, and email delivery logic more effectively. Introduced `sendBookingNotification` email functionality and a new template for booking notifications. Improved handling of booking data for emails and centralized logic for retrieving booking details.
Implemented functionality to split collected order invoices, ensuring proper validation and handling processor constraints. Added a notification system to inform departments about new bookings via Slack or SMS. Also, included minor enhancements such as a corrected Gateway API URL and improved form handling for wash certificate emails.
Replaced raw SQL with a consolidated object-based approach for adding bookings, enhancing maintainability and reducing redundancy. Adjusted form handling to include stricter type casting, additional property checks, and default fallbacks for wash certificate data. These changes improve code readability and error handling while ensuring consistent data processing.
Commented out unused cron tasks 'CheckUnfulfilledBookings' and 'SyncBookings' in the cron configuration. Also removed a debug print statement from the booking wash form to clean up the code.
Introduced a method to handle the sending of wash certificates via email for bookings with valid certificates. Updated the wash certificate generation process to trigger this new functionality automatically.
The `book_interior_wash_f` form was removed due to redundancy. Added functionality to handle wash certificate generation, including safety seal and operator data, and added a new form `complete_booking_f` to finalize bookings without certificates. Adjustments were made to several related components to ensure seamless integration.
Introduced a new GatewayAPI module to handle SMS messaging integration. This includes interfaces, core classes for API interaction, configuration management, and routing for config retrieval and update. Added necessary initializations in `index.php` to integrate the module seamlessly.
Introduce a `setPassword` method in the `users_o` class to hash and update user passwords in the database. Add a new `/superuser/user/password` API route that allows setting user passwords, with appropriate permission checks, validation, and logging.
Updated the wash certificate template to include a signature image instead of plain text in the specified table cell. Added new image assets to support this update, ensuring proper rendering and appearance. This enhances the visual presentation of the certificates.
Ensure correct comparison between customer ID and user number by explicitly casting both to integers. This prevents potential logical errors when checking permissions for vehicle deletion.
Previously defined constants could cause errors if redefined, so checks are added to ensure they are defined only once. Additionally, the `syncAllUsersEconomicCustomerDetails` call in the Cron job is commented out, likely to prevent unintended executions.
Added `set_time_limit(0)` to prevent timeout for long-running scripts and set `memory_limit` to unlimited to handle extensive memory usage. These changes ensure the script can handle resource-intensive operations without interruptions.
Enhanced PDF generation with dynamic booking, department, and customer data, improving template variability. Introduced a new cron job and script to sync Economic invoice statuses, ensuring data consistency and error handling in automated tasks.
Added support for presigned URLs in PDF responses and improved image handling by dynamically setting dimensions. Refactored and expanded wash certificate templates with additional fields and styles, along with a new background template. Updated HTML2PDF configuration for better rendering and full-page display mode.
This new endpoint allows simulating Stripe payment intents for debugging purposes. It includes validation checks for session, order existence, and payment intent status, ensuring controlled execution. This functionality is intended strictly for testing and should not be used in production environments.
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.
Introduced functionality for handling Stripe payment intents, including creation, retrieval, and cancellation. Added a subscription_allowed flag to products for enabling subscription-specific operations. Integrated the necessary backend endpoints, object property updates, and route handling logic.
Commented out debug echo and print_r statements that were used for logging error messages and invoice details. This ensures cleaner output and avoids unnecessary clutter in logs during execution.
Introduce a new route for running error checks and implement a method to evaluate and clear specific invoice errors. Enhance draft handling with additional error checks and new helper methods to fetch and manage draft invoices.
Refactored invoice draft handling to improve error checks, added support for optional fetch skipping, and enhanced currency management. Expanded filtering capabilities with date range and attribute-based filters. Adjusted Nginx config to increase FastCGI read timeout for long-running processes.
Introduced a "NOT ZERO" filter in `db_object_t` to enable stricter checks for fields with non-zero values. Applied this filter to enforce restrictions on active invoices in relevant routes to improve data consistency and validation accuracy.
Introduce new endpoints for viewing Economic invoice summaries and running draft checks. Implement `economic_tasks` helper for managing draft validations, and enhance `collected_order_invoices_o` and SQL clauses to improve query flexibility, including handling "NOT NULL" filters.
Modified functionalities for creating invoice drafts by adding support for custom dates and enhanced validations. Updated methods now check and validate date formats, handle booked invoice collections, and ensure proper invoice creation workflows.
The /collected-invoices/transactions route was removed as it was no longer in use. Removing this unused code improves maintainability and reduces potential confusion in the codebase.
Introduced new superuser-only routes for handling collected invoices, including viewing invoices per order/month, invoice totals, and transactions. Enhanced validation for invoice closure with processors and added support for database views in multiple classes and objects. These updates improve backend functionality and data granularity while maintaining strict permission control.
Replaced hardcoded "DKK" with a dynamic currency variable to ensure the correct currency is displayed on invoice discounts. This improves flexibility and localization for international users.
Introduced dynamic currency handling in invoice generation by adding methods to set currency and retrieve conversion rates. Adjusted logic to ensure accurate currency conversions when processing orders, draft invoices, and customer data. Default behavior falls back to DKK if no currency is specified.
Implemented a method to handle currency conversion in `currency_conversion_rates_o` and introduced a new API endpoint to fetch conversion rates. These changes improve functionality for managing and retrieving currency data through the FXRatesAPI module.
Integrated a new fxratesapi module to handle currency conversions, including API configurations, rate conversion actions, and request logging. Added support for module settings such as enablement status, API key, and daily request limits. New routes, database interactions, and object handling were implemented to facilitate the module's operations.