svn commit: r574045 - in /ofbiz/trunk/applications/workeffort: script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml servicedef/services_timesheet.xml

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

svn commit: r574045 - in /ofbiz/trunk/applications/workeffort: script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml servicedef/services_timesheet.xml

apatel-2
Author: apatel
Date: Sun Sep  9 11:00:42 2007
New Revision: 574045

URL: http://svn.apache.org/viewvc?rev=574045&view=rev
Log:
Add a convinence service to create Timesheet for multiple parties.

Modified:
    ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
    ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml

Modified: ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml?rev=574045&r1=574044&r2=574045&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml (original)
+++ ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/timesheet/TimesheetServices.xml Sun Sep  9 11:00:42 2007
@@ -63,7 +63,13 @@
             <result-to-result result-name="timesheetId"/>
         </call-service>
     </simple-method>
-    
+    <simple-method  method-name="createTimesheets" short-description="Creates Timesheet multiple parties at a time">
+       <iterate list-name="parameters.partyIdList" entry-name="partyId">
+           <set field="parameters.partyId" from-field="partyId"/>
+           <set-service-fields to-map-name="createParams" service-name="createTimesheet" map-name="parameters"/>
+           <call-service service-name="createTimesheet" in-map-name="createParams"/>
+       </iterate>
+    </simple-method>
     <simple-method method-name="addTimesheetToInvoice" short-description="Add Timesheet to Invoice">
         <check-permission permission="WORKEFFORTMGR" action="_CREATE"><fail-message message="You do not have permission to perform this operation: ${methodShortDescription}."/></check-permission>
         <check-errors/>

Modified: ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml?rev=574045&r1=574044&r2=574045&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml (original)
+++ ofbiz/trunk/applications/workeffort/servicedef/services_timesheet.xml Sun Sep  9 11:00:42 2007
@@ -42,6 +42,15 @@
         <description>Deletes Timesheet</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
+    <service name="createTimesheets" engine="simple"
+            location="org/ofbiz/workeffort/timesheet/TimesheetServices.xml" invoke="createTimesheets" auth="true">
+        <description>Creates Timesheet for multiple Parties in a single shot</description>
+        <attribute name="partyIdList" type="List" mode="IN" optional="true"/>
+        <attribute name="clientPartyId" type="String" mode="IN" optional="true"/>
+        <attribute name="fromDate" type="String" mode="IN" optional="true"/>
+        <attribute name="thruDate" type="String" mode="IN" optional="true"/>
+        <attribute name="comments" type="String" mode="IN" optional="true"/>
+    </service>
     <service name="createTimesheetForThisWeek" default-entity-name="Timesheet" engine="simple" auth="true"
         location="org/ofbiz/workeffort/timesheet/TimesheetServices.xml" invoke="createTimesheetForThisWeek">
         <description>Creates Timesheet</description>