OKL Purchase Option

Description
Categories: BI Publisher
Columns: Id, Contract Number, Org Id, Contract Status, Contract Effective From, Contract Effective To, Cust Acct Id, Contract Term, Purchase Option, Purchase Option Type ...
Application: Lease and Finance Management
Source:
Short Name: OKLPURCHSOPT
DB package:
  SELECT CHR.ID,
       CHR.CONTRACT_NUMBER,
       CHR.ORG_ID,
       CHR.STS_CODE CONTRACT_STATUS,
       CHR.START_DATE CONTRACT_EFFECTIVE_FROM,
       CHR.END_DATE CONTRACT_EFFECTIVE_TO,
       CHR.CUST_ACCT_ID CUST_ACCT_ID,
       ROUND(MONTHS_BETWEEN(CHR.END_DATE,CHR.START_DATE)) CONTRACT_TERM,
       POL.MEANING PURCHASE_OPTION,
       EOT.MEANING PURCHASE_OPTION_TYPE,
       RUL.RULE_INFORMATION2 PURCHASE_AMOUNT,
       RUL.RULE_INFORMATION3 PURCHASE_OPTION_FORMULA,
       PRO.MEANING PURCHASE_OPTION_PRORATE,
       PMX.MEANING PURCHASE_OPTION_MAX_OPTION,
       RUL.RULE_INFORMATION6 PURCHASE_OPTION_MAX_AMOUNT,
       RUL.RULE_INFORMATION7 PURCHASE_OPTION_MAX_FORMULA,
       PMN.MEANING PURCHASE_OPTION_MIN_OPTION,
       RUL.RULE_INFORMATION9 PURCHASE_OPTION_MIN_AMOUNT,
       RUL.RULE_INFORMATION10 PURCHASE_OPTION_MIN_FORMULA
FROM OKC_K_HEADERS_B CHR,
     OKC_RULE_GROUPS_B RGP,
     OKC_RULES_B RUL,
     FND_LOOKUPS POL,
     FND_LOOKUPS EOT,
     FND_LOOKUPS PRO,
     FND_LOOKUPS PMX,
     FND_LOOKUPS PMN
WHERE CHR.ID = :P_CONTRACT_ID
AND CHR.ID = RGP.DNZ_CHR_ID
AND RGP.RGD_CODE = 'AMTEOC'
AND RUL.RGP_ID = RGP.ID
AND RUL.RULE_INFORMATION_CATEGORY = 'AMBPOC'
AND RUL.RULE_INFORMATION1 = POL.LOOKUP_CODE
AND POL.LOOKUP_TYPE = 'OKL_QUOTE_RULE_OPTION_TYPE'
AND RUL.RULE_INFORMATION11 = EOT.LOOKUP_CODE
AND EOT.LOOKUP_TYPE = 'OKL_EOT_OPTION'
AND RUL.RULE_INFORMATION4 = PRO.LOOKUP_CODE
AND PRO.LOOKUP_TYPE = 'OKL_QUOTE_PRORATE_OPTION_TYPE'
AND RUL.RULE_INFORMATION5 = PMX.LOOKUP_CODE
AND PMX.LOOKUP_TYPE = 'OKL_QUOTE_RULE_OPTION_TYPE'
AND RUL.RULE_INFORMATION8 = PMN.LOOKUP_CODE
AND PMN.LOOKUP_TYPE = 'OKL_QUOTE_RULE_OPTION_TYPE'