svn commit: r462867 - /incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r462867 - /incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml

jacopoc
Author: jacopoc
Date: Wed Oct 11 10:19:53 2006
New Revision: 462867

URL: http://svn.apache.org/viewvc?view=rev&rev=462867
Log:
Minor change to improve error handling when creating/updating a product store.

Modified:
    incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml

Modified: incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml?view=diff&rev=462867&r1=462866&r2=462867
==============================================================================
--- incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml (original)
+++ incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml Wed Oct 11 10:19:53 2006
@@ -25,12 +25,11 @@
         <if-compare field-name="parameters.showPricesWithVatTax" operator="equals" value="Y">                
             <if-empty field-name="parameters.vatTaxAuthGeoId" >
                 <add-error><fail-property property="VatTaxAuthGeoNotSet" resource="CommonUiLabels"/></add-error>
-                <check-errors/>
             </if-empty>
             <if-empty field-name="parameters.vatTaxAuthPartyId" >
                 <add-error><fail-property property="VatTaxAuthPartyNotSet" resource="CommonUiLabels"/></add-error>
-                <check-errors/>
             </if-empty>
+            <check-errors/>
         </if-compare>  
 
         <make-value value-name="newEntity" entity-name="ProductStore"/>
@@ -57,21 +56,21 @@
         <check-permission permission="CATALOG" action="_UPDATE"><fail-message message="Security Error: to run updateProductStore you must have the CATALOG_UPDATE or CATALOG_ADMIN permission"/></check-permission>
         <check-errors/>
 
-        <if-compare field-name="parameters.showPricesWithVatTax" operator="equals" value="Y">                
-            <if-empty field-name="parameters.vatTaxAuthGeoId" >
-                <add-error><fail-property property="VatTaxAuthGeoNotSet" resource="CommonUiLabels"/></add-error>
-                <check-errors/>
-            </if-empty>
-            <if-empty field-name="parameters.vatTaxAuthPartyId" >
-                <add-error><fail-property property="VatTaxAuthPartyNotSet" resource="CommonUiLabels"/></add-error>
-                <check-errors/>
-            </if-empty>
-        </if-compare>  
-        
         <set from-field="parameters.productStoreId" field="lookupPKMap.productStoreId"/>
         <find-by-primary-key entity-name="ProductStore" map-name="lookupPKMap" value-name="store"/>
         <set from-field="store.inventoryFacilityId" field="oldFacilityId"/>
         <set-nonpk-fields map-name="parameters" value-name="store"/>
+
+        <if-compare field-name="store.showPricesWithVatTax" operator="equals" value="Y">                
+            <if-empty field-name="store.vatTaxAuthGeoId" >
+                <add-error><fail-property property="VatTaxAuthGeoNotSet" resource="CommonUiLabels"/></add-error>
+            </if-empty>
+            <if-empty field-name="store.vatTaxAuthPartyId" >
+                <add-error><fail-property property="VatTaxAuthPartyNotSet" resource="CommonUiLabels"/></add-error>
+            </if-empty>
+            <check-errors/>
+        </if-compare>
+
         <store-value value-name="store"/>
 
         <!-- update the ProductStoreFacility record -->