svn commit: r1709238 - in /ofbiz/trunk/applications/humanres: script/org/ofbiz/humanres/HumanResServices.xml servicedef/services.xml

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

svn commit: r1709238 - in /ofbiz/trunk/applications/humanres: script/org/ofbiz/humanres/HumanResServices.xml servicedef/services.xml

jleroux@apache.org
Author: jleroux
Date: Sun Oct 18 06:10:57 2015
New Revision: 1709238

URL: http://svn.apache.org/viewvc?rev=1709238&view=rev
Log:
Completes r1709192 for Changes for "SalaryStep entity missing From and Thru dates" https://issues.apache.org/jira/browse/OFBIZ-5758

I'm certainly tired so I did not find a smart way to use entity-auto in createSalaryStep service and also create several salary steps different on the from date, at least using the older simple service works.
     




Modified:
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml

Modified: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml?rev=1709238&r1=1709237&r2=1709238&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Sun Oct 18 06:10:57 2015
@@ -221,5 +221,14 @@
         <create-value value-field="personTraining"/>
         <check-errors/>
     </simple-method>
+    
+    <simple-method method-name="createSalaryStep" short-description="Create a Salary Step">
+        <make-value entity-name="SalaryStep" value-field="newEntity"/>
+        <set-pk-fields map="parameters" value-field="newEntity"/>
+        <set-nonpk-fields map="parameters" value-field="newEntity"/>
+        <sequenced-id sequence-name="SalaryStep" field="newEntity.salaryStepSeqId"/>
+        <field-to-result field="salaryStepSeqId" result-name="salaryStepSeqId"/>
+        <create-value value-field="newEntity"/>
+    </simple-method>    
 
 </simple-methods>

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=1709238&r1=1709237&r2=1709238&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Sun Oct 18 06:10:57 2015
@@ -283,13 +283,13 @@ under the License.
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
 
-    <service name="createSalaryStep" engine="entity-auto" default-entity-name="SalaryStep" invoke="create" auth="true">
+    <service name="createSalaryStep" engine="simple" default-entity-name="SalaryStep"
+             location="component://humanres/script/org/ofbiz/humanres/HumanResServices.xml" invoke="createSalaryStep" auth="true">
         <description>Create Salary Step</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
-        <attribute name="payGradeId" mode="IN" type="String"/>
-        <attribute name="fromDate" mode="IN" type="Timestamp"/>
-        <attribute name="salaryStepSeqId" mode="OUT" type="String"/>
+        <override type="String" mode="IN" name="salaryStepSeqId" optional="true"/>
     </service>
 
     <service name="updateSalaryStep" engine="entity-auto" default-entity-name="SalaryStep" invoke="update" auth="true">