DBA Data[Home] [Help]

APPS.ARP_CTL_PKG dependencies on RA_CUSTOMER_TRX_LINES

Line 122: p_tax_amount IN ra_customer_trx_lines.extended_amount%type,

118: | |
119: +===========================================================================*/
120:
121: FUNCTION calculate_prorated_tax_amount (p_mode IN varchar2,
122: p_tax_amount IN ra_customer_trx_lines.extended_amount%type,
123: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
124: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type)
125: RETURN NUMBER
126: IS

Line 124: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type)

120:
121: FUNCTION calculate_prorated_tax_amount (p_mode IN varchar2,
122: p_tax_amount IN ra_customer_trx_lines.extended_amount%type,
123: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
124: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type)
125: RETURN NUMBER
126: IS
127: l_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;
128: l_total_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;

Line 127: l_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;

123: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
124: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type)
125: RETURN NUMBER
126: IS
127: l_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;
128: l_total_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;
129: l_precision FND_CURRENCIES.precision%type;
130: l_mau FND_CURRENCIES.minimum_accountable_unit%type;
131: l_tax_amount ra_customer_trx_lines.extended_amount%type;

Line 128: l_total_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;

124: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type)
125: RETURN NUMBER
126: IS
127: l_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;
128: l_total_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;
129: l_precision FND_CURRENCIES.precision%type;
130: l_mau FND_CURRENCIES.minimum_accountable_unit%type;
131: l_tax_amount ra_customer_trx_lines.extended_amount%type;
132:

Line 131: l_tax_amount ra_customer_trx_lines.extended_amount%type;

127: l_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;
128: l_total_tax_recoverable ra_customer_trx_lines.tax_recoverable%type;
129: l_precision FND_CURRENCIES.precision%type;
130: l_mau FND_CURRENCIES.minimum_accountable_unit%type;
131: l_tax_amount ra_customer_trx_lines.extended_amount%type;
132:
133: BEGIN
134: IF PG_DEBUG in ('Y', 'C') THEN
135: arp_util.debug( 'arp_ctl_pkg.calculate_prorated_tax_amount()+');

Line 142: (select sum(ctl_tax.extended_amount) from ra_customer_trx_lines_all ctl_tax

138: IF p_mode = 'INSERT_NO_LINE' then
139:
140: select sum(decode(ct.complete_flag , 'N', 0,
141: nvl(ctl.tax_recoverable,
142: (select sum(ctl_tax.extended_amount) from ra_customer_trx_lines_all ctl_tax
143: where ctl_tax.customer_trx_id = ctl.customer_trx_id
144: and ctl_tax.link_to_cust_trx_line_id = ctl.customer_trx_line_id
145: and ctl_tax.line_type = 'TAX')))) tax_recoverable
146: INTO l_tax_recoverable

Line 147: from ra_customer_trx_lines_all orig_ctl,

143: where ctl_tax.customer_trx_id = ctl.customer_trx_id
144: and ctl_tax.link_to_cust_trx_line_id = ctl.customer_trx_line_id
145: and ctl_tax.line_type = 'TAX')))) tax_recoverable
146: INTO l_tax_recoverable
147: from ra_customer_trx_lines_all orig_ctl,
148: ra_customer_trx_lines_all ctl,
149: ra_customer_trx_lines_all cm_ctl,
150: ra_customer_trx_all ct
151: where (ctl.customer_trx_line_id = orig_ctl.customer_trx_line_id

Line 148: ra_customer_trx_lines_all ctl,

144: and ctl_tax.link_to_cust_trx_line_id = ctl.customer_trx_line_id
145: and ctl_tax.line_type = 'TAX')))) tax_recoverable
146: INTO l_tax_recoverable
147: from ra_customer_trx_lines_all orig_ctl,
148: ra_customer_trx_lines_all ctl,
149: ra_customer_trx_lines_all cm_ctl,
150: ra_customer_trx_all ct
151: where (ctl.customer_trx_line_id = orig_ctl.customer_trx_line_id
152: OR ( ctl.previous_customer_trx_line_id IS NOT NULL

Line 149: ra_customer_trx_lines_all cm_ctl,

145: and ctl_tax.line_type = 'TAX')))) tax_recoverable
146: INTO l_tax_recoverable
147: from ra_customer_trx_lines_all orig_ctl,
148: ra_customer_trx_lines_all ctl,
149: ra_customer_trx_lines_all cm_ctl,
150: ra_customer_trx_all ct
151: where (ctl.customer_trx_line_id = orig_ctl.customer_trx_line_id
152: OR ( ctl.previous_customer_trx_line_id IS NOT NULL
153: AND ctl.previous_customer_trx_line_id = orig_ctl.customer_trx_line_id)

Line 164: nvl(ctl.tax_recoverable, (select sum(ctl_tax.extended_amount) from ra_customer_trx_lines_all ctl_tax

160: and ct.customer_trx_id = ctl.customer_trx_id
161: group by orig_ctl.customer_trx_line_id, ctl.line_type;
162:
163: select sum(decode(ct.complete_flag , 'N', 0,
164: nvl(ctl.tax_recoverable, (select sum(ctl_tax.extended_amount) from ra_customer_trx_lines_all ctl_tax
165: where ctl_tax.customer_trx_id = ctl.customer_trx_id
166: and ctl_tax.link_to_cust_trx_line_id = ctl.customer_trx_line_id
167: and ctl_tax.line_type = 'TAX')))) total_tax_recoverable
168: INTO l_total_tax_recoverable

Line 169: from ra_customer_trx_lines_all orig_ctl,

165: where ctl_tax.customer_trx_id = ctl.customer_trx_id
166: and ctl_tax.link_to_cust_trx_line_id = ctl.customer_trx_line_id
167: and ctl_tax.line_type = 'TAX')))) total_tax_recoverable
168: INTO l_total_tax_recoverable
169: from ra_customer_trx_lines_all orig_ctl,
170: ra_customer_trx_lines_all ctl,
171: ra_customer_trx_lines_all cm_ctl,
172: ra_customer_trx_all ct
173: where (ctl.customer_trx_line_id = orig_ctl.customer_trx_line_id

Line 170: ra_customer_trx_lines_all ctl,

166: and ctl_tax.link_to_cust_trx_line_id = ctl.customer_trx_line_id
167: and ctl_tax.line_type = 'TAX')))) total_tax_recoverable
168: INTO l_total_tax_recoverable
169: from ra_customer_trx_lines_all orig_ctl,
170: ra_customer_trx_lines_all ctl,
171: ra_customer_trx_lines_all cm_ctl,
172: ra_customer_trx_all ct
173: where (ctl.customer_trx_line_id = orig_ctl.customer_trx_line_id
174: OR ( ctl.previous_customer_trx_line_id IS NOT NULL

Line 171: ra_customer_trx_lines_all cm_ctl,

167: and ctl_tax.line_type = 'TAX')))) total_tax_recoverable
168: INTO l_total_tax_recoverable
169: from ra_customer_trx_lines_all orig_ctl,
170: ra_customer_trx_lines_all ctl,
171: ra_customer_trx_lines_all cm_ctl,
172: ra_customer_trx_all ct
173: where (ctl.customer_trx_line_id = orig_ctl.customer_trx_line_id
174: OR ( ctl.previous_customer_trx_line_id IS NOT NULL
175: AND ctl.previous_customer_trx_line_id = orig_ctl.customer_trx_line_id)

Line 253: | p_line_rec - ra_customer_trx_lines record |

249: | arp_util.debug |
250: | |
251: | ARGUMENTS : IN: |
252: | p_update_cursor - ID of the update cursor |
253: | p_line_rec - ra_customer_trx_lines record |
254: | OUT: |
255: | None |
256: | |
257: | RETURNS : NONE |

Line 294: p_line_rec IN ra_customer_trx_lines%rowtype) IS

