hotwax / OrderRouting

Order Routing
Apache License 2.0
0 stars 1 forks source link

Feature Enhancement for Order Item Group Support in Brokering #23

Closed dixitdeepak closed 4 months ago

dixitdeepak commented 5 months ago

Order items can be grouped together based on various business requirements. To improve the efficiency and accuracy of the brokering process, it is necessary to ensure that all items within a specific order item group are brokered to the same location.

Use BROKERING_ITEM_GRP in condition to identify the brokering order item group

dixitdeepak commented 4 months ago

The new feature enhances the brokering logic to include order item group associations. By default, the system allows partial assignments for routing rules, setting the splitOrderItemGroup condition to true. If the OrderRoutingRuleInvCond condition explicitly sets splitOrderItemGroup to 'N', the system ensures all items from an order item group are assigned to a single location, preventing items from being brokered to different locations.

dixitdeepak commented 4 months ago

Incorporated support for order item group associations in brokering. Added logic to evaluate the splitOrderItemGroup condition, which defaults to true. Introduced a new enumeration for inventory filter condtion: <moqui.basic.Enumeration enumId="IIP_SPLIT_ITEM_GROUP" description="Split order item group" sequenceNum="6" enumTypeId="INV_FILTER_PRM_TYPE" enumCode="splitOrderItemGroup"/> If splitOrderItemGroup is set to 'N' in the OrderRoutingRuleInvCond condition, the system will check all items from the order item group (of type BROKERING_ITEM_GRP) to ensure they are assigned to a single location. Prevent items from the same order item group from being brokered to different locations.

If partial assignment is enabled in the routing rule and splitOrderItemGroup is set to 'N', items will not be split and will be brokered to a single location.

dixitdeepak commented 4 months ago

Here is the PR for this feature: https://github.com/hotwax/OrderRouting/pull/26/files

dixitdeepak commented 4 months ago

Fixed some of the corner cases found during the review and verification