Skip to content

Staging - #343

Open
MostafaKadry wants to merge 84 commits into
developfrom
staging
Open

Staging#343
MostafaKadry wants to merge 84 commits into
developfrom
staging

Conversation

@MostafaKadry

Copy link
Copy Markdown
Collaborator

No description provided.

MohamedAliSmk and others added 30 commits July 19, 2026 16:52
Implemented functionality to check if an item qualifies for active promotions based on quantity, affecting discount editing capabilities. Updated UI to reflect promotional offer statuses and adjusted related computed properties for better user experience. Enhanced backend API to support promotional checks for items.
- Introduced new fields for coupon management: apply_scope, applicable_brand, applicable_item_group, and excluded_brands.
- Updated coupon validation to compute line-level discounts based on eligible items.
- Enhanced the UI components for coupon application, allowing users to specify scope and exclusions.
- Improved the logic for applying discounts to ensure compliance with new coupon rules.
- Added functionality to revalidate applied coupons based on cart changes, ensuring accurate discount application.
…support

- Introduced a new resource for calculating coupon discounts with item-level exclusions.
- Updated CouponDialog to build invoice payloads for coupon validation.
- Enhanced CouponManagement to include an option for excluding already discounted items.
- Modified applyCoupon logic to handle new discount calculations and validations.
- Added item-level discount flags and logic to ensure proper discount application in the cart.
- Updated API endpoints to support new promotion types and constraints.
- Enhanced test coverage for coupon and promotion functionalities, ensuring correct behavior with item-level discounts.
…al schemes

- Introduced a new validation function to prevent duplicate promotion types for the same item across active promotional schemes.
- Updated the validation logic in the Promotional Scheme to include the new check, enhancing the integrity of promotional configurations.
- Refactored coupon validation logic to utilize a new API call for reliable response parsing.
- Introduced a Promotion Interaction Matrix to determine item eligibility for promotions based on various states.
- Updated the coupon handling logic to exclude already discounted items and apply brand exclusions effectively.
- Enhanced test coverage for coupon eligibility and interaction scenarios, ensuring accurate discount application.
- Introduced GWP (Gift With Purchase) promotion type, allowing free items based on purchase quantities.
- Updated invoice and cart logic to calculate GWP discounts accurately, ensuring correct display of free item quantities.
- Enhanced promotional scheme management to include GWP-specific fields and validation.
- Refactored discount calculation methods to accommodate GWP logic, ensuring seamless integration with existing discount structures.
- Improved test coverage for GWP scenarios, validating correct application of promotions across various conditions.
- Introduced a dedicated method to check for GWP promotions, improving code readability and maintainability.
- Updated validation and cleanup methods to utilize the new GWP check, ensuring accurate handling of promotional conditions.
- Enhanced logic to correctly manage same item conditions for GWP promotions, aligning with the overall discount structure.
- Introduced functions to identify and clear offer discounts from cart items, improving the handling of promotional discounts.
- Updated the logic to ensure that discounts are accurately applied or removed based on server responses and item conditions.
- Refactored existing discount handling to streamline the process of clearing discounts when offers are invalidated.
feat: implement accumulative discount mode with automated slab management and validation
test: add regression test suite for promotion precedence and scoping
…Checking how other files in the project import it.
- Refactored the loading of CSS and JS assets for the Nexus demo to utilize template variables, improving flexibility and maintainability.
- Removed hardcoded asset paths in favor of conditional checks for asset availability.
- Added validation to ensure a customer and company are selected before applying a coupon, improving user experience and preventing errors.
- Updated the coupon application logic to utilize the new company prop across relevant components, ensuring consistent data handling.
- Enhanced API methods to require customer and company parameters, returning appropriate error messages when they are missing.
- Introduced a new utility function, unwrapCouponValidation, to normalize API responses from the coupon validation process, ensuring accurate interpretation of success and error messages.
- Updated the CouponDialog and posCart store to utilize the new validation function, enhancing the reliability of coupon application feedback.
- Updated the logic in sync_promotion_fields_to_pricing_rules to differentiate between GWP and non-GWP product discounts.
- Ensured that GWP rules maintain a same_item value of 1, while allowing non-GWP discounts to retain their configured same_item/free_item values.
…lidation

- Updated cart hash generation, snapshot building, and offer eligibility checks to filter out free items, ensuring that only paid items are considered in calculations.
- Enhanced logic to prevent free gifts from affecting minimum and maximum quantity checks, improving the reliability of promotional offer processing.
- Changed the GWP paid quantity basis labels from "Min Qty" and "Max Qty" to "Min Price" and "Max Price" for clarity and consistency.
- Updated related logic in the POS cart store and various API files to reflect the new basis options.
- Added normalization function for legacy basis labels to ensure backward compatibility.
- Enhanced test coverage for the new basis options and their handling in promotions.
- Introduced a computed property to merge free items into a single line for better clarity in the invoice cart.
- Updated item display logic to show combined quantities of free items and adjusted related badge texts accordingly.
- Refactored quantity handling to ensure accurate updates for both paid and free items, improving user experience during item interactions.
MostafaKadry and others added 30 commits August 5, 2026 18:40
…tal-instead-of-subtotal

[PN 84]Sync pricing items for transaction-scoped pricing rules evaluation
…ion, ensuring correct application of discount percentages and amounts while maintaining free item promotion handling
… no NULL values are written to NOT NULL columns and providing user feedback on submission status
…lowing for soft failure management and improved error logging
…backend API to allow optional email input, generating defaults for Magento sync when necessary
…ctions for fetching UOM prices and validating price conditions, enhancing code readability and maintainability
…ing unused email generation functions and integrating Magento registration, allowing for streamlined customer creation and improved email handling
Integrate remote offer eligibility refactor with local customer email and item pricing changes.
…n on POS invoice submission, enhancing performance and error handling
…ce and update imports for improved customer registration handling in POS API
…ion for clarity and consistency in parameter naming
…uplicate calls and improving validation handling with custom_is_publish flag
…PhoneInput components, and enhance CreateCustomerDialog to apply default mobile ISD from POS Profile country
Implement POS authorization with PIN authentication and rule validation
- Implemented sync_return_loyalty_program to ensure return invoices align with the original invoice's loyalty program.
- Updated auto_assign_loyalty_program_on_invoice to handle cases where the invoice is a return or in Magento loyalty mode.
- Added unit tests for new loyalty program functionalities and ensured existing logic is preserved.
- Modified CustomSalesInvoice to integrate loyalty program checks during submission and loyalty point entry creation.
- Added functionality to drop out-of-stock free items from the cart before proceeding to payment.
- Implemented warnings for empty carts and out-of-stock free items during checkout.
- Enhanced stock validation logic to ensure free items are only added if stock is available.
- Updated invoice processing to strip out-of-stock free items while allowing paid items to be submitted.
…m, removing deprecated methods and enhancing customer handling in POS
…calculations and ensuring accurate item display for bundled promotions
- Replaced the deprecated is_magento_loyalty_mode function with is_external_loyalty_mode for better integration handling.
- Updated unit tests to reflect the changes in loyalty mode checks, ensuring consistent behavior across different scenarios.
…n-split

Feature/magento integration split
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants