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.

Reply via email to