Operation Details
Description: Returns a list of caseDeductionItemDtls for active deductions for a particular thirdPartyConcernRoleID for a particular case. An active deduction is any deduction whose endDate is null or whose endDate is sometime in the future (and has a status of active).
Sterotype: nsmulti
SQL
SELECT
  caseDeductionItemID,
  deductionName,
  thirdPartyConcernRoleID,
  concernRoleID,
  customerAccName,
  customerAccNumber,
  priority,
  category,
  businessStatus,
  createdDate,
  startDate,
  endDate,
  statusCode,
  comments,
  relatedCaseID,
  caseID,
  rate,
  amount,
  relatedObjectiveID,
  rulesObjectiveID,
  deductionType,
  actionType,
  caseNomineeID,
  deductionID,
  versionNo
INTO
  :caseDeductionItemID,
  :deductionName,
  :thirdPartyConcernRoleID,
  :concernRoleID,
  :customerAccName,
  :customerAccNumber,
  :priority,
  :category,
  :businessStatus,
  :createdDate,
  :startDate,
  :endDate,
  :statusCode,
  :comments,
  :relatedCaseID,
  :caseID,
  :rate,
  :amount,
  :relatedObjectiveID,
  :rulesObjectiveID,
  :deductionType,
  :actionType,
  :caseNomineeID,
  :deductionID,
  :versionNo
FROM
  CaseDeductionItem 
WHERE caseID = :caseID 
  AND thirdPartyConcernRoleID = :thirdPartyConcernRoleID 
  AND statusCode = :statusCode 
  AND 
  (
    endDate IS NULL 
    OR :currentDate IS NULL 
    OR endDate > :currentDate 
  )