Posted by
jaz-3 on
URL: http://ofbiz.116.s1.nabble.com/svn-commit-r573636-in-ofbiz-trunk-applications-product-config-entitydef-script-org-ofbiz-product-sto-tp213058.html
Author: jaz
Date: Fri Sep 7 10:38:36 2007
New Revision: 573636
URL:
http://svn.apache.org/viewvc?rev=573636&view=revLog:
create new UI for product store finAccount settings
Modified:
ofbiz/trunk/applications/product/config/ProductUiLabels.properties
ofbiz/trunk/applications/product/entitydef/entitymodel.xml
ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
ofbiz/trunk/applications/product/servicedef/services_store.xml
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml
ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreTabBar.ftl
ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml
Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Fri Sep 7 10:38:36 2007
@@ -134,6 +134,7 @@
PageTitleEditProductStore=Edit Product Store
PageTitleEditProductStoreCatalogs=Edit Product Store Catalogs
PageTitleEditProductStoreEmailSetup=Edit Product Store Email Setup
+PageTitleEditProductStoreFinAccountSettings=Edit Product Store Financial Account Settings
PageTitleEditProductStoreKeywordOvrd=Edit Product Store Keyword Ovrd
PageTitleEditProductStoreList=Edit Product Store List
PageTitleEditProductStorePaySetup=Edit Product Store Payment Setup
@@ -1040,6 +1041,7 @@
ProductProductPromotionsList=Product Promotions List
ProductProductStore=Product Store
ProductProductStoreEmailSettings=Product Store Email Settings
+ProductStoreFinAccountSettings=Product Store Financial Account Settings
ProductProductStoreGroup=Product Store Group
ProductProductStoreGroupId=Product Store Group Id
ProductProductStoreKeywordOverrideSettings=Product Store Keyword Override Settings
Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Fri Sep 7 10:38:36 2007
@@ -3465,7 +3465,10 @@
</field>
<field name="allowAuthToNegative" type="indicator"></field>
<field name="minBalance" type="currency-amount"></field>
- <field name="replenishThreshold" type="currency-amount"></field>
+ <field name="replenishThreshold" type="currency-amount"></field>
+ <field name="replenishMethodEnumId" type="id">
+ <description>Replenish Method for Replenish Account. Can be FARP_TOP_OFF or FARP_REPLENISH_LEVEL. Default FARP_TOP_OFF.</description>
+ </field>
<prim-key field="productStoreId"/>
<prim-key field="finAccountTypeId"/>
<relation rel-entity-name="ProductStore" type="one" fk-name="PRSTFNAC_PRDS">
@@ -3476,6 +3479,9 @@
</relation>
<relation rel-entity-name="Survey" type="one" fk-name="PRSTFNAC_SRVY">
<key-map field-name="purchaseSurveyId" rel-field-name="surveyId"/>
+ </relation>
+ <relation type="one" fk-name="PRSTFNAC_FARPMTD" title="ReplenishMethod" rel-entity-name="Enumeration">
+ <key-map field-name="replenishMethodEnumId" rel-field-name="enumId"/>
</relation>
</entity>
<entity entity-name="ProductStoreFacility"
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml Fri Sep 7 10:38:36 2007
@@ -343,6 +343,37 @@
<store-value value-name="lookedUpValue"/>
</simple-method>
+ <!-- Product Store FinAccount Settings -->
+ <simple-method method-name="createProductStoreFinActSetting" short-description="Create a ProductStoreFinActSetting">
+ <check-permission permission="CATALOG" action="_CREATE"><fail-message message="Security Error: to run createProductStoreFinActSetting you must have the CATALOG_CREATE or CATALOG_ADMIN permission"/></check-permission>
+ <check-errors/>
+
+ <make-value value-name="finAcctSetting" entity-name="ProductStoreFinActSetting"/>
+ <set-pk-fields value-name="finAcctSetting" map-name="parameters"/>
+ <set-nonpk-fields value-name="finAcctSetting" map-name="parameters"/>
+ <create-value value-name="finAcctSetting"/>
+ </simple-method>
+ <simple-method method-name="updateProductStoreFinActSetting" short-description="Update a ProductStoreFinActSetting">
+ <check-permission permission="CATALOG" action="_UPDATE"><fail-message message="Security Error: to run updateProductStoreFinActSetting you must have the CATALOG_UPDATE or CATALOG_ADMIN permission"/></check-permission>
+ <check-errors/>
+
+ <make-value value-name="lookupPk" entity-name="ProductStoreFinActSetting"/>
+ <set-pk-fields value-name="lookupPk" map-name="parameters"/>
+ <find-by-primary-key map-name="lookupPk" value-name="finAccountSetting"/>
+
+ <set-nonpk-fields value-name="finAccountSetting" map-name="parameters"/>
+ <store-value value-name="finAccountSetting"/>
+ </simple-method>
+ <simple-method method-name="removeProductStoreFinActSetting" short-description="Remove a ProductStoreFinActSetting">
+ <check-permission permission="CATALOG" action="_DELETE"><fail-message message="Security Error: to run removeProductStoreFinActSetting you must have the CATALOG_DELETE or CATALOG_ADMIN permission"/></check-permission>
+ <check-errors/>
+
+ <make-value value-name="lookupPk" entity-name="ProductStoreFinActSetting"/>
+ <set-pk-fields value-name="lookupPk" map-name="parameters"/>
+ <find-by-primary-key map-name="lookupPk" value-name="finAccountSetting"/>
+ <remove-value value-name="finAccountSetting"/>
+ </simple-method>
+
<!-- Store Inventory Services -->
<simple-method method-name="reserveStoreInventory" short-description="Reserve Store Inventory">
<entity-one entity-name="Product" value-name="product" use-cache="true"/>
Modified: ofbiz/trunk/applications/product/servicedef/services_store.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_store.xml?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_store.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_store.xml Fri Sep 7 10:38:36 2007
@@ -239,4 +239,23 @@
<description>Delete ProductStorePromoAppl</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
+
+ <!-- ProductStoreFinActSetting Services -->
+ <service name="createProductStoreFinActSetting" default-entity-name="ProductStoreFinActSetting" engine="simple"
+ location="org/ofbiz/product/store/ProductStoreServices.xml" invoke="createProductStoreFinActSetting" auth="true">
+ <description>Create ProductStoreFinActSetting</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+ <service name="updateProductStoreFinActSetting" default-entity-name="ProductStoreFinActSetting" engine="simple"
+ location="org/ofbiz/product/store/ProductStoreServices.xml" invoke="updateProductStoreFinActSetting" auth="true">
+ <description>Update ProductStoreFinActSetting</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+ <service name="removeProductStoreFinActSetting" default-entity-name="ProductStoreFinActSetting" engine="simple"
+ location="org/ofbiz/product/store/ProductStoreServices.xml" invoke="removeProductStoreFinActSetting" auth="true">
+ <description>Remove ProductStoreFinActSetting</description>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ </service>
</services>
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Fri Sep 7 10:38:36 2007
@@ -2146,7 +2146,34 @@
</request-map>
<!-- ================ ProductStore Segment Requests ================= -->
- <request-map uri="ViewProductStoreSegments"><security https="true" auth="true"/><response name="success" type="view" value="ViewProductStoreSegments"/></request-map>
+ <request-map uri="ViewProductStoreSegments">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="ViewProductStoreSegments"/>
+ </request-map>
+
+ <!-- ================ ProductStore FinAccount Settings ================ -->
+ <request-map uri="EditProductStoreFinAccountSettings">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="EditProductStoreFinAccountSettings"/>
+ </request-map>
+ <request-map uri="CreateProductStoreFinAccountSettings">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="createProductStoreFinActSetting"/>
+ <response name="success" type="view" value="EditProductStoreFinAccountSettings"/>
+ <response name="error" type="view" value="EditProductStoreFinAccountSettings"/>
+ </request-map>
+ <request-map uri="UpdateProductStoreFinAccountSettings">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="updateProductStoreFinActSetting"/>
+ <response name="success" type="view" value="EditProductStoreFinAccountSettings"/>
+ <response name="error" type="view" value="EditProductStoreFinAccountSettings"/>
+ </request-map>
+ <request-map uri="RemoveProductStoreFinAccountSettings">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="removeProductStoreFinActSetting"/>
+ <response name="success" type="view" value="EditProductStoreFinAccountSettings"/>
+ <response name="error" type="view" value="EditProductStoreFinAccountSettings"/>
+ </request-map>
<!-- ================ Keyword Thesaurus Requests ================= -->
<request-map uri="editKeywordThesaurus">
@@ -2534,6 +2561,7 @@
<view-map name="EditProductStoreWebSites" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreWebSites"/>
<view-map name="EditProductStoreKeywordOvrd" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreKeywordOvrd"/>
<view-map name="ViewProductStoreSegments" type="screen" page="component://product/widget/catalog/StoreScreens.xml#ViewProductStoreSegments"/>
+ <view-map name="EditProductStoreFinAccountSettings" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreFinAccountSettings"/>
<view-map name="EditKeywordThesaurus" type="screen" page="component://product/widget/catalog/ThesaurusScreens.xml#EditKeywordThesaurus"/>
Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreForms.xml Fri Sep 7 10:38:36 2007
@@ -268,6 +268,49 @@
<field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
</form>
+ <form name="ListProductStoreFinAccountSettings" type="list" target="UpdateProductStoreFinAccountSettings" list-name="productStoreFinActSettings">
+ <auto-fields-service service-name="updateProductStoreFinActSetting" default-field-type="display"/>
+ <field name="productStoreId"><ignored/></field>
+ <field name="finAccountTypeId">
+ <display-entity entity-name="FinAccountType" description="${description}" key-field-name="finAccountTypeId"/>
+ </field>
+ <field name="replenishMethodEnumId">
+ <display-entity entity-name="Enumeration" description="${description}" key-field-name="enumId"/>
+ </field>
+ <field name="remove" title="&nbsp;">
+ <hyperlink target="RemoveProductStoreFinAccountSettings?productStoreId=${productStoreId}&finAccountTypeId=${finAccountTypeId}" description="${uiLabelMap.CommonRemove}"/>
+ </field>
+ <field name="edit" title="&nbsp;">
+ <hyperlink target="EditProductStoreFinAccountSettings?productStoreId=${productStoreId}&finAccountTypeId=${finAccountTypeId}" description="${uiLabelMap.CommonEdit}"/>
+ </field>
+ </form>
+ <form name="EditProductStoreFinAccountSettings" type="single" target="UpdateProductStoreFinAccountSettings" default-map-name="finAccountSetting">
+ <alt-target use-when="finAccountSetting==null" target="CreateProductStoreFinAccountSettings"/>
+ <auto-fields-service service-name="updateProductStoreFinActSetting"/>
+
+ <field name="productStoreId"><hidden/></field>
+ <field name="finAccountTypeId" use-when="finAccountSetting!=null">
+ <display-entity entity-name="FinAccountType" also-hidden="true" description="${description}" key-field-name="finAccountTypeId"/>
+ </field>
+ <field name="finAccountTypeId" use-when="finAccountSetting==null">
+ <drop-down allow-empty="false">
+ <entity-options entity-name="FinAccountType" description="${description}" key-field-name="finAccountTypeId"/>
+ </drop-down>
+ </field>
+
+ <field name="replenishMethodEnumId">
+ <drop-down allow-empty="false" no-current-selected-key="FARP_TOP_OFF">
+ <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description}">
+ <entity-constraint name="enumTypeId" value="FARP_METHOD"/>
+ <entity-order-by field-name="sequenceId"/>
+ </entity-options>
+ </drop-down>
+ </field>
+
+ <field name="spacer" title="&nbsp;"><display/></field>
+ <field name="submit" title="${uiLabelMap.CommonSubmit}"><submit/></field>
+ </form>
+
<form name="CreateProductStoreCatalog" type="single" target="createProductStoreCatalog" title=""
default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
<auto-fields-service service-name="createProductStoreCatalog"/>
Modified: ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreTabBar.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreTabBar.ftl?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreTabBar.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/store/ProductStoreTabBar.ftl Fri Sep 7 10:38:36 2007
@@ -29,6 +29,7 @@
<a href="<@ofbizUrl>EditProductStoreShipSetup?productStoreId=${productStoreId}</@ofbizUrl>" class="${selectedClassMap.EditProductStoreShipSetup?default(unselectedClassName)}">${uiLabelMap.OrderShipping}</a>
<a href="<@ofbizUrl>EditProductStoreShipmentCostEstimates?productStoreId=${productStoreId}</@ofbizUrl>" class="${selectedClassMap.EditProductStoreShipmentCostEstimates?default(unselectedClassName)}">${uiLabelMap.ProductViewEstimates}</a>
<a href="<@ofbizUrl>EditProductStorePaySetup?productStoreId=${productStoreId}</@ofbizUrl>" class="${selectedClassMap.EditProductStorePaySetup?default(unselectedClassName)}">${uiLabelMap.AccountingPayments}</a>
+ <a href="<@ofbizUrl>EditProductStoreFinAccountSettings?productStoreId=${productStoreId}</@ofbizUrl>" class="${selectedClassMap.EditProductStoreFinAccountSettings?default(unselectedClassName)}">${uiLabelMap.CommonFinAccounts}</a>
<a href="<@ofbizUrl>EditProductStoreEmails?productStoreId=${productStoreId}</@ofbizUrl>" class="${selectedClassMap.EditProductStoreEmails?default(unselectedClassName)}">${uiLabelMap.CommonEmails}</a>
<a href="<@ofbizUrl>EditProductStoreSurveys?productStoreId=${productStoreId}</@ofbizUrl>" class="${selectedClassMap.EditProductStoreSurveys?default(unselectedClassName)}">${uiLabelMap.CommonSurveys}</a>
<a href="<@ofbizUrl>editProductStoreKeywordOvrd?productStoreId=${productStoreId}</@ofbizUrl>" class="${selectedClassMap.EditProductStoreKeywordOvrd?default(unselectedClassName)}">${uiLabelMap.ProductOverride}</a>
Modified: ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml?rev=573636&r1=573635&r2=573636&view=diff==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml Fri Sep 7 10:38:36 2007
@@ -408,4 +408,34 @@
</widgets>
</section>
</screen>
+ <screen name="EditProductStoreFinAccountSettings">
+ <section>
+ <actions>
+ <set field="titleProperty" value="PageTitleEditProductStoreFinAccountSettings"/>
+ <set field="headerItem" value="store"/>
+ <set field="tabButtonItem" value="EditProductStoreFinAccountSettings"/>
+ <set field="labelTitleProperty" value="ProductStoreFinAccountSettings"/>
+
+ <set field="productStoreId" from-field="parameters.productStoreId"/>
+ <entity-one entity-name="ProductStore" value-name="productStore" auto-field-map="true"/>
+
+ <entity-one entity-name="ProductStoreFinActSetting" value-name="finAccountSetting"/>
+ <entity-condition entity-name="ProductStoreFinActSetting" list-name="productStoreFinActSettings">
+ <condition-expr field-name="productStoreId" env-name="productStoreId"/>
+ </entity-condition>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonProductStoreDecorator" location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <container style="widget-container">
+ <include-form name="ListProductStoreFinAccountSettings" location="component://product/webapp/catalog/store/ProductStoreForms.xml"/>
+ </container>
+ <container style="widget-container">
+ <include-form name="EditProductStoreFinAccountSettings" location="component://product/webapp/catalog/store/ProductStoreForms.xml"/>
+ </container>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
</screens>