|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
<P><FONT face=Arial>下面为公式示例, 大家请注意, 这个公式的主要计算逻辑在第二部分的 PKG中.<BR>/* ------------------------------------------------------------------------<BR> NAME : <BR> This formula calculates the start and end dates for a simple multiplier.<BR> This formula calculates the dates between which an assignment is to accrue.<BR> ---------------------------------------------------------------------*/</FONT></P>
<P>DEFAULT FOR ACP_INELIGIBILITY_PERIOD_TYPE IS 'CM'<BR>DEFAULT FOR ACP_INELIGIBILITY_PERIOD_LENGTH IS 0<BR>DEFAULT FOR ACP_CONTINUOUS_SERVICE_DATE IS '4712/12/31 00:00:00' (date)<BR>DEFAULT FOR ACP_ENROLLMENT_END_DATE IS '4712/12/31 00:00:00' (date)<BR>DEFAULT FOR ACP_TERMINATION_DATE IS '4712/12/31 00:00:00' (date)<BR>DEFAULT FOR ACP_ENROLLMENT_START_DATE IS '4712/12/31 00:00:00' (date)<BR>DEFAULT FOR ACP_SERVICE_START_DATE IS '4712/12/31 00:00:00' (date)</P>
<P>default for Accrual_Start_Date is '4712/12/31 00:00:00' (date)<BR>default for Accrual_Latest_Balance is 0</P>
<P>INPUTS ARE<BR>Calculation_Date (date), /*计算日期*/<BR>Accrual_Start_Date (date),/*PTO的开始生效日期*/<BR>Accrual_Latest_Balance</P>
<P>这部分/*是用来计算员工的服务年限的, 因为一般来说年假都是按照服务年限不同, 值不同,*/<BR>Hire_Date_Anniversary = add_months(ACP_SERVICE_START_DATE,<BR> trunc(months_between(Calculation_Date,<BR> ACP_SERVICE_START_DATE) / 12) * 12)<BR><BR>/*Total_Accrued_PTO,这个是当前计算日期, 该员工享有的年假,CAL_SICK_TOTAL,是我们自己定义的函数*/<BR><BR>Total_Accrued_PTO = CAL_SICK_TOTAL('有薪病假_PTO',ACP_SERVICE_START_DATE,Calculation_Date)<BR>Effective_start_date = Hire_Date_Anniversary<BR>Effective_end_date = ADD_MONTHS(ADD_DAYS(Effective_start_date,-1),12)<BR>Accrual_end_date = Calculation_Date</P>
<P>RETURN Total_Accrued_PTO, Effective_start_date, Effective_end_date, Accrual_end_date</P>
<P>注意 : 必须返回这四个值, 对应 应计额那个form 界面上的日期框, 和本年应有计划. </P>
<P> </P> |
|