290: +===========================================================================*/
291:
292:
293: PROCEDURE bind_line_variables(p_update_cursor IN integer,
294: p_line_rec IN ra_customer_trx_lines%rowtype) IS
295:
296: BEGIN
297:
298: arp_util.debug('arp_ctl_pkg.bind_line_variables()+');

Line 803: 'UPDATE ra_customer_trx_lines

799: BEGIN
800: arp_util.debug('arp_ctl_pkg.construct_line_update_stmt()+');
801:
802: update_text :=
803: 'UPDATE ra_customer_trx_lines
804: SET customer_trx_line_id =
805: DECODE(:customer_trx_line_id,
806: :ar_number_dummy, customer_trx_line_id,
807: :customer_trx_line_id),

Line 1366: | This procedure Updates records in ra_customer_trx_lines identified by |

1362: | PROCEDURE |
1363: | generic_update |
1364: | |
1365: | DESCRIPTION |
1366: | This procedure Updates records in ra_customer_trx_lines identified by |
1367: | the where clause that is passed in as a parameter. Only those columns |
1368: | in the line record parameter that do not contain the special dummy |
1369: | values are updated. |
1370: | |

Line 1403: ra_customer_trx_lines.line_type%type,

1399: PROCEDURE generic_update(p_update_cursor IN OUT NOCOPY integer,
1400: p_where_clause IN varchar2,
1401: p_where1 IN number,
1402: p_line_type IN
1403: ra_customer_trx_lines.line_type%type,
1404: p_currency_code IN
1405: fnd_currencies.currency_code%type,
1406: p_line_rec IN ra_customer_trx_lines%rowtype)
1407: IS

Line 1406: p_line_rec IN ra_customer_trx_lines%rowtype)

1402: p_line_type IN
1403: ra_customer_trx_lines.line_type%type,
1404: p_currency_code IN
1405: fnd_currencies.currency_code%type,
1406: p_line_rec IN ra_customer_trx_lines%rowtype)
1407: IS
1408:
1409: l_count number;
1410: l_update_statement varchar2(32767);

Line 1573: PROCEDURE set_to_dummy( p_line_rec OUT NOCOPY ra_customer_trx_lines%rowtype) IS

1569: | into the table handlers. |
1570: +===========================================================================*/
1571:
1572:
1573: PROCEDURE set_to_dummy( p_line_rec OUT NOCOPY ra_customer_trx_lines%rowtype) IS
1574:
1575: BEGIN
1576:
1577: IF PG_DEBUG in ('Y', 'C') THEN

Line 1737: | This procedure fetches a single row from ra_customer_trx_lines into a |

1733: | PROCEDURE |
1734: | fetch_p |
1735: | |
1736: | DESCRIPTION |
1737: | This procedure fetches a single row from ra_customer_trx_lines into a |
1738: | variable specified as a parameter based on the table's primary key, |
1739: | customer_trx__line_id. |
1740: | |
1741: | SCOPE - PUBLIC |

Line 1760: PROCEDURE fetch_p( p_line_rec OUT NOCOPY ra_customer_trx_lines%rowtype,

1756: | 07-JUN-95 Charlie Tomberg Created |
1757: | |
1758: +===========================================================================*/
1759:
1760: PROCEDURE fetch_p( p_line_rec OUT NOCOPY ra_customer_trx_lines%rowtype,
1761: p_customer_trx_line_id IN
1762: ra_customer_trx_lines.customer_trx_line_id%type )
1763: IS
1764:

Line 1762: ra_customer_trx_lines.customer_trx_line_id%type )

1758: +===========================================================================*/
1759:
1760: PROCEDURE fetch_p( p_line_rec OUT NOCOPY ra_customer_trx_lines%rowtype,
1761: p_customer_trx_line_id IN
1762: ra_customer_trx_lines.customer_trx_line_id%type )
1763: IS
1764:
1765: BEGIN
1766: IF PG_DEBUG in ('Y', 'C') THEN

Line 1772: FROM ra_customer_trx_lines

1768: END IF;
1769:
1770: SELECT *
1771: INTO p_line_rec
1772: FROM ra_customer_trx_lines
1773: WHERE customer_trx_line_id = p_customer_trx_line_id;
1774:
1775: IF PG_DEBUG in ('Y', 'C') THEN
1776: arp_util.debug( 'arp_ctl_pkg.fetch_p()-');

Line 1796: | This procedure locks the ra_customer_trx_lines row identified by the |

1792: | PROCEDURE |
1793: | lock_p |
1794: | |
1795: | DESCRIPTION |
1796: | This procedure locks the ra_customer_trx_lines row identified by the |
1797: | p_customer_trx_line_id parameter. |
1798: | |
1799: | SCOPE - PUBLIC |
1800: | |

