Monday, October 23, 2017

Query to get AR Open Receipts in Oracle Apps

SELECT acra.cash_receipt_id,
       acra.receipt_number,
       acra.receipt_date,
       acra.amount,
       (SELECT a.account_number
          FROM hz_cust_accounts_all a, hz_parties b
         WHERE     a.party_id = b.party_id
               AND a.cust_account_id = apsa.customer_id)
          customer_number,
       (SELECT b.party_name
          FROM hz_cust_accounts_all a, hz_parties b
         WHERE     a.party_id = b.party_id
               AND a.cust_account_id = apsa.customer_id)
          customer_name,
       (SELECT location
          FROM hz_cust_site_uses_all
         WHERE site_use_id = acra.customer_site_use_id)
          trx_bill_location,
       acra.status,
       acra.type,
       acra.comments,
       apsa.payment_schedule_id,
       apsa.amount_due_original,
       apsa.amount_due_remaining,
       apsa.class,
       apsa.customer_id,
       apsa.customer_site_use_id,
       apsa.amount_applied,
       apsa.acctd_amount_due_remaining
  FROM ar_cash_receipts_all acra, ar_payment_schedules_all apsa
 WHERE     acra.cash_receipt_id = apsa.cash_receipt_id
       AND apsa.status = 'OP'
       AND apsa.class = 'PMT'
       AND amount_applied = 0
       AND acra.org_id = :p_org_id
       AND acra.status = 'UNAPP'

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)