DBA Data[Home] [Help]

APPS.OZF_SPECIAL_PRICING_PVT dependencies on OZF_RESALE_LINES

Line 87: From ozf_resale_lines_int

83: l_last_updated_by NUMBER(15);
84:
85: CURSOR OPEN_line_count_csr (p_id in NUMBER) IS
86: SELECT count(1)
87: From ozf_resale_lines_int
88: WHERE resale_batch_id = p_id
89: AND status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN;
90: l_count NUMBER;
91:

Line 105: FROM ozf_resale_lines_int

101: p_order_number in VARCHAR2,
102: p_cust_id in NUMBER,
103: p_date in date) IS
104: SELECT resale_line_int_id
105: FROM ozf_resale_lines_int
106: WHERE resale_batch_id = p_id
107: AND order_number = p_order_number
108: AND sold_from_cust_account_id = p_cust_id
109: AND date_ordered = p_date

Line 128: FROM ozf_resale_lines_int

124: CURSOR batch_order_num_csr(p_id in NUMBER) IS
125: SELECT distinct order_number,
126: sold_from_cust_account_id,
127: date_ordered
128: FROM ozf_resale_lines_int
129: WHERE resale_batch_id = p_id
130: AND status_code = 'PROCESSED'
131: --AND status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED)
132: ORDER BY date_ordered;

Line 163: FROM ozf_resale_lines_int

159: l_sales_transaction_id NUMBER;
160:
161: CURSOR agreement_list_csr(p_resale_batch_id NUMBER) IS
162: SELECT distinct substr(agreement_name, 1, 30)
163: FROM ozf_resale_lines_int
164: where resale_batch_id = p_resale_batch_id;
165:
166: TYPE agreement_name_type IS RECORD (
167: agreement_name VARCHAR2(30)

Line 194: , ozf_resale_lines_int b

190: , p_cust_id IN NUMBER
191: , p_date IN DATE ) IS
192: SELECT a.resale_header_id
193: FROM ozf_resale_headers a
194: , ozf_resale_lines_int b
195: , ozf_resale_lines c
196: WHERE b.resale_batch_id = p_id
197: AND b.order_number = p_order_number
198: AND b.sold_from_cust_account_id = p_cust_id

Line 195: , ozf_resale_lines c

191: , p_date IN DATE ) IS
192: SELECT a.resale_header_id
193: FROM ozf_resale_headers a
194: , ozf_resale_lines_int b
195: , ozf_resale_lines c
196: WHERE b.resale_batch_id = p_id
197: AND b.order_number = p_order_number
198: AND b.sold_from_cust_account_id = p_cust_id
199: AND b.date_ordered = p_date

Line 210: FROM ozf_resale_lines_int s

206: --Start POS Batch Processing Changes
207: CURSOR csr_batch_request(cv_batch_id IN NUMBER, cv_partner_id IN NUMBER) IS
208: SELECT count(1)
209:
210: FROM ozf_resale_lines_int s
211: , ozf_request_headers_all_b r
212: WHERE s.resale_batch_id = cv_batch_id
213: AND s.agreement_name = r.agreement_number
214: AND r.partner_id = cv_partner_id

Line 392: UPDATE ozf_resale_lines_int_all

388:
389: -- There is something wrong with this order. dispute all the orders
390: -- and move to the next one.
391: -- JXWU move update to common pvt
392: UPDATE ozf_resale_lines_int_all
393: SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
394: dispute_code = 'OZF_RESALE_MULTI_HEADER',
395: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
396: response_type = 'CA',

Line 469: UPDATE ozf_resale_lines_int

465: ozf_utility_PVT.debug_message('Did not pass inventory checking');
466: END IF;
467:
468: -- Here turn this line to disputed and create a disput code for it.
469: UPDATE ozf_resale_lines_int
470: SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
471: dispute_code = 'OZF_LT_INVT',
472: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
473: response_type = 'CA',

Line 678: UPDATE ozf_resale_lines_int

674: IF l_amount_claimed <> 0 THEN
675:
676: -- IF anything is paid, UPDATE batch line status to CLOSEd for each OPEN and duplicated lines.
677: BEGIN
678: UPDATE ozf_resale_lines_int
679: SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_CLOSED
680: WHERE resale_batch_id = p_resale_batch_id
681: AND status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED) ;
682:

