svn commit: r1749103 - in /ofbiz/trunk/applications/order: template/reports/PurchasesByOrganizationReport.fo.ftl template/reports/SalesByStoreReport.fo.ftl widget/ordermgr/ReportForms.xml 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: r1749103 - in /ofbiz/trunk/applications/order: template/reports/PurchasesByOrganizationReport.fo.ftl template/reports/SalesByStoreReport.fo.ftl widget/ordermgr/ReportForms.xml widget/ordermgr/ReportScreens.xml

diveshdutta
Author: diveshdutta
Date: Sat Jun 18 22:48:54 2016
New Revision: 1749103

URL: http://svn.apache.org/viewvc?rev=1749103&view=rev
Log:
[OFBIZ-7385]
Allowing user to select multiple options in - Sales By Store - report from basic search criteria while generating report. Thanks Mohammad Kathawala for the patch and thanks Swapnil Shah for suggesting the improvment.

Modified:
    ofbiz/trunk/applications/order/template/reports/PurchasesByOrganizationReport.fo.ftl
    ofbiz/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl
    ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml
    ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml

Modified: ofbiz/trunk/applications/order/template/reports/PurchasesByOrganizationReport.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/reports/PurchasesByOrganizationReport.fo.ftl?rev=1749103&r1=1749102&r2=1749103&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/template/reports/PurchasesByOrganizationReport.fo.ftl (original)
+++ ofbiz/trunk/applications/order/template/reports/PurchasesByOrganizationReport.fo.ftl Sat Jun 18 22:48:54 2016
@@ -41,8 +41,8 @@ under the License.
             <#if !showToParty><fo:block font-size="10pt">${uiLabelMap.CommonFor}: ${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, toPartyId, false)}</fo:block></#if>
             <#if !showFromParty><fo:block font-size="10pt">${uiLabelMap.CommonFrom}: ${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, fromPartyId, false)}</fo:block></#if>
             <fo:block font-size="10pt">${uiLabelMap.FormFieldTitle_orderStatusId}:
-                <#if parameters.orderStatusIds?has_content>
-                  <#list parameters.orderStatusIds as orderStatusId>
+                <#if orderStatusIds?has_content>
+                  <#list orderStatusIds as orderStatusId>
                     <#assign statusItem = delegator.findOne("StatusItem", {"statusId" : orderStatusId}, false)!/>
                     ${statusItem.description}
                   </#list>

Modified: ofbiz/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl?rev=1749103&r1=1749102&r2=1749103&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl (original)
+++ ofbiz/trunk/applications/order/template/reports/SalesByStoreReport.fo.ftl Sat Jun 18 22:48:54 2016
@@ -38,10 +38,17 @@ under the License.
         <fo:page-sequence master-reference="main">
         <fo:flow flow-name="xsl-region-body" font-family="Helvetica">
             <fo:block font-size="14pt">${uiLabelMap.OrderReportSalesByStore}</fo:block>
-            <#if !showProductStore><fo:block font-size="10pt">${uiLabelMap.CommonFor} ${uiLabelMap.ProductProductStore}: ${parameters.productStoreId} - ${productReportList.get(0).storeName!}</fo:block></#if>
+            <#if !showProductStore><fo:block font-size="10pt">${uiLabelMap.CommonFor} ${uiLabelMap.ProductProductStore}: ${parameters.productStoreId}</fo:block></#if>
             <#if !showToParty><fo:block font-size="10pt">${uiLabelMap.PartyParty}: ${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, toPartyId, false)}</fo:block></#if>
             <fo:block font-size="10pt">${uiLabelMap.FormFieldTitle_orderStatusId}:
