DBA Data[Home] [Help]

APPS.ARPT_SQL_FUNC_UTIL dependencies on RA_CUSTOMER_TRX

Line 35: l_inv_trx_number ra_customer_trx.trx_number%type;

31: FUNCTION get_cb_invoice( p_customer_trx_id IN number,
32: p_class IN varchar2)
33: RETURN VARCHAR2 IS
34:
35: l_inv_trx_number ra_customer_trx.trx_number%type;
36:
37: BEGIN
38:
39: IF ( p_class <> 'CB' )

Line 45: FROM ra_customer_trx ct,

41: ELSE
42:
43: SELECT MAX( ct.trx_number )
44: INTO l_inv_trx_number
45: FROM ra_customer_trx ct,
46: ar_adjustments_all aa --anuj
47: WHERE aa.chargeback_customer_trx_id = p_customer_trx_id
48: and ct.org_id = aa.org_id
49: AND aa.customer_trx_id = ct.customer_trx_id;

Line 332: FROM ra_customer_trx

328: Check if it is a credit memo
329:
330: SELECT decode(previous_customer_trx_id,NULL,'N','Y')
331: INTO l_cm_flag
332: FROM ra_customer_trx
333: WHERE customer_trx_id = p_customer_trx_id;
334:
335: IF ( l_cm_flag ='Y')
336: THEN

Line 343: FROM ra_customer_trx trx,

339: SELECT decode( max(d.customer_trx_id),
340: null, 'N',
341: 'Y')
342: INTO l_rule_flag
343: FROM ra_customer_trx trx,
344: ra_cust_trx_line_gl_dist d
345: WHERE trx.customer_trx_id = p_customer_trx_id
346: and trx.previous_customer_trx_id = d.customer_trx_id
347: and d.account_class in ('UNEARN', 'UNBILL')

Line 375: FROM ra_customer_trx_lines

371: INTO l_temp_flag
372: FROM DUAL
373: WHERE EXISTS (
374: SELECT 'Revenue recognition has been run'
375: FROM ra_customer_trx_lines
376: WHERE customer_trx_id = p_customer_trx_id
377: AND autorule_duration_processed <> 0
378: );
379:

Line 690: FROM ra_customer_trx ct,

686: SELECT DECODE(ctt.type,
687: 'GUAR', 'Y',
688: 'N')
689: INTO l_activity_flag
690: FROM ra_customer_trx ct,
691: ra_cust_trx_types ctt
692: WHERE ct.cust_trx_type_id = ctt.cust_trx_type_id
693: AND ct.customer_trx_id = p_initial_customer_trx_id
694: --begin anuj

Line 726: FROM ra_customer_trx ct

722: SELECT DECODE( MAX(ct.customer_trx_id),
723: NULL, 'N',
724: 'Y')
725: INTO l_activity_flag
726: FROM ra_customer_trx ct
727: WHERE ct.initial_customer_trx_id = p_customer_trx_id;
728:
729: IF (l_activity_flag = 'Y')
730: THEN RETURN('Y');

Line 833: ra_customer_trx other_ct

829: 'Y')
830: INTO l_activity_flag
831: FROM ar_payment_schedules this_ps,
832: ar_payment_schedules other_ps,
833: ra_customer_trx other_ct
834: WHERE this_ps.customer_trx_id = p_customer_trx_id
835: AND other_ct.previous_customer_trx_id =
836: p_previous_customer_trx_id
837: AND other_ct.customer_trx_id = other_ps.customer_trx_id

Line 918: FROM ra_customer_trx_lines ctl

914: SELECT DECODE( MAX(customer_trx_line_id),
915: NULL, 'N',
916: 'Y')
917: INTO l_activity_flag
918: FROM ra_customer_trx_lines ctl
919: WHERE br_ref_customer_trx_id = p_customer_trx_id;
920:
921: IF (l_activity_flag = 'Y')
922: THEN RETURN('Y');

Line 960: FROM ra_customer_trx

956: /* bug 2207354 - Check if the transaction has an incomplete
957: credit memo against it */
958: SELECT decode (MAX(previous_customer_trx_id), NULL, 'N', 'Y')
959: INTO l_activity_flag
960: FROM ra_customer_trx
961: WHERE previous_customer_trx_id = p_customer_trx_id;
962:
963: IF (l_activity_flag = 'Y')
964: THEN RETURN('Y');

Line 1032: FROM ra_customer_trx ct,

1028: '14', ct.interface_header_attribute14,
1029: '15', ct.interface_header_attribute15,
1030: NULL )
1031: INTO l_temp
1032: FROM ra_customer_trx ct,
1033: ra_batch_sources bs
1034: WHERE ct.rowid = p_trx_rowid and
1035: bs.batch_source_id = ct.batch_source_id;
1036: END IF;

Line 1097: FROM ra_customer_trx_lines ctl,

1093: '14', ctl.interface_line_attribute14,
1094: '15', ctl.interface_line_attribute15,
1095: NULL )
1096: INTO l_line_temp
1097: FROM ra_customer_trx_lines ctl,
1098: ra_customer_trx ct,
1099: ra_batch_sources bs
1100: WHERE bs.batch_source_id = ct.batch_source_id and
1101: ctl.customer_trx_id = ct.customer_trx_id and

