DBA Data[Home] [Help]

APPS.IEX_COLL_IND dependencies on HZ_CUST_ACCOUNTS

Line 42: FROM ar_payment_schedules ps, hz_cust_accounts ca

38: --Start of comment for Bug 8201317 14-Jun-2010 barathsr
39: /* SELECT sum(TRUNC(sysdate) - ps.due_date)
40: / COUNT(1)
41: INTO l_avg_days_late
42: FROM ar_payment_schedules ps, hz_cust_accounts ca
43: WHERE ps.gl_date between TRUNC(add_months(sysdate, -12)) and TRUNC(sysdate)
44: AND ps.class in ('INV','DEP','DM','CB')
45: AND ps.gl_date_closed > TRUNC(sysdate)
46: -- Begin fix bug #4949609-JYPARK-2/15/2006-add condition for performance

Line 186: FROM ar_payment_schedules ps, hz_cust_accounts ca

182: GET_ADJ_TOTAL(ps.payment_schedule_id, TRUNC(sysdate)) +
183: nvl(ps.acctd_amount_due_remaining, 0)
184: )
185: INTO l_wtd_days_late
186: FROM ar_payment_schedules ps, hz_cust_accounts ca
187: WHERE ps.gl_date between TRUNC(add_months(sysdate, -12)) and TRUNC(sysdate)
188: AND ps.class in ('INV','DEP','DM','CB')
189: -- Begin fix bug #4917851-jypark-11/47/2005-remove invalid condition
190: --AND ps.gl_date_closed > TRUNC(sysdate)

Line 384: hz_cust_accounts ca

380: , 0) WEIGHTED_AVG_DAYS_PAID
381: INTO l_wtd_days_paid
382: FROM ar_receivable_applications ra,
383: ar_payment_schedules ps,
384: hz_cust_accounts ca
385: WHERE ps.customer_id = ca.cust_account_id
386: AND ca.party_id = p_party_id
387: AND ra.status = 'APP'
388: AND ps.payment_schedule_id = ra.applied_payment_schedule_id

Line 504: FROM ar_payment_schedules ps, hz_cust_accounts ca

500: GET_ADJ_TOTAL(ps.payment_schedule_id, TRUNC(sysdate)) +
501: nvl(ps.acctd_amount_due_remaining, 0)
502: )
503: INTO l_wtd_days_terms
504: FROM ar_payment_schedules ps, hz_cust_accounts ca
505: WHERE ps.gl_date between TRUNC(add_months(sysdate, -12)) and TRUNC(sysdate)
506: AND ps.class in ('INV','DEP','DM','CB')
507: -- Begin fix bug #4917851-jypark-11/47/2005-remove invalid condition
508: -- AND ps.gl_date_closed > TRUNC(sysdate)

Line 714: hz_cust_accounts cust_acct,

710: )
711: ), 0) /* DSO */
712: INTO l_conv_dso
713: FROM ar_system_parameters sp,
714: hz_cust_accounts cust_acct,
715: ar_payment_schedules ps
716: WHERE ps.customer_id = cust_acct.cust_account_id
717: AND cust_acct.party_id = p_party_id
718: -- Begin fix bug #5261855-jypark-06/16/2006-add addtional condition for performance

Line 836: hz_cust_accounts ca

832: SELECT COUNT(cr.cash_receipt_id) NSF_STOP_PAYMENT_COUNT
833: INTO l_nsf_stop_payment_count
834: FROM ar_cash_receipts cr,
835: ar_cash_receipt_history crh,
836: hz_cust_accounts ca
837: WHERE cr.cash_receipt_id = crh.cash_receipt_id
838: AND crh.current_record_flag = 'Y'
839: AND crh.status = 'REVERSED'
840: -- BEGIN fix bug #4483830--20050714-jypark-change query for NSF info

Line 913: hz_cust_accounts ca