Line 1819: ra_customer_trx_lines.customer_trx_line_id%type )

1815: | |
1816: +===========================================================================*/
1817:
1818: PROCEDURE lock_p( p_customer_trx_line_id IN
1819: ra_customer_trx_lines.customer_trx_line_id%type )
1820: IS
1821:
1822: l_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type;
1823:

Line 1822: l_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type;

1818: PROCEDURE lock_p( p_customer_trx_line_id IN
1819: ra_customer_trx_lines.customer_trx_line_id%type )
1820: IS
1821:
1822: l_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type;
1823:
1824: BEGIN
1825: IF PG_DEBUG in ('Y', 'C') THEN
1826: arp_util.debug( 'arp_ctl_pkg.lock_p()+');

Line 1832: FROM ra_customer_trx_lines

1828:
1829:
1830: SELECT customer_trx_line_id
1831: INTO l_customer_trx_line_id
1832: FROM ra_customer_trx_lines
1833: WHERE customer_trx_line_id = p_customer_trx_line_id
1834: FOR UPDATE OF customer_trx_line_id NOWAIT;
1835:
1836: IF PG_DEBUG in ('Y', 'C') THEN

Line 1858: | This procedure locks the ra_customer_trx_lines rows identified by the |

1854: | PROCEDURE |
1855: | lock_f_ct_id |
1856: | |
1857: | DESCRIPTION |
1858: | This procedure locks the ra_customer_trx_lines rows identified by the |
1859: | p_customer_trx_id parameter. |
1860: | |
1861: | SCOPE - PUBLIC |
1862: | |

Line 1886: FROM ra_customer_trx_lines

1882: IS
1883:
1884: CURSOR LOCK_C IS
1885: SELECT 'lock'
1886: FROM ra_customer_trx_lines
1887: WHERE customer_trx_id = p_customer_trx_id
1888: FOR UPDATE OF customer_trx_line_id NOWAIT;
1889:
1890: BEGIN

Line 1921: | This procedure locks the ra_customer_trx_lines row identified by the |

1917: | PROCEDURE |
1918: | lock_fetch_p |
1919: | |
1920: | DESCRIPTION |
1921: | This procedure locks the ra_customer_trx_lines row identified by the |
1922: | p_ra_customer_trx_line_id parameter and populates the |
1923: | p_line_rec parameter with the row that was locked |
1924: | |
1925: | SCOPE - PUBLIC |

Line 1944: PROCEDURE lock_fetch_p( p_line_rec IN OUT NOCOPY ra_customer_trx_lines%rowtype,

1940: | 07-JUN-95 Charlie Tomberg Created |
1941: | |
1942: +===========================================================================*/
1943:
1944: PROCEDURE lock_fetch_p( p_line_rec IN OUT NOCOPY ra_customer_trx_lines%rowtype,
1945: p_customer_trx_line_id IN
1946: ra_customer_trx_lines.customer_trx_line_id%type ) IS
1947:
1948: BEGIN

Line 1946: ra_customer_trx_lines.customer_trx_line_id%type ) IS

1942: +===========================================================================*/
1943:
1944: PROCEDURE lock_fetch_p( p_line_rec IN OUT NOCOPY ra_customer_trx_lines%rowtype,
1945: p_customer_trx_line_id IN
1946: ra_customer_trx_lines.customer_trx_line_id%type ) IS
1947:
1948: BEGIN
1949: IF PG_DEBUG in ('Y', 'C') THEN
1950: arp_util.debug( 'arp_ctl_pkg.lock_fetch_p()+');

Line 1955: FROM ra_customer_trx_lines

1951: END IF;
1952:
1953: SELECT *
1954: INTO p_line_rec
1955: FROM ra_customer_trx_lines
1956: WHERE customer_trx_line_id = p_customer_trx_line_id
1957: FOR UPDATE OF customer_trx_line_id NOWAIT;
1958:
1959: IF PG_DEBUG in ('Y', 'C') THEN

Line 1982: | This procedure locks the ra_customer_trx_lines row identified by the |

1978: | PROCEDURE |
1979: | lock_compare_p |
1980: | |
1981: | DESCRIPTION |
1982: | This procedure locks the ra_customer_trx_lines row identified by the |
1983: | p_customer_trx_line_id parameter only if no columns in that row have |
1984: | changed from when they were first selected in the form. |
1985: | |
1986: | SCOPE - PUBLIC |

Line 2032: PROCEDURE lock_compare_p( p_line_rec IN ra_customer_trx_lines%rowtype,

2028: | 31-OCT-2000 Y Rakotonirainy Bug 1243304 : Added column wh_update_date |
2029: | into the table handlers. |
2030: +===========================================================================*/
2031:
2032: PROCEDURE lock_compare_p( p_line_rec IN ra_customer_trx_lines%rowtype,
2033: p_customer_trx_line_id IN
2034: ra_customer_trx_lines.customer_trx_line_id%type,
2035: p_ignore_who_flag BOOLEAN DEFAULT FALSE ) IS
2036:

Line 2034: ra_customer_trx_lines.customer_trx_line_id%type,

2030: +===========================================================================*/
2031:
2032: PROCEDURE lock_compare_p( p_line_rec IN ra_customer_trx_lines%rowtype,
2033: p_customer_trx_line_id IN
2034: ra_customer_trx_lines.customer_trx_line_id%type,
2035: p_ignore_who_flag BOOLEAN DEFAULT FALSE ) IS
2036:
2037: l_new_line_rec ra_customer_trx_lines%rowtype;
2038: l_temp_line_rec ra_customer_trx_lines%rowtype;

Line 2037: l_new_line_rec ra_customer_trx_lines%rowtype;

2033: p_customer_trx_line_id IN
2034: ra_customer_trx_lines.customer_trx_line_id%type,
2035: p_ignore_who_flag BOOLEAN DEFAULT FALSE ) IS
2036:
2037: l_new_line_rec ra_customer_trx_lines%rowtype;
2038: l_temp_line_rec ra_customer_trx_lines%rowtype;
2039: l_ignore_who_flag varchar2(2);
2040:
2041: BEGIN

Line 2038: l_temp_line_rec ra_customer_trx_lines%rowtype;

