svn commit: r1814277 - in /ofbiz/ofbiz-framework/trunk/applications/order: entitydef/entitymodel_view.xml template/reports/SalesByStoreReport.fo.ftl widget/ordermgr/ReportScreens.xml

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

svn commit: r1814277 - in /ofbiz/ofbiz-framework/trunk/applications/order: entitydef/entitymodel_view.xml template/reports/SalesByStoreReport.fo.ftl widget/ordermgr/ReportScreens.xml

jleroux@apache.org
Author: jleroux
Date: Sat Nov  4 11:36:25 2017
New Revision: 1814277

URL: http://svn.apache.org/viewvc?rev=1814277&view=rev
Log:
Fixed: Sales by Store report calculates Value Sold incorrectly
(OFBIZ-9958)

Sales by Store report calculate Value Sold without taking into account order
item quantity.

jleroux: I also noticed that given products (free ones, due to^promotion) are
counted as paid products, another thing to fix

Thanks: Oleg Andreyev

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/entitydef/entitymodel_view.xml
    ofbiz/ofbiz-framework/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl
    ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReportScreens.xml

Modified: ofbiz/ofbiz-framework/trunk/applications/order/entitydef/entitymodel_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/entitydef/entitymodel_view.xml?rev=1814277&r1=1814276&r2=1814277&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/entitydef/entitymodel_view.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/entitydef/entitymodel_view.xml Sat Nov  4 11:36:25 2017
@@ -1194,7 +1194,15 @@ under the License.
           <complex-alias-field entity-alias="OI" field="cancelQuantity" default-value="0"/>
         </complex-alias>
       </alias>
-      <alias entity-alias="OI" name="unitPrice" function="sum"/>
+      <alias entity-alias="OI" name="amount" function="sum">
+        <complex-alias operator="*">
+          <complex-alias operator="-">
+            <complex-alias-field entity-alias="OI" field="quantity" default-value="0"/>
+            <complex-alias-field entity-alias="OI" field="cancelQuantity" default-value="0"/>
+          </complex-alias>
+          <complex-alias-field entity-alias="OI" field="unitPrice" default-value="0"/>
+        </complex-alias>
+      </alias>
       <view-link entity-alias="OH" rel-entity-alias="OI">
         <key-map field-name="orderId"/>
       </view-link>

Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl?rev=1814277&r1=1814276&r2=1814277&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl Sat Nov  4 11:36:25 2017
@@ -87,7 +87,7 @@ under the License.
                                 <fo:block>${productReport.quantityOrdered!}</fo:block>
                             </fo:table-cell>
                             <fo:table-cell padding="2pt" background-color="${rowColor}">
-                                <fo:block>${productReport.unitPrice!}</fo:block>
+                                <fo:block>${productReport.amount!}</fo:block>
                             </fo:table-cell>
                         </fo:table-row>
                         <#-- toggle the row color -->

Modified: ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReportScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReportScreens.xml?rev=1814277&r1=1814276&r2=1814277&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReportScreens.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/widget/ordermgr/ReportScreens.xml Sat Nov  4 11:36:25 2017
@@ -225,7 +225,7 @@ under the License.
                     <select-field field-name="productId"/>
                     <select-field field-name="internalName"/>
                     <select-field field-name="quantityOrdered"/>
-                    <select-field field-name="unitPrice"/>
+                    <select-field field-name="amount"/>
                     <order-by field-name="storeName"/>
                     <order-by field-name="internalName"/>
                 </entity-condition>