|
Modified: ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml Tue Dec 15 15:34:29 2009 @@ -227,8 +227,31 @@ </entity-options> </drop-down> </field>--> - <field name="fromDate" title="${uiLabelMap.OrderReportFromDate}"><date-time type="timestamp"/></field> - <field name="thruDate" title="${uiLabelMap.OrderReportThruDate}"><date-time type="timestamp"/></field> + <field name="fromDate" title="${uiLabelMap.OrderReportFromDate}"><date-time type="date"/></field> + <field name="thruDate" title="${uiLabelMap.OrderReportThruDate}"><date-time type="date"/></field> <field name="submitButton" title="${uiLabelMap.CommonRun}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + <form name="OrderByReferrer" type="single" target="OrderByReferrer.pdf" target-window="_BLANK"> + <!--field name="referrerUrl"><text-find default-option="contains"/></field--> + <field name="referrerUrl" title="${uiLabelMap.CommonEmptyHeader}"><display description="All Referrer"></display></field> + <field name="submit" title="${uiLabelMap.CommonRun}"><submit button-type="button"/></field> + </form> + <form name="SaleOrdersByChannel" type="single" target="OrdersByChannel.pdf" target-window="_BLANK"> + <field name="saleChannel"> + <drop-down allow-empty="false"> + <option key="" description="- ${uiLabelMap.CommonSelectAny} -"/> + <entity-options description="${description}" entity-name="Enumeration" key-field-name="description"> + <entity-constraint name="enumTypeId" operator="equals" value="ORDER_SALES_CHANNEL"/> + </entity-options> + </drop-down> + </field> + <field name="submit" title="${uiLabelMap.CommonRun}"><submit button-type="button"/></field> + </form> + <form name="SaleOrderDiscountCode" type="single" target="OrderDiscountCode.pdf" target-window="_BLANK"> + <field name="discountCodeUrl" title="${uiLabelMap.CommonEmptyHeader}"><display description="All order items with discount code"></display></field> + <field name="submit" title="${uiLabelMap.CommonRun}"><submit button-type="button"/></field> + </form> + <form name="Last3MonthsSalesReport" type="single" target="Last3MonthsSalesReport.pdf" target-window="_BLANK"> + <field name="submit" title="${uiLabelMap.CommonRun}"><submit button-type="button"/></field> + </form> </forms> \ No newline at end of file Modified: ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml Tue Dec 15 15:34:29 2009 @@ -24,6 +24,7 @@ <screen name="OrderPurchaseReportOptions"> <section> <actions> + <set field="headerItem" value="reports"/> <entity-one value-field="portalPage" entity-name="PortalPage"> <field-map field-name="portalPageId" value="OrderReportPage"/> </entity-one> @@ -304,9 +305,49 @@ </actions>--> <widgets> <platform-specific> - <xml><html-template location="component://birt/webapp/birt/report/SalesReport.rptdesign"/></xml> + <xml><html-template location="component://order/webapp/ordermgr/reports/SalesReport.rptdesign"/></xml> </platform-specific> </widgets> </section> </screen> + <!-- Sale Order By Referrer --> + <screen name="SaleOrdersByReferrerReport"> + <section> + <widgets> + <screenlet title="Sale Orders by Referrer Report"> + <include-form name="OrderByReferrer" location="component://order/widget/ordermgr/ReportForms.xml"/> + </screenlet> + </widgets> + </section> + </screen> + <!-- Sale Order By Channel --> + <screen name="SaleOrdersByChannelReport"> + <section> + <widgets> + <screenlet title="Sale Orders By Channel Report"> + <include-form name="SaleOrdersByChannel" location="component://order/widget/ordermgr/ReportForms.xml"/> + </screenlet> + </widgets> + </section> + </screen> + <!-- Sale Order with Discount Code --> + <screen name="SaleOrderDiscountCodeReport"> + <section> + <widgets> + <screenlet title="Sale Orders Discount Code Report"> + <include-form name="SaleOrderDiscountCode" location="component://order/widget/ordermgr/ReportForms.xml"/> + </screenlet> + </widgets> + </section> + </screen> + <!-- Last Three Months Sales Report --> + <screen name="Last3MonthsSalesReport"> + <section> + <widgets> + <screenlet title="Last Three Months Sales Report"> + <include-form name="Last3MonthsSalesReport" location="component://order/widget/ordermgr/ReportForms.xml"/> + </screenlet> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Tue Dec 15 15:34:29 2009 @@ -110,6 +110,9 @@ <value xml:lang="zh">åºå</value> <value xml:lang="zh_CN">åºå</value> </property> + <property key="FacilityInventoryHistoryReport"> + <value xml:lang="en">Inventory History Report</value> + </property> <property key="FacilityMultipleLocations"> <value xml:lang="en">Multiple Locations</value> <value xml:lang="it">Posizioni multiple</value> Modified: ofbiz/trunk/applications/product/entitydef/entitygroup_olap.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitygroup_olap.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitygroup_olap.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitygroup_olap.xml Tue Dec 15 15:34:29 2009 @@ -25,4 +25,6 @@ <!-- Dimensions --> <!-- ========================================================= --> <entity-group group="org.ofbiz.olap" entity="ProductDimension"/> + <entity-group group="org.ofbiz.olap" entity="InventoryItemFact"/> + <entity-group group="org.ofbiz.olap" entity="InventoryItemSchema"/> </entitygroup> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel_olap.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel_olap.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitymodel_olap.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitymodel_olap.xml Tue Dec 15 15:34:29 2009 @@ -46,4 +46,93 @@ <field name="internalName" type="description"></field> <prim-key field="dimensionId"/> </entity> + + <!-- ========================================================= --> + <!-- Inventory Item Facts and Star schema --> + <!-- ========================================================= --> + <entity entity-name="InventoryItemFact" package-name="org.ofbiz.bi.fact.product" title="Inventory Item Fact"> + <description>A transaction fact entity with inventory item.</description> + <field name="inventoryItemId" type="id-ne"></field> + <field name="facilityId" type="id-ne"></field> + <field name="productDimId" type="id-ne"></field> + <field name="origCurrencyDimId" type="id-ne"></field> + <field name="inventoryDateDimId" type="id-ne"></field> + + <field name="quantityOnHandTotal" type="fixed-point"></field> + <field name="availableToPromiseTotal" type="fixed-point"></field> + <field name="unitCost" type="fixed-point"></field> + <field name="soldoutAmount" type="fixed-point"></field> + <prim-key field="inventoryItemId"/> + <relation type="one" fk-name="IIF_INVPRODUCT" rel-entity-name="ProductDimension"> + <key-map field-name="productDimId" rel-field-name="dimensionId"/> + </relation> + <relation type="one" fk-name="IIF_INVCURRENCY" rel-entity-name="CurrencyDimension"> + <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/> + </relation> + <relation type="one" fk-name="IIF_INVDATE" rel-entity-name="DateDimension"> + <key-map field-name="inventoryDateDimId" rel-field-name="dimensionId"/> + </relation> + </entity> + + <view-entity entity-name="InventoryItemSchema" package-name="org.ofbiz.bi.starschema.product" title="Inventory Item Schema"> + <description>"Inventory Item Schema.</description> + <member-entity entity-alias="IIF" entity-name="InventoryItemFact"/> + <!--member-entity entity-alias="SIIF" entity-name="SalesOrderItemFact"/--> + <member-entity entity-alias="PD" entity-name="ProductDimension"/> + <member-entity entity-alias="IDD" entity-name="DateDimension"/> + <member-entity entity-alias="CD" entity-name="CurrencyDimension"/> + + <alias-all entity-alias="IIF" function="sum"> + <exclude field="inventoryItemId"/> + <exclude field="orderId"/> + <exclude field="facilityId"/> + <exclude field="inventoryDateDimId"/> + <exclude field="productDimId"/> + <exclude field="origCurrencyDimId"/> + </alias-all> + <!--alias-all entity-alias="SIIF" function="sum"> + <exclude field="orderItemSeqId"/> + <exclude field="orderDateDimId"/> + <exclude field="productDimId"/> + <exclude field="billToCustomerDimId"/> + <exclude field="origCurrencyDimId"/> + <exclude field="orderId"/> + <exclude field="orderItemSeqId"/> + <exclude field="orderStatus"/> + <exclude field="saleChanel"/> + </alias-all--> + <alias-all entity-alias="PD" prefix="product" group-by="true"> + <exclude field="dimensionId"/> + </alias-all> + <alias-all entity-alias="IDD" prefix="inventoryDate" group-by="true"> + <exclude field="dimensionId"/> + </alias-all> + <alias-all entity-alias="CD" prefix="currency" group-by="true"> + <exclude field="dimensionId"/> + </alias-all> + <alias entity-alias="IIF" name="inventoryItemId" group-by="true"> + <description>Inventory Item Id</description> + </alias> + <alias entity-alias="IIF" name="facilityId" group-by="true"> + <description>Facility Id</description> + </alias> + <alias entity-alias="PD" name="productId" group-by="true"> + <description>Product id</description> + </alias> + + + <view-link entity-alias="IIF" rel-entity-alias="PD" rel-optional="true"> + <key-map field-name="productDimId" rel-field-name="dimensionId"/> + </view-link> + <!--view-link entity-alias="PD" rel-entity-alias="SIIF" rel-optional="true"> + <key-map field-name="dimensionId" rel-field-name="productDimId"/> + </view-link--> + <view-link entity-alias="IIF" rel-entity-alias="IDD"> + <key-map field-name="inventoryDateDimId" rel-field-name="dimensionId"/> + </view-link> + <view-link entity-alias="IIF" rel-entity-alias="CD"> + <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/> + </view-link> + + </view-entity> </entitymodel> Added: ofbiz/trunk/applications/product/script/org/ofbiz/product/olap/FactServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/olap/FactServices.xml?rev=890830&view=auto ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/olap/FactServices.xml (added) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/olap/FactServices.xml Tue Dec 15 15:34:29 2009 @@ -0,0 +1,95 @@ +<?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" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> + <simple-method method-name="loadInventoryFact" short-description=""> + <entity-one entity-name="InventoryItem" value-field="inventory"> + <field-map field-name="inventoryItemId" from-field="parameters.inventoryItemId"/> + </entity-one> + <entity-one entity-name="InventoryItemFact" value-field="fact"> + <field-map field-name="inventoryItemId" from-field="parameters.inventoryItemId"/> + </entity-one> + <if-empty field="fact"> + <make-value value-field="fact" entity-name="InventoryItemFact"/> + <set field="fact.inventoryItemId" from-field="inventory.inventoryItemId"/> + <!-- conversion of the inventory date --> + <if-not-empty field="inventory.createdStamp"> + <clear-field field="inMap"/> + <set field="inMap.dimensionEntityName" value="DateDimension"/> + <set field="inMap.naturalKeyFields.dateValue" from-field="inventory.createdStamp" type="Date"/> + <call-service service-name="getDimensionIdFromNaturalKey" in-map-name="inMap"> + <result-to-field result-name="dimensionId" field="fact.inventoryDateDimId"/> + </call-service> + <if-empty field="fact.inventoryDateDimId"> + <set field="fact.inventoryDateDimId" value="_NF_"/> + </if-empty> + <else> + <set field="fact.inventoryDateDimId" value="_NA_"/> + </else> + </if-not-empty> + <!-- conversion of the product id --> + <if-not-empty field="inventory.productId"> + <clear-field field="inMap"/> + <set field="inMap.dimensionEntityName" value="ProductDimension"/> + <set field="inMap.naturalKeyFields.productId" from-field="inventory.productId"/> + <call-service service-name="getDimensionIdFromNaturalKey" in-map-name="inMap"> + <result-to-field result-name="dimensionId" field="fact.productDimId"/> + </call-service> + <if-empty field="fact.productDimId"> + <set field="fact.productDimId" value="_NF_"/> + </if-empty> + <else> + <set field="fact.productDimId" value="_NA_"/> + </else> + </if-not-empty> + <!-- conversion of the order currency --> + <if-not-empty field="inventory.currencyUomId"> + <clear-field field="inMap"/> + <set field="inMap.dimensionEntityName" value="CurrencyDimension"/> + <set field="inMap.naturalKeyFields.currencyId" from-field="inventory.currencyUomId"/> + <call-service service-name="getDimensionIdFromNaturalKey" in-map-name="inMap"> + <result-to-field result-name="dimensionId" field="fact.origCurrencyDimId"/> + </call-service> + <if-empty field="fact.origCurrencyDimId"> + <set field="fact.origCurrencyDimId" value="_NF_"/> + </if-empty> + <else> + <set field="fact.origCurrencyDimId" value="_NA_"/> + </else> + </if-not-empty> + <create-value value-field="fact"/> + </if-empty> + + <set field="fact.facilityId" from-field="inventory.facilityId"/> + <set field="fact.inventoryItemId" from-field="inventory.inventoryItemId"/> + <set field="fact.quantityOnHandTotal" from-field="inventory.quantityOnHandTotal"/> + <set field="fact.availableToPromiseTotal" from-field="inventory.availableToPromiseTotal"/> + <set field="fact.unitCost" from-field="inventory.unitCost"/> + + <!-- calculate sold out amount --> + <calculate field="fact.soldoutAmount"> + <calcop operator="get" field="inventory.quantityOnHandTotal"> + <calcop operator="negative" field="inventory.availableToPromiseTotal"/> + </calcop> + </calculate> + <store-value value-field="fact"/> + </simple-method> +</simple-methods> Propchange: ofbiz/trunk/applications/product/script/org/ofbiz/product/olap/FactServices.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/product/script/org/ofbiz/product/olap/FactServices.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/product/script/org/ofbiz/product/olap/FactServices.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/applications/product/servicedef/services_olap.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_olap.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_olap.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_olap.xml Tue Dec 15 15:34:29 2009 @@ -51,4 +51,9 @@ <description>Calls the loadProductInProductDimension service for all the products.</description> <attribute name="updateMode" type="String" mode="IN" optional="true" default-value="TYPE1"/> </service> + <!-- BI Dimension --> + <service name="loadInventoryFact" auth="true" engine="simple" + location="component://product/script/org/ofbiz/product/olap/FactServices.xml" invoke="loadInventoryFact"> + <attribute name="inventoryItemId" type="String" mode="IN" optional="true"/> + </service> </services> Added: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemReport.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemReport.groovy?rev=890830&view=auto ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemReport.groovy (added) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemReport.groovy Tue Dec 15 15:34:29 2009 @@ -0,0 +1,55 @@ +/* + * 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. + */ + + import org.ofbiz.accounting.util.UtilAccounting + import org.ofbiz.base.util.*; + import org.ofbiz.entity.util.EntityUtil; + import org.ofbiz.entity.condition.EntityCondition; + import org.ofbiz.entity.condition.EntityOperator; + import com.ibm.icu.util.Calendar; + + birtParameters = [:]; + /* + birtParameters.facilityId = request.getParameter("facilityId"); + birtParameters.productId = request.getParameter("productId"); + birtParameters.productTypeId = request.getParameter("productTypeId"); + birtParameters.searchInProductCategoryId = request.getParameter("searchInProductCategoryId"); + birtParameters.contentType = request.getParameter("contentType"); + birtParameters.productSupplierId = request.getParameter("productSupplierId"); + birtParameters.statusId = request.getParameter("statusId"); + birtParameters.productsSoldThruTimestamp = request.getParameter("productsSoldThruTimestamp"); + birtParameters.VIEW_SIZE = request.getParameter("VIEW_SIZE"); + birtParameters.monthsInPastLimit = request.getParameter("monthsInPastLimit"); + birtParameters.fromDateSellThrough = request.getParameter("fromDateSellThrough"); + birtParameters.thruDateSellThrough = request.getParameter("thruDateSellThrough"); + */ + + int lastIntMonth = Integer.parseInt(request.getParameter("lastIntMonth")); + if (lastIntMonth == 0 ){ + fromOrderDate = null; + }else{ + fromDateTime = UtilDateTime.getDayStart(UtilDateTime.toTimestamp(UtilDateTime.nowTimestamp()), (lastIntMonth*(-30))); + fromOrderDate = UtilDateTime.toDateString(fromDateTime,"MMMM dd, yyyy") + Debug.logInfo("====fromDate======="+fromOrderDate.toString(),""); + } + + birtParameters.facilityId = request.getParameter("facilityId"); + birtParameters.orderDateDateValue_fld0_op = fromOrderDate.toString(); + request.setAttribute("birtParameters", birtParameters); + return "success"; Propchange: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemReport.groovy ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemReport.groovy ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemReport.groovy ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Tue Dec 15 15:34:29 2009 @@ -27,6 +27,7 @@ <handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/> <handler name="bsf" type="request" class="org.ofbiz.webapp.event.BsfEventHandler"/> + <handler name="birt" type="view" class="org.ofbiz.webapp.view.BirtViewHandler"/> <!-- Events to run on every request before security (chains exempt) --> @@ -155,6 +156,35 @@ <security https="true" auth="true"/> <response name="success" type="view" value="ViewFacilityInventoryByProductExport"/> </request-map> + <request-map uri="ViewFacilityInventoryHistoryReport"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ViewFacilityInventoryHistoryReport"/> + </request-map> + <request-map uri="RenderInventoryReportHtml"> + <security https="true" auth="true"/> + <event type="groovy" path="component://product/webapp/facility/WEB-INF/actions/inventory/" invoke="InventoryItemReport.groovy"/> + <response name="success" type="view" value="RenderInventoryReportHtml"/> + </request-map> + <request-map uri="RenderInventoryReportPDF"> + <security https="true" auth="true"/> + <event type="groovy" path="component://product/webapp/facility/WEB-INF/actions/inventory/" invoke="InventoryItemReport.groovy"/> + <response name="success" type="view" value="RenderInventoryReportPDF"/> + </request-map> + <request-map uri="RenderInventoryReportExcel"> + <security https="true" auth="true"/> + <event type="groovy" path="component://product/webapp/facility/WEB-INF/actions/inventory/" invoke="InventoryItemReport.groovy"/> + <response name="success" type="view" value="RenderInventoryReportExcel"/> + </request-map> + <request-map uri="RenderInventoryReportMSWord"> + <security https="true" auth="true"/> + <event type="groovy" path="component://product/webapp/facility/WEB-INF/actions/inventory/" invoke="InventoryItemReport.groovy"/> + <response name="success" type="view" value="RenderInventoryReportMSWord"/> + </request-map> + <request-map uri="RenderInventoryReportPPT"> + <security https="true" auth="true"/> + <event type="groovy" path="component://product/webapp/facility/WEB-INF/actions/inventory/" invoke="InventoryItemReport.groovy"/> + <response name="success" type="view" value="RenderInventoryReportPPT"/> + </request-map> <request-map uri="FindFacilityTransfers"> <security https="true" auth="true"/> @@ -1309,6 +1339,7 @@ <view-map name="ViewFacilityInventoryByProductSimple" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProductSimple"/> <view-map name="ViewFacilityInventoryByProductReport" type="screenfop" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProductReport" content-type="application/pdf" encoding="none"/> <view-map name="ViewFacilityInventoryByProductExport" type="screenxml" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProductReport" content-type="text/xml"/> + <view-map name="ViewFacilityInventoryHistoryReport" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryHistoryReport"/> <view-map name="EditFacilityGroups" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityGroups"/> <view-map name="EditFacilityParties" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityParties"/> <view-map name="ViewContactMechs" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewContactMechs"/> @@ -1392,5 +1423,13 @@ <view-map name="EditShipmentGatewayConfig" page="component://product//widget/facility/ShipmentGatewayConfigScreens.xml#EditShipmentGatewayConfig" type="screen"/> <view-map name="FindShipmentGatewayConfigTypes" page="component://product//widget/facility/ShipmentGatewayConfigScreens.xml#FindShipmentGatewayConfigTypes" type="screen"/> <view-map name="EditShipmentGatewayConfigType" page="component://product//widget/facility/ShipmentGatewayConfigScreens.xml#EditShipmentGatewayConfigType" type="screen"/> + + <!-- Export Report --> + <view-map name="RenderInventoryReportHtml" type="birt" page="component://product/webapp/facility/inventory/report/InventoryReport.rptdesign" content-type="text/html"/> + <view-map name="RenderInventoryReportPDF" type="birt" page="component://product/webapp/facility/inventory/report/InventoryReport.rptdesign" content-type="application/pdf"/> + <view-map name="RenderInventoryReportExcel" type="birt" page="component://product/webapp/facility/inventory/report/InventoryReport.rptdesign" content-type="application/vnd.ms-excel"/> + <view-map name="RenderInventoryReportMSWord" type="birt" page="component://product/webapp/facility/inventory/report/InventoryReport.rptdesign" content-type="application/vnd.ms-word"/> + <view-map name="RenderInventoryReportPPT" type="birt" page="component://product/webapp/facility/inventory/report/InventoryReport.rptdesign" content-type="application/vnd.ms-powerpoint"/> + <!-- end of view mappings --> </site-conf> Added: ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign?rev=890830&view=auto ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign (added) +++ ofbiz/trunk/applications/product/webapp/facility/inventory/report/InventoryReport.rptdesign Tue Dec 15 15:34:29 2009 @@ -0,0 +1,690 @@ +<?xml version="1.0" encoding="UTF-8"?> +<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.15" id="1"> + <property name="createdBy">Eclipse BIRT Designer Version 2.2.2.r222_v20071226 Build <2.2.2.v20080226-1155></property> + <property name="units">in</property> + <property name="comments">Copyright (c) 2007 <<Your Company Name here>></property> + <html-property name="description">Creates a blank report with no predefined content.</html-property> + <list-property name="userProperties"> + <structure> + <property name="name">Data Cube.Inventory.x</property> + <property name="type">integer</property> + <property name="isVisible">false</property> + </structure> + <structure> + <property name="name">Data Cube.Inventory.y</property> + <property name="type">integer</property> + <property name="isVisible">false</property> + </structure> + <structure> + <property name="name">Data Cube.productOrd.NewTabularHierarchy1.x</property> + <property name="type">integer</property> + <property name="isVisible">false</property> + </structure> + <structure> + <property name="name">Data Cube.productOrd.NewTabularHierarchy1.y</property> + <property name="type">integer</property> + <property name="isVisible">false</property> + </structure> + <structure> + <property name="name">Data Cube.Inventory.width</property> + <property name="type">integer</property> + <property name="isVisible">false</property> + </structure> + <structure> + <property name="name">Data Cube.Inventory.height</property> + <property name="type">integer</property> + <property name="isVisible">false</property> + </structure> + </list-property> + <property name="Data Cube.Inventory.x">239</property> + <property name="Data Cube.Inventory.y">50</property> + <property name="Data Cube.productOrd.NewTabularHierarchy1.x">20</property> + <property name="Data Cube.productOrd.NewTabularHierarchy1.y">3</property> + <property name="Data Cube.Inventory.width">150</property> + <property name="Data Cube.Inventory.height">200</property> + <method name="initialize"><![CDATA[importPackage(Packages.org.ofbiz.base.util) +importPackage(Packages.javolution.util) + +module = "InventoryReport.rptdesign";]]></method> + <text-property name="displayName">Blank Report</text-property> + <property name="iconFile">/templates/blank_report.gif</property> + <parameters> + <scalar-parameter name="facilityId" id="186"> + <property name="valueType">static</property> + <property name="dataType">string</property> + <property name="paramType">simple</property> + <property name="isRequired">false</property> + <property name="controlType">text-box</property> + <property name="distinct">true</property> + <structure name="format"> + <property name="category">Unformatted</property> + </structure> + </scalar-parameter> + </parameters> + <data-sources> + <script-data-source name="OFBiz" id="8"/> + </data-sources> + <data-sets> + <script-data-set name="Inventory" id="9"> + <list-property name="resultSetHints"> + <structure> + <property name="position">1</property> + <property name="name">productId</property> + <property name="dataType">string</property> + </structure> + <structure> + <property name="position">2</property> + <property name="name">quantityOnHand</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">3</property> + <property name="name">availableToPromise</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">4</property> + <property name="name">retailPrice</property> + <property name="dataType">float</property> + </structure> + <structure> + <property name="position">5</property> + <property name="name">productName</property> + <property name="dataType">string</property> + </structure> + <structure> + <property name="position">6</property> + <property name="name">datetimeReceived</property> + <property name="dataType">date-time</property> + </structure> + </list-property> + <list-property name="columnHints"> + <structure> + <property name="columnName">productId</property> + </structure> + <structure> + <property name="columnName">quantityOnHand</property> + </structure> + <structure> + <property name="columnName">availableToPromise</property> + </structure> + <structure> + <property name="columnName">retailPrice</property> + </structure> + <structure> + <property name="columnName">productName</property> + </structure> + <structure> + <property name="columnName">datetimeReceived</property> + </structure> + </list-property> + <structure name="cachedMetaData"> + <list-property name="resultSet"> + <structure> + <property name="position">1</property> + <property name="name">productId</property> + <property name="dataType">string</property> + </structure> + <structure> + <property name="position">2</property> + <property name="name">quantityOnHand</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">3</property> + <property name="name">availableToPromise</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">4</property> + <property name="name">retailPrice</property> + <property name="dataType">float</property> + </structure> + <structure> + <property name="position">5</property> + <property name="name">productName</property> + <property name="dataType">string</property> + </structure> + <structure> + <property name="position">6</property> + <property name="name">datetimeReceived</property> + <property name="dataType">date-time</property> + </structure> + </list-property> + </structure> + <property name="dataSource">OFBiz</property> + <method name="open"><![CDATA[inventories = null; +userLogin = null; +try { + userLogin = delegator.findByPrimaryKey("UserLogin",UtilMisc.toMap("userLoginId","admin")); +} catch(e) { + Debug.logError(e,""); +} + +inputInvent = FastMap.newInstance(); +inputInventFields = FastMap.newInstance(); +if(params!=null){ + inputInventFields.put("facilityId", params["facilityId"]); + inputInventFields.put("noConditionFind", "Y"); + //inputFields.put("productInternalName", params["internalName"]); + /* + inputFields.put("quantityOnHandTotal", params["offsetQOHQty"]); + inputFields.put("availableToPromiseTotal", params["offsetATPQty"]); + inputFields.put("productId", params["productId"]); + inputFields.put("productTypeId", params["productTypeId"]); + inputFields.put("searchInProductCategoryId", params["searchInProductCategoryId"]); + inputFields.put("productSupplierId", params["productSupplierId"]); + inputFields.put("productsSoldThruTimestamp", params["productsSoldThruTimestamp"]); + inputFields.put("statusId", params["statusId"]); + inputFields.put("VIEW_SIZE", params["VIEW_SIZE"]); + inputFields.put("monthsInPastLimit", params["monthsInPastLimit"]); + inputFields.put("fromDateSellThrough", params["fromDateSellThrough"]); + inputFields.put("thruDateSellThrough", params["thruDateSellThrough"]);*/ +} +inputInvent.put("userLogin",userLogin); +inputInvent.put("inputFields",inputInventFields); +inputInvent.put("entityName","InventoryItemSchema"); +inputInvent.put("orderBy","inventoryDateDateValue DESC"); + +try { + result = dispatcher.runSync("performFind", inputInvent); + inventories = result.get("listIt"); +} catch (e) { + Debug.logError(e, module); +}]]></method> + <method name="fetch"><![CDATA[if(inventories == null)return false; +if(inventory = inventories.next()){ + row["productId"] = inventory.getString("productProductId"); + row["productName"] = inventory.getString("productInternalName"); + row["quantityOnHand"] = inventory.getString("quantityOnHandTotal"); + row["availableToPromise"] = inventory.getString("availableToPromiseTotal"); + row["retailPrice"] = inventory.getString("unitCost"); + row["datetimeReceived"] = inventory.getString("inventoryDateDateValue"); + Debug.logInfo("-----------inventory---------"+inventory.getString("productProductId"),module); + return true; +}else{ + inventories.close(); + return false; +}]]></method> + </script-data-set> + <script-data-set name="Order" id="191"> + <list-property name="resultSetHints"> + <structure> + <property name="position">1</property> + <property name="name">quantity</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">2</property> + <property name="name">productOrderId</property> + <property name="dataType">string</property> + </structure> + <structure> + <property name="position">3</property> + <property name="name">orderDate</property> + <property name="dataType">any</property> + </structure> + </list-property> + <list-property name="columnHints"> + <structure> + <property name="columnName">quantity</property> + </structure> + <structure> + <property name="columnName">productOrderId</property> + </structure> + <structure> + <property name="columnName">orderDate</property> + </structure> + </list-property> + <structure name="cachedMetaData"> + <list-property name="resultSet"> + <structure> + <property name="position">1</property> + <property name="name">quantity</property> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="position">2</property> + <property name="name">productOrderId</property> + <property name="dataType">string</property> + </structure> + <structure> + <property name="position">3</property> + <property name="name">orderDate</property> + <property name="dataType">any</property> + </structure> + </list-property> + </structure> + <property name="dataSource">OFBiz</property> + <method name="open"><![CDATA[inputOrder = FastMap.newInstance(); +userLogin = null; +try { + userLogin = delegator.findByPrimaryKey("UserLogin",UtilMisc.toMap("userLoginId","admin")); +} catch(e) { + Debug.logError(e,""); +} +inputOrderFields = FastMap.newInstance(); +if(params!=null){ + inputOrderFields.put("orderDateDateValue_fld0_op", params["orderDateDateValue_fld0_op"]); + inputOrderFields.put("noConditionFind", "Y"); +} + +orders = null; + +inputOrder.put("userLogin",userLogin); +inputOrder.put("inputFields",inputOrderFields); +inputOrder.put("entityName","SalesOrderItemStarSchema"); +inputOrder.put("orderBy","orderDateDateValue DESC"); +try { + results = dispatcher.runSync("performFind", inputOrder); + orders = results.get("listIt"); +} catch (e) { + Debug.logError(e, module); +}]]></method> + <method name="fetch"><![CDATA[if(orders == null)return false; +if(order = orders.next()){ + row["productOrderId"] = order.getString("productProductId"); + row["quantity"] = order.getString("quantity"); + row["orderDate"] = order.getString("orderDateDescription"); + Debug.logInfo("++++++++++++order++++++++"+order.getString("quantity"),module); + return true; +}else{ + orders.close(); + return false; +}]]></method> + </script-data-set> + </data-sets> + <styles> + <style name="crosstab-cell" id="4"> + <property name="borderBottomColor">#CCCCCC</property> + <property name="borderBottomStyle">solid</property> + <property name="borderBottomWidth">1pt</property> + <property name="borderLeftColor">#CCCCCC</property> + <property name="borderLeftStyle">solid</property> + <property name="borderLeftWidth">1pt</property> + <property name="borderRightColor">#CCCCCC</property> + <property name="borderRightStyle">solid</property> + <property name="borderRightWidth">1pt</property> + <property name="borderTopColor">#CCCCCC</property> + <property name="borderTopStyle">solid</property> + <property name="borderTopWidth">1pt</property> + </style> + <style name="crosstab" id="5"> + <property name="borderBottomColor">#CCCCCC</property> + <property name="borderBottomStyle">solid</property> + <property name="borderBottomWidth">1pt</property> + <property name="borderLeftColor">#CCCCCC</property> + <property name="borderLeftStyle">solid</property> + <property name="borderLeftWidth">1pt</property> + <property name="borderRightColor">#CCCCCC</property> + <property name="borderRightStyle">solid</property> + <property name="borderRightWidth">1pt</property> + <property name="borderTopColor">#CCCCCC</property> + <property name="borderTopStyle">solid</property> + <property name="borderTopWidth">1pt</property> + </style> + </styles> + <page-setup> + <simple-master-page name="Simple MasterPage" id="2"> + <property name="leftMargin">1.2333333333in</property> + <property name="rightMargin">1.3111111111in</property> + <page-footer> + <text id="3"> + <property name="contentType">html</property> + <text-property name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property> + </text> + </page-footer> + </simple-master-page> + </page-setup> + <body> + <table id="68"> + <property name="marginTop">0pt</property> + <property name="textAlign">justify</property> + <property name="width">100%</property> + <property name="dataSet">Inventory</property> + <list-property name="boundDataColumns"> + <structure> + <property name="name">productId</property> + <expression name="expression">dataSetRow["productId"]</expression> + <property name="dataType">string</property> + </structure> + <structure> + <property name="name">quantityOnHand</property> + <expression name="expression">dataSetRow["quantityOnHand"]</expression> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="name">availableToPromise</property> + <expression name="expression">dataSetRow["availableToPromise"]</expression> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="name">retailPrice</property> + <expression name="expression">dataSetRow["retailPrice"]</expression> + <property name="dataType">float</property> + </structure> + <structure> + <property name="name">productName</property> + <expression name="expression">dataSetRow["productName"]</expression> + <property name="dataType">string</property> + </structure> + <structure> + <property name="name">datetimeReceived</property> + <expression name="expression">dataSetRow["datetimeReceived"]</expression> + <property name="dataType">date-time</property> + </structure> + <structure> + <property name="name">Column Binding</property> + <property name="displayName">Qoh</property> + <expression name="expression">dataSetRow["quantityOnHand"]</expression> + <property name="dataType">integer</property> + </structure> + <structure> + <property name="name">QoH</property> + <expression name="expression">dataSetRow["quantityOnHand"]</expression> + <property name="dataType">any</property> + <simple-property-list name="aggregateOn"> + <value>productId</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + <structure> + <property name="name">AtP</property> + <expression name="expression">dataSetRow["availableToPromise"]</expression> + <property name="dataType">integer</property> + <simple-property-list name="aggregateOn"> + <value>productId</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + <structure> + <property name="name">TotalSold</property> + <expression name="expression">dataSetRow["quantityOnHand"]-dataSetRow["availableToPromise"]</expression> + <property name="dataType">integer</property> + <simple-property-list name="aggregateOn"> + <value>productId</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + </list-property> + <property name="repeatHeader">false</property> + <property name="sortByGroups">true</property> + <column id="87"> + <property name="width">1.1111111111in</property> + </column> + <column id="88"> + <property name="width">1.1222222222in</property> + </column> + <column id="89"> + <property name="width">1.0777777778in</property> + </column> + <column id="90"> + <property name="width">1.3in</property> + </column> + <column id="91"/> + <header> + <row id="69"> + <property name="fontSize">small</property> + <property name="fontWeight">bold</property> + <property name="color">green</property> + <property name="borderBottomColor">#808080</property> + <property name="borderBottomStyle">solid</property> + <property name="borderBottomWidth">thin</property> + <property name="textAlign">center</property> + <cell id="70"> + <label id="92"> + <property name="color">gray</property> + <text-property name="text">Product Id</text-property> + </label> + </cell> + <cell id="71"> + <label id="94"> + <property name="color">gray</property> + <text-property name="text">Quantiy on hand</text-property> + </label> + </cell> + <cell id="72"> + <label id="95"> + <property name="color">gray</property> + <text-property name="text">Available to promise</text-property> + </label> + </cell> + <cell id="73"> + <label id="96"> + <property name="color">gray</property> + <text-property name="text">Retail Price</text-property> + </label> + </cell> + <cell id="74"/> + </row> + </header> + <group id="168"> + <property name="groupName">productId</property> + <property name="interval">none</property> + <property name="sortDirection">asc</property> + <expression name="keyExpr">row["productId"]</expression> + <structure name="toc"> + <expression name="expressionValue">row["productId"]</expression> + </structure> + <property name="repeatHeader">true</property> + <property name="hideDetail">false</property> + <property name="pageBreakAfter">auto</property> + <property name="pageBreakBefore">auto</property> + <property name="pageBreakInside">auto</property> + <list-property name="sort"> + <structure> + <expression name="key">row["productId"]</expression> + <property name="direction">asc</property> + </structure> + </list-property> + <header> + <row id="169"> + <property name="height">1cm</property> + <property name="fontSize">small</property> + <property name="fontWeight">bold</property> + <property name="textAlign">center</property> + <property name="verticalAlign">middle</property> + <property name="pageBreakAfter">auto</property> + <cell id="170"> + <data id="181"> + <property name="resultSetColumn">productId</property> + </data> + </cell> + <cell id="171"> + <data id="380"> + <property name="resultSetColumn">QoH</property> + </data> + </cell> + <cell id="172"> + <data id="381"> + <property name="resultSetColumn">AtP</property> + </data> + </cell> + <cell id="173"> + <data id="384"> + <property name="resultSetColumn">retailPrice</property> + </data> + </cell> + <cell id="174"/> + </row> + </header> + <footer> + <row id="175"> + <cell id="176"/> + <cell id="177"/> + <cell id="178"/> + <cell id="179"/> + <cell id="180"/> + </row> + </footer> + </group> + <detail> + <row id="75"> + <property name="fontSize">small</property> + <property name="textAlign">center</property> + <cell id="76"/> + <cell id="77"/> + <cell id="78"/> + <cell id="79"/> + <cell id="80"/> + </row> + </detail> + <footer> + <row id="81"> + <property name="height">1cm</property> + <property name="fontSize">medium</property> + <property name="color">maroon</property> + <property name="textAlign">center</property> + <property name="verticalAlign">middle</property> + <cell id="82"/> + <cell id="83"/> + <cell id="84"/> + <cell id="85"/> + <cell id="86"/> + </row> + </footer> + </table> + <table id="193"> + <property name="width">100%</property> + <property name="dataSet">Order</property> + <list-property name="boundDataColumns"> + <structure> + <property name="name">quantity</property> + <expression name="expression">dataSetRow["quantity"]</expression> + <property name="dataType">any</property> + </structure> + <structure> + <property name="name">productOrderId</property> + <expression name="expression">dataSetRow["productOrderId"]</expression> + <property name="dataType">any</property> + </structure> + <structure> + <property name="name">sumSoldOutQty</property> + <expression name="expression">dataSetRow["quantity"]</expression> + <property name="dataType">any</property> + <simple-property-list name="aggregateOn"> + <value>productOrderId</value> + </simple-property-list> + <property name="aggregateFunction">SUM</property> + </structure> + <structure> + <property name="name">orderDate</property> + <expression name="expression">dataSetRow["orderDate"]</expression> + <property name="dataType">any</property> + </structure> + </list-property> + <column id="212"> + <property name="width">1.3333333333in</property> + </column> + <column id="213"> + <property name="width">0.2666666667in</property> + </column> + <column id="214"> + <property name="width">2.2444444444in</property> + </column> + <column id="215"> + <property name="width">0.8111111111in</property> + </column> + <column id="216"/> + <header> + <row id="194"> + <property name="height">0.367in</property> + <property name="borderBottomColor">#000000</property> + <property name="borderBottomStyle">solid</property> + <property name="borderBottomWidth">thin</property> + <property name="textAlign">center</property> + <cell id="195"> + <label id="416"> + <property name="color">gray</property> + <text-property name="text">Order Date</text-property> + </label> + </cell> + <cell id="196"/> + <cell id="197"> + <label id="413"> + <property name="fontWeight">bold</property> + <property name="color">gray</property> + <text-property name="text">Item sold out summary</text-property> + </label> + </cell> + <cell id="198"/> + <cell id="199"> + <label id="287"> + <property name="fontWeight">bold</property> + <property name="color">gray</property> + <text-property name="text">Sold out qty</text-property> + </label> + </cell> + </row> + </header> + <group id="291"> + <property name="groupName">productOrderId</property> + <property name="interval">none</property> + <property name="sortDirection">asc</property> + <expression name="keyExpr">row["productOrderId"]</expression> + <structure name="toc"> + <expression name="expressionValue">row["productOrderId"]</expression> + </structure> + <property name="repeatHeader">true</property> + <property name="hideDetail">false</property> + <property name="pageBreakAfter">auto</property> + <property name="pageBreakBefore">auto</property> + <property name="pageBreakInside">auto</property> + <header> + <row id="292"> + <property name="height">0.344in</property> + <property name="textAlign">center</property> + <property name="verticalAlign">middle</property> + <cell id="293"> + <data id="415"> + <property name="resultSetColumn">orderDate</property> + </data> + </cell> + <cell id="294"/> + <cell id="295"> + <data id="304"> + <property name="fontWeight">bold</property> + <property name="resultSetColumn">productOrderId</property> + </data> + </cell> + <cell id="296"/> + <cell id="297"> + <data id="305"> + <property name="marginTop">0pt</property> + <property name="paddingTop">1pt</property> + <property name="resultSetColumn">sumSoldOutQty</property> + </data> + </cell> + </row> + </header> + <footer> + <row id="298"> + <cell id="299"/> + <cell id="300"/> + <cell id="301"/> + <cell id="302"/> + <cell id="303"/> + </row> + </footer> + </group> + <detail> + <row id="200"> + <cell id="201"/> + <cell id="202"/> + <cell id="203"/> + <cell id="204"/> + <cell id="205"/> + </row> + </detail> + <footer> + <row id="206"> + <cell id="207"/> + <cell id="208"/> + <cell id="209"/> + <cell id="210"/> + <cell id="211"/> + </row> + </footer> + </table> + </body> +</report> Modified: ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/FacilityForms.xml Tue Dec 15 15:34:29 2009 @@ -854,5 +854,34 @@ <submit/> </field> </form> + + <form name="ViewFacilityInventoryHistoryReportForm" extends="FindFacilityInventoryByProduct" target="RenderInventoryReportHtml" target-window="_BLANK"> + <field name="facilityId"><hidden/></field> + <field name="productId"><hidden/></field> + <field name="internalName"><hidden/></field> + <field name="productTypeId"><hidden/></field> + <field name="searchInProductCategoryId"><hidden/></field> + <field name="productSupplierId"><hidden/></field> + <field name="statusId"><hidden/></field> + <field name="productsSoldThruTimestamp"><hidden/></field> + <field name="VIEW_SIZE"><hidden/></field> + <field name="monthsInPastLimit"><hidden/></field> + <field name="fromDateSellThrough"><hidden/></field> + <field name="thruDateSellThrough"><hidden/></field> + <field name="offsetQOHQty"><hidden/></field> + <field name="offsetATPQty"><hidden/></field> + <field name="lastIntMonth" title="Number of last month to sold out"><text size="15" default-value="0"></text></field> + <field name="contentType" action="document.ViewFacilityInventoryHistoryReportForm.action=this.value" event="onchange"> + <drop-down allow-empty="false" > + <option key="RenderInventoryReportHtml" description="HTML"/> + <option key="RenderInventoryReportPDF" description="PDF"/> + <!--option key="RenderInventoryReportExcel" description="MS-Excel"/> + <option key="RenderInventoryReportMSWord" description="MS-Word"/> + <option key="RenderInventoryReportPPT" description="MS-Powerpoint"/--> + </drop-down> + </field> + <field name="submitButton"><hidden/></field> + <field name="report" title="Export Report" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> </forms> Modified: ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Tue Dec 15 15:34:29 2009 @@ -1436,5 +1436,32 @@ </widgets> </section> </screen> + + <screen name="ViewFacilityInventoryHistoryReport"> + <section> + <actions> + <set field="headerItem" value="reports"/> + <set field="facilityId" from-field="parameters.facilityId"/> + <entity-one entity-name="Facility" value-field="facility" use-cache="true"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <container> + <label style="h1" text="${uiLabelMap.ProductInventoryByProduct} ${uiLabelMap.CommonFor} ${facility.facilityName}"/> + </container> + <container> + <link target="ViewFacilityInventoryByProductReport?facilityId=${parameters.facilityId}" text="${uiLabelMap.CommonPrint}" style="buttontext"/> + <link target="ViewFacilityInventoryByProductExport?facilityId=${parameters.facilityId}" text="${uiLabelMap.CommonExport}" style="buttontext"/> + <link target="ViewFacilityInventoryHistoryReport?facilityId=${parameters.facilityId}" text="${uiLabelMap.FacilityInventoryHistoryReport}" style="buttontext"/> + </container> + <screenlet title="${uiLabelMap.FacilityInventoryHistoryReport}"> + <include-form name="ViewFacilityInventoryHistoryReportForm" location="component://product/widget/facility/FacilityForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/product/widget/facility/ReportScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/ReportScreens.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/facility/ReportScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/facility/ReportScreens.xml Tue Dec 15 15:34:29 2009 @@ -56,6 +56,7 @@ <container> <link target="ViewFacilityInventoryByProductReport?${searchParameterString}" text="${uiLabelMap.CommonPrint}" style="buttontext"/> <link target="ViewFacilityInventoryByProductExport?${searchParameterString}" text="${uiLabelMap.CommonExport}" style="buttontext"/> + <link target="ViewFacilityInventoryHistoryReport?${searchParameterString}" text="${uiLabelMap.FacilityInventoryHistoryReport}" style="buttontext"/> </container> <screenlet title="${uiLabelMap.PageTitleFindFacilityInventoryItemsByProduct}"> <include-form name="FindFacilityInventoryByProduct" location="component://product/widget/facility/FacilityForms.xml"/> Modified: ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml?rev=890830&r1=890829&r2=890830&view=diff ============================================================================== --- ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml (original) +++ ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml Tue Dec 15 15:34:29 2009 @@ -46,7 +46,6 @@ <iterate list="invoices" entry="invoice"> <clear-field field="inMap"/> <set field="inMap.invoiceId" from-field="invoice.invoiceId"/> - <log level="always" message="===================inMap : ${inMap}"/> <call-service service-name="loadSalesInvoiceFact" in-map-name="inMap"/> <check-errors/> </iterate> @@ -62,9 +61,20 @@ <iterate list="orderHeaders" entry="orderHeader"> <clear-field field="inMap"/> <set field="inMap.orderId" from-field="orderHeader.orderId"/> - <log level="always" message="===================inMap : ${inMap}"/> <call-service service-name="loadSalesOrderFact" in-map-name="inMap"></call-service> <check-errors/> </iterate> + + + <!-- loads the inventory items in the InventoryItemFact fact entity --> + <entity-condition entity-name="InventoryItem" list="inventoryItems"> + <condition-expr field-name="inventoryItemTypeId" operator="equals" value="NON_SERIAL_INV_ITEM"/> + </entity-condition> + <iterate list="inventoryItems" entry="inventoryItem"> + <clear-field field="inventMap"/> + <set field="inventMap.inventoryItemId" from-field="inventoryItem.inventoryItemId"/> + <call-service service-name="loadInventoryFact" in-map-name="inventMap"></call-service> + <check-errors/> + </iterate> </simple-method> </simple-methods> |
| Free forum by Nabble | Edit this page |