909: SELECT SUM(cr.amount) NSF_STOP_PAYMENT_AMOUNT
910: INTO l_nsf_stop_payment_amount
911: FROM ar_cash_receipts_all cr,
912: ar_cash_receipt_history_all crh,
913: hz_cust_accounts ca
914: WHERE cr.cash_receipt_id = crh.cash_receipt_id
915: AND crh.current_record_flag = 'Y'
916: AND crh.status = 'REVERSED'
917: -- BEGIN fix bug #4483830--20050714-jypark-change query for NSF info

Line 1012: FROM ar_payment_schedules ps, ar_adjustments adj, hz_cust_accounts ca

1008: IF p_party_id IS NOT NULL THEN
1009: SELECT
1010: sum( nvl(adj.acctd_amount,0))
1011: INTO l_adj
1012: FROM ar_payment_schedules ps, ar_adjustments adj, hz_cust_accounts ca
1013: WHERE ps.class in ('INV', 'DM', 'CB', 'DEP' )
1014: AND ps.payment_schedule_id <> -1
1015: AND ps.gl_date BETWEEN TRUNC(add_months(sysdate, -12)) AND TRUNC(sysdate)
1016: AND ps.customer_id = ca.cust_account_id

Line 1120: hz_cust_accounts ca

1116: g_curr_rec.base_min_acc_unit) +
1117: GET_ADJ_FOR_TOT_REC(ps.payment_schedule_id,p_end_date))
1118: INTO l_tot_rec
1119: FROM ar_payment_schedules ps,
1120: hz_cust_accounts ca
1121: WHERE ps.class in ('INV', 'DM', 'CB', 'DEP' )
1122: AND ps.payment_schedule_id <> -1
1123: AND ps.gl_date BETWEEN l_temp_start AND p_end_date
1124: AND ps.customer_id = ca.cust_account_id

Line 1217: hz_cust_accounts ca

1213: GET_ADJ_TOTAL(ps.payment_schedule_id,p_end_date) +
1214: nvl(ps.acctd_amount_due_remaining,0))
1215: INTO l_rem_sales
1216: FROM ar_payment_schedules ps,
1217: hz_cust_accounts ca
1218: WHERE ps.gl_date between p_start_date and p_end_date
1219: AND ps.class in ('INV','DEP','DM','CB')
1220: AND ps.gl_date_closed > p_end_date
1221: AND ps.customer_id = ca.cust_account_id

Line 1314: hz_cust_accounts ca

1310:
1311: SELECT sum(nvl(ps.acctd_amount_due_remaining,0))
1312: INTO l_curr_rec
1313: FROM ar_payment_schedules ps,
1314: hz_cust_accounts ca
1315: WHERE ps.gl_date between p_start_date and p_end_date
1316: AND ps.class in ('INV','DEP','DM','CB')
1317: AND ps.gl_date_closed > p_end_date
1318: AND ps.status = 'OP'

Line 1558: hz_cust_accounts ca

1554: sysdate, l_conversion_type , trx_summ.op_bal_high_watermark))
1555: INTO l_high_credit_ytd
1556: FROM ar_trx_summary trx_summ,ar_system_parameters asp,--Added for Bug 9404646 09-Mar-2010 barathsr
1557: -- ar_cmgt_setup_options cm_opt,
1558: hz_cust_accounts ca
1559: WHERE trx_summ.org_id=asp.org_id--Added for Bug 9404646 09-Mar-2010 barathsr
1560: AND trx_summ.cust_account_id = ca.cust_account_id
1561: AND ca.party_id = p_party_id;
1562: ELSIF p_cust_account_id IS NOT NULL THEN

Line 1615: hz_cust_accounts d

1611: INTO l_amount_due_org
1612: from gl_sets_of_books a,
1613: ar_system_parameters b,
1614: ar_trx_summary c,
1615: hz_cust_accounts d
1616: where a.set_of_books_id = b.set_of_books_id
1617: and b.org_id = c.org_id
1618: AND c.cust_account_id = d.cust_account_id
1619: AND d.party_id = p_party_id

