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.
Refactored `orderInvoicesRoute` to use a central method for fetching invoice details, reducing code duplication. Added functionality for generating and storing material transaction PDFs using a new HTML2PDF template. Updated database handling for accommodating null filters and enhanced customer data retrieval in orders.
Implemented a new endpoint to mark orders as completed and updated the `orders_o` object with the necessary logic and database integration. Added a `completed_at` property to track when an order is marked as completed. Includes validation, error handling, and logging to ensure proper functionality.
Reverted table name from 'bookings_new' to 'bookings' and removed unused sync data structure. Updated routes to use 'wash_certificate_store' instead of 'pdf_store' for wash certificate management. Added 'taulov' as a new department legacy name entry.
Introduced `sendWashCertificateEmail` method to handle email dispatch, including necessary exception handling for MailerSend. Updated the wash booking form text to enhance clarity and ensure appropriate instructions in Danish.
Introduced support for a `data` property in bookings, extended form handling with additional validation and input fields, and added functionality for retrieving booking counts by date and status. Improved safety seal labeling and enhanced PDF generation comments.
Replaced `wash_certificate_store` with `pdf_store` for handling wash certificate operations. Enhanced error handling with booking status checks (pending, completed, or cancelled) and added validation for wash certificate URL existence. This improves code clarity and ensures better consistency in managing wash certificates.
This commit introduces changes to include branding information in departments. Updates were made to routes, forms, and objects to handle branding IDs and enforce validation. Additionally, a method call was added to track object changes when branding is updated.
Introduced a new branding functionality, including a `branding_o` object, `create_branding_f` form, and associated routes in `BrandingRoute`. Refactored the forms directory for better organization and added support for branding in departments. Extended validation, object handling, and response handling to accommodate this new feature.
Integrates a new method to send wash certificate emails, including support for attaching PDFs. Updates the email system to handle attachments and streamlines booking processes to send certificates upon completion.
Introduces a form for generating wash certificates associated with bookings, along with validations and access restrictions. Refactors booking management to integrate a new `bookings_new_o` class, enhancing structure and adding functionalities like caching and detailed error handling.
Introduce `BOOK_INTERIOR_WASH` functionality with new input fields, setup, and email confirmations in the booking process. Refactor form validation to include advanced field metadata, conditional display logic, and stricter validation requirements. Implement reusable methods for field requirement checks, sanitization, and dynamic metadata handling for better form management.
Implemented a new booking confirmation email template and its integration with email sending functionality. Updated form handling to trigger confirmation email after submission and enhanced error handling on department validation.
Introduced a new `customer_number` property across the form handling codebase, enabling forms to store and manage customer numbers where applicable. Updated methods to handle this property, including sanitization, validation, and saving processes. Added a `beforeSave` method to set `customer_number` during form submission.
Added support for defining and retrieving form field options, along with methods to manage field-specific configurations. Enhanced invoice draft generation to handle discounts, including the ability to calculate total discounts and display them as separate lines. These updates improve flexibility in forms and invoice processing.
This commit introduces a new PDF generation module leveraging the HTML2PDF library. The module generates PDFs from HTML templates, supports customization through styles and templates, and integrates with Minio for storage and retrieval. A test route is added for generating and serving PDFs dynamically.
Updated composer.json to include spipu/html2pdf for HTML to PDF conversion and its dependency tecnickcom/tcpdf. Adjusted composer.lock to reflect the updated dependency tree for these additions.
Updated the message format to simplify content, translate to Danish, and remove unnecessary fields. This improves clarity and aligns with localized conventions.
Removed commented-out code snippets for better readability and maintainability. This streamlines the logic by eliminating unused query modifications and debug artifacts.
Introduced customer attribute-based filtering for individual invoicing and enhanced collected order invoice processing with proper associations to customers and orders. Added new endpoints, fields, and utility methods to streamline data retrieval, ensure consistency, and support new use cases like 'Ready to Invoice'. Includes minor fixes, validations, and optimizations throughout the affected modules.
Implemented a robust form management system with validation, sanitization, and database integration. Added reusable traits, classes, and methods to define, submit, and process forms. Introduced a "Book a Wash" form as an example implementation.