Edit order - promotion calculation problem
------------------------------------------ Key: OFBIZ-1833 URL: https://issues.apache.org/jira/browse/OFBIZ-1833 Project: OFBiz Issue Type: Bug Components: order Affects Versions: SVN trunk Reporter: Rashko Rejmer Priority: Minor Fix For: SVN trunk I noticed 2 problems when you try to update already created order: 1. The loadCartFromOrder service removes all promotions and recreates them. The problem is that the service first sets the order items quantities(triggers promotion creation) and then sets the prices of the order items(if the price was changed during order creation). In this situation the last order item, if there is a % promotion applied to it, the promotion is not recalculated and it is based on the product base price. 2. After loading the shopping cart from order, updateOrderItems service sets first changed quantities, and then changed prices. If you change the price of an item you get only promotion calculated, based on the item base price(not on the changed price). Steps to reproduce: - create an order with DemoCustCompany party; - buy 1 x GZ-1000 - you will get 100% discount for this item; - change the price of the item to 100$ and recalculate the cart - you will get 100% discount again. - finalize the order; - go the order summary screen and edit the order item by changing it's price from 100$ to 50$; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-1833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rashko Rejmer updated OFBIZ-1833: --------------------------------- Attachment: orderChangePromotionProblem.patch This patch fixes mentioned issues, and it is ready for review. > Edit order - promotion calculation problem > ------------------------------------------ > > Key: OFBIZ-1833 > URL: https://issues.apache.org/jira/browse/OFBIZ-1833 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Rashko Rejmer > Priority: Minor > Fix For: SVN trunk > > Attachments: orderChangePromotionProblem.patch > > > I noticed 2 problems when you try to update already created order: > 1. The loadCartFromOrder service removes all promotions and recreates them. > The problem is that the service first sets the order items quantities(triggers promotion creation) and then sets the prices of the order items(if the price was changed during order creation). In this situation the last order item, if there is a % promotion applied to it, the promotion is not recalculated and it is based on the product base price. > 2. After loading the shopping cart from order, updateOrderItems service sets first changed quantities, and then changed prices. If you change the price of an item you get only promotion calculated, based on the item base price(not on the changed price). > > Steps to reproduce: > - create an order with DemoCustCompany party; > - buy 1 x GZ-1000 - you will get 100% discount for this item; > - change the price of the item to 100$ and recalculate the cart - you will get 100% discount again. > - finalize the order; > - go the order summary screen and edit the order item by changing it's price from 100$ to 50$; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-1833. ---------------------------------- Resolution: Fixed Assignee: Jacques Le Roux Thanks Rashko, Your patch is in trunk rev. 669874. I tried to merge by hand in release4.0 but I ran out of time when it came to Java 1.4 and 1.5 incompatility for addItemToEnd parameter (unitPrice == null ? null : false). > Edit order - promotion calculation problem > ------------------------------------------ > > Key: OFBIZ-1833 > URL: https://issues.apache.org/jira/browse/OFBIZ-1833 > Project: OFBiz > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Rashko Rejmer > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: orderChangePromotionProblem.patch > > > I noticed 2 problems when you try to update already created order: > 1. The loadCartFromOrder service removes all promotions and recreates them. > The problem is that the service first sets the order items quantities(triggers promotion creation) and then sets the prices of the order items(if the price was changed during order creation). In this situation the last order item, if there is a % promotion applied to it, the promotion is not recalculated and it is based on the product base price. > 2. After loading the shopping cart from order, updateOrderItems service sets first changed quantities, and then changed prices. If you change the price of an item you get only promotion calculated, based on the item base price(not on the changed price). > > Steps to reproduce: > - create an order with DemoCustCompany party; > - buy 1 x GZ-1000 - you will get 100% discount for this item; > - change the price of the item to 100$ and recalculate the cart - you will get 100% discount again. > - finalize the order; > - go the order summary screen and edit the order item by changing it's price from 100$ to 50$; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |