[Home] [Help]
1450: AND posting_status = 'UNPOSTED'
1451: AND srp_payee_assign_id IS NULL
1452: -- posting_status not set to posted yet
1453: AND NOT EXISTS (SELECT NULL
1454: FROM cn_payment_transactions_all pmt
1455: WHERE pmt.credited_salesrep_id = ccl.credited_salesrep_id
1456: AND pmt.commission_line_id = ccl.commission_line_id
1457: AND pmt.credit_type_id = ccl.credit_type_id
1458: AND pmt.incentive_type_code IN ('COMMISSION', 'BONUS')
2635: AND srp.org_id = s.org_id
2636: AND srp.org_id = r.org_id
2637: AND srp.org_id = wksht_rec.org_id
2638: AND NOT EXISTS (SELECT 'X'
2639: FROM cn_payment_transactions_all cnpt
2640: WHERE cnpt.payrun_id = wksht_rec.payrun_id
2641: AND cnpt.credited_salesrep_id = wksht_rec.salesrep_id
2642: AND cnpt.quota_id = q.quota_id
2643: AND cnpt.incentive_type_code IN ('COMMISSION', 'BONUS')