Author: apatel
Date: Wed Jul  8 12:44:10 2009
New Revision: 792117

URL: http://svn.apache.org/viewvc?rev=792117&view=rev
Log:
findPreviousTimePeriod service returns null if none exists.

Modified:
    
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml

Modified: 
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml?rev=792117&r1=792116&r2=792117&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml
 (original)
+++ 
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/period/PeriodServices.xml
 Wed Jul  8 12:44:10 2009
@@ -88,9 +88,6 @@
             </entity-and>
             <first-from-list list="customTimePeriodList" 
entry="previousTimePeriod"/>
             <field-to-result field="previousTimePeriod"/>
-        <else>
-            <field-to-result field="currentTimePeriod" 
result-name="previousTimePeriod"/>
-        </else>
         </if-compare>
     </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=792117&r1=792116&r2=792117&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml 
(original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Wed Jul  
8 12:44:10 2009
@@ -570,9 +570,9 @@
     </service>
     <service name="getPreviousTimePeriod" engine="simple" 
invoke="getPreviousTimePeriod"
         
location="component://accounting/script/org/ofbiz/accounting/period/PeriodServices.xml"
 auth="true">
-        <description>Return previous year with respect to the given year and 
if none found then return current year as previous.</description>
+        <description>Return previous year with respect to the given year and 
if none found then return null.</description>
         <attribute name="customTimePeriodId" mode="IN" type="String"/>
-        <attribute name="previousTimePeriod" mode="OUT" type="Map" 
optional="false"/>
+        <attribute name="previousTimePeriod" mode="OUT" type="Map" 
optional="true"/>
     </service>
     <service name="getAcctgTransEntriesAndTransTotal" engine="simple" 
invoke="getAcctgTransEntriesAndTransTotal" 
         
location="component://accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml"
 auth="true">


Reply via email to