svn commit: r598732 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml

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

svn commit: r598732 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml

sichen
Author: sichen
Date: Tue Nov 27 11:05:14 2007
New Revision: 598732

URL: http://svn.apache.org/viewvc?rev=598732&view=rev
Log:
Fix a bug where invoice items of type product cannot be updated if they don't have a productId

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=598732&r1=598731&r2=598732&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Tue Nov 27 11:05:14 2007
@@ -295,6 +295,7 @@
         <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
 
         <!-- check if the productNumber is updated, when yes retrieve product description and price -->
+        <if-not-empty field-name="productId">
         <if-compare-field field-name="productId"  map-name="savedValue" operator="not-equals" to-map-name="lookedUpValue">
             <entity-one entity-name="Product" value-name="product"/>
             <set from-field="product.description" field="lookedUpValue.description"/>
@@ -304,6 +305,7 @@
                 <result-to-field result-name="price" field-name="lookedUpValue.amount"/>
             </call-service>
         </if-compare-field>
+        </if-not-empty>
         <if-empty field-name="newEntity.amount">
             <add-error>
                 <fail-message message="The amount value is mandatory"/>