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.
Introduced `getPaymentTermsNumber` method in the customer helper to fetch payment terms directly from the customer object. Refactored invoice drafts endpoint to use this method, ensuring cleaner and more reliable access to payment terms data.
Introduced a complete notifications module, including classes for managing notifications (`notifications_o`), traits for handling types and routing, and API routes to list, add, and delete notifications. Added input validation, permission handling, and JSON data processing capabilities.
Include customer user data in the collected order invoices payload by retrieving user information based on customer number. This ensures that relevant user details are available for further processing or integration.
Introduce logic for validating booked and draft invoices in E-conomic. Add methods to calculate the total net amount for invoice collections and improve error handling for specific invoice states. Updated related workflows to ensure consistent validation and data integrity.
This commit introduces support for `min` and `max` fields in product options. It includes backend changes to handle validation, setting, and retrieval of these new fields, ensuring compatibility. Additionally, a new `requireTypeIn` utility and `TYPE_NULL` constant were added for improved type validation.
Updated user price overrides and product attributes to enforce consistent data types. This improves data handling clarity and reduces type-related errors across the application.
Extended the `addItemToOrder` method to accept an optional `notes` parameter and updated relevant logic to handle it. Modified input validation in `orderItemsRoute` to ensure notes are a valid string. Adjusted `set_name` in `product_options_o` to handle empty strings by nullifying the name.
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.