svn commit: r778406 - in /ofbiz/trunk/applications/order: config/ entitydef/ src/org/ofbiz/order/shoppingcart/ webapp/ordermgr/WEB-INF/ webapp/ordermgr/WEB-INF/actions/order/ webapp/ordermgr/order/ widget/ordermgr/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r778406 - in /ofbiz/trunk/applications/order: config/ entitydef/ src/org/ofbiz/order/shoppingcart/ webapp/ordermgr/WEB-INF/ webapp/ordermgr/WEB-INF/actions/order/ webapp/ordermgr/order/ widget/ordermgr/

mor-2
Author: mor
Date: Mon May 25 12:35:33 2009
New Revision: 778406

URL: http://svn.apache.org/viewvc?rev=778406&view=rev
Log:
Enabled audit on few fields on OrderItem to archive changes in OrderItem price and quantities as well as on OrderItemShipGroup to archive changes in shipment method for an
order. This can be viewed through "Order History" link under Actions screelet on Order Detail Page.
Slightly modified patch from Amit Sharma, part of OFBIZ-2499 (https://issues.apache.org/jira/browse/OFBIZ-2499)

Added:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy   (with props)
Modified:
    ofbiz/trunk/applications/order/config/OrderUiLabels.xml
    ofbiz/trunk/applications/order/entitydef/entitymodel.xml
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
    ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml

Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=778406&r1=778405&r2=778406&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Mon May 25 12:35:33 2009
@@ -1499,6 +1499,9 @@
         <value xml:lang="th">AVS</value>
         <value xml:lang="zh">地址验证服务</value>
     </property>
+    <property key="OrderBackToOrder">
+        <value xml:lang="en">Back to order</value>
+    </property>
     <property key="OrderBackOrdered">
         <value xml:lang="de">Auftrag im Rückstand</value>
         <value xml:lang="en">Backordered</value>
@@ -3133,6 +3136,9 @@
         <value xml:lang="zh">你可能还会对下列产品感兴趣:</value>
         <value xml:lang="zh_CN">你可能也对这些感兴趣 :</value>
     </property>
+    <property key="OrderHistoryNotAvailable">
+        <value xml:lang="en">History not available</value>
+    </property>
     <property key="OrderHold">
         <value xml:lang="de">Auftrag anhalten</value>
         <value xml:lang="en">Hold Order</value>
@@ -4819,6 +4825,9 @@
         <value xml:lang="zh">订单头信息</value>
         <value xml:lang="zh_CN">订单头信息</value>
     </property>
+    <property key="OrderOrderHistory">
+        <value xml:lang="en">Order History</value>
+    </property>
     <property key="OrderOrderId">
         <value xml:lang="de">Auftrag ID</value>
         <value xml:lang="en">Order Id</value>
@@ -6669,6 +6678,9 @@
         <value xml:lang="th">รหัสจำนวนที่ยกเลิก</value>
         <value xml:lang="zh">取消的数量</value>
     </property>
+    <property key="OrderQuantityHistory">
+        <value xml:lang="en">Item Quantity History</value>
+    </property>
     <property key="OrderQuantityInShipGroup">
         <value xml:lang="de">In Gruppe</value>
         <value xml:lang="en">In Group</value>
@@ -8592,6 +8604,9 @@
         <value xml:lang="zh">运输信息</value>
         <value xml:lang="zh_CN">发货信息</value>
     </property>
+    <property key="OrderShipmentMethodHistory">
+        <value xml:lang="en">Shipment Method History</value>
+    </property>
     <property key="OrderShipmentReceived">
         <value xml:lang="de">Lieferung erhalten</value>
         <value xml:lang="en">Shipment Received</value>
@@ -9294,6 +9309,9 @@
         <value xml:lang="zh">单价</value>
         <value xml:lang="zh_CN">单价</value>
     </property>
+    <property key="OrderUnitPriceHistory">
+        <value xml:lang="en">Item Unit Price History</value>
+    </property>
     <property key="OrderUnitPriceHT">
         <value xml:lang="de">Stückpreis ohne Steuern</value>
         <value xml:lang="en">Unit  Price  HT</value>

Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?rev=778406&r1=778405&r2=778406&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Mon May 25 12:35:33 2009
@@ -490,10 +490,10 @@
       <field name="shoppingListItemSeqId" type="id"></field>
       <field name="subscriptionId" type="id"></field>
       <field name="deploymentId" type="id"></field>
-      <field name="quantity" type="fixed-point"></field>
+      <field name="quantity" type="fixed-point" enable-audit-log="true"></field>
       <field name="cancelQuantity" type="fixed-point"></field>
       <field name="selectedAmount" type="fixed-point"></field>
-      <field name="unitPrice" type="currency-amount"></field>
+      <field name="unitPrice" type="currency-amount" enable-audit-log="true"></field>
       <field name="unitListPrice" type="currency-amount"></field>
       <field name="unitAverageCost" type="currency-amount"></field>
       <field name="unitRecurringPrice" type="currency-amount"></field>
@@ -514,6 +514,7 @@
       <field name="cancelBackOrderDate" type="date-time"><description>Used to cancel all orders from suppliers when its in past</description></field>
       <field name="overrideGlAccountId" type="id"><description>Used to specify the override or actual glAccountId used for the adjustment, avoids problems if configuration changes after initial posting, etc.</description></field>
       <field name="salesOpportunityId" type="id-ne"></field>
+      <field name="changeByUserLoginId" type="id" enable-audit-log="true"></field>
       <prim-key field="orderId"/>
       <prim-key field="orderItemSeqId"/>
       <relation type="one" fk-name="ORDER_ITEM_HDR" rel-entity-name="OrderHeader">
@@ -827,10 +828,10 @@
             title="Order Item Ship Group">
       <field name="orderId" type="id-ne"></field>
       <field name="shipGroupSeqId" type="id-ne"></field>
-      <field name="shipmentMethodTypeId" type="id"></field>
+      <field name="shipmentMethodTypeId" type="id" enable-audit-log="true"></field>
       <field name="supplierPartyId" type="id"></field>
       <field name="vendorPartyId" type="id"><description>For use with multi-vendor stores, order will be split so that each ship group is associated with only one vendor (only if applicable)</description></field>
-      <field name="carrierPartyId" type="id"></field>
+      <field name="carrierPartyId" type="id" enable-audit-log="true"></field>
       <field name="carrierRoleTypeId" type="id"></field>
       <field name="facilityId" type="id"></field>
       <field name="contactMechId" type="id"></field>

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=778406&r1=778405&r2=778406&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon May 25 12:35:33 2009
@@ -3458,6 +3458,7 @@
                 orderItem.set("shipAfterDate", item.getShipAfterDate());
                 orderItem.set("estimatedShipDate", item.getEstimatedShipDate());
                 orderItem.set("cancelBackOrderDate", item.getCancelBackOrderDate());
+                orderItem.set("changeByUserLoginId", this.getUserLogin().get("userLoginId"));
 
                 String fromInventoryItemId = (String) item.getAttribute("fromInventoryItemId");
                 if (fromInventoryItemId != null) {

Added: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy?rev=778406&view=auto
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy (added)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy Mon May 25 12:35:33 2009
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityOperator;
+
+orderId = parameters.orderId;
+context.orderId = orderId;
+
+orderHeader = null;
+if (orderId) {
+    orderHeader = delegator.findByPrimaryKey("OrderHeader", [orderId : orderId]);
+}
+
+if (orderHeader) {
+    shipmentMethodCond = [EntityCondition.makeCondition("changedEntityName", EntityOperator.EQUALS, "OrderItemShipGroup"),
+                          EntityCondition.makeCondition("changedFieldName", EntityOperator.EQUALS, "shipmentMethodTypeId"),
+                          EntityCondition.makeCondition("pkCombinedValueText", EntityOperator.LIKE, orderId + "%")];
+    shipmentMethodHistories = delegator.findList("EntityAuditLog", EntityCondition.makeCondition(shipmentMethodCond, EntityOperator.AND), null, ["-changedDate"], null, false);
+
+    carrierPartyCond = [EntityCondition.makeCondition("changedEntityName", EntityOperator.EQUALS, "OrderItemShipGroup"),
+                        EntityCondition.makeCondition("changedFieldName", EntityOperator.EQUALS, "carrierPartyId"),
+                        EntityCondition.makeCondition("pkCombinedValueText", EntityOperator.LIKE, orderId + "%")];
+    carrierPartyHistories = delegator.findList("EntityAuditLog", EntityCondition.makeCondition(carrierPartyCond, EntityOperator.AND), null, null, null, false);
+
+    orderShipmentHistories = [];
+    shipmentMethodHistories.each { shipmentMethodHistory ->
+        orderShipmentHistory = [:];
+        if ("shipmentMethodTypeId".equals(shipmentMethodHistory.changedFieldName)) {
+            shipmentMethodType = delegator.findOne("ShipmentMethodType", ["shipmentMethodTypeId" : shipmentMethodHistory.newValueText], false);
+            carrierPartyHistories.each { carrierPartyHistory ->
+                if (carrierPartyHistory.lastUpdatedTxStamp == shipmentMethodHistory.lastUpdatedTxStamp) {
+                    if ("_NA_".equals(carrierPartyHistory.newValueText)) {
+                        orderShipmentHistory.shipmentMethod = shipmentMethodType.description;
+                    } else {
+                        orderShipmentHistory.shipmentMethod = carrierPartyHistory.newValueText + " " + shipmentMethodType.description;
+                    }
+                }
+            }
+            orderShipmentHistory.lastUpdated = shipmentMethodHistory.lastUpdatedTxStamp;
+            orderShipmentHistory.changedDate = shipmentMethodHistory.changedDate;
+            orderShipmentHistory.changedByUser = shipmentMethodHistory.changedByInfo;
+            orderShipmentHistories.add(orderShipmentHistory);
+        }
+    }
+    context.orderShipmentHistories = orderShipmentHistories;
+
+    changedByInfoCond = [EntityCondition.makeCondition("changedEntityName", EntityOperator.EQUALS, "OrderItem"),
+                         EntityCondition.makeCondition("changedFieldName", EntityOperator.EQUALS, "changeByUserLoginId"),
+                         EntityCondition.makeCondition("pkCombinedValueText", EntityOperator.LIKE, orderId + "%")];
+    changedByInfoHistories = delegator.findList("EntityAuditLog", EntityCondition.makeCondition(changedByInfoCond, EntityOperator.AND), null, ["-changedDate"], null, false);
+
+    orderUnitPriceHistories = [];
+    unitPriceCond = [EntityCondition.makeCondition("changedEntityName", EntityOperator.EQUALS, "OrderItem"),
+                     EntityCondition.makeCondition("changedFieldName", EntityOperator.EQUALS, "unitPrice"),
+                     EntityCondition.makeCondition("pkCombinedValueText", EntityOperator.LIKE, orderId + "%")];
+    unitPriceHistories = delegator.findList("EntityAuditLog", EntityCondition.makeCondition(unitPriceCond, EntityOperator.AND), null, ["-changedDate"], null, false);
+    unitPriceHistories.each { unitPriceHistory ->
+        orderUnitPriceHistory = [:];
+        if  ((unitPriceHistory.oldValueText) && (unitPriceHistory.newValueText)) {
+            if ((Float.valueOf(unitPriceHistory.oldValueText)).compareTo(Float.valueOf(unitPriceHistory.newValueText)) != 0) {
+                orderUnitPriceHistory.oldValue = unitPriceHistory.oldValueText;
+                orderUnitPriceHistory.newValue = unitPriceHistory.newValueText;
+                orderUnitPriceHistory.changedDate = unitPriceHistory.changedDate;
+                orderItemSeqId = (unitPriceHistory.pkCombinedValueText).substring((unitPriceHistory.pkCombinedValueText).indexOf("::") + 2, (unitPriceHistory.pkCombinedValueText).length());
+                orderItem = delegator.findOne("OrderItem", [orderId : orderId, orderItemSeqId : orderItemSeqId], false);
+                orderUnitPriceHistory.productId = orderItem.productId;
+                changedByInfoHistories.each { changedByInfoHistory ->
+                    if (changedByInfoHistory.lastUpdatedTxStamp == unitPriceHistory.lastUpdatedTxStamp) {
+                        if (changedByInfoHistory.newValueText) {
+                            orderUnitPriceHistory.changedByUser = changedByInfoHistory.newValueText;
+                        } else {
+                            orderUnitPriceHistory.changedByUser = changedByInfoHistory.oldValueText;
+                        }
+                     }
+                }
+                orderUnitPriceHistories.add(orderUnitPriceHistory);
+            }
+        }
+    }
+
+    context.orderUnitPriceHistories = orderUnitPriceHistories;
+    orderQuantityHistories = [];
+    quantityCond = [EntityCondition.makeCondition("changedEntityName", EntityOperator.EQUALS, "OrderItem"),
+                    EntityCondition.makeCondition("changedFieldName", EntityOperator.EQUALS, "quantity"),
+                    EntityCondition.makeCondition("pkCombinedValueText", EntityOperator.LIKE, orderId + "%")];
+    quantityHistories = delegator.findList("EntityAuditLog", EntityCondition.makeCondition(quantityCond, EntityOperator.AND), null, ["-changedDate"], null, false);
+    quantityHistories.each { quantityHistory ->
+        orderQuantityHistory = [:];
+        if ((quantityHistory.oldValueText) && (quantityHistory.newValueText)) {
+            if ((Float.valueOf(quantityHistory.oldValueText)).compareTo(Float.valueOf(quantityHistory.newValueText)) != 0) {
+                orderQuantityHistory.oldValue =  new BigDecimal(quantityHistory.oldValueText);
+                orderQuantityHistory.newValue = quantityHistory.newValueText;
+                orderQuantityHistory.changedDate = quantityHistory.changedDate;
+                orderItemSeqId = (quantityHistory.pkCombinedValueText).substring((quantityHistory.pkCombinedValueText).indexOf("::") + 2, (quantityHistory.pkCombinedValueText).length());
+                orderItem = delegator.findOne("OrderItem", [orderId : orderId, orderItemSeqId : orderItemSeqId], false);
+                orderQuantityHistory.productId = orderItem.productId;
+                changedByInfoHistories.each { changedByInfoHistory ->
+                    if (changedByInfoHistory.lastUpdatedTxStamp == quantityHistory.lastUpdatedTxStamp) {
+                        if(changedByInfoHistory.newValueText) {
+                            orderQuantityHistory.changedByUser = changedByInfoHistory.newValueText;
+                        } else {
+                            orderQuantityHistory.changedByUser = changedByInfoHistory.oldValueText;
+                        }
+                    }
+                }
+                orderQuantityHistories.add(orderQuantityHistory);
+            }
+        }
+    }
+    context.orderQuantityHistories = orderQuantityHistories;
+}

Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=778406&r1=778405&r2=778406&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Mon May 25 12:35:33 2009
@@ -90,6 +90,10 @@
         <response name="success" type="view" value="orderview"/>
         <response name="error" type="view" value="SendConfirmationMail"/>
     </request-map>
+    <request-map uri="OrderHistory">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="OrderHistory"/>
+    </request-map>
 
     <!-- Order Manager Mass Change Requests -->
     <request-map uri="massApproveOrders">
@@ -1565,6 +1569,7 @@
     <view-map name="findorders" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderFindOrder"/>
     <view-map name="OrderDeliveryScheduleInfo" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderDeliveryScheduleInfo"/>
     <view-map name="orderview" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderHeaderView"/>
+    <view-map name="OrderHistory" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderHistory"/>
     <view-map name="orderlist" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderHeaderListView"/>
     <view-map name="editorderitems" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderItemEdit"/>
     <view-map name="createnewnote" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderNewNote"/>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml?rev=778406&r1=778405&r2=778406&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml Mon May 25 12:35:33 2009
@@ -148,4 +148,30 @@
             <submit/>
         </field>
     </form>
+
+    <form name="OrderShipmentMethodHistory" type="list" list-name="orderShipmentHistories"
+            odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <field name="shipmentMethod"><display/></field>
+        <field name="changedDate"><display/></field>
+        <field name="changedByUser"><display/></field>
+    </form>
+
+    <form name="OrderUnitPriceHistory" type="list" list-name="orderUnitPriceHistories"
+            odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <field name="productId"><display/></field>
+        <field name="oldValue"><display type="currency"/></field>
+        <field name="newValue"><display type="currency"/></field>
+        <field name="changedDate"><display/></field>
+        <field name="changedByUser"><display/></field>
+    </form>
+
+    <form name="OrderQuantityHistory" type="list" list-name="orderQuantityHistories"
+            odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <field name="productId"><display/></field>
+        <field name="oldValue"><display/></field>
+        <field name="newValue"><display/></field>
+        <field name="changedDate"><display/></field>
+        <field name="changedByUser"><display/></field>
+    </form>
+
 </forms>
\ No newline at end of file

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl?rev=778406&r1=778405&r2=778406&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/ordershippinginfo.ftl Mon May 25 12:35:33 2009
@@ -98,6 +98,7 @@
           </#if>
           <li><a href="<@ofbizUrl>loadCartFromOrder?${paramString}&amp;finalizeMode=init</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderCreateAsNewOrder}</a></li>
         </#if>
+        <li><a href="<@ofbizUrl>OrderHistory?orderId=${orderId}</@ofbizUrl>" class="buttontext">${uiLabelMap.OrderOrderHistory}</a></li>
       </ul>
     </div>
   </div>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=778406&r1=778405&r2=778406&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Mon May 25 12:35:33 2009
@@ -351,4 +351,89 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="OrderHistory">
+        <section>
+            <actions>
+                <set field="headerItem" value="findorders"/>
+                <script location="component://order/webapp/ordermgr/WEB-INF/actions/order/OrderHistory.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonOrderViewDecorator">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.OrderOrderHistory} #${orderId}">
+                            <container>
+                                <link target="orderview?orderId=${orderId}" text="${uiLabelMap.OrderBackToOrder}" style="buttontext"/>
+                            </container>
+                            <container></container>
+                            <include-screen name="OrderShipmentMethodHistory"/>
+                            <include-screen name="OrderUnitPriceHistory"/>
+                            <include-screen name="OrderQuantityHistory"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="OrderShipmentMethodHistory">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field="orderShipmentHistories"/>
+                </not>
+            </condition>
+            <widgets>
+                <screenlet title="${uiLabelMap.OrderShipmentMethodHistory}">
+                    <include-form location="component://order/webapp/ordermgr/order/OrderForms.xml" name="OrderShipmentMethodHistory"/>
+                </screenlet>
+            </widgets>
+            <fail-widgets>
+                <screenlet title="${uiLabelMap.OrderShipmentMethodHistory}">
+                    <label text="${uiLabelMap.OrderHistoryNotAvailable}"/>
+                </screenlet>
+            </fail-widgets>
+        </section>
+    </screen>
+
+    <screen name="OrderUnitPriceHistory">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field="orderUnitPriceHistories"/>
+                </not>
+            </condition>
+            <widgets>
+                <screenlet title="${uiLabelMap.OrderUnitPriceHistory}">
+                    <include-form location="component://order/webapp/ordermgr/order/OrderForms.xml" name="OrderUnitPriceHistory"/>
+                </screenlet>
+            </widgets>
+            <fail-widgets>
+                <screenlet title="${uiLabelMap.OrderUnitPriceHistory}">
+                    <label text="${uiLabelMap.OrderHistoryNotAvailable}"/>
+                </screenlet>
+            </fail-widgets>
+        </section>
+    </screen>
+
+    <screen name="OrderQuantityHistory">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field="orderUnitPriceHistories"/>
+                </not>
+            </condition>
+            <widgets>
+                <screenlet title="${uiLabelMap.OrderQuantityHistory}">
+                    <include-form location="component://order/webapp/ordermgr/order/OrderForms.xml" name="OrderQuantityHistory"/>
+                </screenlet>
+            </widgets>
+            <fail-widgets>
+                <screenlet title="${uiLabelMap.OrderQuantityHistory}">
+                    <label text="${uiLabelMap.OrderHistoryNotAvailable}"/>
+                </screenlet>
+            </fail-widgets>
+        </section>
+    </screen>
+
 </screens>
\ No newline at end of file