2034: ra_customer_trx_lines.customer_trx_line_id%type,
2035: p_ignore_who_flag BOOLEAN DEFAULT FALSE ) IS
2036:
2037: l_new_line_rec ra_customer_trx_lines%rowtype;
2038: l_temp_line_rec ra_customer_trx_lines%rowtype;
2039: l_ignore_who_flag varchar2(2);
2040:
2041: BEGIN
2042: IF PG_DEBUG in ('Y', 'C') THEN

Line 2053: FROM ra_customer_trx_lines ctl

2049: END IF;
2050:
2051: SELECT *
2052: INTO l_new_line_rec
2053: FROM ra_customer_trx_lines ctl
2054: WHERE ctl.customer_trx_line_id = p_customer_trx_line_id
2055: AND
2056: (
2057: NVL(ctl.customer_trx_line_id, AR_NUMBER_DUMMY) =

Line 3167: | This procedure deletes the ra_customer_trx_lines row identified by the |

3163: | PROCEDURE |
3164: | delete_p |
3165: | |
3166: | DESCRIPTION |
3167: | This procedure deletes the ra_customer_trx_lines row identified by the |
3168: | p_customer_trx_line_id parameter. |
3169: | |
3170: | SCOPE - PUBLIC |
3171: | |

Line 3190: ra_customer_trx_lines.customer_trx_line_id%type)

3186: | |
3187: +===========================================================================*/
3188:
3189: procedure delete_p( p_customer_trx_line_id IN
3190: ra_customer_trx_lines.customer_trx_line_id%type)
3191: IS
3192:
3193:
3194: BEGIN

Line 3201: DELETE FROM ra_customer_trx_lines

3197: arp_util.debug( 'arp_ctl_pkg.delete_p()+');
3198: arp_util.debug( 'deleting ctlid: ' || p_customer_trx_line_id);
3199: END IF;
3200:
3201: DELETE FROM ra_customer_trx_lines
3202: WHERE customer_trx_line_id = p_customer_trx_line_id;
3203:
3204: IF ( SQL%ROWCOUNT = 0 )
3205: THEN arp_util.debug('EXCEPTION: arp_ctl_pkg.delete_p()');

Line 3232: | This procedure deletes the ra_customer_trx_lines rows identified by |

3228: | PROCEDURE |
3229: | delete_f_ct_id |
3230: | |
3231: | DESCRIPTION |
3232: | This procedure deletes the ra_customer_trx_lines rows identified by |
3233: | the p_customer_trx_id parameter. |
3234: | |
3235: | SCOPE - PUBLIC |
3236: | |

Line 3269: DELETE FROM ra_customer_trx_lines

3265: IF PG_DEBUG in ('Y', 'C') THEN
3266: arp_util.debug( 'arp_ctl_pkg.delete_f_ct_id()+');
3267: END IF;
3268:
3269: DELETE FROM ra_customer_trx_lines
3270: WHERE customer_trx_id = p_customer_trx_id
3271: --{BUG#3339072
3272: RETURNING customer_trx_line_id
3273: BULK COLLECT INTO l_ctl_key_list;

Line 3300: | This procedure deletes the child ra_customer_trx_lines rows identified |

3296: | PROCEDURE |
3297: | delete_f_ltctl_id |
3298: | |
3299: | DESCRIPTION |
3300: | This procedure deletes the child ra_customer_trx_lines rows identified |
3301: | by the p_link_to_cust_trx_line_id parameter. |
3302: | |
3303: | SCOPE - PUBLIC |
3304: | |

Line 3323: ra_customer_trx_lines.link_to_cust_trx_line_id%type)

3319: | |
3320: +===========================================================================*/
3321:
3322: procedure delete_f_ltctl_id( p_link_to_cust_trx_line_id IN
3323: ra_customer_trx_lines.link_to_cust_trx_line_id%type)
3324: IS
3325: --{BUG#3339072
3326: l_ctl_key_list gl_ca_utility_pkg.r_key_value_arr;
3327: --}

Line 3336: DELETE FROM ra_customer_trx_lines

3332: IF PG_DEBUG in ('Y', 'C') THEN
3333: arp_util.debug( 'arp_ctl_pkg.delete_f_ltctl_id()+');
3334: END IF;
3335:
3336: DELETE FROM ra_customer_trx_lines
3337: WHERE link_to_cust_trx_line_id = p_link_to_cust_trx_line_id
3338: --{BUG#3339072
3339: RETURNING customer_trx_line_id
3340: BULK COLLECT INTO l_ctl_key_list;

Line 3366: | This procedure deletes the child ra_customer_trx_lines rows identified |

3362: | PROCEDURE |
3363: | delete_f_ct_ltctl_id_type |
3364: | |
3365: | DESCRIPTION |
3366: | This procedure deletes the child ra_customer_trx_lines rows identified |
3367: | by the p_customer_trx_id, p_link_to_cust_trx_line_id and p_line_type |
3368: | |
3369: | SCOPE - PUBLIC |
3370: | |

Line 3396: ra_customer_trx_lines.link_to_cust_trx_line_id%type,

3392: procedure delete_f_ct_ltctl_id_type(
3393: p_customer_trx_id IN
3394: ra_customer_trx.customer_trx_id%type,
3395: p_link_to_cust_trx_line_id IN
3396: ra_customer_trx_lines.link_to_cust_trx_line_id%type,
3397: p_line_type IN
3398: ra_customer_trx_lines.line_type%type DEFAULT NULL)
3399: IS
3400: --{BUG#3339072

Line 3398: ra_customer_trx_lines.line_type%type DEFAULT NULL)

3394: ra_customer_trx.customer_trx_id%type,
3395: p_link_to_cust_trx_line_id IN
3396: ra_customer_trx_lines.link_to_cust_trx_line_id%type,
3397: p_line_type IN
3398: ra_customer_trx_lines.line_type%type DEFAULT NULL)
3399: IS
3400: --{BUG#3339072
3401: l_ctl_key_list gl_ca_utility_pkg.r_key_value_arr;
3402: --}

Line 3410: DELETE FROM ra_customer_trx_lines

3406: IF PG_DEBUG in ('Y', 'C') THEN
3407: arp_util.debug( 'arp_ctl_pkg.delete_f_ct_ltctl_id_type()+');
3408: END IF;
3409:
3410: DELETE FROM ra_customer_trx_lines
3411: WHERE customer_trx_id = p_customer_trx_id
3412: AND decode(p_link_to_cust_trx_line_id,
3413: null, -99,
3414: customer_trx_line_id) = nvl(p_link_to_cust_trx_line_id, -99)

