DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_CASH_RULES

Source


1 package body hr_cash_rules as
2 /* $Header: pycshrle.pkb 115.0 99/07/17 05:55:27 porting ship $ */
3 /*
4  * ---------------------------------------------------------------------------
5    Copyright (c) Oracle Corporation (UK) Ltd 1992.
6    All Rights Reserved.
7   --
8   --
9   PRODUCT
10     Oracle*Payroll
11   NAME
12     hr_cash_rules (hrpca.pkb)
13   NOTES
14      Package available to user for implementation of cash analysis rules.
15   USAGE
16     The method of calling a cash rule is dependant upon the coder knowing the
17     name of the cash rule to be implemented.  The rule should then be trapped
18     in an IF statement, and hr_pre_pay.coin_rule called to implement.
19     --
20     For example suppose it was required to pay at least three five dollar
21     bills in a certain pay packet.  This cash organization payment method
22     has been set up with the name 'FIVE DOLLAR RULE'.  It would be implemented
23     here as follows:
24     --
25     if cash_rule = 'FIVE DOLLAR RULE' then
26       --
27       -- Pay three five dollar bills
28       --
29       hr_pre_pay.coin_rule(3,5);
30       --
31     end if;
32     --
33     This is all that is required.  Note that the remainder of the payment will
34     be paid automatically using the default rule (ie pay using the highest
35     denomination bill possible.
36     --
37   MODIFIED
38     --
39     amcinnes    28-JAN-1993  Created
40      WMcVeagh   19-mar-98   Change create or replace 'as' not 'is'
41   --
42 */
43 --
44 --------------------------- user_rule -----------------------------------
45 /*
46 NAME
47   user_rule
48 DESCRIPTION
49   Perform user cash(coinage) analysis.
50 NOTES
51   Uses the input parameter to decide which rule to implement.  Executes
52   the required rules using hr_pre_pay.coin_rule and exits.
53 */
54   procedure user_rule(cash_rule in varchar2) is
55   begin
56     --
57     -- Set up location in case of error
58     --
59     hr_utility.set_location('HR_CASH_RULES.USER_RULE',1);
60     --
61     -- INSERT USER RULES HERE
62     --
63     -- Dummy rule:
64     --
65     if cash_rule = 'MY RULE' then
66       --
67       -- call hr_pre_pay.coin_rule(null,number_of_units, value)
68       --
69       null;
70       --
71     end if;
72     --
73   end;
74   --
75 end hr_cash_rules;