[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. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749103 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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} >= ${uiLabelMap.CommonFrom})</fo:block></#if>
|
||||
<#if parameters.thruOrderDate?has_content><fo:block font-size="10pt">${uiLabelMap.CommonThruDate}: ${parameters.thruOrderDate} (${uiLabelMap.OrderDate} < ${uiLabelMap.CommonFrom})</fo:block></#if>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user