Line 3446: | This procedure updates the ra_customer_trx_lines row identified by the |

3442: | PROCEDURE |
3443: | update_p |
3444: | |
3445: | DESCRIPTION |
3446: | This procedure updates the ra_customer_trx_lines row identified by the |
3447: | p_customer_trx_line_id parameter. |
3448: | |
3449: | SCOPE - PUBLIC |
3450: | |

Line 3472: PROCEDURE update_p( p_line_rec IN ra_customer_trx_lines%rowtype,

3468: | 06-JUN-95 Charlie Tomberg Created |
3469: | |
3470: +===========================================================================*/
3471:
3472: PROCEDURE update_p( p_line_rec IN ra_customer_trx_lines%rowtype,
3473: p_customer_trx_line_id IN
3474: ra_customer_trx_lines.customer_trx_line_id%type,
3475: p_currency_code IN fnd_currencies.currency_code%type
3476: DEFAULT NULL ) IS

Line 3474: ra_customer_trx_lines.customer_trx_line_id%type,

3470: +===========================================================================*/
3471:
3472: PROCEDURE update_p( p_line_rec IN ra_customer_trx_lines%rowtype,
3473: p_customer_trx_line_id IN
3474: ra_customer_trx_lines.customer_trx_line_id%type,
3475: p_currency_code IN fnd_currencies.currency_code%type
3476: DEFAULT NULL ) IS
3477:
3478: l_currency_code fnd_currencies.currency_code%type;

Line 3496: ra_customer_trx_lines ctl

3492: THEN
3493: SELECT ct.invoice_currency_code
3494: INTO l_currency_code
3495: FROM ra_customer_trx ct,
3496: ra_customer_trx_lines ctl
3497: WHERE ct.customer_trx_id = ctl.customer_trx_id
3498: AND ctl.customer_trx_line_id = p_customer_trx_line_id;
3499: ELSE l_currency_code := p_currency_code;
3500: END IF;

Line 3540: | This procedure updates the ra_customer_trx_lines rows identified by the|

3536: | PROCEDURE |
3537: | update_f_ct_id |
3538: | |
3539: | DESCRIPTION |
3540: | This procedure updates the ra_customer_trx_lines rows identified by the|
3541: | p_customer_trx_id parameter. |
3542: | |
3543: | SCOPE - PUBLIC |
3544: | |

Line 3567: PROCEDURE update_f_ct_id( p_line_rec IN ra_customer_trx_lines%rowtype,

3563: | 06-JUN-95 Charlie Tomberg Created |
3564: | |
3565: +===========================================================================*/
3566:
3567: PROCEDURE update_f_ct_id( p_line_rec IN ra_customer_trx_lines%rowtype,
3568: p_customer_trx_id IN
3569: ra_customer_trx_lines.customer_trx_id%type,
3570: p_line_type IN
3571: ra_customer_trx_lines.line_type%type default null,

Line 3569: ra_customer_trx_lines.customer_trx_id%type,

3565: +===========================================================================*/
3566:
3567: PROCEDURE update_f_ct_id( p_line_rec IN ra_customer_trx_lines%rowtype,
3568: p_customer_trx_id IN
3569: ra_customer_trx_lines.customer_trx_id%type,
3570: p_line_type IN
3571: ra_customer_trx_lines.line_type%type default null,
3572: p_currency_code IN fnd_currencies.currency_code%type
3573: DEFAULT NULL) IS

Line 3571: ra_customer_trx_lines.line_type%type default null,

3567: PROCEDURE update_f_ct_id( p_line_rec IN ra_customer_trx_lines%rowtype,
3568: p_customer_trx_id IN
3569: ra_customer_trx_lines.customer_trx_id%type,
3570: p_line_type IN
3571: ra_customer_trx_lines.line_type%type default null,
3572: p_currency_code IN fnd_currencies.currency_code%type
3573: DEFAULT NULL) IS
3574:
3575: l_where varchar2(500);

Line 3643: | This procedure updates the amounts in a record in ra_customer_trx_lines|

3639: | PROCEDURE |
3640: | update_amount_f_ctl_id |
3641: | |
3642: | DESCRIPTION |
3643: | This procedure updates the amounts in a record in ra_customer_trx_lines|
3644: | The columns affected are: extended_amount, unit_selling_price, |
3645: | gross_extended_amount, and gross_unit_selling_price. |
3646: | These are adjustments made for inclusive tax amounts. |
3647: | This function is used when the amounts are gross of inclusive tax. |

Line 3686: ra_customer_trx_lines

3682: gross_extended_amount,
3683: gross_unit_selling_price,
3684: revenue_amount
3685: from
3686: ra_customer_trx_lines
3687: where
3688: customer_trx_line_id = p_customer_trx_line_id for update;
3689: crow c%rowtype;
3690: l_extended_amount ra_customer_trx_lines.extended_amount%type;

Line 3690: l_extended_amount ra_customer_trx_lines.extended_amount%type;

3686: ra_customer_trx_lines
3687: where
3688: customer_trx_line_id = p_customer_trx_line_id for update;
3689: crow c%rowtype;
3690: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3691: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;

Line 3691: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;

3687: where
3688: customer_trx_line_id = p_customer_trx_line_id for update;
3689: crow c%rowtype;
3690: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3691: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3695: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;

Line 3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;

3688: customer_trx_line_id = p_customer_trx_line_id for update;
3689: crow c%rowtype;
3690: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3691: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3695: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3696: l_qty ra_customer_trx_lines.quantity_invoiced%type;

Line 3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;

3689: crow c%rowtype;
3690: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3691: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3695: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3696: l_qty ra_customer_trx_lines.quantity_invoiced%type;
3697: begin

Line 3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;

3690: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3691: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3695: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3696: l_qty ra_customer_trx_lines.quantity_invoiced%type;
3697: begin
3698: IF PG_DEBUG in ('Y', 'C') THEN

Line 3695: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;

3691: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3695: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3696: l_qty ra_customer_trx_lines.quantity_invoiced%type;
3697: begin
3698: IF PG_DEBUG in ('Y', 'C') THEN
3699: arp_util.debug( 'arp_ctl_pkg.update_amount_f_ctl_id('

Line 3696: l_qty ra_customer_trx_lines.quantity_invoiced%type;

3692: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3693: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3694: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3695: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3696: l_qty ra_customer_trx_lines.quantity_invoiced%type;
3697: begin
3698: IF PG_DEBUG in ('Y', 'C') THEN
3699: arp_util.debug( 'arp_ctl_pkg.update_amount_f_ctl_id('
3700: || to_char(p_customer_trx_line_id) || ','

Line 3750: update ra_customer_trx_lines

3746: l_gross_extended_amount := NULL;
3747: l_gross_unit_selling_price := NULL;
3748: END IF;
3749:
3750: update ra_customer_trx_lines
3751: set
3752: extended_amount = l_extended_amount,
3753: unit_selling_price = l_unit_selling_price,
3754: gross_extended_amount = l_gross_extended_amount,

Line 3789: | This procedure updates the amounts in a record in ra_customer_trx_lines|

3785: | PROCEDURE |
3786: | update_cm_amount_f_ctl_id |
3787: | |
3788: | DESCRIPTION |
3789: | This procedure updates the amounts in a record in ra_customer_trx_lines|
3790: | The columns affected are: extended_amount, unit_selling_price, |
3791: | gross_extended_amount, and gross_unit_selling_price. |
3792: | These are adjustments made for inclusive tax amounts. |
3793: | This function is used when the amounts are net of inclusive tax. |

Line 3826: ra_customer_trx_lines cm

3822: cm.gross_extended_amount gross_extended_amount,
3823: cm.gross_unit_selling_price gross_unit_selling_price,
3824: cm.previous_customer_trx_line_id previous_customer_trx_line_id
3825: from
3826: ra_customer_trx_lines cm
3827: where
3828: customer_trx_line_id = p_customer_trx_line_id for update;
3829: cursor cinv(p_line_id IN number) is select
3830: inv.gross_unit_selling_price gross_unit_selling_price

Line 3832: ra_customer_trx_lines inv

3828: customer_trx_line_id = p_customer_trx_line_id for update;
3829: cursor cinv(p_line_id IN number) is select
3830: inv.gross_unit_selling_price gross_unit_selling_price
3831: from
3832: ra_customer_trx_lines inv
3833: where
3834: customer_trx_line_id = p_line_id;
3835:
3836: crow c%rowtype;

Line 3837: l_extended_amount ra_customer_trx_lines.extended_amount%type;

3833: where
3834: customer_trx_line_id = p_line_id;
3835:
3836: crow c%rowtype;
3837: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3838: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3839: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3840: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3841: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;

Line 3838: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;

3834: customer_trx_line_id = p_line_id;
3835:
3836: crow c%rowtype;
3837: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3838: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3839: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3840: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3841: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3842: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;

Line 3839: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;

3835:
3836: crow c%rowtype;
3837: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3838: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3839: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3840: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3841: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3842: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3843: begin

Line 3840: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;

3836: crow c%rowtype;
3837: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3838: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3839: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3840: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3841: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3842: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3843: begin
3844: IF PG_DEBUG in ('Y', 'C') THEN

Line 3841: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;

3837: l_extended_amount ra_customer_trx_lines.extended_amount%type;
3838: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3839: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3840: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3841: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3842: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3843: begin
3844: IF PG_DEBUG in ('Y', 'C') THEN
3845: arp_util.debug( 'arp_ctl_pkg.update_cm_amount_f_ctl_id('

Line 3842: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;

3838: l_unit_selling_price ra_customer_trx_lines.unit_selling_price%type;
3839: l_gross_extended_amount ra_customer_trx_lines.gross_extended_amount%type;
3840: l_gross_unit_selling_price ra_customer_trx_lines.gross_unit_selling_price%type;
3841: l_revenue_amount ra_customer_trx_lines.revenue_amount%type;
3842: l_old_inclusive_amt ra_customer_trx_lines.extended_amount%type;
3843: begin
3844: IF PG_DEBUG in ('Y', 'C') THEN
3845: arp_util.debug( 'arp_ctl_pkg.update_cm_amount_f_ctl_id('
3846: || to_char(p_customer_trx_line_id) || ','

Line 3912: update ra_customer_trx_lines

3908: * 100 * p_min_acct_unit;
3909: end if;
3910: end if;
3911:
3912: update ra_customer_trx_lines
3913: set
3914: gross_extended_amount = l_gross_extended_amount,
3915: gross_unit_selling_price = l_gross_unit_selling_price
3916: where current of c;

Line 3950: | This procedure inserts a row into ra_customer_trx_lines that contains |

3946: | PROCEDURE |
3947: | insert_p |
3948: | |
3949: | DESCRIPTION |
3950: | This procedure inserts a row into ra_customer_trx_lines that contains |
3951: | the column values specified in the p_trx_rec parameter. |
3952: | |
3953: | SCOPE - PUBLIC |
3954: | |

Line 4004: p_line_rec IN ra_customer_trx_lines%rowtype,

4000: | commented the changes for Bug 4410461
4001: +===========================================================================*/
4002:
4003: PROCEDURE insert_p(
4004: p_line_rec IN ra_customer_trx_lines%rowtype,
4005: p_customer_trx_line_id OUT NOCOPY
4006: ra_customer_trx_lines.customer_trx_line_id%type
4007: ) IS
4008:

Line 4006: ra_customer_trx_lines.customer_trx_line_id%type

4002:
4003: PROCEDURE insert_p(
4004: p_line_rec IN ra_customer_trx_lines%rowtype,
4005: p_customer_trx_line_id OUT NOCOPY
4006: ra_customer_trx_lines.customer_trx_line_id%type
4007: ) IS
4008:
4009:
4010: l_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type;

Line 4010: l_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type;

4006: ra_customer_trx_lines.customer_trx_line_id%type
4007: ) IS
4008:
4009:
4010: l_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type;
4011: l_revenue_amount ra_customer_trx_lines.revenue_amount%TYPE;
4012:
4013: BEGIN
4014:

Line 4011: l_revenue_amount ra_customer_trx_lines.revenue_amount%TYPE;

4007: ) IS
4008:
4009:
4010: l_customer_trx_line_id ra_customer_trx_lines.customer_trx_line_id%type;
4011: l_revenue_amount ra_customer_trx_lines.revenue_amount%TYPE;
4012:
4013: BEGIN
4014:
4015: IF PG_DEBUG in ('Y', 'C') THEN

Line 4026: SELECT RA_CUSTOMER_TRX_LINES_S.NEXTVAL

4022: | Get the unique identifier |
4023: *---------------------------*/
4024: /* Bug 4410461 FP for 4340099: Added the If Condition below */
4025: IF p_line_rec.customer_trx_line_id is null THEN
4026: SELECT RA_CUSTOMER_TRX_LINES_S.NEXTVAL
4027: INTO l_customer_trx_line_id
4028: FROM DUAL;
4029: ELSE l_customer_trx_line_id := p_line_rec.customer_trx_line_id ;
4030: END IF ;

Line 4048: INSERT INTO ra_customer_trx_lines

4044: END IF;
4045: END IF;
4046:
4047:
4048: INSERT INTO ra_customer_trx_lines
4049: (
4050: customer_trx_line_id,
4051: customer_trx_id,
4052: line_number,

Line 4367: p_line_rec IN ra_customer_trx_lines%rowtype) IS

4363: | 19-JUL-95 Subash C Created |
4364: | |
4365: +===========================================================================*/
4366: PROCEDURE display_line_rec(
4367: p_line_rec IN ra_customer_trx_lines%rowtype) IS
4368: BEGIN
4369: IF PG_DEBUG in ('Y', 'C') THEN
4370: arp_util.debug( 'arp_ctl_pkg.display_line_rec()+');
4371: END IF;

Line 4409: ra_customer_trx_lines.customer_trx_line_id%type) IS

4405: | |
4406: +===========================================================================*/
4407: PROCEDURE display_line_p(
4408: p_customer_trx_line_id IN
4409: ra_customer_trx_lines.customer_trx_line_id%type) IS
4410: BEGIN
4411: IF PG_DEBUG in ('Y', 'C') THEN
4412: arp_util.debug( 'arp_ctl_pkg.display_line_p()+');
4413: END IF;

Line 4454: ra_customer_trx_lines.link_to_cust_trx_line_id%type)

4450: +===========================================================================*/
4451:
4452:
4453: PROCEDURE display_line_f_lctl_id( p_link_to_cust_trx_line_id IN
4454: ra_customer_trx_lines.link_to_cust_trx_line_id%type)
4455: IS
4456: BEGIN
4457:
4458: IF PG_DEBUG in ('Y', 'C') THEN

Line 4579: p_old_line_rec IN ra_customer_trx_lines%rowtype,

4575: | support ship to at the line level |
4576: +===========================================================================*/
4577:
4578: PROCEDURE merge_line_recs(
4579: p_old_line_rec IN ra_customer_trx_lines%rowtype,
4580: p_new_line_rec IN
4581: ra_customer_trx_lines%rowtype,
4582: p_out_line_rec IN OUT NOCOPY
4583: ra_customer_trx_lines%rowtype)

Line 4581: ra_customer_trx_lines%rowtype,

4577:
4578: PROCEDURE merge_line_recs(
4579: p_old_line_rec IN ra_customer_trx_lines%rowtype,
4580: p_new_line_rec IN
4581: ra_customer_trx_lines%rowtype,
4582: p_out_line_rec IN OUT NOCOPY
4583: ra_customer_trx_lines%rowtype)
4584: IS
4585:

Line 4583: ra_customer_trx_lines%rowtype)

4579: p_old_line_rec IN ra_customer_trx_lines%rowtype,
4580: p_new_line_rec IN
4581: ra_customer_trx_lines%rowtype,
4582: p_out_line_rec IN OUT NOCOPY
4583: ra_customer_trx_lines%rowtype)
4584: IS
4585:
4586: BEGIN
4587:

Line 5434: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,

5430: | -ement the line level rounding logic.|
5431: +===========================================================================*/
5432: PROCEDURE insert_line_f_cm_ct_ctl_id(
5433: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
5434: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
5435: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
5436: p_line_type IN ra_customer_trx_lines.line_type%type,
5437: p_line_percent IN number,
5438: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,

Line 5436: p_line_type IN ra_customer_trx_lines.line_type%type,

5432: PROCEDURE insert_line_f_cm_ct_ctl_id(
5433: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
5434: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
5435: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
5436: p_line_type IN ra_customer_trx_lines.line_type%type,
5437: p_line_percent IN number,
5438: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
5439: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,
5440: p_currency_code IN fnd_currencies.currency_code%type,

Line 5438: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,

5434: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
5435: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
5436: p_line_type IN ra_customer_trx_lines.line_type%type,
5437: p_line_percent IN number,
5438: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
5439: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,
5440: p_currency_code IN fnd_currencies.currency_code%type,
5441: p_tax_amount IN ra_customer_trx_lines.extended_amount%type)
5442: IS

Line 5439: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,

5435: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
5436: p_line_type IN ra_customer_trx_lines.line_type%type,
5437: p_line_percent IN number,
5438: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
5439: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,
5440: p_currency_code IN fnd_currencies.currency_code%type,
5441: p_tax_amount IN ra_customer_trx_lines.extended_amount%type)
5442: IS
5443: l_rows_inserted number;

Line 5441: p_tax_amount IN ra_customer_trx_lines.extended_amount%type)