Line 1098: ra_customer_trx ct,

1094: '15', ctl.interface_line_attribute15,
1095: NULL )
1096: INTO l_line_temp
1097: FROM ra_customer_trx_lines ctl,
1098: ra_customer_trx ct,
1099: ra_batch_sources bs
1100: WHERE bs.batch_source_id = ct.batch_source_id and
1101: ctl.customer_trx_id = ct.customer_trx_id and
1102: ctl.rowid = p_line_trx_rowid ;

Line 1261: | This function is used in view ra_customer_trx_partial_v |

1257: | payment schedule record for the first due installment. If there is no |
1258: | payment schedule record, it calculates the first due date by calling |
1259: | the function Get_First_Due_Date in this package. |
1260: | |
1261: | This function is used in view ra_customer_trx_partial_v |
1262: | and was created in response to bug 486822. |
1263: | |
1264: | SCOPE - PUBLIC |
1265: | |

Line 1297: ra_customer_trx ct

1293: SELECT NVL(MIN(ps.due_date),
1294: arpt_sql_func_util.get_first_due_date(p_term_id, nvl(ct.billing_date, p_trx_date)))
1295: INTO l_term_due_date
1296: FROM ar_payment_schedules ps,
1297: ra_customer_trx ct
1298: WHERE ct.customer_trx_id=ps.customer_trx_id(+)
1299: AND ct.customer_trx_id = p_customer_trx_id
1300: group by ct.billing_date;
1301:

Line 1418: | Used by the ra_customer_trx_cr_trx_v view. |

1414: | get_territory |
1415: | |
1416: | DESCRIPTION |
1417: | Gets the territory name based on the incoming address id. |
1418: | Used by the ra_customer_trx_cr_trx_v view. |
1419: | |
1420: | SCOPE - PUBLIC |
1421: | |
1422: | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 1472: | Used by the ra_customer_trx_cm_v view. |

1468: | get_territory_rowid |
1469: | |
1470: | DESCRIPTION |
1471: | Gets the territory row id based on the incoming address id. |
1472: | Used by the ra_customer_trx_cm_v view. |
1473: | |
1474: | SCOPE - PUBLIC |
1475: | |
1476: | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 1595: FROM ra_customer_trx

1591: )
1592: THEN
1593: SELECT MAX(initial_customer_trx_id)
1594: INTO l_ct_prev_initial_cust_trx_id
1595: FROM ra_customer_trx
1596: WHERE customeR_trx_id = p_previous_customer_trx_id;
1597: ELSE
1598: l_ct_prev_initial_cust_trx_id := p_ct_prev_initial_cust_trx_id;
1599: END IF;

Line 1616: ra_customer_trx trx

1612: so_agreements soa,
1613: hz_cust_acct_sites acct_site,
1614: ra_cust_trx_types inv_type,
1615: ra_cust_trx_types type,
1616: ra_customer_trx trx
1617: WHERE trx.cust_trx_type_id = type.cust_trx_type_id
1618: AND trx.bill_to_customer_id = cust_acct.cust_account_id
1619: AND trx.remit_to_address_id = acct_site.cust_acct_site_id(+)
1620: AND 'A' = acct_site.status(+)

Line 1832: l_customer_trx_id ra_customer_trx.customer_trx_id%type;

1828: )
1829: RETURN VARCHAR2 is
1830:
1831: l_bs_name ra_batch_sources.name%type;
1832: l_customer_trx_id ra_customer_trx.customer_trx_id%type;
1833:
1834: BEGIN
1835:
1836: IF ( p_class <> 'CB' ) THEN

Line 1847: from ra_customer_trx ct,

1843: +------------------------------------------------------------------------------------*/
1844:
1845: select bs.name
1846: into l_bs_name
1847: from ra_customer_trx ct,
1848: ra_batch_sources bs
1849: where ct.batch_source_id = bs.batch_source_id
1850: and ct.org_id = bs.org_id --anuj
1851: and ct.customer_trx_id = (select max(ctt.customer_trx_id)

Line 1852: from ra_customer_trx ctt,

1848: ra_batch_sources bs
1849: where ct.batch_source_id = bs.batch_source_id
1850: and ct.org_id = bs.org_id --anuj
1851: and ct.customer_trx_id = (select max(ctt.customer_trx_id)
1852: from ra_customer_trx ctt,
1853: ar_adjustments aa
1854: where aa.chargeback_customer_trx_id = p_customer_trx_id
1855: and aa.org_id = ctt.org_id --anuj
1856: and aa.customer_trx_id = ctt.customer_trx_id

Line 2498: FROM ra_customer_trx_lines

2494: BEGIN
2495:
2496: SELECT NVL(SUM(extended_amount),0)
2497: INTO l_total
2498: FROM ra_customer_trx_lines
2499: WHERE line_type = p_line_type
2500: AND customer_trx_id = p_customer_trx_id;
2501:
2502: return l_total;