Operation Details
Description: Reads the overpayment case details for the tab details panel.
Sterotype: ns
SQL
SELECT
CaseHeader1.caseID,
CaseHeader1.caseReference,
CaseHeader1.statusCode,
Product.name,
OverpaymentEvidence.relatedCaseID,
RelatedCaseHeader.caseReference,
RelatedProduct.name,
CaseHeader1.concernRoleID,
ConcernRole.concernRoleName,
ConcernRole.primaryAlternateID,
ConcernRole.primaryPhoneNumberID,
EmailAddress.emailAddress,
Address.addressData,
OrgObjectLink.orgObjectLinkID,
OverpaymentEvidence.overpaymentAmount,
OverpaymentEvidence.fromDate,
OverpaymentEvidence.toDate,
Overpaymentevidence.reassessmentDate
INTO
:caseID,
:caseReference,
:caseStatus,
:productName,
:relatedCaseID,
:relatedCaseReference,
:relatedProductName,
:concernRoleID,
:concernRoleName,
:clientPrimaryAlternateID,
:clientPhoneNumberID,
:clientEmailAddress,
:clientAddressData,
:orgObjectLinkID,
:overpaymentAmount,
:fromDate,
:toDate,
:reassessmentDate
FROM
CaseHeader CaseHeader1,
ProductDelivery RelatedProductDelivery,
Product RelatedProduct,
CaseHeader RelatedCaseHeader,
ConcernRole
LEFT OUTER JOIN EmailAddress
  ON ConcernRole.primaryEmailAddressID = EmailAddress.emailAddressID LEFT OUTER JOIN Address
  ON ConcernRole.primaryAddressID = Address.addressID, OrgObjectLink, OverpaymentEvidence, ProductDelivery, Product WHERE OverpaymentEvidence.caseID  = :caseID AND ConcernRole. concernRoleID = CaseHeader1.concernRoleID AND OrgObjectLink.orgObjectLinkID = CaseHeader1.ownerOrgObjectLinkID AND OverpaymentEvidence.caseID = CaseHeader1.caseID AND ProductDelivery.caseID = CaseHeader1.caseID AND Product.productID = ProductDelivery.productID AND CaseHeader1.caseID = OverpaymentEvidence.caseID AND RelatedCaseHeader.caseID = OverpaymentEvidence.relatedCaseID AND RelatedProductDelivery.caseID = RelatedCaseHeader.caseID AND RelatedProduct.productID = RelatedProductDelivery.productID