nside emploeyee consent - is1012 false Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - is1011 false Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - HRStatus_c A Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - IncentiveType_c BONUS Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - CED_c -1500 Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - SalesRP_c Y Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - EmploymentCountry_c GB Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - HRStatus_c A Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - BBActionManual_c MAV_DIR_BB_ACTION_1012 Feb 11, 2026 11:29:53 PM UTC
inside emploeyee consent - value No
def value = dateCheck()
println( 'inside emploeyee consent - value '+value )
println( 'inside emploeyee consent - BBActionManual_c '+BBActionManual_c )
println( 'inside emploeyee consent - HRStatus_c '+HRStatus_c )
println( 'inside emploeyee consent - EmploymentCountry_c '+EmploymentCountry_c )
println( 'inside emploeyee consent - SalesRP_c '+SalesRP_c )
println( 'inside emploeyee consent - CED_c '+CED_c )
println( 'inside emploeyee consent - IncentiveType_c '+IncentiveType_c )
println( 'inside emploeyee consent - HRStatus_c '+HRStatus_c )
if(value == "No") {
// 1. Identify the specific business scenarios
def is1011 = (BBActionManual_c == 'MAV_DIR_BB_ACTION_1011' &&
HRStatus_c == 'A' &&
EmploymentCountry_c != 'RO' &&
SalesRP_c == 'N' &&
CED_c <= 0 &&
(IncentiveType_c == 'COMMISSION' || IncentiveType_c == 'BONUS'))
println( 'inside emploeyee consent - is1011 '+is1011 )
def is1012 = (BBActionManual_c == 'MAV_DIR_BB_ACTION_1012' &&
IncentiveType_c == 'BONUS' &&
HRStatus_c == 'A' &&
SalesRP_c == 'A' &&
CED_c <= 0)
println( 'inside emploeyee consent - is1012 '+is1012 )
// 2. Case: Mandatory Check Required
// If conditions are met, the box MUST be 'Y'
if (is1011 && EmployeeConsent_c != 'Y') {
throw new oracle.jbo.ValidationException("MPA to Payroll Collections requires manual acknowledgement. Please check Employee Consent.")
}
if (is1012 && EmployeeConsent_c != 'Y') {
throw new oracle.jbo.ValidationException("SPIF vs Comm deduction requires manual acknowledgement. Please check Employee Consent.")
}
// 3. Case: Restricted
// If conditions are NOT met, the box MUST NOT be 'Y'
if (!is1011 && !is1012 && EmployeeConsent_c == 'Y') {
throw new oracle.jbo.ValidationException("Employee Consent is not applicable for this record configuration. Please uncheck the box to save.")
}
return true
}
dev7 from eror
select rules.* , -- BBAction_c DECODE(Rule_Number, 1, 'MAV_DIR_BB_ACTION_1000', 2, 'MAV_DIR_BB_ACTION_1003', 3, 'MAV_DIR_BB_ACTION_1001', 4, 'MAV_DIR_BB_ACTION_1003', 5, 'MAV_DIR_BB_ACTION_1003', 6, 'MAV_DIR_BB_ACTION_1003', 7, 'MAV_DIR_BB_ACTION_1003', 8, 'MAV_DIR_BB_ACTION_1003', 9, 'MAV_DIR_BB_ACTION_1003', 10, 'MAV_DIR_BB_ACTION_1003', 99, 'MAV_DIR_BB_ACTION_1002', 11 , 'MAV_DIR_BB_ACTION_1002', -- Pre-approved zero BB for active sale rep NULL ) AS "BBAction_c", -- BBReasonCode_c DECODE(Rule_Number, 1, 'MVA_DIR_BB_REASON_1018', 2, 'MVA_DIR_BB_REASON_1001', 3, 'MVA_DIR_BB_REASON_1018', 4, 'MVA_DIR_BB_REASON_1001', 5, 'MVA_DIR_BB_REASON_1001', 6, 'MVA_DI...
Comments
Post a Comment