DBA Data[Home] [Help]

VIEW: APPS.AST_CUST_PROFILE_CREDIT_V

Source

View Text - Preformatted

SELECT cust_profile.rowid ,cust_account_profile_id ,cust_profile.cust_account_id ,risk_code ,profile_class_id ,credit_rating ,cust_profile.status ,restriction_limit_amount ,tolerance ,clearing_days ,standard_terms ,std_terms.name ,lk1.meaning ,lk2.meaning ,lk3.meaning ,lk4.meaning ,next_credit_review_date ,interest_period_days ,payment_grace_days ,discount_grace_days ,cust_profile.collector_id ,c.name ,credit_analyst_id ,cust_acct.write_off_payment_amount ,cust_acct.write_off_amount ,cust_acct.payment_term_id ,pay_terms.name ,cust_acct.deposit_refund_method ,cust_acct.credit_classification_code ,cust_acct.last_update_date ,cust_profile.last_update_date ,cust_profile.last_updated_by ,cust_profile.creation_date ,cust_profile.created_by ,cust_profile.last_update_login ,cust_profile.site_use_id ,cust_profile.attribute_category ,cust_profile.attribute1 ,cust_profile.attribute2 ,cust_profile.attribute3 ,cust_profile.attribute4 ,cust_profile.attribute5 ,cust_profile.attribute6 ,cust_profile.attribute7 ,cust_profile.attribute8 ,cust_profile.attribute9 ,cust_profile.attribute10 ,cust_profile.attribute11 ,cust_profile.attribute12 ,cust_profile.attribute13 ,cust_profile.attribute14 ,cust_profile.attribute15 FROM HZ_CUSTOMER_PROFILES cust_profile ,HZ_CUST_ACCOUNTS cust_acct ,ra_terms std_terms ,ar_collectors c ,ra_terms_vl pay_terms ,fnd_lookups lk1 ,fnd_lookups lk2 ,fnd_lookups lk3 ,fnd_lookups lk4 WHERE cust_profile.cust_account_id = cust_acct.cust_account_id AND cust_profile.standard_terms = std_terms.term_id(+) AND trunc(sysdate) between nvl(std_terms.start_date_active,sysdate-1) and nvl(std_terms.end_date_active,trunc(sysdate)) AND cust_profile.collector_id = c.collector_id AND c.status = 'A' AND cust_acct.payment_term_id = pay_terms.term_id(+) AND cust_profile.override_terms = lk1.lookup_code(+) AND lk1.lookup_type(+) = 'YES_NO' AND cust_profile.discount_terms = lk2.lookup_code(+) AND lk2.lookup_type(+) = 'YES_NO' AND cust_profile.interest_charges = lk3.lookup_code(+) AND lk3.lookup_type(+)= 'YES_NO' AND cust_profile.credit_checking = lk4.lookup_code(+) AND lk4.lookup_type(+) = 'YES_NO'
View Text - HTML Formatted

SELECT CUST_PROFILE.ROWID
, CUST_ACCOUNT_PROFILE_ID
, CUST_PROFILE.CUST_ACCOUNT_ID
, RISK_CODE
, PROFILE_CLASS_ID
, CREDIT_RATING
, CUST_PROFILE.STATUS
, RESTRICTION_LIMIT_AMOUNT
, TOLERANCE
, CLEARING_DAYS
, STANDARD_TERMS
, STD_TERMS.NAME
, LK1.MEANING
, LK2.MEANING
, LK3.MEANING
, LK4.MEANING
, NEXT_CREDIT_REVIEW_DATE
, INTEREST_PERIOD_DAYS
, PAYMENT_GRACE_DAYS
, DISCOUNT_GRACE_DAYS
, CUST_PROFILE.COLLECTOR_ID
, C.NAME
, CREDIT_ANALYST_ID
, CUST_ACCT.WRITE_OFF_PAYMENT_AMOUNT
, CUST_ACCT.WRITE_OFF_AMOUNT
, CUST_ACCT.PAYMENT_TERM_ID
, PAY_TERMS.NAME
, CUST_ACCT.DEPOSIT_REFUND_METHOD
, CUST_ACCT.CREDIT_CLASSIFICATION_CODE
, CUST_ACCT.LAST_UPDATE_DATE
, CUST_PROFILE.LAST_UPDATE_DATE
, CUST_PROFILE.LAST_UPDATED_BY
, CUST_PROFILE.CREATION_DATE
, CUST_PROFILE.CREATED_BY
, CUST_PROFILE.LAST_UPDATE_LOGIN
, CUST_PROFILE.SITE_USE_ID
, CUST_PROFILE.ATTRIBUTE_CATEGORY
, CUST_PROFILE.ATTRIBUTE1
, CUST_PROFILE.ATTRIBUTE2
, CUST_PROFILE.ATTRIBUTE3
, CUST_PROFILE.ATTRIBUTE4
, CUST_PROFILE.ATTRIBUTE5
, CUST_PROFILE.ATTRIBUTE6
, CUST_PROFILE.ATTRIBUTE7
, CUST_PROFILE.ATTRIBUTE8
, CUST_PROFILE.ATTRIBUTE9
, CUST_PROFILE.ATTRIBUTE10
, CUST_PROFILE.ATTRIBUTE11
, CUST_PROFILE.ATTRIBUTE12
, CUST_PROFILE.ATTRIBUTE13
, CUST_PROFILE.ATTRIBUTE14
, CUST_PROFILE.ATTRIBUTE15
FROM HZ_CUSTOMER_PROFILES CUST_PROFILE
, HZ_CUST_ACCOUNTS CUST_ACCT
, RA_TERMS STD_TERMS
, AR_COLLECTORS C
, RA_TERMS_VL PAY_TERMS
, FND_LOOKUPS LK1
, FND_LOOKUPS LK2
, FND_LOOKUPS LK3
, FND_LOOKUPS LK4
WHERE CUST_PROFILE.CUST_ACCOUNT_ID = CUST_ACCT.CUST_ACCOUNT_ID
AND CUST_PROFILE.STANDARD_TERMS = STD_TERMS.TERM_ID(+)
AND TRUNC(SYSDATE) BETWEEN NVL(STD_TERMS.START_DATE_ACTIVE
, SYSDATE-1)
AND NVL(STD_TERMS.END_DATE_ACTIVE
, TRUNC(SYSDATE))
AND CUST_PROFILE.COLLECTOR_ID = C.COLLECTOR_ID
AND C.STATUS = 'A'
AND CUST_ACCT.PAYMENT_TERM_ID = PAY_TERMS.TERM_ID(+)
AND CUST_PROFILE.OVERRIDE_TERMS = LK1.LOOKUP_CODE(+)
AND LK1.LOOKUP_TYPE(+) = 'YES_NO'
AND CUST_PROFILE.DISCOUNT_TERMS = LK2.LOOKUP_CODE(+)
AND LK2.LOOKUP_TYPE(+) = 'YES_NO'
AND CUST_PROFILE.INTEREST_CHARGES = LK3.LOOKUP_CODE(+)
AND LK3.LOOKUP_TYPE(+)= 'YES_NO'
AND CUST_PROFILE.CREDIT_CHECKING = LK4.LOOKUP_CODE(+)
AND LK4.LOOKUP_TYPE(+) = 'YES_NO'