You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2006/08/14 10:47:29 UTC
svn commit: r431310 - in /incubator/ofbiz/trunk/applications/product:
webapp/facility/WEB-INF/ webapp/facility/WEB-INF/actions/facility/
webapp/facility/facility/ widget/facility/
Author: jacopoc
Date: Mon Aug 14 01:47:28 2006
New Revision: 431310
URL: http://svn.apache.org/viewvc?rev=431310&view=rev
Log:
Added pdf and xml versions of the "inventory" report.
Modified:
incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh
incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh?rev=431310&r1=431309&r2=431310&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh (original)
+++ incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh Mon Aug 14 01:47:28 2006
@@ -32,22 +32,25 @@
action = request.getParameter("action");
+String searchParameterString = "";
+searchParameterString = "action=Y&facilityId=" + facilityId;
qty = -1;
List rows = new ArrayList();
if (action != null) {
+ // ------------------------------
+ DynamicViewEntity prodView = new DynamicViewEntity();
+ Map conditionMap = UtilMisc.toMap("facilityId", facilityId);
if (offsetQty != null && offsetQty.length() > 0) {
try {
qty = Integer.parseInt(offsetQty);
+ searchParameterString = searchParameterString + "&offsetQty=" + offsetQty;
} catch(NumberFormatException nfe) {
qty = -1;
}
}
- // ------------------------------
- DynamicViewEntity prodView = new DynamicViewEntity();
- Map conditionMap = UtilMisc.toMap("facilityId", facilityId);
prodView.addMemberEntity("PRFA", "ProductFacility");
prodView.addAliasAll("PRFA", null);
@@ -58,12 +61,14 @@
if (productTypeId != null && productTypeId.length() > 0) {
prodView.addAlias("PROD", "productTypeId");
conditionMap.put("productTypeId", productTypeId);
+ searchParameterString = searchParameterString + "&productTypeId=" + productTypeId;
}
if (searchInProductCategoryId != null && searchInProductCategoryId.length() > 0) {
prodView.addMemberEntity("PRCA", "ProductCategoryMember");
prodView.addViewLink("PRFA", "PRCA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
prodView.addAlias("PRCA", "productCategoryId");
conditionMap.put("productCategoryId", searchInProductCategoryId);
+ searchParameterString = searchParameterString + "&searchInProductCategoryId=" + searchInProductCategoryId;
}
if (productSupplierId != null && productSupplierId.length() > 0) {
@@ -71,6 +76,7 @@
prodView.addViewLink("PRFA", "SPPR", Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
prodView.addAlias("SPPR", "partyId");
conditionMap.put("partyId", productSupplierId);
+ searchParameterString = searchParameterString + "&productSupplierId=" + productSupplierId;
}
// set distinct on so we only get one row per product
@@ -140,3 +146,4 @@
}
context.put("inventoryByProduct", rows);
+context.put("searchParameterString", searchParameterString);
Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=431310&r1=431309&r2=431310&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ incubator/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Mon Aug 14 01:47:28 2006
@@ -32,9 +32,8 @@
<handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
<handler name="jsp" type="view" class="org.ofbiz.webapp.view.JspViewHandler"/>
<handler name="screenfop" type="view" class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>
-
+ <handler name="screenxml" type="view" class="org.ofbiz.widget.screen.ScreenXmlViewHandler"/>
<handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/>
- <handler name="jasperreportspdf" type="view" class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
<preprocessor>
<!-- Events to run on every request before security (chains exempt) -->
@@ -198,6 +197,14 @@
<security https="true" auth="true"/>
<response name="success" type="view" value="ViewFacilityInventoryByProductSimple"/>
</request-map>
+ <request-map uri="ViewFacilityInventoryByProductReport">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ViewFacilityInventoryByProductReport"/>
+ </request-map>
+ <request-map uri="ViewFacilityInventoryByProductExport">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ViewFacilityInventoryByProductExport"/>
+ </request-map>
<request-map uri="SearchInventoryItems">
<security https="true" auth="true"/>
<response name="success" type="view" value="SearchInventoryItems"/>
@@ -970,6 +977,8 @@
<view-map name="EditFacilityInventoryItems" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityInventoryItems"/>
<view-map name="ViewFacilityInventoryByProduct" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewFacilityInventoryByProduct"/>
<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#ViewFacilityInventoryByProductExport" content-type="text/xml"/>
<view-map name="EditFacilityGroups" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityGroups"/>
<view-map name="EditFacilityRoles" type="screen" page="component://product/widget/facility/FacilityScreens.xml#EditFacilityRoles"/>
<view-map name="ViewContactMechs" type="screen" page="component://product/widget/facility/FacilityScreens.xml#ViewContactMechs"/>
Modified: incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?rev=431310&r1=431309&r2=431310&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ incubator/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Mon Aug 14 01:47:28 2006
@@ -56,18 +56,18 @@
<form name="ListFacilityInventoryByProduct" type="list"
target="" title="" list-name="inventoryByProduct" paginate-target="ViewFacilityInventoryByProduct"
default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
- <field name="editLink" title="${uiLabelMap.CommonUpdateLink}" widget-style="buttontext">
+ <field name="editLink" title="${uiLabelMap.ProductProductId}" widget-style="buttontext">
<hyperlink target="/catalog/control/EditProduct?productId=${productId}" target-type="inter-app" description="${productId}" />
</field>
- <field name="productId" title="${uiLabelMap.CommonDescription}">
+ <field name="productId" title="${uiLabelMap.CommonDescription}" title-area-style="tableheadwide">
<display-entity entity-name="Product" description="${internalName}"/>
</field>
- <field name="minimumStock" title="${uiLabelMap.ProductMinimumStock}"><display/></field>
- <field name="reorderQuantity" title="${uiLabelMap.ProductReorderQuantity}"><display/></field>
- <field name="daysToShip" title="${uiLabelMap.ProductDaysToShip}"><display/></field>
- <field name="totalAvailableToPromise" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductAtp}"><display/></field>
- <field name="totalQuantityOnHand" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductQoh}"><display/></field>
- <field name="offsetQtyAvailable" title="${uiLabelMap.ProductQtyOffset}"><display/></field>
+ <field name="minimumStock" title="${uiLabelMap.ProductMinimumStock}" widget-area-style="tabletextright"><display/></field>
+ <field name="reorderQuantity" title="${uiLabelMap.ProductReorderQuantity}" widget-area-style="tabletextright"><display/></field>
+ <field name="daysToShip" title="${uiLabelMap.ProductDaysToShip}" widget-area-style="tabletextright"><display/></field>
+ <field name="totalAvailableToPromise" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductAtp}" widget-area-style="tabletextright"><display/></field>
+ <field name="totalQuantityOnHand" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductQoh}" widget-area-style="tabletextright"><display/></field>
+ <field name="offsetQtyAvailable" title="${uiLabelMap.ProductQtyOffset}" widget-area-style="tabletextright"><display/></field>
</form>
<form name="SearchInventoryItemsParams" type="single" target="SearchInventoryItems"
Modified: incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml?rev=431310&r1=431309&r2=431310&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml (original)
+++ incubator/ofbiz/trunk/applications/product/widget/facility/FacilityScreens.xml Mon Aug 14 01:47:28 2006
@@ -225,7 +225,9 @@
</container>
<container>
<link target="EditFacilityInventoryItems?facilityId=${facilityId}" text="${uiLabelMap.ProductInventoryItems}" style="buttontext"/>
- <link target="ViewFacilityInventoryByProductSimple?facilityId=${facilityId}" text="${uiLabelMap.CommonPrint}" style="buttontext"/>
+ <!--<link target="ViewFacilityInventoryByProductSimple?facilityId=${facilityId}" text="${uiLabelMap.CommonPrint}" style="buttontext"/>-->
+ <link target="ViewFacilityInventoryByProductReport?${searchParameterString}" text="${uiLabelMap.CommonPrint}" style="buttontext"/>
+ <link target="ViewFacilityInventoryByProductExport?${searchParameterString}" text="${uiLabelMap.CommonExport}" style="buttontext"/>
</container>
<include-form name="FindFacilityInventoryByProduct" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
@@ -272,6 +274,61 @@
</container>
<include-form name="FindFacilityInventoryByProduct" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+ <include-form name="ListFacilityInventoryByProduct" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="ViewFacilityInventoryByProductReport">
+ <section>
+ <actions>
+ <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+ <set field="pageLayoutName" value="simple-landscape"/>
+ <set field="titleProperty" value="PageTitleEditFacilityInventoryItems"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="500"/>
+
+ <set field="facilityId" from-field="parameters.facilityId"/>
+ <set field="productTypeId" from-field="parameters.productTypeId"/>
+ <set field="searchInProductCategoryId" from-field="parameters.searchInProductCategoryId"/>
+ <set field="productSupplierId" from-field="parameters.productSupplierId"/>
+ <set field="offsetQty" from-field="parameters.offsetQty"/>
+
+ <script location="component://product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="FoDecorator" location="component://common/widget/CommonScreens.xml">
+ <decorator-section name="body">
+ <include-form name="FindFacilityInventoryByProduct" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+ <include-form name="ListFacilityInventoryByProduct" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="ViewFacilityInventoryByProductExport">
+ <section>
+ <actions>
+ <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+ <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+ <set field="titleProperty" value="PageTitleEditFacilityInventoryItems"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="500"/>
+
+ <set field="facilityId" from-field="parameters.facilityId"/>
+ <set field="productTypeId" from-field="parameters.productTypeId"/>
+ <set field="searchInProductCategoryId" from-field="parameters.searchInProductCategoryId"/>
+ <set field="productSupplierId" from-field="parameters.productSupplierId"/>
+ <set field="offsetQty" from-field="parameters.offsetQty"/>
+
+ <script location="component://product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="XmlDecorator" location="component://common/widget/CommonScreens.xml">
+ <decorator-section name="body">
<include-form name="ListFacilityInventoryByProduct" location="component://product/webapp/facility/facility/FacilityForms.xml"/>
</decorator-section>
</decorator-screen>