DBA Data[Home] [Help]

APPS.CN_INVOICE_CHANGES_PVT dependencies on CN_COMM_LINES_API

Line 58: x_api_rec OUT NOCOPY cn_comm_lines_api_pkg.comm_lines_api_rec_type) IS

54: END;
55: --
56: PROCEDURE convert_adj_to_api(
57: p_adj_rec IN cn_get_tx_data_pub.adj_rec_type,
58: x_api_rec OUT NOCOPY cn_comm_lines_api_pkg.comm_lines_api_rec_type) IS
59: BEGIN
60: x_api_rec.salesrep_id := p_adj_rec.direct_salesrep_id;
61: x_api_rec.processed_date := p_adj_rec.processed_date;
62: x_api_rec.processed_period_id := p_adj_rec.processed_period_id;

Line 254: l_exchange_rate cn_comm_lines_api.exchange_rate%type;

250: x_return_status OUT NOCOPY VARCHAR2) IS
251: --
252: l_attribute1 VARCHAR2(240);
253: l_attribute100 VARCHAR2(240);
254: l_exchange_rate cn_comm_lines_api.exchange_rate%type;
255: --
256: BEGIN
257:
258: IF (p_newtx_rec.exchange_rate <> FND_API.G_MISS_NUM) THEN

Line 820: FROM cn_comm_lines_api l

816: l_line_number NUMBER,
817: l_revenue_type VARCHAR2,
818: l_split_pct NUMBER) IS
819: SELECT l.*
820: FROM cn_comm_lines_api l
821: WHERE l.salesrep_id = l_salesrep_id
822: AND l.invoice_number = l_invoice_number
823: AND l.line_number = l_line_number
824: AND l.revenue_type = l_revenue_type

Line 841: cn_comm_lines_api api

837: l_revenue_type VARCHAR2,
838: l_split_pct NUMBER) IS
839: SELECT h.*, api.terr_id, api.terr_name, NVL(api.preserve_credit_override_flag,'N') preserve_credit_override_flag
840: FROM cn_commission_headers h,
841: cn_comm_lines_api api
842: WHERE h.direct_salesrep_id = l_salesrep_id
843: AND h.invoice_number = l_invoice_number
844: AND h.line_number = l_line_number
845: AND h.revenue_type = l_revenue_type

Line 1089: -- Create a record in the cn_comm_lines_api table using this record.