5437: p_line_percent IN number,
5438: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
5439: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,
5440: p_currency_code IN fnd_currencies.currency_code%type,
5441: p_tax_amount IN ra_customer_trx_lines.extended_amount%type)
5442: IS
5443: l_rows_inserted number;
5444: --{BUG#3339072
5445: l_trx_line_array ctlrec;

Line 5456: l_total_tax_prorate ra_customer_trx_lines.extended_amount%type := 0;

5452: l_amt_prev_run_total Number ;
5453: l_rev_run_total Number ;
5454: l_rev_prev_run_total Number ;
5455: /* Bug Number 6790882 */
5456: l_total_tax_prorate ra_customer_trx_lines.extended_amount%type := 0;
5457: l_tax_amount ra_customer_trx_lines.extended_amount%type;
5458:
5459:
5460: BEGIN

Line 5457: l_tax_amount ra_customer_trx_lines.extended_amount%type;

5453: l_rev_run_total Number ;
5454: l_rev_prev_run_total Number ;
5455: /* Bug Number 6790882 */
5456: l_total_tax_prorate ra_customer_trx_lines.extended_amount%type := 0;
5457: l_tax_amount ra_customer_trx_lines.extended_amount%type;
5458:
5459:
5460: BEGIN
5461:

Line 5478: SELECT ra_customer_trx_lines_s.nextval,

5474: arp_util.debug('p_tax_amount '||p_tax_amount);
5475: END IF;
5476:
5477: --{BUG#3339072
5478: SELECT ra_customer_trx_lines_s.nextval,
5479: p_customer_trx_id,
5480: pg_user_id, /* created_by */
5481: sysdate, /* creation_date */
5482: pg_user_id, /* last_updated_by */

Line 5682: FROM ra_customer_trx_lines inv_ctl,

5678: l_trx_line_array.tax_classification_code,
5679: l_trx_line_array.historical_flag,
5680: l_trx_line_array.memo_line_type
5681: --}
5682: FROM ra_customer_trx_lines inv_ctl,
5683: ra_customer_trx_lines cm_ctl,
5684: ra_customer_trx cm_ct,
5685: ar_net_revenue_amount nra,
5686: ar_memo_lines_b inv_ctl_memo

Line 5683: ra_customer_trx_lines cm_ctl,

5679: l_trx_line_array.historical_flag,
5680: l_trx_line_array.memo_line_type
5681: --}
5682: FROM ra_customer_trx_lines inv_ctl,
5683: ra_customer_trx_lines cm_ctl,
5684: ra_customer_trx cm_ct,
5685: ar_net_revenue_amount nra,
5686: ar_memo_lines_b inv_ctl_memo
5687: WHERE cm_ct.customer_trx_id = p_customer_trx_id