Line 698: UPDATE ozf_resale_lines_int

694: ELSE
695: BEGIN
696: -- UPDATE batch line status to CLOSED for duplicated and processed lines
697:
698: UPDATE ozf_resale_lines_int
699: SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_CLOSED
700: WHERE resale_batch_id = p_resale_batch_id
701: AND status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED) ;
702:

Line 838: FROM ozf_resale_lines_int_all b

834: FND_MESSAGE.get_string('OZF','OZF_RESALE_AGR_TYPE_WNG'),
835: 'AGREEMENT_TYPE',
836: NULL,
837: org_id
838: FROM ozf_resale_lines_int_all b
839: WHERE b.status_code = 'OPEN'
840: AND b.tracing_flag = 'F'
841: AND b.agreement_type <>'SPO'
842: AND b.resale_batch_id = p_resale_batch_id

Line 859: UPDATE ozf_resale_lines_int_all

855: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
856: END;
857:
858: BEGIN
859: UPDATE ozf_resale_lines_int_all
860: SET status_code = 'DISPUTED',
861: dispute_code = 'OZF_RESALE_AGRM_TYPE_WNG',
862: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
863: response_type = 'CA',

Line 898: FROM ozf_resale_lines_int_all b

894: fnd_message.get_string('OZF','OZF_RESALE_PUR_PRICE_MISSING'),
895: 'PURCHASE_PRICE',
896: NULL,
897: org_id
898: FROM ozf_resale_lines_int_all b
899: WHERE b.status_code = 'OPEN'
900: AND b.tracing_flag = 'F'
901: AND b.purchase_price IS NULL
902: AND b.resale_batch_id = p_resale_batch_id

Line 919: UPDATE ozf_resale_lines_int_all

915: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
916: END;
917:
918: BEGIN
919: UPDATE ozf_resale_lines_int_all
920: SET status_code = 'DISPUTED',
921: dispute_code = 'OZF_RESALE_PUR_PRICE_MISSING',
922: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
923: response_type = 'CA',

Line 1010: FROM ozf_resale_lines_int

1006: CURSOR order_set_csr(p_order_number VARCHAR2,
1007: p_id NUMBER, p_date date,
1008: p_resale_id NUMBER) IS
1009: SELECT *
1010: FROM ozf_resale_lines_int
1011: WHERE order_number = p_order_number
1012: AND sold_from_cust_account_id= p_id
1013: AND date_ordered = p_date
1014: AND status_code = 'OPEN'

Line 1028: FROM ozf_resale_lines_int

1024: CURSOR all_order_set_csr(p_order_number VARCHAR2,
1025: p_id NUMBER, p_date date,
1026: p_resale_id NUMBER) IS
1027: SELECT *
1028: FROM ozf_resale_lines_int
1029: WHERE order_number = p_order_number
1030: AND sold_from_cust_account_id= p_id
1031: AND date_ordered = p_date
1032: AND status_code = 'OPEN'

Line 1071: FROM ozf_resale_lines_all orl,

1067: CURSOR accrued_quantity_csr(p_request_header_id NUMBER,
1068: p_inventory_item_id NUMBER) IS
1069: SELECT sum(orl.quantity) used_quantity,
1070: orl.uom_code
1071: FROM ozf_resale_lines_all orl,
1072: ozf_resale_adjustments_all ora
1073: WHERE orl.inventory_item_id = p_inventory_item_id
1074: AND NVL(ora.corrected_agreement_id, ora.agreement_id) = p_request_header_id
1075: AND orl.resale_line_id = ora.resale_line_id

Line 1246: UPDATE ozf_resale_lines_int_all

1242: END IF;
1243:
1244: -- SET Batch as DISPUTED
1245: -- SLKRISHN change to common procedure
1246: UPDATE ozf_resale_lines_int_all
1247: SET status_code = 'DISPUTED',
1248: dispute_code = 'OZF_LT_INVT',
1249: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1250: response_type = 'CA',

Line 1254: UPDATE ozf_resale_lines_int_all

