Product: | OKS - Service Contracts |
---|---|
Description: | View of all contracts |
Implementation/DBA Data: |
![]() |
SELECT HDR.AUTHORING_ORG_ID ORG_ID
, HDR.ID CONTRACT_ID
, HDR.CONTRACT_NUMBER CONTRACT_NUMBER
, HDT.SHORT_DESCRIPTION SHORT_DESCRIPTION
, OKS_ENT_UTIL_PVT.GET_CONTRACT_AMOUNT(HDR.ID) CONTRACT_AMOUNT
, HDR.STS_CODE CONTRACT_STATUS_CODE
, HDR.CHR_TYPE CONTRACT_TYPE_CODE
, TO_NUMBER(PTY.OBJECT1_ID1) PARTY_ID
, HDR.TEMPLATE_YN CONTRACT_TEMPLATE_YN
, HDR.TEMPLATE_USED CONTRACT_TEMPLATE_USED
, TO_NUMBER(OKS_ENT_UTIL_PVT.GET_DURATION_PERIOD(HDR.START_DATE
, HDR.END_DATE
, 'D')) DURATION
, SUBSTR(OKS_ENT_UTIL_PVT.GET_DURATION_PERIOD(HDR.START_DATE
, HDR.END_DATE
, 'P')
, 1
, 25) PERIOD_CODE
, HDR.START_DATE START_DATE_ACTIVE
, HDR.END_DATE END_DATE_ACTIVE
, HDR.BILL_TO_SITE_USE_ID BILL_TO_SITE_USE_ID
, HDR.SHIP_TO_SITE_USE_ID SHIP_TO_SITE_USE_ID
, OKS_ENT_UTIL_PVT.GET_AGREEMENT(HDR.ID) AGREEMENT_ID
, HDR.PRICE_LIST_ID PRICE_LIST_ID
, NULL MODIFIER
, HDR.CURRENCY_CODE CURRENCY_CODE
, OKSHDR.ACCT_RULE_ID ACCOUNTING_RULE_ID
, HDR.INV_RULE_ID INVOICING_RULE_ID
, HDR.PAYMENT_TERM_ID TERMS_ID
, HDR.CUST_PO_NUMBER PO_NUMBER
, OKSHDR.BILLING_PROFILE_ID BILLING_PROFILE_ID
, NULL BILLING_FREQUENCY
, NULL BILLING_METHOD
, NULL REGULAR_OFFSET_DAYS
, NULL FIRST_BILL_TO
, NULL FIRST_BILL_ON
, HDR.AUTO_RENEW_DAYS AUTO_RENEW_BEFORE_DAYS
, HDR.QCL_ID QA_CHECK_LIST_ID
, NULL RENEWAL_NOTE
, NULL TERMINATION_NOTE
, OKSHDR.TAX_EXEMPTION_ID TAX_EXEMPTION
, OKSHDR.TAX_STATUS TAX_STATUS
, HDR.CONVERSION_TYPE CONVERSION_TYPE
FROM OKC_K_HEADERS_B HDR
, OKC_K_HEADERS_TL HDT
, OKS_K_HEADERS_B OKSHDR
, OKC_K_PARTY_ROLES_B PTY
WHERE HDR.START_DATE IS NOT NULL
AND HDR.END_DATE IS NOT NULL
AND HDR.ID = HDT.ID
AND HDR.ID = OKSHDR.CHR_ID
AND HDT.LANGUAGE = USERENV('LANG')
AND HDR.TEMPLATE_YN='N'
AND HDR.ID=PTY.CHR_ID
AND PTY.JTOT_OBJECT1_CODE='OKX_PARTY'