Author: hansbak
Date: Mon Sep  1 07:59:58 2008
New Revision: 690988

URL: http://svn.apache.org/viewvc?rev=690988&view=rev
Log:
accept an empty statusId to service updateInvoice when one does not want to 
change the invoicestatus

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=690988&r1=690987&r2=690988&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
 Mon Sep  1 07:59:58 2008
@@ -222,13 +222,15 @@
             </else>
         </if-compare>
 
-        <!-- check if there is a status change if yes call invoice status 
update service -->
-        <if-compare-field field="parameters.statusId" 
to-field="savedValue.statusId" operator="not-equals">
-            <set from-field="parameters.invoiceId" field="inputMap.invoiceId"/>
-            <set from-field="parameters.statusId" field="inputMap.statusId"/>
-            <now-timestamp-to-env env-name="inputMap.statusDate"/>
-            <call-service service-name="setInvoiceStatus" 
in-map-name="inputMap"/>
-        </if-compare-field>
+        <!-- check if there is a requested status change if yes call invoice 
status update service -->
+        <if-not-empty field="parameters.statusId">
+               <if-compare-field field="parameters.statusId" 
to-field="savedValue.statusId" operator="not-equals">
+               <set from-field="parameters.invoiceId" 
field="inputMap.invoiceId"/>
+                   <set from-field="parameters.statusId" 
field="inputMap.statusId"/>
+               <now-timestamp-to-env env-name="inputMap.statusDate"/>
+               <call-service service-name="setInvoiceStatus" 
in-map-name="inputMap"/>
+               </if-compare-field>
+        </if-not-empty>
     </simple-method>
 
     <simple-method method-name="sendInvoicePerEmail" short-description="Send 
an invoice per Email">


Reply via email to