Friday, 24 January 2014

AR TABLES AND LINKS

NALAM1

KOE MONTLY

KOE 30 MONTLY

KOE PROFILE

12138

KOE123

COLLECTOS
===========
select * from ar_collectors where name='nalam1'

STATEMENT CYCLES
====================

SELECT * FROM AR_STATEMENT_CYCLES WHERE NAME='KOE MONTLY'

PAYMENT TERMS
====================

SELECT * FROM RA_TERMS_TL WHERE NAME='KOE 30 MONTLY'

CUSTOMER PROFILES
===================

SELECT * FROM HZ_CUST_PROFILE_CLASSES WHERE NAME='KOE PROFILE'

CUSTOMERS
============
SELECT * FROM HZ_PARTIES WHERE PARTY_NAME='KIRLOSKAR PUNE'

SELECT * FROM HZ_PARTY_SITES WHERE PARTY_ID= 405839

SELECT * FROM HZ_LOCATIONS WHERE LOCATION_ID= 26584

SELECT * FROM HZ_CUST_ACCOUNTS_ALL WHERE PARTY_ID=405839

SELECT * FROM HZ_CUST_ACCT_SITES_ALL WHERE CUST_ACCOUNT_ID=120764

SELECT * FROM HZ_CUST_SITE_USES_ALL WHERE CUST_ACCT_SITE_ID=11403

SELECT * FROM HZ_CONTACT_POINTS WHERE OWNER_TABLE_ID=224741

SELECT * FROM HZ_CUSTOMER_PROFILES WHERE CUST_ACCOUNT_ID=120764


AR TRANSACTIONS
=================

SELECT * FROM RA_CUSTOMER_TRX_ALL WHERE TRX_NUMBER='12138'

SELECT * FROM RA_CUSTOMER_TRX_LINES_ALL WHERE CUSTOMER_TRX_ID=757231

SELECT * FROM RA_CUST_TRX_LINE_GL_DIST_ALL WHERE CUSTOMER_TRX_ID=757231

SELECT * FROM RA_CUST_TRX_LINE_SALESREPS_ALL WHERE CUSTOMER_TRX_ID=757231

SELECT * FROM AR_PAYMENT_SCHEDULES_ALL WHERE CUSTOMER_TRX_ID=757231

RECEIPT
========

SELECT * FROM AR_CASH_RECEIPTS_ALL WHERE RECEIPT_NUMBER='KOE123'

SELECT * FROM AR_CASH_RECEIPT_HISTORY_ALL WHERE CASH_RECEIPT_ID=110043

SELECT * FROM AR_RECEIVABLE_APPLICATIONS_ALL WHERE CASH_RECEIPT_ID=110043

SELECT HP.PARTY_NAME CUSTOMER_NAME
  FROM HZ_PARTIES HP,
       HZ_CUST_ACCOUNTS_ALL HCAA,
       RA_CUSTOMER_TRX_ALL RCTA
 WHERE HP.PARTY_ID = HCAA.PARTY_ID
   AND HCAA.CUST_ACCOUNT_ID = RCTA.BILL_TO_CUSTOMER_ID
   AND RCTA.TRX_NUMBER = '12415'
  
=========================================

SELECT HCAA.ACCOUNT_NUMBER
  FROM HZ_PARTIES HP,
       HZ_CUST_ACCOUNTS_ALL HCAA
 WHERE HP.PARTY_ID = HCAA.PARTY_ID
   AND HP.PARTY_NAME = 'ASIAN PAINTS'  
  
  
=====================================
  
SELECT ACRA.RECEIPT_NUMBER
  FROM RA_CUSTOMER_TRX_ALL RCTA,
       AR_CASH_RECEIPTS_ALL ACRA,
       AR_RECEIVABLE_APPLICATIONS_ALL ARAA
 WHERE RCTA.CUSTOMER_TRX_ID = ARAA.APPLIED_CUSTOMER_TRX_ID
   AND ARAA.CASH_RECEIPT_ID = ACRA.CASH_RECEIPT_ID
   AND RCTA.TRX_NUMBER = '12415'
  
================================================

SELECT RCTTA.NAME
  FROM RA_CUSTOMER_TRX_ALL RCTA,
       RA_CUST_TRX_TYPES_ALL RCTTA
 WHERE RCTA.CUST_TRX_TYPE_ID = RCTTA.CUST_TRX_TYPE_ID
   AND RCTA.ORG_ID = RCTTA.ORG_ID
   AND RCTA.TRX_NUMBER = '12415'  
  
==================================================

SELECT HP.PARTY_NAME,
       HCAA.ACCOUNT_NUMBER,
       HCSUA.LOCATION,
       HL.ADDRESS1,
       HL.ADDRESS2,
       HL.ADDRESS3,
       HL.ADDRESS4,
       HL.CITY,
       HL.STATE,
       HL.COUNTRY,
       HL.POSTAL_CODE
  FROM RA_CUSTOMER_TRX_ALL RCTA,
       HZ_CUST_ACCOUNTS_ALL HCAA,
       HZ_CUST_ACCT_SITES_ALL HCASA,
       HZ_CUST_SITE_USES_ALL HCSUA,
       HZ_PARTIES HP,
       HZ_PARTY_SITES HPS,
       HZ_LOCATIONS HL
 WHERE RCTA.BILL_TO_CUSTOMER_ID = HCAA.CUST_ACCOUNT_ID
   AND HCAA.PARTY_ID = HP.PARTY_ID
   AND HCAA.CUST_ACCOUNT_ID = HCASA.CUST_ACCOUNT_ID
   AND HCASA.CUST_ACCT_SITE_ID = HCSUA.CUST_ACCT_SITE_ID
   AND HCSUA.SITE_USE_ID = RCTA.BILL_TO_SITE_USE_ID
   AND HP.PARTY_ID = HPS.PARTY_ID
   AND HPS.LOCATION_ID = HL.LOCATION_ID
   AND HPS.PARTY_SITE_ID = HCASA.PARTY_SITE_ID
   AND HCSUA.SITE_USE_CODE = 'BILL_TO'
   AND RCTA.TRX_NUMBER = '12415'

No comments:

Post a Comment