svn commit: r1743254 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/price/PriceServices.xml servicedef/services.xml widget/catalog/ProductForms.xml

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

svn commit: r1743254 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/price/PriceServices.xml servicedef/services.xml widget/catalog/ProductForms.xml

jleroux@apache.org
Author: jleroux
Date: Tue May 10 19:31:23 2016
New Revision: 1743254

URL: http://svn.apache.org/viewvc?rev=1743254&view=rev
Log:
A modified patch from Pawan Verma for "Add a drop-down for Tax Auth Combined Id in Product Price Creation screen" - https://issues.apache.org/jira/browse/OFBIZ-5697

Currently in Product Price Creation screen there are 3 fields:

    Tax Auth Geo ID
    Tax In Price
    Tax Auth Combined Id

We should either show only

    Tax Auth Geo ID
    Tax In Price
    using lookups like in Product Store screen and remove the Tax Auth Combined Id field
    or keep it and use a combined Tax Auth Geo ID+Tax In Price drop-down for it. Then we could use the same in Product Store screen to be consistent


A patch for the improvements. Removed "Tax Auth Combined Id" field and display lookups for "Tax Authority Party ID" & "Tax Auth Geo ID" fields as showing on the product store screen.

jleroux: I also modified the createProductPrice service implementation (by removing taxAuthCombinedId handling in inlineHandlePriceWithTaxIncuded) and the documentation (comments about taxAuthCombinedId in the service definition)

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml
    ofbiz/trunk/applications/product/servicedef/services.xml
    ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml?rev=1743254&r1=1743253&r2=1743254&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml Tue May 10 19:31:23 2016
@@ -93,15 +93,6 @@ under the License.
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="inlineHandlePriceWithTaxIncuded" short-description="Inline Handle Price with Tax Included">
-        <if-not-empty field="parameters.taxAuthCombinedId">
-            <set field="taxAuthCombinedId" from-field="parameters.taxAuthCombinedId"/>
-            <!-- if passed in value will be split based on: "${taxAuthGeoId}::${taxAuthPartyId}" -->
-            <set field="parameters.taxAuthGeoId"
-                value="${groovy:taxAuthCombinedId.substring(0,taxAuthCombinedId.indexOf('::'))}"/>
-            <set field="parameters.taxAuthPartyId"
-                value="${groovy:taxAuthCombinedId.substring(taxAuthCombinedId.indexOf('::')+2)}"/>
-        </if-not-empty>
-        
         <!-- handle price with tax included related fields (priceWithTax, taxAmount, taxPercentage, taxAuthPartyId, taxAuthGeoId) -->
         <if>
             <condition>

Modified: ofbiz/trunk/applications/product/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services.xml?rev=1743254&r1=1743253&r2=1743254&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services.xml Tue May 10 19:31:23 2016
@@ -240,13 +240,13 @@ under the License.
         <description>
             Create a Product Price.
             
-            If taxAuthGeoId and taxAuthPartyId are (or taxAuthCombinedId is) passed in then the price will be considered a price
+            If taxAuthGeoId and taxAuthPartyId are passed in then the price will be considered a price
             with tax included (the priceWithoutTax, priceWithTax, taxAmount, and taxPercentage fields will also be populated).
             
-            If the taxInPrice field is 'Y' then the price field will be left with the tax included (price will be equal to priceWithTax),            
+            If the taxInPrice field is 'Y' then the price field will be left with the tax included (price will be equal to priceWithTax),
             otherwise tax will be removed from the passed in price and the price field will be equal to the priceWithoutTax field.
             
-            If taxAuthGeoId or taxAuthPartyId empty, and taxAuthCombinedId is empty, then the taxInPrice field will be ignored.
+            If taxAuthGeoId or taxAuthPartyId empty then the taxInPrice field will be ignored.
         </description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
@@ -258,7 +258,6 @@ under the License.
             <exclude field-name="lastModifiedDate"/>
             <exclude field-name="lastModifiedByUserLogin"/>
         </auto-attributes>
-        <attribute name="taxAuthCombinedId" type="String" mode="IN" optional="true"><!-- if passed in value will be split based on: "${taxAuthGeoId}::${taxAuthPartyId}" --></attribute>
         <override name="fromDate" mode="INOUT" optional="true"/>
         <override name="price" optional="false"/>
     </service>

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1743254&r1=1743253&r2=1743254&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Tue May 10 19:31:23 2016
@@ -445,6 +445,8 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
+        <field name="taxAuthPartyId"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="taxAuthGeoId"><lookup target-form-name="LookupGeo"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
     <form name="UpdateProductPrice" type="list" target="updateProductPrice" title="" list-name="productPrices"
@@ -478,6 +480,9 @@ under the License.
             <display description="[${lastModifiedByUserLogin}] ${uiLabelMap.CommonOn} ${lastModifiedDate}" also-hidden="false"/>
         </field>
 
+        <field name="taxAuthPartyId"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="taxAuthGeoId"><lookup target-form-name="LookupGeo"/></field>
+
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
 
         <field name="viewHistoryLink" title=" " widget-style="buttontext">