Line 1682: hz_cust_accounts d

1678: INTO l_adj_total
1679: from gl_sets_of_books a,
1680: ar_system_parameters b,
1681: ar_trx_summary c,
1682: hz_cust_accounts d
1683: where a.set_of_books_id = b.set_of_books_id
1684: and b.org_id = c.org_id
1685: AND c.cust_account_id = d.cust_account_id
1686: AND d.party_id = p_party_id

Line 1748: hz_cust_accounts d

1744: INTO l_amount_due_rem
1745: from gl_sets_of_books a,
1746: ar_system_parameters b,
1747: ar_trx_summary c,
1748: hz_cust_accounts d
1749: where a.set_of_books_id = b.set_of_books_id
1750: and b.org_id = c.org_id
1751: AND c.cust_account_id = d.cust_account_id
1752: AND d.party_id = p_party_id

Line 1834: from ar_trx_bal_summary c, ar_system_parameters b, gl_sets_of_books a, hz_cust_accounts d

1830: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.op_bills_receivables_value),0)+
1831: nvl(gl_currency_api.convert_amount(c.currency,a.currency_code,sysdate,
1832: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.op_credit_memos_value),0)))
1833: INTO l_tot_rec
1834: from ar_trx_bal_summary c, ar_system_parameters b, gl_sets_of_books a, hz_cust_accounts d
1835: where b.set_of_books_id = a.set_of_books_id
1836: AND c.cust_account_id = d.cust_account_id
1837: AND d.party_id = p_party_id
1838: and c.org_id = b.org_id;

Line 1859: FROM gl_sets_of_books a, ar_trx_summary c, ar_system_parameters b, hz_cust_accounts d

1855: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.total_cash_receipts_value),0)-
1856: NVL(gl_currency_api.convert_amount(c.currency,a.currency_code,sysdate,
1857: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.nsf_stop_payment_amount),0))
1858: INTO l_tot_sales_in_year
1859: FROM gl_sets_of_books a, ar_trx_summary c, ar_system_parameters b, hz_cust_accounts d
1860: WHERE c.org_id = b.org_id
1861: AND c.cust_account_id = d.cust_account_id
1862: AND d.party_id = p_party_id
1863: AND b.set_of_books_id = a.set_of_books_id

Line 2001: from ar_payment_schedules_all a, hz_cust_accounts b

1997:
1998: /* Numerator (Sysdate - Invoice date) * Invoice Amount */
1999: cursor c_invoices_party (p_party_id number) is
2000: select (sysdate-gl_date)* amount_due_original amount, to_char(gl_date,'MM') month,payment_schedule_id
2001: from ar_payment_schedules_all a, hz_cust_accounts b
2002: where a.customer_id = b.cust_account_id
2003: AND b.party_id = p_party_id
2004: AND a.CLASS IN ('INV','DEP','DM','CB')
2005: and a.gl_date between trunc(sysdate-365) AND TRUNC(sysdate);

Line 2035: FROM gl_sets_of_books a, ar_trx_summary c, ar_system_parameters b , hz_cust_accounts d

2031: NVL(gl_currency_api.convert_amount(c.currency,a.currency_code,sysdate,
2032: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.total_chargeback_value),0)+
2033: NVL(gl_currency_api.convert_amount(c.currency,a.currency_code,sysdate,
2034: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.total_adjustments_value),0)) amount ,to_char(c.as_of_date,'MM') month
2035: FROM gl_sets_of_books a, ar_trx_summary c, ar_system_parameters b , hz_cust_accounts d
2036: WHERE c.cust_account_id = d.cust_account_id
2037: AND d.party_id = p_party_id
2038: and c.org_id = b.org_id
2039: AND b.set_of_books_id = a.set_of_books_id

Line 2230: from ar_trx_bal_summary c, ar_system_parameters b, gl_sets_of_books a,hz_cust_accounts d

