remove log messages from image managment, correct sales report and popular categories

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068279 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2011-02-08 07:10:36 +00:00
parent 8c821fb62a
commit fc625f71d2
15 changed files with 1154 additions and 218 deletions
@@ -91,6 +91,10 @@ under the License.
<field name="GP" type="currency-precise">
<description>Gross Profit: Gross Merchandize Profit less Gross Shipping Profit.</description>
</field>
<field name="countOrder" type="fixed-point">
<description>Count of order.</description>
</field>
<prim-key field="orderId"/>
<prim-key field="orderItemSeqId"/>
@@ -120,11 +120,13 @@ under the License.
</if-not-empty>
<!-- conversion of the order date -->
<entity-and entity-name="OrderStatus" list="orderStatusList">
<field-map field-name="orderId" from-field="orderHeader.orderId"/>
<field-map field-name="orderItemSeqId" from-field="orderItem.orderItemSeqId"/>
<field-map field-name="statusId" value="ITEM_APPROVED"/>
</entity-and>
<entity-condition entity-name="OrderStatus" list="orderStatusList">
<condition-list combine="and">
<condition-expr field-name="orderId" from-field="orderHeader.orderId"/>
<condition-expr field-name="statusId" value="ORDER_APPROVED"/>
</condition-list>
<order-by field-name="-statusDatetime"/>
</entity-condition>
<first-from-list entry="orderStatus" list="orderStatusList"/>
<if-not-empty field="orderStatus.statusDatetime">
<clear-field field="inMap"/>
@@ -193,6 +195,7 @@ under the License.
<!-- =============== -->
<set field="fact.quantity" from-field="orderItem.quantity" type="BigDecimal"/>
<set field="fact.extGrossAmount" value="0" type="BigDecimal"/>
<set field="fact.extGrossCost" value="0" type="BigDecimal"/>
<set field="fact.extDiscountAmount" value="0" type="BigDecimal"/>
<set field="fact.extNetAmount" value="0" type="BigDecimal"/>
<set field="fact.extShippingAmount" value="0" type="BigDecimal"/>
@@ -206,19 +209,20 @@ under the License.
<set field="fact.GSP" value="0" type="BigDecimal"/>
<set field="fact.GP" value="0" type="BigDecimal"/>
<set field="fact.countOrder" value="0" type="BigDecimal"/>
<!-- extGrossAmount -->
<entity-condition entity-name="UomConversionDated" list="UomConversionDatedList">
<condition-list combine="and">
<condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/>
<condition-expr field-name="uomIdTo" operator="equals" value="USD"/>
<condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
</condition-list>
</entity-condition>
<if-not-empty field="UomConversionDatedList">
<first-from-list entry="UomConversion" list="UomConversionDatedList"/>
<set field="convertUomCurrencyMap.uomId" from-field="orderHeader.currencyUom"/>
<set field="convertUomCurrencyMap.uomIdTo" value="USD"/>
<set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/>
<call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap">
<result-to-field result-name="conversionFactor" field="exchangeRate"/>
</call-service>
<if-not-empty field="exchangeRate">
<calculate field="unitPrice">
<calcop field="orderItem.unitPrice" operator="multiply">
<calcop field="UomConversion.conversionFactor" operator="get"/>
<calcop field="exchangeRate" operator="get"/>
</calcop>
</calculate>
@@ -230,34 +234,36 @@ under the License.
</if-not-empty>
<!-- extGrossCost -->
<entity-condition entity-name="UomConversionDated" list="UomConversionDatedList">
<entity-condition entity-name="SupplierProduct" list="costs">
<condition-list combine="and">
<condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/>
<condition-expr field-name="uomIdTo" operator="equals" value="USD"/>
<condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
<condition-expr field-name="productId" operator="equals" from-field="orderItem.productId"/>
<condition-expr field-name="availableThruDate" operator="equals" from-field="nullField"/>
<condition-expr field-name="minimumOrderQuantity" operator="equals" value="0"/>
</condition-list>
</entity-condition>
<if-not-empty field="UomConversionDatedList">
<first-from-list entry="UomConversion" list="UomConversionDatedList"/>
<if-not-empty field="costs">
<first-from-list entry="cost" list="costs"/>
<entity-and entity-name="SupplierProduct" list="costs">
<field-map field-name="productId" from-field="orderItem.productId"/>
</entity-and>
<iterate list="costs" entry="cost">
<if-compare field="cost.minimumOrderQuantity" operator="equals" value="0">
<calculate field="costPrice">
<calcop field="cost.lastPrice" operator="multiply">
<calcop field="UomConversion.conversionFactor" operator="get"/>
</calcop>
</calculate>
<set field="convertUomCurrencyMap.uomId" from-field="cost.currencyUomId"/>
<set field="convertUomCurrencyMap.uomIdTo" value="USD"/>
<set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/>
<call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap">
<result-to-field result-name="conversionFactor" field="exchangeRate"/>
</call-service>
<if-not-empty field="exchangeRate">
<calculate field="costPrice">
<calcop field="cost.lastPrice" operator="multiply">
<calcop field="exchangeRate" operator="get"/>
</calcop>
</calculate>
<calculate field="fact.extGrossCost">
<calcop field="fact.quantity" operator="multiply">
<calcop field="costPrice" operator="get"/>
</calcop>
</calculate>
</if-compare>
</iterate>
<calculate field="fact.extGrossCost">
<calcop field="fact.quantity" operator="multiply">
<calcop field="costPrice" operator="get"/>
</calcop>
</calculate>
</if-not-empty>
</if-not-empty>
<!-- extShippingAmount -->
@@ -324,18 +330,17 @@ under the License.
</if-not-empty>
</iterate>
<if-compare field="countGS" operator="equals" value="0">
<entity-condition entity-name="UomConversionDated" list="UomConversionDatedList">
<condition-list combine="and">
<condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/>
<condition-expr field-name="uomIdTo" operator="equals" value="USD"/>
<condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
</condition-list>
</entity-condition>
<if-not-empty field="UomConversionDatedList">
<first-from-list entry="UomConversion" list="UomConversionDatedList"/>
<set field="convertUomCurrencyMap.uomId" from-field="orderHeader.currencyUom"/>
<set field="convertUomCurrencyMap.uomIdTo" value="USD"/>
<set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/>
<call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap">
<result-to-field result-name="conversionFactor" field="exchangeRate"/>
</call-service>
<if-not-empty field="exchangeRate">
<calculate field="fact.GS">
<calcop field="orderHeader.grandTotal" operator="multiply">
<calcop field="UomConversion.conversionFactor" operator="get"/>
<calcop field="exchangeRate" operator="get"/>
</calcop>
</calculate>
</if-not-empty>
@@ -372,45 +377,39 @@ under the License.
<field-map field-name="orderId" from-field="orderHeader.orderId"/>
</entity-and>
<entity-condition entity-name="UomConversionDated" list="UomConversionDatedList">
<condition-list combine="and">
<condition-expr field-name="uomId" operator="equals" from-field="orderHeader.currencyUom"/>
<condition-expr field-name="uomIdTo" operator="equals" value="USD"/>
<condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
</condition-list>
</entity-condition>
<if-not-empty field="UomConversionDatedList">
<first-from-list entry="UomConversion" list="UomConversionDatedList"/>
<set field="warrantyPrice" value="0" type="BigDecimal"/>
<iterate list="orderAdjustments" entry="warranty">
<if-compare field="warranty.orderAdjustmentTypeId" operator="equals" value="WARRANTY_ADJUSTMENT">
<calculate field="warrantyPrice">
<calcop field="warrantyPrice" operator="add">
<calcop field="warranty.amount" operator="get"/>
</calcop>
</calculate>
</if-compare>
</iterate>
<calculate field="GSS">
<calcop field="fact.extShippingAmount" operator="add">
<calcop field="warrantyPrice" operator="get"/>
</calcop>
</calculate>
<set field="convertUomCurrencyMap.uomId" from-field="orderHeader.currencyUom"/>
<set field="convertUomCurrencyMap.uomIdTo" value="USD"/>
<set field="convertUomCurrencyMap.nowDate" from-field="orderStatus.statusDatetime"/>
<call-service service-name="convertUomCurrency" in-map-name="convertUomCurrencyMap">
<result-to-field result-name="conversionFactor" field="exchangeRate"/>
</call-service>
<if-not-empty field="exchangeRate">
<calculate field="GSS">
<calcop field="fact.extShippingAmount" operator="multiply">
<calcop field="UomConversion.conversionFactor" operator="get"/>
<calcop field="GSS" operator="multiply">
<calcop field="exchangeRate" operator="get"/>
</calcop>
</calculate>
</if-not-empty>
<set field="fact.GSS" from-field="GSS"/>
<!--<entity-condition entity-name="UomConversionDated" list="UomConversionDatedList">
<condition-list combine="and">
<condition-expr field-name="uomId" operator="equals" value="orderHeader.currencyUom"/>
<condition-expr field-name="uomIdTo" operator="equals" value="USD"/>
<condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
</condition-list>
</entity-condition>
<if-not-empty field="UomConversionDatedList">
<first-from-list entry="UomConversion" list="UomConversionDatedList"/>
<calculate field="GSC">
<calcop field="GSC" operator="multiply">
<calcop field="UomConversion.conversionFactor" operator="get"/>
</calcop>
</calculate>
</if-not-empty>
<set field="fact.GSC" from-field="GSC"/>-->
<calculate field="fact.GSP">
<calcop field="GSS" operator="subtract">
<calcop field="GSC" operator="get"/>
</calcop>
</calculate>
<set field="fact.GSP" from-field="GSS" type="BigDecimal"/>
</if-compare>
<!-- GP -->
@@ -420,11 +419,27 @@ under the License.
</calcop>
</calculate>
<!-- countOrder -->
<set field="countOrder" value="0"/>
<entity-and entity-name="SalesOrderItemFact" list="checkCountOrderList">
<field-map field-name="orderId" from-field="orderHeader.orderId"/>
</entity-and>
<iterate entry="checkCountOrder" list="checkCountOrderList">
<if-not-empty field="checkCountOrder.countOrder">
<if-compare field="checkCountOrder.countOrder" operator="not-equals" value="0">
<set field="countOrder" value="1"/>
</if-compare>
</if-not-empty>
</iterate>
<if-compare field="countOrder" operator="equals" value="0">
<set field="fact.countOrder" value="1" type="BigDecimal"/>
</if-compare>
<store-value value-field="fact"/>
</if-compare>
</simple-method>
<simple-method method-name="importSalesOrderData" short-description="Import Sales Order Data">
<simple-method method-name="loadSalesOrderDataDaily" short-description="Load Sales Order Data Daily">
<now-date-to-env field="nowDate"/>
<set field="yesterday" value="${groovy:
import java.text.SimpleDateFormat;
@@ -438,20 +453,24 @@ under the License.
def today = sdf.format(nowDate);
return today;
}" type="Timestamp"/>
<log level="always" message="===== yesterday:${yesterday}"></log>
<log level="always" message="===== today:${today}"></log>
<set field="inMap.fromDate" from-field="yesterday"/>
<set field="inMap.thruDate" from-field="today"/>
<call-service service-name="importSalesOrderData" in-map-name="inMap"></call-service>
</simple-method>
<simple-method method-name="importSalesOrderData" short-description="Import Sales Order Data">
<set-service-fields service-name="loadDateDimension" map="parameters" to-map="inMap"/>
<set field="inMap.fromDate" from-field="yesterday"/>
<set field="inMap.thruDate" from-field="today"/>
<set field="inMap.fromDate" from-field="parameters.fromDate"/>
<set field="inMap.thruDate" from-field="parameters.thruDate"/>
<call-service service-name="loadDateDimension" in-map-name="inMap"/>
<check-errors/>
<entity-condition list="orderStatusList" entity-name="OrderStatus">
<condition-list combine="and">
<condition-expr field-name="statusId" value="ORDER_APPROVED"/>
<condition-expr field-name="statusDatetime" operator="greater-equals" from-field="yesterday"/>
<condition-expr field-name="statusDatetime" operator="less" from-field="today"/>
<condition-expr field-name="statusDatetime" operator="greater-equals" from-field="parameters.fromDate"/>
<condition-expr field-name="statusDatetime" operator="less" from-field="parameters.thruDate"/>
</condition-list>
</entity-condition>
<iterate list="orderStatusList" entry="orderHeader">
@@ -461,4 +480,33 @@ under the License.
<check-errors/>
</iterate>
</simple-method>
<simple-method method-name="convertUomCurrency" short-description="Convert Uom Currency from UomConversionDated entity">
<entity-condition entity-name="UomConversionDated" list="UomConversionDatedList">
<condition-list combine="and">
<condition-expr field-name="uomId" operator="equals" from-field="parameters.uomId"/>
<condition-expr field-name="uomIdTo" operator="equals" from-field="parameters.uomIdTo"/>
<condition-expr field-name="fromDate" operator="less-equals" from-field="parameters.nowDate"/>
<condition-expr field-name="thruDate" operator="greater" from-field="parameters.nowDate"/>
</condition-list>
<order-by field-name="-fromDate"/>
</entity-condition>
<if-not-empty field="UomConversionDatedList">
<first-from-list entry="UomConversion" list="UomConversionDatedList"/>
<field-to-result field="UomConversion.conversionFactor" result-name="conversionFactor"/>
<else>
<entity-condition entity-name="UomConversionDated" list="UomConversionDatedLastestList">
<condition-list combine="and">
<condition-expr field-name="uomId" operator="equals" from-field="parameters.uomId"/>
<condition-expr field-name="uomIdTo" operator="equals" from-field="parameters.uomIdTo"/>
<condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
</condition-list>
</entity-condition>
<if-not-empty field="UomConversionDatedLastestList">
<first-from-list entry="UomConversionLastest" list="UomConversionDatedLastestList"/>
<field-to-result field="UomConversionLastest.conversionFactor" result-name="conversionFactor"/>
</if-not-empty>
</else>
</if-not-empty>
</simple-method>
</simple-methods>
@@ -25,47 +25,258 @@
<if-compare operator="equals" value="day" field="reportBy">
<if-not-empty field="thruDate">
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="and">
<condition-expr field-name="orderDateYearMonthDay" operator="greater-equals" from-field="fromDate"/>
<condition-expr field-name="orderDateYearMonthDay" operator="less-equals" from-field="thruDate"/>
<condition-list combine="or">
<condition-list combine="and">
<condition-expr field-name="orderDateYearMonthDay" operator="greater-equals" from-field="fromDate"/>
<condition-expr field-name="orderDateYearMonthDay" operator="less-equals" from-field="thruDate"/>
</condition-list>
<condition-expr field-name="orderDateYearMonthDay" operator="equals" from-field="lastDate"/>
</condition-list>
<select-field field-name="orderDateDateValue"/>
<select-field field-name="orderDateDescription"/>
<select-field field-name="orderDateDayName"/>
<select-field field-name="orderDateDayOfMonth"/>
<select-field field-name="orderDateMonthName"/>
<select-field field-name="orderDateYearName"/>
<select-field field-name="orderDateWeekOfYear"/>
<select-field field-name="orderDateYearMonthDay"/>
<select-field field-name="orderDateMonthOfYear"/>
<select-field field-name="salesChannelEnumId"/>
<select-field field-name="brand"/>
<select-field field-name="pod"/>
<select-field field-name="account"/>
<select-field field-name="quantity"/>
<select-field field-name="GS"/>
<select-field field-name="GMS"/>
<select-field field-name="GMP"/>
<select-field field-name="GSP"/>
<select-field field-name="GP"/>
<select-field field-name="countOrder"/>
<order-by field-name="-orderDateDateValue"/>
</entity-condition>
</if-not-empty>
</if-compare>
<if-compare operator="equals" value="week" field="reportBy">
<calculate field="fromWeek">
<calcop field="thruWeek" operator="subtract">
<number value="3"/>
</calcop>
</calculate>
<if-not-empty field="thruWeek">
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateWeekOfYear" operator="greater-equals" from-field="fromWeek"/>
<condition-expr field-name="orderDateWeekOfYear" operator="less-equals" from-field="thruWeek"/>
</condition-list>
</entity-condition>
<if-compare field="thruWeek" operator="less-equals" value="3" type="Integer">
<calculate field="lastYear">
<calcop field="thisYear" operator="subtract">
<number value="1"/>
</calcop>
</calculate>
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateWeekOfYear" operator="greater-equals" value="1"/>
<condition-expr field-name="orderDateWeekOfYear" operator="less-equals" from-field="thruWeek"/>
</condition-list>
<select-field field-name="orderDateDescription"/>
<select-field field-name="orderDateDayName"/>
<select-field field-name="orderDateDayOfMonth"/>
<select-field field-name="orderDateMonthName"/>
<select-field field-name="orderDateYearName"/>
<select-field field-name="orderDateWeekOfYear"/>
<select-field field-name="orderDateYearMonthDay"/>
<select-field field-name="orderDateMonthOfYear"/>
<select-field field-name="salesChannelEnumId"/>
<select-field field-name="brand"/>
<select-field field-name="pod"/>
<select-field field-name="account"/>
<select-field field-name="quantity"/>
<select-field field-name="GS"/>
<select-field field-name="GMS"/>
<select-field field-name="GMP"/>
<select-field field-name="GSP"/>
<select-field field-name="GP"/>
<select-field field-name="countOrder"/>
</entity-condition>
<else>
<calculate field="fromWeek">
<calcop field="thruWeek" operator="subtract">
<number value="3"/>
</calcop>
</calculate>
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateWeekOfYear" operator="greater-equals" from-field="fromWeek"/>
<condition-expr field-name="orderDateWeekOfYear" operator="less-equals" from-field="thruWeek"/>
</condition-list>
<select-field field-name="orderDateDescription"/>
<select-field field-name="orderDateDayName"/>
<select-field field-name="orderDateDayOfMonth"/>
<select-field field-name="orderDateMonthName"/>
<select-field field-name="orderDateYearName"/>
<select-field field-name="orderDateWeekOfYear"/>
<select-field field-name="orderDateYearMonthDay"/>
<select-field field-name="orderDateMonthOfYear"/>
<select-field field-name="salesChannelEnumId"/>
<select-field field-name="brand"/>
<select-field field-name="pod"/>
<select-field field-name="account"/>
<select-field field-name="quantity"/>
<select-field field-name="GS"/>
<select-field field-name="GMS"/>
<select-field field-name="GMP"/>
<select-field field-name="GSP"/>
<select-field field-name="GP"/>
<select-field field-name="countOrder"/>
</entity-condition>
</else>
</if-compare>
</if-not-empty>
</if-compare>
<if-compare operator="equals" value="month" field="reportBy">
<calculate field="fromMonth">
<calcop field="thruMonth" operator="subtract">
<number value="3"/>
</calcop>
</calculate>
<if-not-empty field="fromMonth">
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" from-field="fromMonth"/>
<condition-expr field-name="orderDateMonthOfYear" operator="less-equals" from-field="thruMonth"/>
</condition-list>
</entity-condition>
<if-not-empty field="thruMonth">
<if-compare field="thruMonth" operator="less-equals" value="3" type="Integer">
<calculate field="lastYear">
<calcop field="thisYear" operator="subtract">
<number value="1"/>
</calcop>
</calculate>
<if-compare field="thruMonth" operator="equals" value="3" type="Integer">
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="or">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="1"/>
<condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="3"/>
</condition-list>
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="lastYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="equals" value="12"/>
</condition-list>
</condition-list>
<select-field field-name="orderDateDescription"/>
<select-field field-name="orderDateDayName"/>
<select-field field-name="orderDateDayOfMonth"/>
<select-field field-name="orderDateMonthName"/>
<select-field field-name="orderDateYearName"/>
<select-field field-name="orderDateWeekOfYear"/>
<select-field field-name="orderDateYearMonthDay"/>
<select-field field-name="orderDateMonthOfYear"/>
<select-field field-name="salesChannelEnumId"/>
<select-field field-name="brand"/>
<select-field field-name="pod"/>
<select-field field-name="account"/>
<select-field field-name="quantity"/>
<select-field field-name="GS"/>
<select-field field-name="GMS"/>
<select-field field-name="GMP"/>
<select-field field-name="GSP"/>
<select-field field-name="GP"/>
<select-field field-name="countOrder"/>
</entity-condition>
</if-compare>
<if-compare field="thruMonth" operator="equals" value="2" type="Integer">
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="or">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="1"/>
<condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="2"/>
</condition-list>
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="lastYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="11"/>
<condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="12"/>
</condition-list>
</condition-list>
<select-field field-name="orderDateDescription"/>
<select-field field-name="orderDateDayName"/>
<select-field field-name="orderDateDayOfMonth"/>
<select-field field-name="orderDateMonthName"/>
<select-field field-name="orderDateYearName"/>
<select-field field-name="orderDateWeekOfYear"/>
<select-field field-name="orderDateYearMonthDay"/>
<select-field field-name="orderDateMonthOfYear"/>
<select-field field-name="salesChannelEnumId"/>
<select-field field-name="brand"/>
<select-field field-name="pod"/>
<select-field field-name="account"/>
<select-field field-name="quantity"/>
<select-field field-name="GS"/>
<select-field field-name="GMS"/>
<select-field field-name="GMP"/>
<select-field field-name="GSP"/>
<select-field field-name="GP"/>
<select-field field-name="countOrder"/>
</entity-condition>
</if-compare>
<if-compare field="thruMonth" operator="equals" value="1" type="Integer">
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="or">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="equals" value="1"/>
</condition-list>
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="lastYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" value="10"/>
<condition-expr field-name="orderDateMonthOfYear" operator="less-equals" value="12"/>
</condition-list>
</condition-list>
<select-field field-name="orderDateDescription"/>
<select-field field-name="orderDateDayName"/>
<select-field field-name="orderDateDayOfMonth"/>
<select-field field-name="orderDateMonthName"/>
<select-field field-name="orderDateYearName"/>
<select-field field-name="orderDateWeekOfYear"/>
<select-field field-name="orderDateYearMonthDay"/>
<select-field field-name="orderDateMonthOfYear"/>
<select-field field-name="salesChannelEnumId"/>
<select-field field-name="brand"/>
<select-field field-name="pod"/>
<select-field field-name="account"/>
<select-field field-name="quantity"/>
<select-field field-name="GS"/>
<select-field field-name="GMS"/>
<select-field field-name="GMP"/>
<select-field field-name="GSP"/>
<select-field field-name="GP"/>
<select-field field-name="countOrder"/>
</entity-condition>
</if-compare>
<else>
<calculate field="fromMonth">
<calcop field="thruMonth" operator="subtract">
<number value="3"/>
</calcop>
</calculate>
<entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas">
<condition-list combine="and">
<condition-expr field-name="orderDateYearName" operator="equals" from-field="thisYear"/>
<condition-expr field-name="orderDateMonthOfYear" operator="greater-equals" from-field="fromMonth"/>
<condition-expr field-name="orderDateMonthOfYear" operator="less-equals" from-field="thruMonth"/>
</condition-list>
<select-field field-name="orderDateDescription"/>
<select-field field-name="orderDateDayName"/>
<select-field field-name="orderDateDayOfMonth"/>
<select-field field-name="orderDateMonthName"/>
<select-field field-name="orderDateYearName"/>
<select-field field-name="orderDateWeekOfYear"/>
<select-field field-name="orderDateYearMonthDay"/>
<select-field field-name="orderDateMonthOfYear"/>
<select-field field-name="salesChannelEnumId"/>
<select-field field-name="brand"/>
<select-field field-name="pod"/>
<select-field field-name="account"/>
<select-field field-name="quantity"/>
<select-field field-name="GS"/>
<select-field field-name="GMS"/>
<select-field field-name="GMP"/>
<select-field field-name="GSP"/>
<select-field field-name="GP"/>
<select-field field-name="countOrder"/>
</entity-condition>
</else>
</if-compare>
</if-not-empty>
</if-compare>
</simple-method>
</simple-methods>
@@ -40,9 +40,25 @@ under the License.
<attribute name="orderId" type="String" mode="IN" optional="false"/>
</service>
<service name="importSalesOrderData" auth="true" engine="simple"
location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="importSalesOrderData">
<description>Import Sales Order Data.</description>
<service name="loadSalesOrderDataDaily" auth="true" engine="simple"
location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="loadSalesOrderDataDaily" transaction-timeout="10000000">
<description>Load Sales Order Data Daily.</description>
</service>
</services>
<service name="importSalesOrderData" auth="true" engine="simple"
location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="importSalesOrderData" transaction-timeout="10000000">
<description>Import Sales Order Data.</description>
<attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
<attribute name="thruDate" type="Timestamp" mode="IN" optional="false"/>
</service>
<service name="convertUomCurrency" auth="true" engine="simple"
location="component://order/script/org/ofbiz/order/olap/FactServices.xml" invoke="convertUomCurrency">
<description>Import Sales Order Data.</description>
<attribute name="uomId" type="String" mode="IN" optional="false"/>
<attribute name="uomIdTo" type="String" mode="IN" optional="false"/>
<attribute name="nowDate" type="Timestamp" mode="IN" optional="false"/>
<attribute name="conversionFactor" type="Double" mode="OUT" optional="true"/>
</service>
</services>
@@ -21,19 +21,48 @@ import javax.servlet.http.HttpServletRequest;
import org.ofbiz.base.util.UtilValidate;
reportBy = parameters.reportBy;
exportType = parameters.exportType;
if (UtilValidate.isEmpty(parameters.fromDate)) {
request.setAttribute("_ERROR_MESSAGE_", "Please select From Date.");
return "error";
}
if (reportBy == "day") {
return "day";
} else if (reportBy == "week") {
return "week";
} else if (reportBy == "month") {
return "month";
} else {
request.setAttribute("_ERROR_MESSAGE_", "Please select Report By.");
return "error";
if (exportType == "pdf") {
if (reportBy == "day") {
return "dayPDF";
} else if (reportBy == "week") {
return "weekPDF";
} else if (reportBy == "month") {
return "monthPDF";
} else {
request.setAttribute("_ERROR_MESSAGE_", "Please select Report By.");
return "error";
}
}
if (exportType == "excel") {
if (reportBy == "day") {
return "dayExcel";
} else if (reportBy == "week") {
return "weekExcel";
} else if (reportBy == "month") {
return "monthExcel";
} else {
request.setAttribute("_ERROR_MESSAGE_", "Please select Report By.");
return "error";
}
}
if (exportType == "html") {
if (reportBy == "day") {
return "dayHTML";
} else if (reportBy == "week") {
return "weekHTML";
} else if (reportBy == "month") {
return "monthHTML";
} else {
request.setAttribute("_ERROR_MESSAGE_", "Please select Report By.");
return "error";
}
}
@@ -30,8 +30,9 @@ int year = cal.get(Calendar.YEAR);
birtParameters = [:];
try {
birtParameters.reportBy = parameters.reportBy;
birtParameters.fromDate = (Date.valueOf(fromDateStr))-3;
birtParameters.fromDate = (Date.valueOf(fromDateStr))-2;
birtParameters.thruDate = Date.valueOf(fromDateStr);
birtParameters.lastDate = (Date.valueOf(fromDateStr))-7;
birtParameters.thruWeek = week;
birtParameters.thruMonth = month;
birtParameters.thisYear = year;
@@ -1160,9 +1160,15 @@ under the License.
<request-map uri="checkReportBy">
<security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="CheckReportBy.groovy"/>
<response name="day" type="request" value="SalesReport.pdf"/>
<response name="week" type="request" value="SalesReportWeek.pdf"/>
<response name="month" type="request" value="SalesReportMonth.pdf"/>
<response name="dayPDF" type="request" value="SalesReport.pdf"/>
<response name="weekPDF" type="request" value="SalesReportWeek.pdf"/>
<response name="monthPDF" type="request" value="SalesReportMonth.pdf"/>
<response name="dayExcel" type="request" value="SalesReport.excel"/>
<response name="weekExcel" type="request" value="SalesReportWeek.excel"/>
<response name="monthExcel" type="request" value="SalesReportMonth.excel"/>
<response name="dayHTML" type="request" value="SalesReport.html"/>
<response name="weekHTML" type="request" value="SalesReportWeek.html"/>
<response name="monthHTML" type="request" value="SalesReportMonth.html"/>
<response name="error" type="request-redirect" value="OrderPurchaseReportOptions">
<redirect-parameter name="fromDate"/>
<redirect-parameter name="reportBy" from="parameters.reportDate"/>
@@ -1170,15 +1176,39 @@ under the License.
</request-map>
<request-map uri="SalesReport.pdf"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReport"/>
<response name="success" type="view" value="SalesOrderReportPDF"/>
</request-map>
<request-map uri="SalesReportWeek.pdf"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportWeek"/>
<response name="success" type="view" value="SalesOrderReportWeekPDF"/>
</request-map>
<request-map uri="SalesReportMonth.pdf"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportMonth"/>
<response name="success" type="view" value="SalesOrderReportMonthPDF"/>
</request-map>
<request-map uri="SalesReport.excel"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportExcel"/>
</request-map>
<request-map uri="SalesReportWeek.excel"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportWeekExcel"/>
</request-map>
<request-map uri="SalesReportMonth.excel"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportMonthExcel"/>
</request-map>
<request-map uri="SalesReport.html"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportHTML"/>
</request-map>
<request-map uri="SalesReportWeek.html"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportWeekHTML"/>
</request-map>
<request-map uri="SalesReportMonth.html"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="SalesReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportMonthHTML"/>
</request-map>
<request-map uri="NetBeforeOverheadReport.pdf"><security https="true" auth="true"/>
<event type="groovy" path="component://order/webapp/ordermgr/WEB-INF/actions/reports/" invoke="NetBeforeOverheadReport.groovy"/>
@@ -1935,9 +1965,15 @@ under the License.
<view-map name="OpenOrderItemsReport" type="screen" page="component://order/widget/ordermgr/ReportScreens.xml#OpenOrderItemsReport"/>
<view-map name="PurchasesByOrganizationReport" type="screenfop" page="component://order/widget/ordermgr/ReportScreens.xml#PurchasesByOrganizationReport" content-type="application/pdf" encoding="none"/>
<view-map name="SalesOrderReport" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="application/pdf"/>
<view-map name="SalesOrderReportWeek" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="application/pdf"/>
<view-map name="SalesOrderReportMonth" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="application/pdf"/>
<view-map name="SalesOrderReportPDF" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="application/pdf"/>
<view-map name="SalesOrderReportWeekPDF" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="application/pdf"/>
<view-map name="SalesOrderReportMonthPDF" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="application/pdf"/>
<view-map name="SalesOrderReportExcel" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="application/vnd.ms-excel"/>
<view-map name="SalesOrderReportWeekExcel" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="application/vnd.ms-excel"/>
<view-map name="SalesOrderReportMonthExcel" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="application/vnd.ms-excel"/>
<view-map name="SalesOrderReportHTML" type="birt" page="component://order/webapp/ordermgr/reports/SalesReport.rptdesign" content-type="text/html"/>
<view-map name="SalesOrderReportWeekHTML" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportWeek.rptdesign" content-type="text/html"/>
<view-map name="SalesOrderReportMonthHTML" type="birt" page="component://order/webapp/ordermgr/reports/SalesReportMonth.rptdesign" content-type="text/html"/>
<view-map name="NetBeforeOverheadOrderReport" type="birt" page="component://order/webapp/ordermgr/reports/NetBeforeOverheadReport.rptdesign" content-type="application/pdf"/>
<view-map name="ProductDemandOrderReport" type="birt" page="component://order/webapp/ordermgr/reports/ProductDemandReport.rptdesign" content-type="application/pdf"/>
<view-map name="OrderByReferrerReport" type="birt" page="component://order/webapp/ordermgr/reports/OrderByReferrer.rptdesign" content-type="application/pdf"/>
@@ -124,6 +124,16 @@ under the License.
<property name="iconFile">/templates/blank_report.gif</property>
<property name="layoutPreference">auto layout</property>
<parameters>
<scalar-parameter name="reportBy" id="2051">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="distinct">true</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="fromDate" id="310">
<property name="valueType">static</property>
<property name="isRequired">false</property>
@@ -146,9 +156,10 @@ under the License.
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="reportBy" id="2051">
<scalar-parameter name="lastDate" id="2715">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="isRequired">false</property>
<property name="dataType">date</property>
<property name="distinct">true</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
@@ -243,31 +254,36 @@ under the License.
</structure>
<structure>
<property name="position">10</property>
<property name="name">quantity</property>
<property name="name">countOrder</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">GS</property>
<property name="name">quantity</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">GMS</property>
<property name="name">GS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">GMP</property>
<property name="name">GMS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">14</property>
<property name="name">GSP</property>
<property name="name">GMP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">15</property>
<property name="name">GSP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">16</property>
<property name="name">GP</property>
<property name="dataType">integer</property>
</structure>
@@ -309,6 +325,10 @@ under the License.
<property name="columnName">orderDateDescription</property>
<text-property name="displayName">orderDateDescription</text-property>
</structure>
<structure>
<property name="columnName">countOrder</property>
<text-property name="displayName">countOrder</text-property>
</structure>
<structure>
<property name="columnName">quantity</property>
<text-property name="displayName">quantity</text-property>
@@ -383,31 +403,36 @@ under the License.
</structure>
<structure>
<property name="position">10</property>
<property name="name">quantity</property>
<property name="name">countOrder</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">GS</property>
<property name="name">quantity</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">GMS</property>
<property name="name">GS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">GMP</property>
<property name="name">GMS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">14</property>
<property name="name">GSP</property>
<property name="name">GMP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">15</property>
<property name="name">GSP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">16</property>
<property name="name">GP</property>
<property name="dataType">integer</property>
</structure>
@@ -427,6 +452,7 @@ try
reportBy = params["reportBy"].value;
fromDate = params["fromDate"].value;
thruDate = params["thruDate"].value;
lastDate = params["lastDate"].value;
thruWeek = params["thruWeek"].value;
thruMonth = params["thruMonth"].value;
thisYear = params["thisYear"].value;
@@ -434,6 +460,7 @@ try
methodContext.putEnv("reportBy", reportBy);
methodContext.putEnv("fromDate", fromDate);
methodContext.putEnv("thruDate", thruDate);
methodContext.putEnv("lastDate", lastDate);
methodContext.putEnv("thruWeek", thruWeek);
methodContext.putEnv("thruMonth", thruMonth);
methodContext.putEnv("thisYear", thisYear);
@@ -468,6 +495,7 @@ if (starschemas)
pod = starschema.getString("pod");
account = starschema.getString("account");
countOrder = starschema.getString("countOrder");
quantity = starschema.getString("quantity");
GS = starschema.getString("GS");
GMS = starschema.getString("GMS");
@@ -484,6 +512,7 @@ if (starschemas)
row["orderDateWeekOfYear"] = orderDateWeekOfYear;
row["orderDateDayName"] = orderDateDayName;
row["orderDateDescription"] = orderDateDescription;
row["countOrder"] = countOrder;
row["quantity"] = quantity;
row["GS"] = GS;
row["GMS"] = GMS;
@@ -558,6 +587,10 @@ return true;]]></method>
<property name="measureGroups">
<tabular-measure-group name="Summary Field" id="2041">
<property name="measures">
<tabular-measure name="countOrder" id="2747">
<expression name="measureExpression">dataSetRow["countOrder"]</expression>
<property name="dataType">integer</property>
</tabular-measure>
<tabular-measure name="quantity" id="2042">
<expression name="measureExpression">dataSetRow["quantity"]</expression>
<property name="dataType">integer</property>
@@ -643,12 +676,14 @@ return true;]]></method>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="type">us-legal</property>
<property name="type">custom</property>
<property name="height">10in</property>
<property name="width">20in</property>
<property name="orientation">landscape</property>
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<property name="topMargin">0.5in</property>
<property name="leftMargin">0.5in</property>
<property name="bottomMargin">0.5in</property>
<property name="rightMargin">0.5in</property>
<page-footer>
<text id="3">
<property name="fontFamily">sans-serif</property>
@@ -670,6 +705,91 @@ return true;]]></method>
</label>
<extended-item extensionName="Crosstab" extensionVersion="2.5.0" id="2554">
<property name="measures">
<extended-item extensionName="MeasureView" id="2748">
<property name="measure">countOrder</property>
<property name="detail">
<extended-item extensionName="AggregationCell" id="2749">
<property name="aggregationOnRow">Account/Account</property>
<property name="aggregationOnColumn">Date/orderDateDescription</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2756">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Account_Date/orderDateDescription</property>
</data>
</property>
</extended-item>
</property>
<property name="aggregations">
<extended-item extensionName="AggregationCell" id="2750">
<property name="aggregationOnRow">Account/Brand</property>
<property name="aggregationOnColumn">Date/orderDateDescription</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#87CEFA</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2751">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Brand_Date/orderDateDescription</property>
</data>
</property>
</extended-item>
<extended-item extensionName="AggregationCell" id="2752">
<property name="aggregationOnRow">Account/Pod</property>
<property name="aggregationOnColumn">Date/orderDateDescription</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#B0C4DE</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2753">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Pod_Date/orderDateDescription</property>
</data>
</property>
</extended-item>
<extended-item extensionName="AggregationCell" id="2754">
<property name="aggregationOnColumn">Date/orderDateDescription</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#6495ED</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2755">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Date/orderDateDescription</property>
</data>
</property>
</extended-item>
</property>
<property name="header">
<extended-item extensionName="CrosstabCell" id="2757">
<property name="content">
<label id="2758">
<property name="textAlign">center</property>
<text-property name="text">Order</text-property>
</label>
</property>
<property name="fontFamily">sans-serif</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="backgroundColor">#ECE9D8</property>
<property name="textAlign">center</property>
</extended-item>
</property>
</extended-item>
<extended-item extensionName="MeasureView" id="2556">
<property name="measure">quantity</property>
<property name="detail">
@@ -935,7 +1055,7 @@ return true;]]></method>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2583">
<data id="2711">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
@@ -954,12 +1074,12 @@ return true;]]></method>
<property name="backgroundColor">#87CEFA</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2649">
<data id="2713">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Account/Brand_Date/orderDateDescription</property>
<property name="resultSetColumn">Brand_GP</property>
</data>
</property>
</extended-item>
@@ -970,12 +1090,12 @@ return true;]]></method>
<property name="backgroundColor">#B0C4DE</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2667">
<data id="2712">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Account/Pod_Date/orderDateDescription</property>
<property name="resultSetColumn">Pod_GP</property>
</data>
</property>
</extended-item>
@@ -985,12 +1105,12 @@ return true;]]></method>
<property name="backgroundColor">#6495ED</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2685">
<data id="2714">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Date/orderDateDescription</property>
<property name="resultSetColumn">Grand_GP</property>
</data>
</property>
</extended-item>
@@ -1461,6 +1581,20 @@ return true;]]></method>
</extended-item>
</property>
</extended-item>
<extended-item extensionName="LevelView" name="NewLevel View1" id="2759">
<property name="level">Date/orderDateMonthOfYear</property>
<property name="member">
<extended-item extensionName="CrosstabCell" id="2760">
<property name="content">
<data name="orderDateMonthOfYear" id="2761">
<property name="resultSetColumn">orderDateMonthOfYear</property>
</data>
</property>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
</extended-item>
</property>
</extended-item>
<extended-item extensionName="LevelView" name="NewLevel View2" id="2594">
<property name="level">Date/orderDateMonthName</property>
<property name="member">
@@ -1515,6 +1649,7 @@ return true;]]></method>
<property name="header">
<extended-item extensionName="CrosstabCell" id="2555"/>
</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#FFFFFF</property>
<property name="cube">BIC_DataCube</property>
<list-property name="boundDataColumns">
@@ -2123,6 +2258,70 @@ return true;]]></method>
}</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">Account_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Account_Date/orderDateDescription"]+data["GSP_Account/Account_Date/orderDateDescription"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Pod_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Pod_Date/orderDateDescription"]+data["GSP_Account/Pod_Date/orderDateDescription"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Brand_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Brand_Date/orderDateDescription"]+data["GSP_Account/Brand_Date/orderDateDescription"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Grand_GP</property>
<expression name="expression" type="javascript">data["GMP_Date/orderDateDescription"]+data["GSP_Date/orderDateDescription"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">countOrder_Account/Brand_Date/orderDateDescription</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Brand</value>
<value>Date/orderDateDescription</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Account/Pod_Date/orderDateDescription</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Pod</value>
<value>Date/orderDateDescription</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Date/orderDateDescription</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Date/orderDateDescription</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Account/Account_Date/orderDateDescription</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Account</value>
<value>Date/orderDateDescription</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">orderDateMonthOfYear</property>
<expression name="expression">dimension["Date"]["orderDateMonthOfYear"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
</extended-item>
</body>
@@ -124,6 +124,16 @@ under the License.
<property name="iconFile">/templates/blank_report.gif</property>
<property name="layoutPreference">auto layout</property>
<parameters>
<scalar-parameter name="reportBy" id="2051">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="distinct">true</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="fromDate" id="310">
<property name="valueType">static</property>
<property name="isRequired">false</property>
@@ -146,9 +156,10 @@ under the License.
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="reportBy" id="2051">
<scalar-parameter name="lastDate" id="2734">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="isRequired">false</property>
<property name="dataType">date</property>
<property name="distinct">true</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
@@ -228,31 +239,36 @@ under the License.
</structure>
<structure>
<property name="position">7</property>
<property name="name">quantity</property>
<property name="name">countOrder</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">8</property>
<property name="name">GS</property>
<property name="name">quantity</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">9</property>
<property name="name">GMS</property>
<property name="name">GS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">10</property>
<property name="name">GMP</property>
<property name="name">GMS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">GSP</property>
<property name="name">GMP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">GSP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">GP</property>
<property name="dataType">integer</property>
</structure>
@@ -282,6 +298,10 @@ under the License.
<property name="columnName">orderDateMonthName</property>
<text-property name="displayName">orderDateMonthName</text-property>
</structure>
<structure>
<property name="columnName">countOrder</property>
<text-property name="displayName">countOrder</text-property>
</structure>
<structure>
<property name="columnName">quantity</property>
<text-property name="displayName">quantity</text-property>
@@ -341,31 +361,36 @@ under the License.
</structure>
<structure>
<property name="position">7</property>
<property name="name">quantity</property>
<property name="name">countOrder</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">8</property>
<property name="name">GS</property>
<property name="name">quantity</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">9</property>
<property name="name">GMS</property>
<property name="name">GS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">10</property>
<property name="name">GMP</property>
<property name="name">GMS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">GSP</property>
<property name="name">GMP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">GSP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">GP</property>
<property name="dataType">integer</property>
</structure>
@@ -385,6 +410,7 @@ try
reportBy = params["reportBy"].value;
fromDate = params["fromDate"].value;
thruDate = params["thruDate"].value;
lastDate = params["lastDate"].value;
thruWeek = params["thruWeek"].value;
thruMonth = params["thruMonth"].value;
thisYear = params["thisYear"].value;
@@ -392,6 +418,7 @@ try
methodContext.putEnv("reportBy", reportBy);
methodContext.putEnv("fromDate", fromDate);
methodContext.putEnv("thruDate", thruDate);
methodContext.putEnv("lastDate", lastDate);
methodContext.putEnv("thruWeek", thruWeek);
methodContext.putEnv("thruMonth", thruMonth);
methodContext.putEnv("thisYear", thisYear);
@@ -426,6 +453,7 @@ if (starschemas)
pod = starschema.getString("pod");
account = starschema.getString("account");
quantity = starschema.getString("quantity");
quantity = starschema.getString("quantity");
GS = starschema.getString("GS");
GMS = starschema.getString("GMS");
@@ -439,6 +467,7 @@ if (starschemas)
row["orderDateYearName"] = orderDateYearName;
row["orderDateMonthOfYear"] = orderDateMonthOfYear;
row["orderDateMonthName"] = orderDateMonthName;
row["countOrder"] = countOrder;
row["quantity"] = quantity;
row["GS"] = GS;
row["GMS"] = GMS;
@@ -501,6 +530,10 @@ return true;]]></method>
<property name="measureGroups">
<tabular-measure-group name="Summary Field" id="2041">
<property name="measures">
<tabular-measure name="countOrder" id="2736">
<expression name="measureExpression">dataSetRow["countOrder"]</expression>
<property name="dataType">integer</property>
</tabular-measure>
<tabular-measure name="quantity" id="2042">
<expression name="measureExpression">dataSetRow["quantity"]</expression>
<property name="dataType">integer</property>
@@ -586,12 +619,14 @@ return true;]]></method>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="type">us-legal</property>
<property name="type">custom</property>
<property name="height">10in</property>
<property name="width">20in</property>
<property name="orientation">landscape</property>
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<property name="topMargin">0.5in</property>
<property name="leftMargin">0.5in</property>
<property name="bottomMargin">0.5in</property>
<property name="rightMargin">0.5in</property>
<page-footer>
<text id="3">
<property name="fontFamily">sans-serif</property>
@@ -613,6 +648,90 @@ return true;]]></method>
</label>
<extended-item extensionName="Crosstab" extensionVersion="2.5.0" id="2586">
<property name="measures">
<extended-item extensionName="MeasureView" id="2737">
<property name="measure">countOrder</property>
<property name="detail">
<extended-item extensionName="AggregationCell" id="2738">
<property name="aggregationOnRow">Account/Account</property>
<property name="aggregationOnColumn">Date/orderDateMonthName</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2745">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Account_Date/orderDateMonthName</property>
</data>
</property>
</extended-item>
</property>
<property name="aggregations">
<extended-item extensionName="AggregationCell" id="2739">
<property name="aggregationOnRow">Account/Brand</property>
<property name="aggregationOnColumn">Date/orderDateMonthName</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#87CEFA</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2740">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Brand_Date/orderDateMonthName</property>
</data>
</property>
</extended-item>
<extended-item extensionName="AggregationCell" id="2741">
<property name="aggregationOnRow">Account/Pod</property>
<property name="aggregationOnColumn">Date/orderDateMonthName</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#B0C4DE</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2742">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Pod_Date/orderDateMonthName</property>
</data>
</property>
</extended-item>
<extended-item extensionName="AggregationCell" id="2743">
<property name="aggregationOnColumn">Date/orderDateMonthName</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#6495ED</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2744">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Date/orderDateMonthName</property>
</data>
</property>
</extended-item>
</property>
<property name="header">
<extended-item extensionName="CrosstabCell" id="2746">
<property name="content">
<label id="2747">
<text-property name="text">Order</text-property>
</label>
</property>
<property name="fontFamily">sans-serif</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="backgroundColor">#ECE9D8</property>
<property name="textAlign">center</property>
</extended-item>
</property>
</extended-item>
<extended-item extensionName="MeasureView" id="2588">
<property name="measure">quantity</property>
<property name="detail">
@@ -875,7 +994,7 @@ return true;]]></method>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2615">
<data id="2730">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
@@ -893,12 +1012,12 @@ return true;]]></method>
<property name="backgroundColor">#87CEFA</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2672">
<data id="2732">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Account/Brand_Date/orderDateMonthName</property>
<property name="resultSetColumn">Brand_GP</property>
</data>
</property>
</extended-item>
@@ -909,12 +1028,12 @@ return true;]]></method>
<property name="backgroundColor">#B0C4DE</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2690">
<data id="2731">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Account/Pod_Date/orderDateMonthName</property>
<property name="resultSetColumn">Pod_GP</property>
</data>
</property>
</extended-item>
@@ -924,12 +1043,12 @@ return true;]]></method>
<property name="backgroundColor">#6495ED</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2708">
<data id="2733">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Date/orderDateMonthName</property>
<property name="resultSetColumn">Grand_GP</property>
</data>
</property>
</extended-item>
@@ -1984,6 +2103,65 @@ return true;]]></method>
}</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">Account_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Account_Date/orderDateMonthName"]+data["GSP_Account/Account_Date/orderDateMonthName"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Pod_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Pod_Date/orderDateMonthName"]+data["GSP_Account/Pod_Date/orderDateMonthName"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Brand_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Brand_Date/orderDateMonthName"]+data["GSP_Account/Brand_Date/orderDateMonthName"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Grand_GP</property>
<expression name="expression" type="javascript">data["GMP_Date/orderDateMonthName"]+data["GSP_Date/orderDateMonthName"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">countOrder_Account/Brand_Date/orderDateMonthName</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Brand</value>
<value>Date/orderDateMonthName</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Account/Pod_Date/orderDateMonthName</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Pod</value>
<value>Date/orderDateMonthName</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Date/orderDateMonthName</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Date/orderDateMonthName</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Account/Account_Date/orderDateMonthName</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Account</value>
<value>Date/orderDateMonthName</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
</list-property>
</extended-item>
</body>
@@ -124,6 +124,16 @@ under the License.
<property name="iconFile">/templates/blank_report.gif</property>
<property name="layoutPreference">auto layout</property>
<parameters>
<scalar-parameter name="reportBy" id="2051">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="distinct">true</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="fromDate" id="310">
<property name="valueType">static</property>
<property name="isRequired">false</property>
@@ -146,9 +156,10 @@ under the License.
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
<scalar-parameter name="reportBy" id="2051">
<scalar-parameter name="lastDate" id="2771">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="isRequired">false</property>
<property name="dataType">date</property>
<property name="distinct">true</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
@@ -233,31 +244,36 @@ under the License.
</structure>
<structure>
<property name="position">8</property>
<property name="name">quantity</property>
<property name="name">countOrder</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">9</property>
<property name="name">GS</property>
<property name="name">quantity</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">10</property>
<property name="name">GMS</property>
<property name="name">GS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">GMP</property>
<property name="name">GMS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">GSP</property>
<property name="name">GMP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">GSP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">14</property>
<property name="name">GP</property>
<property name="dataType">integer</property>
</structure>
@@ -291,6 +307,10 @@ under the License.
<property name="columnName">orderDateWeekOfYear</property>
<text-property name="displayName">orderDateWeekOfYear</text-property>
</structure>
<structure>
<property name="columnName">countOrder</property>
<text-property name="displayName">countOrder</text-property>
</structure>
<structure>
<property name="columnName">quantity</property>
<text-property name="displayName">quantity</text-property>
@@ -355,31 +375,36 @@ under the License.
</structure>
<structure>
<property name="position">8</property>
<property name="name">quantity</property>
<property name="name">countOrder</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">9</property>
<property name="name">GS</property>
<property name="name">quantity</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">10</property>
<property name="name">GMS</property>
<property name="name">GS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">11</property>
<property name="name">GMP</property>
<property name="name">GMS</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">12</property>
<property name="name">GSP</property>
<property name="name">GMP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">13</property>
<property name="name">GSP</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">14</property>
<property name="name">GP</property>
<property name="dataType">integer</property>
</structure>
@@ -399,6 +424,7 @@ try
reportBy = params["reportBy"].value;
fromDate = params["fromDate"].value;
thruDate = params["thruDate"].value;
lastDate = params["lastDate"].value;
thruWeek = params["thruWeek"].value;
thruMonth = params["thruMonth"].value;
thisYear = params["thisYear"].value;
@@ -406,6 +432,7 @@ try
methodContext.putEnv("reportBy", reportBy);
methodContext.putEnv("fromDate", fromDate);
methodContext.putEnv("thruDate", thruDate);
methodContext.putEnv("lastDate", lastDate);
methodContext.putEnv("thruWeek", thruWeek);
methodContext.putEnv("thruMonth", thruMonth);
methodContext.putEnv("thisYear", thisYear);
@@ -441,6 +468,7 @@ if (starschemas)
account = starschema.getString("account");
quantity = starschema.getString("quantity");
countOrder = starschema.getString("countOrder");
GS = starschema.getString("GS");
GMS = starschema.getString("GMS");
GMP = starschema.getString("GMP");
@@ -454,6 +482,7 @@ if (starschemas)
row["orderDateMonthOfYear"] = orderDateMonthOfYear;
row["orderDateMonthName"] = orderDateMonthName;
row["orderDateWeekOfYear"] = orderDateWeekOfYear;
row["countOrder"] = countOrder;
row["quantity"] = quantity;
row["GS"] = GS;
row["GMS"] = GMS;
@@ -520,6 +549,10 @@ return true;]]></method>
<property name="measureGroups">
<tabular-measure-group name="Summary Field" id="2041">
<property name="measures">
<tabular-measure name="countOrder" id="2772">
<expression name="measureExpression">dataSetRow["countOrder"]</expression>
<property name="dataType">integer</property>
</tabular-measure>
<tabular-measure name="quantity" id="2042">
<expression name="measureExpression">dataSetRow["quantity"]</expression>
<property name="dataType">integer</property>
@@ -605,12 +638,14 @@ return true;]]></method>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<property name="type">us-legal</property>
<property name="type">custom</property>
<property name="height">10in</property>
<property name="width">20in</property>
<property name="orientation">landscape</property>
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<property name="topMargin">0.5in</property>
<property name="leftMargin">0.5in</property>
<property name="bottomMargin">0.5in</property>
<property name="rightMargin">0.5in</property>
<page-footer>
<text id="3">
<property name="fontFamily">sans-serif</property>
@@ -632,6 +667,90 @@ return true;]]></method>
</label>
<extended-item extensionName="Crosstab" extensionVersion="2.5.0" id="2621">
<property name="measures">
<extended-item extensionName="MeasureView" id="2773">
<property name="measure">countOrder</property>
<property name="detail">
<extended-item extensionName="AggregationCell" id="2774">
<property name="aggregationOnRow">Account/Account</property>
<property name="aggregationOnColumn">Date/orderDateWeekOfYear</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2781">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Account_Date/orderDateWeekOfYear</property>
</data>
</property>
</extended-item>
</property>
<property name="aggregations">
<extended-item extensionName="AggregationCell" id="2775">
<property name="aggregationOnRow">Account/Brand</property>
<property name="aggregationOnColumn">Date/orderDateWeekOfYear</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#87CEFA</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2776">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Brand_Date/orderDateWeekOfYear</property>
</data>
</property>
</extended-item>
<extended-item extensionName="AggregationCell" id="2777">
<property name="aggregationOnRow">Account/Pod</property>
<property name="aggregationOnColumn">Date/orderDateWeekOfYear</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#B0C4DE</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2778">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Account/Pod_Date/orderDateWeekOfYear</property>
</data>
</property>
</extended-item>
<extended-item extensionName="AggregationCell" id="2779">
<property name="aggregationOnColumn">Date/orderDateWeekOfYear</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#6495ED</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2780">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">countOrder_Date/orderDateWeekOfYear</property>
</data>
</property>
</extended-item>
</property>
<property name="header">
<extended-item extensionName="CrosstabCell" id="2782">
<property name="content">
<label id="2783">
<text-property name="text">Order</text-property>
</label>
</property>
<property name="fontFamily">sans-serif</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="backgroundColor">#ECE9D8</property>
<property name="textAlign">center</property>
</extended-item>
</property>
</extended-item>
<extended-item extensionName="MeasureView" id="2623">
<property name="measure">quantity</property>
<property name="detail">
@@ -894,7 +1013,7 @@ return true;]]></method>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2650">
<data id="2767">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
@@ -912,12 +1031,12 @@ return true;]]></method>
<property name="backgroundColor">#87CEFA</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2710">
<data id="2769">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Account/Brand_Date/orderDateWeekOfYear</property>
<property name="resultSetColumn">Brand_GP</property>
</data>
</property>
</extended-item>
@@ -928,12 +1047,12 @@ return true;]]></method>
<property name="backgroundColor">#B0C4DE</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2728">
<data id="2768">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Account/Pod_Date/orderDateWeekOfYear</property>
<property name="resultSetColumn">Pod_GP</property>
</data>
</property>
</extended-item>
@@ -943,12 +1062,12 @@ return true;]]></method>
<property name="backgroundColor">#6495ED</property>
<property name="textAlign">center</property>
<property name="content">
<data id="2746">
<data id="2770">
<structure name="numberFormat">
<property name="category">Fixed</property>
<property name="pattern">#,##0</property>
</structure>
<property name="resultSetColumn">GP_Date/orderDateWeekOfYear</property>
<property name="resultSetColumn">Grand_GP</property>
</data>
</property>
</extended-item>
@@ -1415,6 +1534,20 @@ return true;]]></method>
</extended-item>
</property>
</extended-item>
<extended-item extensionName="LevelView" name="NewLevel View1" id="2784">
<property name="level">Date/orderDateMonthOfYear</property>
<property name="member">
<extended-item extensionName="CrosstabCell" id="2785">
<property name="content">
<data name="orderDateMonthOfYear" id="2786">
<property name="resultSetColumn">orderDateMonthOfYear</property>
</data>
</property>
<property name="backgroundColor">#FFEBCD</property>
<property name="textAlign">center</property>
</extended-item>
</property>
</extended-item>
<extended-item extensionName="LevelView" name="NewLevel View2" id="2661">
<property name="level">Date/orderDateMonthName</property>
<property name="member">
@@ -1432,6 +1565,12 @@ return true;]]></method>
</extended-item>
<extended-item extensionName="LevelView" name="NewLevel View3" id="2664">
<property name="level">Date/orderDateWeekOfYear</property>
<property name="sort">
<sort-element>
<expression name="key" type="javascript">data["orderDateWeekOfYear"]</expression>
<property name="direction">asc</property>
</sort-element>
</property>
<property name="member">
<extended-item extensionName="CrosstabCell" id="2665">
<property name="content">
@@ -1454,6 +1593,7 @@ return true;]]></method>
<property name="header">
<extended-item extensionName="CrosstabCell" id="2622"/>
</property>
<property name="fontFamily">sans-serif</property>
<property name="backgroundColor">#FFFFFF</property>
<property name="cube">BIC_DataCube</property>
<list-property name="boundDataColumns">
@@ -2003,6 +2143,70 @@ return true;]]></method>
}</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">Account_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Account_Date/orderDateWeekOfYear"]+data["GSP_Account/Account_Date/orderDateWeekOfYear"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Pod_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Pod_Date/orderDateWeekOfYear"]+data["GSP_Account/Pod_Date/orderDateWeekOfYear"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Brand_GP</property>
<expression name="expression" type="javascript">data["GMP_Account/Brand_Date/orderDateWeekOfYear"]+data["GSP_Account/Brand_Date/orderDateWeekOfYear"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">Grand_GP</property>
<expression name="expression" type="javascript">data["GMP_Date/orderDateWeekOfYear"]+data["GSP_Date/orderDateWeekOfYear"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">countOrder_Account/Brand_Date/orderDateWeekOfYear</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Brand</value>
<value>Date/orderDateWeekOfYear</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Account/Pod_Date/orderDateWeekOfYear</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Pod</value>
<value>Date/orderDateWeekOfYear</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Date/orderDateWeekOfYear</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Date/orderDateWeekOfYear</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">countOrder_Account/Account_Date/orderDateWeekOfYear</property>
<expression name="expression">measure["countOrder"]</expression>
<property name="dataType">integer</property>
<simple-property-list name="aggregateOn">
<value>Account/Account</value>
<value>Date/orderDateWeekOfYear</value>
</simple-property-list>
<property name="aggregateFunction">SUM</property>
</structure>
<structure>
<property name="name">orderDateMonthOfYear</property>
<expression name="expression">dimension["Date"]["orderDateMonthOfYear"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
</extended-item>
</body>
@@ -207,6 +207,13 @@ under the License.
<option key="month" description="Months"></option>
</drop-down>
</field>
<field name="exportType" title="Format Type">
<drop-down>
<option key="pdf" description="PDF"></option>
<option key="excel" description="Excel"></option>
<option key="html" description="HTML"></option>
</drop-down>
</field>
<field name="submitButton" title="${uiLabelMap.CommonRun}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
@@ -889,6 +889,13 @@ under the License.
<number value="1"/>
</calcop>
</calculate>
<if-compare field="week" operator="equals" value="1">
<calculate field="year">
<calcop field="year" operator="subtract">
<number value="1"/>
</calcop>
</calculate>
</if-compare>
</else>
</if-compare>
@@ -953,9 +960,7 @@ under the License.
<if-empty field="productCategoryRollupList">
<set-service-fields service-name="FindBestSellingProduct" map="parameters" to-map="AddProductMap"/>
<set field="AddProductMap.productCategoryId" from-field="parameters.productCategoryId"/>
<call-service service-name="FindBestSellingProduct" in-map-name="AddProductMap">
<result-to-field result-name="productCategoryId"/>
</call-service>
<call-service service-name="FindBestSellingProduct" in-map-name="AddProductMap"/>
<else>
<iterate list="productCategoryRollupList" entry="productCategoryRollup">
<set-service-fields service-name="FindCategoryChild" map="parameters" to-map="CategoryChildMap"/>
@@ -213,7 +213,6 @@ under the License.
<entity-one value-field="dataResource" entity-name="DataResource">
<field-map field-name="dataResourceId" from-field="content.dataResourceId"/>
</entity-one>
<log level="always" message="===========parameters.drIsPublic========== : ${parameters.drIsPublic}"></log>
<set field="dataResource.isPublic" from-field="parameters.drIsPublic"/>
<store-value value-field="dataResource"/>
</if-compare>
@@ -1515,7 +1515,6 @@ under the License.
<attribute name="primaryProductCategoryId" mode="IN" type="String" optional="false"/>
<attribute name="week" mode="IN" type="Long" optional="false"/>
<attribute name="year" mode="IN" type="Long" optional="false"/>
<attribute name="checkCategoryChild" mode="IN" type="List" optional="true"/>
</service>
<service name="FindBestSellingProduct" engine="simple"
@@ -42,7 +42,7 @@ jQuery(document).ready(function(){
<#assign userLoginApprover = userLoginApprovers[0]>
<#assign userLoginAndPartyDetails = delegator.findByPrimaryKey("UserLoginAndPartyDetails", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", userLoginApprover.partyId, "userLoginId", userLoginApprover.userLoginId))?if_exists>
<#if userLoginAndPartyDetails != null && userLoginAndPartyDetails?has_content>
<#assign partyContentDetail = delegator.findByAnd("PartyContentDetail",Static["org.ofbiz.base.util.UtilMisc"].toMap("partyContentTypeId", "IMAGEAPPROVER", "statusId", "IM_PENDING", "partyId", userLoginAndPartyDetails.partyId))/>
<#assign partyContentDetail = delegator.findByAnd("ContentApproval",Static["org.ofbiz.base.util.UtilMisc"].toMap("roleTypeId", "IMAGEAPPROVER", "approvalStatusId", "IM_PENDING", "partyId", userLoginAndPartyDetails.partyId))/>
<#assign imageApproveSize = partyContentDetail.size()>
<#if userLoginAndPartyDetails.userLoginId == userLogin.userLoginId>
<#if userMap.checkUser == userLoginAndPartyDetails.userLoginId>