1250: response_type = 'CA',
1251: response_code = 'N'
1252: WHERE resale_line_int_id = l_resale_int_rec.resale_line_int_id;
1253: ELSE
1254: UPDATE ozf_resale_lines_int_all
1255: SET status_code= 'PROCESSED'
1256: WHERE resale_line_int_id = l_resale_int_rec.resale_line_int_id
1257: AND tracing_flag = 'T';
1258: END IF;

Line 1261: UPDATE ozf_resale_lines_int_all

1257: AND tracing_flag = 'T';
1258: END IF;
1259: ELSE
1260: -- 7570302 update stock sale line to PROCESSED if inventory validation disabled
1261: UPDATE ozf_resale_lines_int_all
1262: SET status_code= 'PROCESSED'
1263: WHERE resale_line_int_id = l_resale_int_rec.resale_line_int_id
1264: AND tracing_flag = 'T';
1265: END IF;

Line 1270: /* UPDATE ozf_resale_lines_int_all

1266: END LOOP;
1267: END IF;
1268: -- the following piece of code has been commented in order to validate the tracing lines.
1269: -- ???? UPDATE tracing order lines to processed for this order to be processed
1270: /* UPDATE ozf_resale_lines_int_all
1271: SET status_code = 'PROCESSED'
1272: WHERE status_code = 'OPEN'
1273: AND order_number = p_order_number
1274: AND sold_from_cust_account_id = p_sold_from_cust_account_id

Line 1355: UPDATE ozf_resale_lines_int_all

1351: END IF;
1352: --
1353: -- SET Batch as DISPUTED
1354: -- SLKRISHN change to common procedure
1355: UPDATE ozf_resale_lines_int_all
1356: SET status_code = 'DISPUTED',
1357: dispute_code = 'OZF_LT_INVT',
1358: followup_action_code = 'C',
1359: response_type = 'CA',

Line 1408: UPDATE ozf_resale_lines_int

1404: RAISE FND_API.g_exc_unexpected_error;
1405: END IF;
1406:
1407: BEGIN
1408: UPDATE ozf_resale_lines_int
1409: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1410: dispute_code = 'OZF_RESALE_AGRM_WNG',
1411: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1412: response_type = 'CA',

Line 1447: UPDATE ozf_resale_lines_int

1443: RAISE FND_API.g_exc_unexpected_error;
1444: END IF;
1445:
1446: BEGIN
1447: UPDATE ozf_resale_lines_int
1448: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1449: dispute_code = 'OZF_RESALE_AGRM_RANG_WNG',
1450: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1451: response_type = 'CA',

Line 1468: UPDATE ozf_resale_lines_int

1464: OZF_UTILITY_PVT.debug_message('line currency '||l_order_set_tbl(J).currency_code );
1465: END IF;
1466: IF l_order_set_tbl(J).currency_code <> l_header_currency_code THEN
1467: BEGIN
1468: UPDATE ozf_resale_lines_int
1469: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1470: dispute_code = 'OZF_RESALE_AGRM_CURRENCY_WNG',
1471: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1472: response_type = 'CA',

Line 1507: UPDATE ozf_resale_lines_int

1503: -- Do nothing
1504: NULL;
1505: ELSE
1506: BEGIN
1507: UPDATE ozf_resale_lines_int
1508: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1509: dispute_code = 'OZF_RESALE_AGRM_END_CUST_WNG',
1510: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1511: response_type = 'CA',

Line 1555: UPDATE ozf_resale_lines_int

1551: (l_order_set_tbl(J).END_cust_party_id is NULL) THEN
1552: NULL;
1553: ELSE
1554: BEGIN
1555: UPDATE ozf_resale_lines_int
1556: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1557: dispute_code = 'OZF_RESALE_AGRM_RESELL_WNG',
1558: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1559: response_type = 'CA',

Line 1573: UPDATE ozf_resale_lines_int

1569: END IF;
1570: END IF;
1571: ELSE
1572: BEGIN
1573: UPDATE ozf_resale_lines_int
1574: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1575: dispute_code = 'OZF_RESALE_AGRM_RESELL_WNG',
1576: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1577: response_type = 'CA',

Line 1598: UPDATE ozf_resale_lines_int

1594:
1595: NULL;
1596: ELSE
1597: BEGIN
1598: UPDATE ozf_resale_lines_int
1599: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1600: dispute_code = 'OZF_RESALE_AGRM_RESELL_WNG',
1601: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1602: response_type = 'CA',

Line 1623: UPDATE ozf_resale_lines_int

1619: IF OZF_DEBUG_LOW_ON THEN
1620: OZF_UTILITY_PVT.debug_message('In Offer id null' );
1621: END IF;
1622: BEGIN
1623: UPDATE ozf_resale_lines_int
1624: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1625: dispute_code = 'OZF_RESALE_AGRM_OFF_NULL',
1626: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1627: response_type = 'CA',

Line 1643: UPDATE ozf_resale_lines_int

1639: IF OZF_DEBUG_LOW_ON THEN
1640: OZF_UTILITY_PVT.debug_message('In Off invoice offer' );
1641: END IF;
1642: BEGIN
1643: UPDATE ozf_resale_lines_int
1644: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1645: dispute_code = 'OZF_RESALE_AGRM_OFF_OFF_INV',
1646: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1647: response_type = 'CA',

Line 1705: UPDATE ozf_resale_lines_int

1701: RAISE FND_API.g_exc_unexpected_error;
1702: END IF;
1703:
1704: BEGIN
1705: UPDATE ozf_resale_lines_int
1706: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1707: dispute_code = 'OZF_RESALE_AGRM_LINE_WNG',
1708: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1709: response_type = 'CA',

Line 1789: UPDATE ozf_resale_lines_int

1785: l_used_uom_code,
1786: NULL, NULL);
1787: IF l_request_line_apprv_max_qty = -99999 THEN
1788: BEGIN
1789: UPDATE ozf_resale_lines_int
1790: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1791: dispute_code = 'OZF_SPP_NO_UOM_CONV_MAX',
1792: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1793: response_type = 'CA',

Line 1816: UPDATE ozf_resale_lines_int

1812: l_used_uom_code,
1813: NULL, NULL);
1814: IF l_request_line_apprv_min_qty = -99999 THEN
1815: BEGIN
1816: UPDATE ozf_resale_lines_int
1817: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1818: dispute_code = 'OZF_SPP_NO_UOM_CONV_MIN',
1819: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1820: response_type = 'CA',

Line 1846: UPDATE ozf_resale_lines_int

1842: l_used_uom_code,
1843: NULL, NULL);
1844: IF l_current_quantity = -99999 THEN
1845: BEGIN
1846: UPDATE ozf_resale_lines_int
1847: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1848: dispute_code = 'OZF_SPP_NO_UOM_CONV_CURR',
1849: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1850: response_type = 'CA',

Line 1870: UPDATE ozf_resale_lines_int

1866:
1867: IF l_request_line_apprv_max_qty is not NULL AND
1868: l_current_quantity + l_used_quantity > l_request_line_apprv_max_qty THEN
1869: BEGIN
1870: UPDATE ozf_resale_lines_int
1871: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1872: dispute_code = 'OZF_RESALE_AGRM_QUN_GT_MAX',
1873: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1874: response_type = 'CA',

Line 1889: UPDATE ozf_resale_lines_int

1885:
1886: IF l_request_line_apprv_min_qty is not NULL AND
1887: l_current_quantity + l_used_quantity < l_request_line_apprv_min_qty THEN
1888: BEGIN
1889: UPDATE ozf_resale_lines_int
1890: SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
1891: dispute_code = 'OZF_RESALE_AGRM_QUN_LT_MIN',
1892: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
1893: response_type = 'CA',

Line 2007: FROM ozf_resale_lines_int

2003: CURSOR order_num_csr IS
2004: SELECT DISTINCT order_number,
2005: sold_from_cust_account_id,
2006: date_ordered
2007: FROM ozf_resale_lines_int
2008: WHERE status_code = 'OPEN'
2009: --status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED)
2010: AND duplicated_adjustment_id IS NULL
2011: AND resale_batch_id = p_resale_batch_id

Line 2123: update ozf_resale_lines_int

2119: x_return_status => l_return_status);
2120:
2121: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2122: BEGIN
2123: update ozf_resale_lines_int
2124: set status_code =OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
2125: dispute_code = 'OZF_PROC_PRIC_RESLT_ERR',
2126: followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
2127: response_type = 'CA',