Operation Details
Description: Searches all Attendance based un-processed Payslips.
Sterotype: nsmulti
SQL
SELECT
  InstructionLineItem.instructLineItemID,
  InstructionLineItem.amount,
  InstructionLineItem.caseID,
  InstructionLineItem.concernRoleID,
  InstructionLineItem.caseNomineeID,
  InstructionLineItem.currencyTypeCode,
  ProductDelivery.productType,
  Payslip.recipientName,
  Payslip.paySlipInstructionID,
  CaseDecisionObjective.relatedReference,
  Roster.rosterID,
  Payslip.payslipID,
  Payslip.addressID,
  Payslip.versionNo
INTO
  :instructLineItemID,
  :amount,
  :caseid,
  :concernRoleID,
  :caseNomineeID,
  :currencyTypeCode,
  :productType,
  :recipientName,
  :payslipInstructionID,
  :relatedReference,
  :rosterID,
  :payslipID,
  :addressID,
  :versionNo 
FROM
  Payslip,
  PayslipComponent,
  InstructionLineItem,
  ProductDelivery,
  CaseDecisionFinancialComp,
  CaseDecisionObjective,
  ProviderRosterLineItem,
  RosterLineItem,
  Roster 
WHERE Payslip.statusCode = :statusCode 
  AND ProductDelivery.productType = :productType 
  AND PayslipComponent.recipientTypeCode = :recipientTypeCode 
  AND CaseDecisionFinancialComp.financialCompID = InstructionLineItem.financialCompID 
  AND CaseDecisionObjective.caseDecisionObjectiveID = CaseDecisionFinancialComp.caseDecisionObjectiveID 
  AND ProductDelivery.caseID = InstructionLineItem.caseID 
  AND CaseDecisionObjective.overflowInd = '0' 
  AND cast(ProviderRosterLineItem.providerRosterLineItemID as char(20)) = cast(CaseDecisionObjective.relatedReference as char(20)) 
  AND Roster.rosterID = RosterLineItem.rosterID 
  AND RosterLineItem.rosterLineItemID = ProviderRosterLineItem.rosterLineItemID 
  AND PayslipComponent.pslipInstructionID = Payslip.paySlipInstructionID 
  AND PayslipComponent.instructLineItemID = InstructionLineItem.instructLineItemID 
ORDER BY InstructionLineItem.concernRoleID,
  caseNomineeID,
  Roster.rosterID,
  RosterLineItem.rosterLineItemID,
  providerRosterLineItemID ASC