2226: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.op_bills_receivables_value),0)+
2227: nvl(gl_currency_api.convert_amount(c.currency,a.currency_code,sysdate,
2228: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.op_credit_memos_value),0)))
2229: INTO l_op_bal
2230: from ar_trx_bal_summary c, ar_system_parameters b, gl_sets_of_books a,hz_cust_accounts d
2231: where c.cust_account_id = d.cust_account_id
2232: AND d.party_id = p_party_id
2233: AND b.set_of_books_id = a.set_of_books_id
2234: and c.org_id = b.org_id;

Line 2291: FROM gl_sets_of_books a, ar_trx_summary c, ar_system_parameters b, hz_cust_accounts d

2287: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.total_bills_receivables_value),0)+
2288: NVL(gl_currency_api.convert_amount(c.currency,a.currency_code,sysdate,
2289: fnd_profile.value('IEX_EXCHANGE_RATE_TYPE'),c.total_adjustments_value),0))
2290: INTO l_tot_bal
2291: FROM gl_sets_of_books a, ar_trx_summary c, ar_system_parameters b, hz_cust_accounts d
2292: WHERE c.cust_account_id = d.cust_account_id
2293: AND d.party_id = p_party_id
2294: and c.org_id = b.org_id
2295: AND b.set_of_books_id = a.set_of_books_id

Line 2451: hz_cust_accounts d

2447: INTO l_nsf_count
2448: from gl_sets_of_books a,
2449: ar_system_parameters b,
2450: ar_trx_summary c,
2451: hz_cust_accounts d
2452: where a.set_of_books_id = b.set_of_books_id
2453: and b.org_id = c.org_id
2454: AND c.cust_account_id = d.cust_account_id
2455: AND d.party_id = p_party_id

Line 2505: hz_cust_accounts d

2501: INTO l_nsf_amount
2502: from gl_sets_of_books a,
2503: ar_system_parameters b,
2504: ar_trx_summary c,
2505: hz_cust_accounts d
2506: where a.set_of_books_id = b.set_of_books_id
2507: and b.org_id = c.org_id
2508: AND c.cust_account_id = d.cust_account_id
2509: AND d.party_id = p_party_id

Line 2562: hz_cust_accounts d

2558: INTO l_wt_days_paid_late
2559: FROM gl_sets_of_books a,
2560: ar_system_parameters b ,
2561: ar_trx_summary c ,
2562: hz_cust_accounts d
2563: WHERE a.set_of_books_id = b.set_of_books_id
2564: AND b.org_id = c.org_id
2565: AND c.cust_account_id = d.cust_account_id
2566: AND d.party_id = p_party_id

Line 2576: -- , hz_cust_accounts d commented for Bug14167214 by bibeura

2572: INTO l_wt_days_paid_late
2573: FROM gl_sets_of_books a,
2574: ar_system_parameters b ,
2575: ar_trx_summary c
2576: -- , hz_cust_accounts d commented for Bug14167214 by bibeura
2577: WHERE a.set_of_books_id = b.set_of_books_id
2578: AND b.org_id = c.org_id
2579: AND c.cust_account_id = p_cust_account_id
2580: AND as_of_date BETWEEN TRUNC(add_months(sysdate, -12)) AND TRUNC(sysdate);

Line 2589: -- , hz_cust_accounts d commented for Bug14167214 by bibeura

2585: INTO l_wt_days_paid_late
2586: FROM gl_sets_of_books a,
2587: ar_system_parameters b ,
2588: ar_trx_summary c
2589: -- , hz_cust_accounts d commented for Bug14167214 by bibeura
2590: WHERE a.set_of_books_id = b.set_of_books_id
2591: AND b.org_id = c.org_id
2592: AND c.site_use_id = p_customer_site_use_id
2593: AND as_of_date BETWEEN TRUNC(add_months(sysdate, -12)) AND TRUNC(sysdate);