1085: l_newtx_rec.transaction_amount_orig
1086: := ROUND((rec.transaction_amount*
1087: p_new_data(i).split_pct)/100,2);
1088: END IF;
1089: -- Create a record in the cn_comm_lines_api table using this record.
1090: cn_get_tx_data_pub.insert_api_record(
1091: p_api_version => p_api_version,
1092: p_init_msg_list => p_init_msg_list,
1093: p_validation_level => p_validation_level,

Line 1324: -- Create a record in the cn_comm_lines_api table using this record.

1320: l_newtx_rec.invoice_number := p_new_data(i).invoice_number;
1321: l_newtx_rec.line_number := p_new_data(i).line_number;
1322: l_newtx_rec.revenue_type := p_new_data(i).revenue_type;
1323: l_newtx_rec.split_pct := p_new_data(i).split_pct;
1324: -- Create a record in the cn_comm_lines_api table using this record.
1325: IF (p_called_from = 'SPLIT') THEN
1326: l_newtx_rec.transaction_amount := ROUND((rec.transaction_amount*
1327: p_new_data(i).split_pct)/100,2);
1328: END IF;

Line 1461: 'cn_comm_lines_api API '||

1457: 'FROM cn_period_statuses CPSP, cn_salesreps RSD, cn_commission_headers CCH, '||
1458: 'cn_lookups CLT, cn_lookups CLR, cn_lookups CLS, cn_lookups CLRV, '||
1459: 'cn_lookups CLAD, cn_revenue_classes CNR, cn_quotas CQ, cn_trx_batches CTB, '||
1460: -- Modified for Crediting Bug
1461: 'cn_comm_lines_api API '||
1462: 'WHERE CCH.direct_salesrep_id = RSD.salesrep_id '||
1463: --Modified for Crediting Bug
1464: 'AND CCH.comm_lines_api_id = API.comm_lines_api_id(+)'||
1465: 'AND CCH.org_id = API.org_id(+)'||

Line 1527: 'FROM cn_comm_lines_api CCLA, '||

1523: 'SELECT CCLA.salesrep_id,CCLA.invoice_number,CCLA.line_number, '||
1524: 'CCLA.revenue_type,CCLA.split_pct,RSD.employee_number, CCLA.comm_lines_api_id, '||
1525: --Modified for Crediting Bug
1526: 'CCLA.terr_id, CCLA.preserve_credit_override_flag '||
1527: 'FROM cn_comm_lines_api CCLA, '||
1528: 'cn_period_statuses CPSP, cn_salesreps RSD, '||
1529: 'cn_revenue_classes CNR, cn_lookups CLT, '||
1530: 'cn_lookups CLRV, cn_lookups CLAD,cn_lookups CLR '||
1531: 'WHERE RSD.salesrep_id = CCLA.salesrep_id '||

Line 1718: FROM cn_comm_lines_api_all api

1714: SELECT comm_lines_api_id,
1715: invoice_number,
1716: line_number,
1717: revenue_type
1718: FROM cn_comm_lines_api_all api
1719: WHERE api.invoice_number = p_invoice_number
1720: AND api.trx_type = p_trx_type
1721: AND api.org_id = p_org_id
1722: AND api.load_status NOT IN ( 'LOADED', 'FILTERED') -- vensrini Buf fix 4202682

Line 1826: into cn_comm_lines_api table using cursor c1

1822: --
1823: /*-----------------------------------------------------------------------------
1824: Batch Program Logic:
1825: o Collect the new invoices split information after collections get the data
1826: into cn_comm_lines_api table using cursor c1
1827: o Collect the new CMs matching with the stored invoice split data based on
1828: invoice/line/revenue type(group by) using cursor c2
1829: o Based on c2, collect the individual transactions from cn_comm_lines_api
1830: table (using api_cur) and NEGATE them.

Line 1829: o Based on c2, collect the individual transactions from cn_comm_lines_api

1825: o Collect the new invoices split information after collections get the data
1826: into cn_comm_lines_api table using cursor c1
1827: o Collect the new CMs matching with the stored invoice split data based on
1828: invoice/line/revenue type(group by) using cursor c2
1829: o Based on c2, collect the individual transactions from cn_comm_lines_api
1830: table (using api_cur) and NEGATE them.
1831: o Based on c2, collect the invoice split data from cn_invoice_changes table
1832: and recreate the new records in the cn_comm_lines_api table.
1833: -----------------------------------------------------------------------------*/

Line 1832: and recreate the new records in the cn_comm_lines_api table.

1828: invoice/line/revenue type(group by) using cursor c2
1829: o Based on c2, collect the individual transactions from cn_comm_lines_api
1830: table (using api_cur) and NEGATE them.
1831: o Based on c2, collect the invoice split data from cn_invoice_changes table
1832: and recreate the new records in the cn_comm_lines_api table.
1833: -----------------------------------------------------------------------------*/
1834: PROCEDURE invoice_split_batch(
1835: x_errbuf OUT NOCOPY VARCHAR2,
1836: x_retcode OUT NOCOPY NUMBER) IS

Line 1845: FROM cn_comm_lines_api api

1841: api.invoice_number,
1842: api.line_number,
1843: api.revenue_type,
1844: api.split_pct
1845: FROM cn_comm_lines_api api
1846: WHERE trx_type = 'INV'
1847: AND load_status = 'UNLOADED'
1848: AND adjust_status ='NEW'; --IS NULL;
1849: -- AND api.processed_date between SYSDATE-1 AND SYSDATE;

Line 1857: FROM cn_comm_lines_api api

1853: SELECT api.invoice_number,
1854: api.line_number,
1855: api.revenue_type,
1856: sum(api.transaction_amount) transaction_amount
1857: FROM cn_comm_lines_api api
1858: WHERE EXISTS (
1859: SELECT 1
1860: FROM cn_invoice_changes inv
1861: WHERE api.invoice_number = inv.invoice_number

Line 1878: FROM cn_comm_lines_api api

1874: l_line_number NUMBER,
1875: l_revenue_type VARCHAR2,
1876: l_trx_type VARCHAR2) IS
1877: SELECT api.*
1878: FROM cn_comm_lines_api api
1879: WHERE api.invoice_number = l_invoice_number
1880: AND api.line_number = l_line_number
1881: AND api.revenue_type = l_revenue_type
1882: AND (api.split_status NOT IN ('LINKED','DELINKED') OR

Line 1911: l_api_rec cn_comm_lines_api_pkg.comm_lines_api_rec_type;

1907: l_trx_type VARCHAR2(30);
1908: -- PL/SQL tables and records
1909: l_insert_rec cn_invoice_changes_pkg.invoice_changes_all_rec_type;
1910: l_invoice_tbl invoice_tbl;
1911: l_api_rec cn_comm_lines_api_pkg.comm_lines_api_rec_type;
1912: l_adj_tbl cn_get_tx_data_pub.adj_tbl_type;
1913: --
1914: BEGIN
1915: --

Line 1965: UPDATE cn_comm_lines_api

1961: --
1962: cn_invoice_changes_pkg.insert_row(
1963: p_invoice_changes_all_rec => l_insert_rec);
1964: --
1965: UPDATE cn_comm_lines_api
1966: SET adjust_status = 'INVLOAD'
1967: WHERE comm_lines_api_id = c1_rec.comm_lines_api_id;
1968: --
1969: END LOOP;

Line 2026: SELECT cn_comm_lines_api_s.NEXTVAL

2022: x_adj_tbl => l_adj_tbl);
2023: --
2024: IF (l_adj_tbl.COUNT > 0) THEN
2025: --
2026: SELECT cn_comm_lines_api_s.NEXTVAL
2027: INTO l_comm_lines_api_id
2028: FROM sys.dual;
2029: --
2030: l_api_rec.comm_lines_api_id := l_comm_lines_api_id;

Line 2185: cn_comm_lines_api_pkg.insert_row(l_api_rec);

2181: l_api_rec.comp_group_id := l_adj_tbl(1).comp_group_id;
2182: l_api_rec.commission_amount := l_adj_tbl(1).commission_amount;
2183: l_api_rec.sales_channel := l_adj_tbl(1).sales_channel;
2184: --
2185: cn_comm_lines_api_pkg.insert_row(l_api_rec);
2186: --
2187: cn_message_pkg.write(
2188: p_message_text =>
2189: 'Creating '||l_trx_type||' : Record-'||l_counter||' '||