| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd"> |
| |
| <simple-method method-name="getOrder" short-description="Get Orders" login-required="false"> |
| <if-compare operator="equals" value="day" field="reportBy"> |
| <if-not-empty field="thruDate"> |
| <entity-condition entity-name="SalesOrderItemStarSchema" list="starschemas"> |
| <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"> |
| <if-not-empty field="thruWeek"> |
| <if-compare field="thruWeek" operator="less-equals" value="3" type="Integer"> |
| <calculate field="lastYear"> |
| <calcop operator="subtract" field="thisYear"> |
| <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 operator="subtract" field="thruWeek"> |
| <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"> |
| <if-not-empty field="thruMonth"> |
| <if-compare field="thruMonth" operator="less-equals" value="3" type="Integer"> |
| <calculate field="lastYear"> |
| <calcop operator="subtract" field="thisYear"> |
| <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 operator="subtract" field="thruMonth"> |
| <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> |