Operation Details
Description: Searches all the placement based unprocessed 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,
  Payslip.payslipID,
  Payslip.addressID,
  Payslip.versionNo
INTO
  :instructLineItemID,
  :amount,
  :caseid,
  :concernRoleID,
  :caseNomineeID,
  :currencyTypeCode,
  :productType,
  :recipientName,
  :payslipInstructionID,
  :relatedReference,
  :payslipID,
  :addressID,
  :versionNo 
FROM
  Payslip,
  PayslipComponent,
  InstructionLineItem,
  ProductDelivery,
  CaseDecisionFinancialComp,
  CaseDecisionObjective,
  Placement 
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(Placement.placementID as char(20)) = CaseDecisionObjective.relatedReference 
  AND PayslipComponent.pslipInstructionID = Payslip.paySlipInstructionID 
  AND PayslipComponent.instructLineItemID = InstructionLineItem.instructLineItemID 
ORDER BY concernRoleID,
  caseNomineeID,
  caseParticipantRoleID ASC