Author: jleroux
Date: Mon May 20 17:18:17 2019
New Revision: 1859574
URL: http://svn.apache.org/viewvc?rev=1859574&view=rev
Log:
"Applied fix from trunk framework for revision: 1859571"
------------------------------------------------------------------------
r1859571 | jleroux | 2019-05-20 19:14:43 +0200 (lun. 20 mai 2019) | 22 lignes
Fixed: field emplFromDate is forgot in PayHistory entity
(OFBIZ-11028)
Arpit Mor: steps to regenerate:
Login to the URL: https://demo-trunk.ofbiz.apache.org/humanres/control/main
Click on Employments
Click on New Employments
Click on Create
Actual: Error message is displayed.
Olivier Heintz: employment is associated with PayHistory, and there is a
problem
in PayHistory entity definition in OFBiz,
In PayHistory, the field fromDate from Employment is confused with fromDate
about the current record.
A Employment can have multiple PayHistories and should have multiple
because PayHistory should show history of Pay for a employment !
It's necessary to have a field emplFromDate (to have the complete employment
primaryKey).
When modifying a PayRecord the current should be expire and a new one should
be created.
Thanks: Arpit Mor for report at OFBIZ-10969 and Olivier Heintz for the fix
------------------------------------------------------------------------
Modified:
ofbiz/branches/release16.11/ (props changed)
ofbiz/branches/release16.11/applications/datamodel/entitydef/humanres-entitymodel.xml
ofbiz/branches/release16.11/applications/humanres/minilang/HumanResServices.xml
ofbiz/branches/release16.11/applications/humanres/servicedef/services.xml
ofbiz/branches/release16.11/applications/humanres/webapp/humanres/WEB-INF/controller.xml
ofbiz/branches/release16.11/applications/humanres/widget/EmploymentScreens.xml
ofbiz/branches/release16.11/applications/humanres/widget/HumanresMenus.xml
ofbiz/branches/release16.11/applications/humanres/widget/forms/EmploymentForms.xml
Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 20 17:18:17 2019
@@ -10,5 +10,5 @@
/ofbiz/branches/json-integration-refactoring:1634077-1635900
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release13.07:1547657
-/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804,1792270,1792272,1792275,1792432,1792609,1792638,1793300,1794008,1794132,1796047,1796262,1797733,1798668,1798682,1798796,1798803,1798808,1799088,1799183,1799327,1799417,1799687,1799767,1799793,1799859,1800250,1800780,1800832,1800853,1801094,1801262-1801263,1801273-1801274,1801303,1801316,1801318-1801319,1801336,1801340,1801346,1801349-1801350,1801359,1801742,1802657,1802766,1803525,1804656,1804843,1804847,1804859,1805143,1805558,1805880,1806036,1806220,1806266,1806269,1806951,1807597,1807890,1808834,1809399,1809429,1809594,1809741,1810102,1811794,1812387,1813600,1813617,1813647,1813833,1814277,1814319,1814349,1814392,1814501,1814591,1814642,1814644,1814709,1814873,1814928,1814934,1815059,1816264,1816273,
1816289,1816291,1816297,1816369,1816373,1816461,1816635,1816795,1818101,1818269,1818273,1818402,1819122,1819136,1819144,1819811,1820823,1820949,1820966,1821012,1821036,1821613,1821965,1822310,1822377,1822383,1823876,1824314,1824316,1824732,1824803,1824847,1824855,1825192,1825233,1825262,1825444,1825450,1826374,1826592,1826671,1826805,1826938,1828255,1830936,1831234,1831608,1831831,1832577,1832662,1832756,1832944,1833211,1834181,1834191,1835235,1836144,1838032,1840189,1840199,1840828,1841657,1841662,1842372,1842921,1843225,1843893,1845418,1845420,1845466,1845544,1845552,1846214,1846594,1846632,1847398,1848263,1848336,1848398,1848444,1848449,1849191,1849193,1849275,1849528,1849540,1849567,1849693,1850015,1850023,1850530,1850685,1850914,1850918,1850948,1851200,1851247,1851319,1851805,1851998,1852587,1852818,1853070,1853691,1853745,1853750,1854306,1854457,1855078,1855287,1855371,1855403,1855488,1855492,1855497,1855501,1855898,1856405,1856455,1856459-1856460,1856484,1856598,1856617,18566
67,1857088,1857099,1857180,1857213,1857392,1857617,1857692,1857813,1858141,1858250,1858275,1858312,1858319,1858432,1858444,1858523,1858539,1858933,1858965,1858980,1859012,1859033,1859255,1859263,1859543
+/ofbiz/ofbiz-framework/trunk:1783202,1783388,1784549,1784558,1784708,1785882,1785925,1786079,1786214,1786525,1787047,1787133,1787176,1787535,1787906-1787911,1787949,1789665,1789863,1789874,1790396,1790810,1791277,1791288,1791342,1791346,1791490,1791496,1791625,1791634,1791791,1791804,1792270,1792272,1792275,1792432,1792609,1792638,1793300,1794008,1794132,1796047,1796262,1797733,1798668,1798682,1798796,1798803,1798808,1799088,1799183,1799327,1799417,1799687,1799767,1799793,1799859,1800250,1800780,1800832,1800853,1801094,1801262-1801263,1801273-1801274,1801303,1801316,1801318-1801319,1801336,1801340,1801346,1801349-1801350,1801359,1801742,1802657,1802766,1803525,1804656,1804843,1804847,1804859,1805143,1805558,1805880,1806036,1806220,1806266,1806269,1806951,1807597,1807890,1808834,1809399,1809429,1809594,1809741,1810102,1811794,1812387,1813600,1813617,1813647,1813833,1814277,1814319,1814349,1814392,1814501,1814591,1814642,1814644,1814709,1814873,1814928,1814934,1815059,1816264,1816273,
1816289,1816291,1816297,1816369,1816373,1816461,1816635,1816795,1818101,1818269,1818273,1818402,1819122,1819136,1819144,1819811,1820823,1820949,1820966,1821012,1821036,1821613,1821965,1822310,1822377,1822383,1823876,1824314,1824316,1824732,1824803,1824847,1824855,1825192,1825233,1825262,1825444,1825450,1826374,1826592,1826671,1826805,1826938,1828255,1830936,1831234,1831608,1831831,1832577,1832662,1832756,1832944,1833211,1834181,1834191,1835235,1836144,1838032,1840189,1840199,1840828,1841657,1841662,1842372,1842921,1843225,1843893,1845418,1845420,1845466,1845544,1845552,1846214,1846594,1846632,1847398,1848263,1848336,1848398,1848444,1848449,1849191,1849193,1849275,1849528,1849540,1849567,1849693,1850015,1850023,1850530,1850685,1850914,1850918,1850948,1851200,1851247,1851319,1851805,1851998,1852587,1852818,1853070,1853691,1853745,1853750,1854306,1854457,1855078,1855287,1855371,1855403,1855488,1855492,1855497,1855501,1855898,1856405,1856455,1856459-1856460,1856484,1856598,1856617,18566
67,1857088,1857099,1857180,1857213,1857392,1857617,1857692,1857813,1858141,1858250,1858275,1858312,1858319,1858432,1858444,1858523,1858539,1858933,1858965,1858980,1859012,1859033,1859255,1859263,1859543,1859571
/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724,1780659,1781109,1781125,1781979,1782498,1782520
Modified:
ofbiz/branches/release16.11/applications/datamodel/entitydef/humanres-entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/datamodel/entitydef/humanres-entitymodel.xml?rev=1859574&r1=1859573&r2=1859574&view=diff
==============================================================================
---
ofbiz/branches/release16.11/applications/datamodel/entitydef/humanres-entitymodel.xml
(original)
+++
ofbiz/branches/release16.11/applications/datamodel/entitydef/humanres-entitymodel.xml
Mon May 20 17:18:17 2019
@@ -526,6 +526,7 @@ under the License.
<field name="roleTypeIdTo" type="id-ne"></field>
<field name="partyIdFrom" type="id-ne"></field>
<field name="partyIdTo" type="id-ne"></field>
+ <field name="emplFromDate" type="date-time"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="salaryStepSeqId" type="id"></field>
@@ -537,13 +538,14 @@ under the License.
<prim-key field="roleTypeIdTo"/>
<prim-key field="partyIdFrom"/>
<prim-key field="partyIdTo"/>
+ <prim-key field="emplFromDate"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="PAY_HIST_EMPLMNT"
rel-entity-name="Employment">
<key-map field-name="roleTypeIdFrom"/>
<key-map field-name="roleTypeIdTo"/>
<key-map field-name="partyIdFrom"/>
<key-map field-name="partyIdTo"/>
- <key-map field-name="fromDate"/>
+ <key-map field-name="emplFromDate" rel-field-name="fromDate"/>
</relation>
<relation type="one" fk-name="PAY_HIST_PGRD" rel-entity-name="PayGrade">
<key-map field-name="payGradeId"/>
Modified:
ofbiz/branches/release16.11/applications/humanres/minilang/HumanResServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/humanres/minilang/HumanResServices.xml?rev=1859574&r1=1859573&r2=1859574&view=diff
==============================================================================
---
ofbiz/branches/release16.11/applications/humanres/minilang/HumanResServices.xml
(original)
+++
ofbiz/branches/release16.11/applications/humanres/minilang/HumanResServices.xml
Mon May 20 17:18:17 2019
@@ -22,7 +22,10 @@
xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
<!-- Employment Group -->
- <simple-method method-name="createEmployment" short-description="Create
Employment"><!--entity-auto-->
+ <simple-method method-name="createEmployment" short-description="Create
Employment">
+ <set-service-fields service-name="ensurePartyRoleTo"
to-map="partyRoleMap" map="parameters"/>
+ <call-service service-name="ensurePartyRoleTo"
in-map-name="partyRoleMap"/>
+
<make-value entity-name="Employment" value-field="newEntity"/>
<set-pk-fields value-field="newEntity" map="parameters"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
@@ -32,10 +35,45 @@
</if-empty>
<create-value value-field="newEntity"/>
- <set-service-fields service-name="createPayHistory" map="newEntity"
to-map="createPayHistoryMap"/><!--create by seca-->
+ <set-service-fields service-name="createPayHistory" map="parameters"
to-map="createPayHistoryMap"/>
+ <set field="createPayHistoryMap.emplFromDate"
from="parameters.fromDate"/>
<call-service service-name="createPayHistory"
in-map-name="createPayHistoryMap"/>
</simple-method>
+ <simple-method method-name="updatePayHistory" short-description="Update
PayHistory, expire current record and create a new">
+ <entity-one entity-name="PayHistory" value-field="lookedOldValue"/>
+ <!-- check if amount or payGrade or salaryStepSeqId change, if Yes so
expire current record -->
+ <if>
+ <condition>
+ <and>
+ <if-compare-field to-field="lookedOldValue.amount"
operator="equals" field="parameters.amount"/>
+ <if-compare-field to-field="lookedOldValue.payGradeId"
operator="equals" field="parameters.payGradeId"/>
+ <if-compare-field to-field="lookedOldValue.salaryStepSeqId"
operator="equals" field="parameters.salaryStepSeqId"/>
+ </and>
+ </condition>
+ <then>
+ <!-- just update comment -->
+ <set field="lookedOldValue.comments"
from-field="parameters.comments"/>
+ <store-value value-field="lookedOldValue"/>
+ </then>
+ <else>
+ <!-- expire old record and create a new one -->
+ <set-service-fields service-name="expirePayHistory"
map="parameters" to-map="expirePayHistoryMap"/>
+ <call-service service-name="expirePayHistory"
in-map-name="expirePayHistoryMap"/>
+ <set-service-fields service-name="createPayHistory"
map="parameters" to-map="createPayHistoryMap"/>
+ <if-empty field="parameters.changeDate">
+ <now-timestamp field="nowTimeStamp"/>
+ <set field="createPayHistoryMap.fromDate"
from-field="nowTimeStamp"/>
+ <else>
+ <set field="createPayHistoryMap.fromDate"
from-field="parameters.changeDate"/>
+ </else>
+ </if-empty>
+ <call-service service-name="createPayHistory"
in-map-name="createPayHistoryMap"/>
+ </else>
+ </if>
+ <field-to-result field="parameters.emplFromDate"
result-name="fromDate"/>
+ </simple-method>
+
<simple-method method-name="deletePayHistory" short-description="Delete
Pay History">
<now-timestamp field="nowTimeStamp"/>
<entity-one entity-name="PayHistory" value-field="lookedUpValue"/>
Modified:
ofbiz/branches/release16.11/applications/humanres/servicedef/services.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/humanres/servicedef/services.xml?rev=1859574&r1=1859573&r2=1859574&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/humanres/servicedef/services.xml
(original)
+++ ofbiz/branches/release16.11/applications/humanres/servicedef/services.xml
Mon May 20 17:18:17 2019
@@ -154,11 +154,18 @@ under the License.
</service>
<!-- Employment Group -->
- <service name="createEmployment" engine="entity-auto"
default-entity-name="Employment" invoke="create" auth="true">
- <description>Create Employment</description>
+ <service name="createEmployment" engine="simple"
default-entity-name="Employment"
+ location="component://humanres/minilang/HumanResServices.xml"
invoke="createEmployment" auth="true">
+ <description>Create Employment and first record in
PayHistory</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"/>
+ <!-- For PayHistory -->
+ <attribute name="amount" mode="IN" type="BigDecimal" optional="true"/>
+ <attribute name="payGradeId" mode="IN" type="String" optional="true"/>
+ <attribute name="salaryStepSeqId" mode="IN" type="String"
optional="true"/>
+ <attribute name="periodTypeId" mode="IN" type="String"
optional="true"/>
+ <attribute name="comments" mode="IN" type="String" optional="true"/>
<override type="Timestamp" mode="IN" name="fromDate" optional="true"/>
</service>
@@ -246,11 +253,14 @@ under the License.
<override type="Timestamp" mode="IN" name="fromDate" optional="true"/>
</service>
- <service name="updatePayHistory" engine="entity-auto"
default-entity-name="PayHistory" invoke="update" auth="true">
+ <service name="updatePayHistory" engine="simple"
default-entity-name="PayHistory"
+ location="component://humanres/minilang/HumanResServices.xml"
invoke="updatePayHistory" auth="true">
<description>Update Pay History</description>
<permission-service service-name="humanResManagerPermission"
main-action="UPDATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
+ <attribute name="changeDate" mode="IN" type="Timestamp"
optional="true"/>
+ <attribute name="fromDate" mode="OUT" type="Timestamp"/>
</service>
<service name="deletePayHistory" engine="simple"
default-entity-name="PayHistory"
Modified:
ofbiz/branches/release16.11/applications/humanres/webapp/humanres/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/humanres/webapp/humanres/WEB-INF/controller.xml?rev=1859574&r1=1859573&r2=1859574&view=diff
==============================================================================
---
ofbiz/branches/release16.11/applications/humanres/webapp/humanres/WEB-INF/controller.xml
(original)
+++
ofbiz/branches/release16.11/applications/humanres/webapp/humanres/WEB-INF/controller.xml
Mon May 20 17:18:17 2019
@@ -233,6 +233,10 @@ under the License.
<security https="true" auth="true"/>
<response name="success" type="view" value="ListPayHistories"/>
</request-map>
+ <request-map uri="EditPayHistory">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="EditPayHistory"/>
+ </request-map>
<request-map uri="updatePayHistory">
<security https="true" auth="true"/>
<event type="service" invoke="updatePayHistory"/>
@@ -1145,6 +1149,7 @@ under the License.
<view-map name="EditPartyBenefits" type="screen"
page="component://humanres/widget/EmploymentScreens.xml#EditPartyBenefits"/>
<view-map name="EditPayrollPreferences" type="screen"
page="component://humanres/widget/EmploymentScreens.xml#EditPayrollPreferences"/>
<view-map name="ListPayHistories" type="screen"
page="component://humanres/widget/EmploymentScreens.xml#ListPayHistories"/>
+ <view-map name="EditPayHistory" type="screen"
page="component://humanres/widget/EmploymentScreens.xml#EditPayHistory"/>
<view-map name="EditSalarySteps" type="screen"
page="component://humanres/widget/PayGradeScreens.xml#EditSalarySteps"/>
<view-map name="EditUnemploymentClaims" type="screen"
page="component://humanres/widget/EmploymentScreens.xml#EditUnemploymentClaims"/>
<view-map name="EditAgreementEmploymentAppls" type="screen"
page="component://humanres/widget/EmploymentScreens.xml#EditAgreementEmploymentAppls"/>
Modified:
ofbiz/branches/release16.11/applications/humanres/widget/EmploymentScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/humanres/widget/EmploymentScreens.xml?rev=1859574&r1=1859573&r2=1859574&view=diff
==============================================================================
---
ofbiz/branches/release16.11/applications/humanres/widget/EmploymentScreens.xml
(original)
+++
ofbiz/branches/release16.11/applications/humanres/widget/EmploymentScreens.xml
Mon May 20 17:18:17 2019
@@ -113,6 +113,28 @@
</widgets>
</section>
</screen>
+ <screen name="EditPayHistory">
+ <section>
+ <actions>
+ <set field="titleProperty" value="HumanResListPayHistories"/>
+ <set field="headerItem" value="Employment"/>
+ <set field="tabButtonItem" value="EditPayHistory"/>
+ <entity-one value-field="payHistory" entity-name="PayHistory"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonEmploymentDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <screenlet
title="${uiLabelMap.HumanResListPayHistories}">
+ <include-form name="ListPayHistories"
location="component://humanres/widget/forms/EmploymentForms.xml"/>
+ </screenlet>
+ <screenlet
title="${uiLabelMap.HumanResListPayHistories}">
+ <include-form name="EditPayHistory"
location="component://humanres/widget/forms/EmploymentForms.xml"/>
+ </screenlet>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
<screen name="EditPartyBenefits">
<section>
<actions>
Modified:
ofbiz/branches/release16.11/applications/humanres/widget/HumanresMenus.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/humanres/widget/HumanresMenus.xml?rev=1859574&r1=1859573&r2=1859574&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/humanres/widget/HumanresMenus.xml
(original)
+++ ofbiz/branches/release16.11/applications/humanres/widget/HumanresMenus.xml
Mon May 20 17:18:17 2019
@@ -36,13 +36,16 @@
</menu>
<menu name="EmploymentBar" default-menu-item-name="EditPartyBenefit"
default-selected-style="selected"
type="simple" menu-container-style="button-bar tab-bar"
selected-menuitem-context-field-name="tabButtonItem">
+ <actions>
+ <set field="emplFromDate" from-field="parameters.emplFromDate"
default-value="${parameters.fromDate}"/>
+ </actions>
<menu-item name="EditEmployment"
title="${uiLabelMap.HumanResEmployment}">
<link target="EditEmployment" >
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditPartyBenefit"
title="${uiLabelMap.HumanResEditPartyBenefit}">
@@ -51,7 +54,7 @@
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditPayrollPreference"
title="${uiLabelMap.HumanResEditPayrollPreference}">
@@ -60,7 +63,7 @@
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditPayHistory"
title="${uiLabelMap.HumanResEditPayHistory}">
@@ -69,7 +72,7 @@
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditUnemploymentClaims"
title="${uiLabelMap.HumanResEditUnemploymentClaim}">
@@ -78,7 +81,7 @@
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
- <parameter param-name="fromDate"/>
+ <parameter param-name="fromDate" from-field="emplFromDate"/>
</link>
</menu-item>
<menu-item name="EditAgreementEmploymentAppls"
title="${uiLabelMap.HumanResAgreementEmploymentAppl}">
Modified:
ofbiz/branches/release16.11/applications/humanres/widget/forms/EmploymentForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/humanres/widget/forms/EmploymentForms.xml?rev=1859574&r1=1859573&r2=1859574&view=diff
==============================================================================
---
ofbiz/branches/release16.11/applications/humanres/widget/forms/EmploymentForms.xml
(original)
+++
ofbiz/branches/release16.11/applications/humanres/widget/forms/EmploymentForms.xml
Mon May 20 17:18:17 2019
@@ -112,7 +112,7 @@
<form name="EditEmployment" type="single" target="updateEmployment"
default-map-name="employment"
header-row-style="header-row" default-table-style="basic-table">
<alt-target use-when="employment==null" target="createEmployment"/>
- <auto-fields-service service-name="createEmployment"
default-field-type="hidden"/>
+<!-- <auto-fields-service service-name="createEmployment"
default-field-type="hidden"/> -->
<field name="roleTypeIdFrom"><hidden
value="INTERNAL_ORGANIZATIO"/></field>
<field name="roleTypeIdTo"><hidden value="EMPLOYEE"/></field>
<field name="partyIdFrom" use-when="employment==null"
title="${uiLabelMap.HumanResEmploymentPartyIdFrom}" required-field="true">
@@ -128,6 +128,19 @@
<field name="fromDate" use-when="employment==null"
title="${uiLabelMap.CommonFromDate}" required-field="true"><date-time
default-value="${nowTimestamp}"/></field>
<field name="fromDate" use-when="employment!=null"
title="${uiLabelMap.CommonFromDate}"><display
default-value="${nowTimestamp}"/></field>
<field name="thruDate" use-when="employment!=null"
title="${uiLabelMap.CommonThruDate}"><date-time/></field>
+ <!-- For PayHistory -->
+ <field name="amount" use-when="employment==null"
required-field="true"><text/></field>
+ <field name="comments"
use-when="employment==null"><text/></field>
+ <field name="payGradeId" use-when="employment==null"
title="${uiLabelMap.HumanResPayGradeID}"><lookup
target-form-name="LookupPayGrade" size="20"/></field>
+ <field name="salaryStepSeqId" use-when="employment==null"
title="${uiLabelMap.HumanResSalaryStepSeqId}"><lookup
target-form-name="LookupSalaryStep" size="20"/></field>
+ <field name="periodTypeId" use-when="employment==null"
title="${uiLabelMap.FormFieldTitle_periodTypeId}">
+ <drop-down allow-empty="false">
+ <entity-options key-field-name="periodTypeId"
entity-name="PeriodType">
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <!-- End of For PayHistory -->
<field name="terminationReasonId" use-when="employment!=null"
title="${uiLabelMap.HumanResTerminationReasonId}">
<drop-down allow-empty="true" no-current-selected-key="------">
<entity-options key-field-name="terminationReasonId"
entity-name="TerminationReason">
@@ -148,44 +161,68 @@
<form name="ListPayHistories" type="list" target="updatePayHistory"
title="" paginate-target="findPayHistories"
odd-row-style="alternate-row" default-table-style="basic-table
hover-bar">
<actions>
- <entity-condition entity-name="PayHistory" filter-by-date="true">
+ <set field="emplFromDate" from-field="parameters.emplFromDate"
default-value="${parameters.fromDate}"/>
+ <entity-condition entity-name="PayHistory">
<condition-list combine="and">
<condition-expr field-name="roleTypeIdFrom"
operator="equals" from-field="parameters.roleTypeIdFrom"/>
<condition-expr field-name="roleTypeIdTo"
operator="equals" from-field="parameters.roleTypeIdTo"/>
<condition-expr field-name="partyIdFrom" operator="equals"
from-field="parameters.partyIdFrom"/>
<condition-expr field-name="partyIdTo" operator="equals"
from-field="parameters.partyIdTo"/>
- <condition-expr field-name="fromDate" operator="equals"
from-field="parameters.fromDate"/>
+ <condition-expr field-name="emplFromDate"
operator="equals" from-field="emplFromDate"/>
</condition-list>
+ <order-by field-name="fromDate"/>
</entity-condition>
</actions>
- <auto-fields-service service-name="updatePayHistory"/>
- <field name="roleTypeIdFrom"><hidden/></field>
- <field name="roleTypeIdTo"><hidden/></field>
- <field name="partyIdFrom"><hidden/></field>
- <field name="partyIdTo"><hidden/></field>
- <field name="fromDate"><display/></field>
- <field name="amount"><hidden/></field>
- <field name="comments"><hidden/></field>
- <field name="salaryStepSeqId"
title="${uiLabelMap.HumanResSalaryStepSeqId}"><lookup
target-form-name="LookupSalaryStep" size="20"/></field>
- <field name="payGradeId"
title="${uiLabelMap.HumanResPayGradeID}"><lookup
target-form-name="LookupPayGrade" size="20"/></field>
- <field name="periodTypeId"
title="${uiLabelMap.FormFieldTitle_periodTypeId}">
- <drop-down allow-empty="false">
- <entity-options key-field-name="periodTypeId"
entity-name="PeriodType">
- <entity-order-by field-name="description"/>
- </entity-options>
- </drop-down>
+ <field name="editLink" title=" " widget-style="buttontext"
use-when="${groovy:thruDate == null}">
+ <hyperlink description="${uiLabelMap.CommonEdit}"
target="EditPayHistory">
+ <parameter param-name="roleTypeIdFrom"/>
+ <parameter param-name="roleTypeIdTo"/>
+ <parameter param-name="partyIdFrom"/>
+ <parameter param-name="partyIdTo"/>
+ <parameter param-name="emplFromDate"/>
+ <parameter param-name="fromDate"/>
+ </hyperlink>
</field>
- <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit
button-type="button"/></field>
- <field name="deleteLink" title=" " widget-style="buttontext">
+ <field name="fromDate" ><display/></field>
+ <field name="thruDate"><display/></field>
+ <field name="amount"><display/></field>
+ <field name="periodTypeId"
title="${uiLabelMap.FormFieldTitle_periodTypeId}"><display-entity
entity-name="PeriodType"/></field>
+ <field name="payGradeId"
title="${uiLabelMap.HumanResPayGradeID}"><display/></field>
+ <field name="salaryStepSeqId"
title="${uiLabelMap.HumanResSalaryStepSeqId}"><display/></field>
+ <field name="salaryStepSeqId"
title="${uiLabelMap.HumanResSalaryStepSeqId}"><display/></field>
+ <field name="comments"><display/></field>
+ <field name="deleteLink" title=" " widget-style="buttontext"
use-when="${groovy:thruDate == null}">
<hyperlink description="${uiLabelMap.CommonDelete}"
target="deletePayHistory">
<parameter param-name="roleTypeIdFrom"/>
<parameter param-name="roleTypeIdTo"/>
<parameter param-name="partyIdFrom"/>
<parameter param-name="partyIdTo"/>
+ <parameter param-name="emplFromDate"/>
<parameter param-name="fromDate"/>
</hyperlink>
</field>
</form>
+ <form name="EditPayHistory" type="single" target="updatePayHistory"
default-entity-name="PayHistory" default-map-name="payHistory">
+ <field name="roleTypeIdFrom" ><hidden/></field>
+ <field name="roleTypeIdTo" ><hidden/></field>
+ <field name="partyIdFrom" ><hidden/></field>
+ <field name="partyIdTo" ><hidden/></field>
+ <field name="emplFromDate" ><hidden/></field>
+ <field name="fromDate"><hidden/></field>
+ <field name="changeDate"><date-time/></field>
+ <field name="amount"><text/></field>
+ <field name="periodTypeId"
title="${uiLabelMap.FormFieldTitle_periodTypeId}" position="2">
+ <drop-down allow-empty="false">
+ <entity-options key-field-name="periodTypeId"
entity-name="PeriodType">
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="comments"><text size="75"/></field>
+ <field name="payGradeId"
title="${uiLabelMap.HumanResPayGradeID}"><lookup
target-form-name="LookupPayGrade" size="20" /></field>
+ <field name="salaryStepSeqId"
title="${uiLabelMap.HumanResSalaryStepSeqId}" position="2"><lookup
target-form-name="LookupSalaryStep" target-parameter="payGradeId"
size="20"/></field>
+ <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit
button-type="button"/></field>
+ </form>
<form name="ListPartyBenefits" type="multi"
target="updatePartyBenefit?benefitTypeId=${benefitTypeId}&roleTypeIdFrom=${roleTypeIdFrom}&roleTypeIdTo=${roleTypeIdTo}&partyIdFrom=${partyIdFrom}&partyIdTo=${partyIdTo}&fromDate=${fromDate}"
title="" paginate-target="findPartyBenefits"
odd-row-style="alternate-row" header-row-style="header-row-2"
default-table-style="basic-table hover-bar">
<actions>