Line 5829: INSERT INTO ra_customer_trx_lines

5825: --{BUG#3339072
5826: IF l_rows_inserted <> 0 THEN
5827: FORALL indx IN l_trx_line_array.customer_trx_line_id.FIRST ..
5828: l_trx_line_array.customer_trx_line_id.LAST
5829: INSERT INTO ra_customer_trx_lines
5830: ( customer_trx_line_id,
5831: customer_trx_id,
5832: created_by,
5833: creation_date,

Line 6071: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,

6067: | |
6068: +===========================================================================*/
6069: PROCEDURE update_line_f_cm_ctl_id(
6070: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
6071: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
6072: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
6073: p_line_type IN ra_customer_trx_lines.line_type%type,
6074: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
6075: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,

Line 6073: p_line_type IN ra_customer_trx_lines.line_type%type,

6069: PROCEDURE update_line_f_cm_ctl_id(
6070: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
6071: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
6072: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
6073: p_line_type IN ra_customer_trx_lines.line_type%type,
6074: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
6075: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,
6076: p_currency_code IN fnd_currencies.currency_code%type)
6077: IS

Line 6074: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,

6070: p_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
6071: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
6072: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
6073: p_line_type IN ra_customer_trx_lines.line_type%type,
6074: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
6075: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,
6076: p_currency_code IN fnd_currencies.currency_code%type)
6077: IS
6078: l_rows_updated number;

Line 6075: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,

6071: p_customer_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%type,
6072: p_prev_customer_trx_id IN ra_customer_trx.customer_trx_id%type,
6073: p_line_type IN ra_customer_trx_lines.line_type%type,
6074: p_uncredited_amount IN ra_customer_trx_lines.extended_amount%type,
6075: p_credit_amount IN ra_customer_trx_lines.extended_amount%type,
6076: p_currency_code IN fnd_currencies.currency_code%type)
6077: IS
6078: l_rows_updated number;
6079: --{BUG#3339072

Line 6088: UPDATE ra_customer_trx_lines ctl

6084: IF PG_DEBUG in ('Y', 'C') THEN
6085: arp_util.debug( 'arp_ctl_pkg.update_line_f_cm_ctl_id()+');
6086: END IF;
6087:
6088: UPDATE ra_customer_trx_lines ctl
6089: SET extended_amount =
6090: (SELECT ( (nra.net_amount -
6091: decode(cm_ct.complete_flag,
6092: 'Y', nvl(ctl.extended_amount, 0),

Line 6118: UPDATE ra_customer_trx_lines ctl

6114: arp_util.debug( 'arp_ctl_pkg.update_line_f_cm_ctl_id : '||
6115: 'Extended Amount :'|| SQL%ROWCOUNT||' rows updated');
6116: END IF;
6117:
6118: UPDATE ra_customer_trx_lines ctl
6119: SET extended_amount = arpcurr.CurrRound (extended_amount,
6120: p_currency_code)
6121: WHERE ctl.customer_trx_id = p_customer_trx_id
6122: AND ctl.link_to_cust_trx_line_id = p_customer_trx_line_id

Line 6140: UPDATE ra_customer_trx_lines l

6136: +----------------------------*/
6137:
6138: IF (SQL%ROWCOUNT > 0)
6139: THEN
6140: UPDATE ra_customer_trx_lines l
6141: SET extended_amount =
6142: (SELECT l.extended_amount +
6143: (p_credit_amount - sum(l2.extended_amount))
6144: FROM ra_customer_trx_lines l2

Line 6144: FROM ra_customer_trx_lines l2

6140: UPDATE ra_customer_trx_lines l
6141: SET extended_amount =
6142: (SELECT l.extended_amount +
6143: (p_credit_amount - sum(l2.extended_amount))
6144: FROM ra_customer_trx_lines l2
6145: WHERE l2.customer_trx_id = l.customer_trx_id
6146: AND l2.link_to_cust_trx_line_id = p_customer_trx_line_id
6147: AND l2.line_type = p_line_type)
6148: WHERE l.customer_trx_id = p_customer_trx_id

Line 6152: FROM ra_customer_trx_lines l3

6148: WHERE l.customer_trx_id = p_customer_trx_id
6149: AND l.line_type = p_line_type
6150: AND l.customer_trx_line_id =
6151: (SELECT min(customer_trx_line_id)
6152: FROM ra_customer_trx_lines l3
6153: WHERE l3.customer_trx_id = p_customer_trx_id
6154: AND l3.link_to_cust_trx_line_id = p_customer_trx_line_id
6155: AND l3.line_type = p_line_type
6156: AND l3.extended_amount <> 0