scdreferece

def paymentcycle = PaymentCycle_c def payperiod = PayPeriodID_c def paydate = PayDate_c def Badgeid = BadgeIDWorkerNumber_c def BB,EPA,CED,Currency,PTDEarnings def gettype def SCDReference if(IncentiveType_c == 'BONUS') { gettype = 'COMMISSION' } else if (IncentiveType_c == 'COMMISSION') { gettype = 'BONUS' } //if(IncentiveType_c !=null && PaymentCycle_c && PayPeriodID_c && PayDate_c && BadgeIDWorkerNumber_c ) if(IncentiveType_c !=null && PayPeriodID_c && PayDate_c && BadgeIDWorkerNumber_c ) { def vo = newView('MTQ_ICM_PPH_OBJ_c'); //vo.appendViewCriteria(" IncentiveType_c='${gettype}' and PaymentCycle_c='${PaymentCycle_c}' and PayPeriodID_c='${PayPeriodID_c}' and PayDate_c='${PayDate_c}' and BadgeIDWorkerNumber_c='${BadgeIDWorkerNumber_c}'") vo.appendViewCriteria(" IncentiveType_c='${gettype}' and PayPeriodID_c='${PayPeriodID_c}' and PayDate_c='${PayDate_c}' and BadgeIDWorkerNumber_c='${BadgeIDWorkerNumber_c}'") vo.executeQuery() def i = 1 while(vo.hasNext()) { def vo1 = vo.next() BB = vo1.BeginningBalance_c EPA = vo1.ExpectedPaymentAmount_c CED = vo1.CED_c MPAStatus = vo1.MPAStatus_c PTDEarnings = vo1.PTDEarnings_c Currency = vo1.CurrencyCode SCDReference = "\n". concat(SCDReference ?: "").concat("BB= ").concat(BB.toString()).concat(", PTDEarnings= ").concat(PTDEarnings.toString()).concat(", EPA= ").concat(EPA.toString()).concat(", CED= ").concat(CED.toString()).concat(", Currency= ").concat(Currency).concat(", MPAStatus= ").concat(MPAStatus.toString()).concat("\n") i++ }} return SCDReference;

Comments

Popular posts from this blog

Section 15-Done

Section 16-Done

Section 13-Done