-                <#if parameters.orderStatusId?has_content>${parameters.orderStatusId}<#else>${uiLabelMap.CommonAny}</#if>
+                <#if orderStatusIds?has_content>
+                  <#list orderStatusIds as orderStatusId>
+                    <#assign statusItem = delegator.findOne("StatusItem", {"statusId" : orderStatusId}, false)!/>
+                    ${statusItem.description}
+                  </#list>
+                <#else>
+                  ${uiLabelMap.CommonAny}
+                </#if>
             </fo:block>
             <#if parameters.fromOrderDate?has_content><fo:block font-size="10pt">${uiLabelMap.CommonFromDate}: ${parameters.fromOrderDate} (${uiLabelMap.OrderDate} &gt;= ${uiLabelMap.CommonFrom})</fo:block></#if>
             <#if parameters.thruOrderDate?has_content><fo:block font-size="10pt">${uiLabelMap.CommonThruDate}: ${parameters.thruOrderDate} (${uiLabelMap.OrderDate} &lt; ${uiLabelMap.CommonFrom})</fo:block></#if>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml?rev=1749103&r1=1749102&r2=1749103&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml Sat Jun 18 22:48:54 2016
@@ -74,23 +74,23 @@ under the License.
     <form name="SalesByStoreReport" type="single" target="SalesByStoreReport.pdf" title=""
         header-row-style="header-row" default-table-style="basic-table" target-window="_BLANK">
         <field name="productStoreId">
-            <drop-down allow-empty="false">
+            <check all-checked="false">
                 <option key="" description="- ${uiLabelMap.CommonSelectAny} -"/>
                 <entity-options entity-name="ProductStore" description="${storeName} [${productStoreId}]">
                     <entity-order-by field-name="storeName"/>
                 </entity-options>
-            </drop-down>
+            </check>
         </field>
         <field name="toPartyId" title="${uiLabelMap.AccountingToPartyId}">
             <lookup target-form-name="LookupPartyName"/>
         </field>
         <field name="orderStatusId">
-            <drop-down allow-empty="false">
+            <check all-checked="false">
                 <option key="" description="- ${uiLabelMap.CommonSelectAny} -"/>
                 <entity-options entity-name="StatusItem" key-field-name="statusId">
                     <entity-constraint name="statusTypeId" operator="equals" value="ORDER_STATUS"/>
                 </entity-options>
-            </drop-down>
+            </check>
         </field>
         <field name="fromOrderDate" title="${uiLabelMap.CommonFromDate}"><date-time type="timestamp"/></field>
         <field name="thruOrderDate" title="${uiLabelMap.CommonThruDate}"><date-time type="timestamp"/></field>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml?rev=1749103&r1=1749102&r2=1749103&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml Sat Jun 18 22:48:54 2016
@@ -194,19 +194,22 @@ under the License.
             <actions>
                 <set field="titleProperty" value="OrderReportSalesByStore"/>
                 <set field="toPartyId" from-field="parameters.toPartyId"/>
+                <set field="productStoreIds" from-field="parameters.productStoreId" type="List"/>
+                <set field="orderStatusIds" from-field="parameters.orderStatusId" type="List"/>
                 <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                
                 <entity-condition entity-name="OrderReportSalesGroupByProduct" list="productReportList">
                     <condition-list combine="and">
                         <!-- this can use the other view, so long as the filter is by SALES_ORDER and fromPartyId = ProductStore.payToPartyId if provided -->
-                        <condition-expr field-name="productStoreId" operator="equals" from-field="parameters.productStoreId" ignore-if-empty="true"/>
+                        <condition-expr field-name="productStoreId" operator="in" from-field="productStoreIds" ignore-if-empty="true"/>
                         <condition-expr field-name="partyId" operator="equals" from-field="parameters.toPartyId" ignore-if-empty="true"/>
                         <condition-expr field-name="roleTypeId" operator="equals" value="BILL_TO_CUSTOMER"/>
                         <condition-expr field-name="orderTypeId" operator="equals" value="SALES_ORDER"/>
                         <!-- possible bug: using from-field="parameters.orderStatusId" did not work for the following line -->
-                        <condition-expr field-name="orderStatusId" operator="equals" value="${parameters.orderStatusId}" ignore-if-empty="true"/>
+                        <condition-expr field-name="orderStatusId" operator="in" from-field="orderStatusIds" ignore-if-empty="true"/>
                         <condition-expr field-name="orderDate" operator="greater-equals" from-field="parameters.fromOrderDate" ignore-if-empty="true"/>
                         <condition-expr field-name="orderDate" operator="less" from-field="parameters.thruOrderDate" ignore-if-empty="true"/>
                     </condition-list>