The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT status_code,
batch_type,
partner_cust_account_id,
partner_id,
partner_party_id,
report_start_date,
report_end_date,
batch_number,
last_updated_by
FROM ozf_resale_batches
WHERE resale_batch_id = p_id;
l_last_updated_by NUMBER(15);
SELECT count(1)
From ozf_resale_lines_int
WHERE resale_batch_id = p_id
AND status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN;
SELECT resale_line_int_id
FROM ozf_resale_lines_int
WHERE resale_batch_id = p_id
AND order_number = p_order_number
AND sold_from_cust_account_id = p_cust_id
AND date_ordered = p_date
AND status_code = 'PROCESSED';
SELECT distinct order_number,
sold_from_cust_account_id,
date_ordered
FROM ozf_resale_lines_int
WHERE resale_batch_id = p_id
AND status_code = 'PROCESSED'
--AND status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED)
ORDER BY date_ordered;
SELECT NVL(SUM(amount), 0)
-- Bug 4496370 (-)
FROM ozf_claims
WHERE batch_id = p_resale_batch_id
AND batch_type = 'BATCH';
SELECT distinct substr(agreement_name, 1, 30)
FROM ozf_resale_lines_int
where resale_batch_id = p_resale_batch_id;
SELECT a.request_header_id,
a.request_number
FROM ozf_request_headers_all_vl a
WHERE a.agreement_number = p_agreement_number
AND a.status_code = 'APPROVED'
AND a.partner_id = p_partner_id
AND a.request_class = G_SPECIAL_PRICE_CLASS;
SELECT a.resale_header_id
FROM ozf_resale_headers a
, ozf_resale_lines_int b
, ozf_resale_lines c
WHERE b.resale_batch_id = p_id
AND b.order_number = p_order_number
AND b.sold_from_cust_account_id = p_cust_id
AND b.date_ordered = p_date
AND b.status_code IN ('DUPLICATED', 'PROCESSED')
AND b.duplicated_line_id = c.resale_line_id
AND c.resale_header_id = a.resale_header_id;
SELECT count(1)
FROM ozf_resale_lines_int s
, ozf_request_headers_all_b r
WHERE s.resale_batch_id = cv_batch_id
AND s.agreement_name = r.agreement_number
AND r.partner_id = cv_partner_id
AND r.status_code = 'APPROVED'
AND r.request_class = 'SPECIAL_PRICE'
AND r.offer_type='SCAN_DATA'
GROUP BY r.request_header_id
, r.request_number;
l_last_updated_by;
OZF_RESALE_COMMON_PVT.Update_Duplicates (
p_api_version => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
p_validation_level => FND_API.G_VALID_LEVEL_FULL,
p_resale_batch_id => p_resale_batch_id,
p_resale_batch_type => l_batch_type,
p_batch_status => l_batch_status,
x_batch_status => l_batch_status,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
l_order_num_tbl.DELETE;
UPDATE ozf_resale_lines_int_all
SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_MULTI_HEADER',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_batch_id = p_resale_batch_id
AND order_number = l_order_num_tbl(k).order_number
AND sold_from_cust_account_id = l_order_num_tbl(k).sold_from_cust_account_id
AND date_ordered = l_order_num_tbl(k).date_ordered
AND status_code in (OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED);
l_valid_line_id_tbl.DELETE;
UPDATE ozf_resale_lines_int
SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_LT_INVT',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_line_int_rec.resale_line_int_id;
UPDATE ozf_resale_batches
SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_DISPUTED
WHERE resale_batch_id = l_line_int_rec.resale_batch_id;
OZF_RESALE_COMMON_PVT.Insert_resale_header(
p_api_version => 1
,p_init_msg_list => FND_API.G_FALSE
,p_commit => FND_API.G_FALSE
,p_validation_level => FND_API.G_VALID_LEVEL_FULL
,p_line_int_rec => l_line_int_rec
,x_header_id => l_header_id
,x_return_status => l_return_status
,x_msg_data => l_msg_data
,x_msg_count => l_msg_count
);
OZF_RESALE_COMMON_PVT.Insert_resale_line(
p_api_version => 1
,p_init_msg_list => FND_API.G_FALSE
,p_commit => FND_API.G_FALSE
,p_validation_level => FND_API.G_VALID_LEVEL_FULL
,p_line_int_rec => l_line_int_rec
,p_header_id => l_header_id
,x_line_id => l_line_id
,x_return_status => l_return_status
,x_msg_data => l_msg_data
,x_msg_count => l_msg_count
);
OZF_SALES_TRANSACTIONS_PVT.UPDATE_inventory_tmp (
p_api_version => 1.0
,p_init_msg_list => FND_API.G_FALSE
,p_validation_level => FND_API.G_VALID_LEVEL_FULL
,p_sales_transaction_id => l_sales_transaction_id
,x_return_status => l_return_status
,x_msg_data => l_msg_data
,x_msg_count => l_msg_count
);
OZF_RESALE_COMMON_PVT.Insert_resale_line_mapping(
p_api_version => 1
,p_init_msg_list => FND_API.G_FALSE
,p_commit => FND_API.G_FALSE
,p_validation_level => FND_API.G_VALID_LEVEL_FULL
,p_resale_batch_id => p_resale_batch_id
,p_line_id => l_line_id
,x_return_status => l_return_status
,x_msg_data => l_msg_data
,x_msg_count => l_msg_count
);
,p_approver_id => l_last_updated_by
,x_return_status => l_return_status
,x_msg_data => l_msg_data
,x_msg_count => l_msg_count
);
UPDATE ozf_resale_lines_int
SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_CLOSED
WHERE resale_batch_id = p_resale_batch_id
AND status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED) ;
UPDATE ozf_resale_batches
SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_CLOSED,
paid_amount = l_amount_claimed
WHERE resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_CLOSED
WHERE resale_batch_id = p_resale_batch_id
AND status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED) ;
UPDATE ozf_resale_batches
SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_CLOSED
WHERE resale_batch_id = p_resale_batch_id;
INSERT INTO ozf_resale_logs_all(
RESALE_LOG_ID,
RESALE_ID,
RESALE_ID_TYPE,
ERROR_CODE,
ERROR_MESSAGE,
COLUMN_NAME,
COLUMN_VALUE,
ORG_ID
) SELECT
ozf_resale_logs_all_s.nextval,
resale_line_int_id,
'IFACE',
'OZF_RESALE_AGRM_TYPE_WNG',
FND_MESSAGE.get_string('OZF','OZF_RESALE_AGR_TYPE_WNG'),
'AGREEMENT_TYPE',
NULL,
org_id
FROM ozf_resale_lines_int_all b
WHERE b.status_code = 'OPEN'
AND b.tracing_flag = 'F'
AND b.agreement_type <>'SPO'
AND b.resale_batch_id = p_resale_batch_id
AND NOT EXISTS(SELECT 1
FROM ozf_resale_logs_all a
WHERE a.resale_id = b.resale_line_int_id
AND a.RESALE_ID_TYPE = 'IFACE'
AND a.error_code ='OZF_RESALE_AGRM_TYPE_WNG'
);
UPDATE ozf_resale_lines_int_all
SET status_code = 'DISPUTED',
dispute_code = 'OZF_RESALE_AGRM_TYPE_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE status_code = 'OPEN'
AND tracing_flag = 'F'
AND agreement_type <>'SPO'
AND resale_batch_id = p_resale_batch_id;
INSERT INTO ozf_resale_logs_all(
RESALE_LOG_ID,
RESALE_ID,
RESALE_ID_TYPE,
ERROR_CODE,
ERROR_MESSAGE,
COLUMN_NAME,
COLUMN_VALUE,
ORG_ID
) SELECT
ozf_resale_logs_all_s.nextval,
resale_line_int_id,
OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE,
'OZF_RESALE_PUR_PRICE_MISSING',
fnd_message.get_string('OZF','OZF_RESALE_PUR_PRICE_MISSING'),
'PURCHASE_PRICE',
NULL,
org_id
FROM ozf_resale_lines_int_all b
WHERE b.status_code = 'OPEN'
AND b.tracing_flag = 'F'
AND b.purchase_price IS NULL
AND b.resale_batch_id = p_resale_batch_id
AND NOT EXISTS(SELECT 1
FROM ozf_resale_logs_all a
WHERE a.resale_id = b.resale_line_int_id
AND a.RESALE_ID_TYPE = 'IFACE'
AND a.error_code ='OZF_RESALE_PUR_PRICE_MISSING'
);
UPDATE ozf_resale_lines_int_all
SET status_code = 'DISPUTED',
dispute_code = 'OZF_RESALE_PUR_PRICE_MISSING',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE status_code = 'OPEN'
AND tracing_flag = 'F'
AND purchase_price IS NULL
AND resale_batch_id = p_resale_batch_id;
SELECT *
FROM ozf_resale_lines_int
WHERE order_number = p_order_number
AND sold_from_cust_account_id= p_id
AND date_ordered = p_date
AND status_code = 'OPEN'
--AND status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED)
AND duplicated_adjustment_id is NULL
AND resale_batch_id = p_resale_id
AND tracing_flag = 'F';
SELECT *
FROM ozf_resale_lines_int
WHERE order_number = p_order_number
AND sold_from_cust_account_id= p_id
AND date_ordered = p_date
AND status_code = 'OPEN'
AND duplicated_adjustment_id is NULL
AND resale_batch_id = p_resale_id;
SELECT a.request_header_id,
-- BUG 4627231 (+)
-- a.start_date,
-- a.end_date,
TRUNC(a.start_date) start_date,
TRUNC(a.end_date) end_date,
-- BUG 4627231 (-)
a.currency_code,
a.request_type_code,
a.end_cust_party_id,
a.reseller_party_id,
a.offer_id,
a.offer_type,
a.ship_from_stock_flag --POS Batch Processing by profiles by ateotia
FROM ozf_request_headers_all_vl a
WHERE a.agreement_number = p_agreement_num
AND a.status_code = 'APPROVED'
AND a.partner_id = p_partner_id
AND a.request_class = G_SPECIAL_PRICE_CLASS;
SELECT sum(orl.quantity) used_quantity,
orl.uom_code
FROM ozf_resale_lines_all orl,
ozf_resale_adjustments_all ora
WHERE orl.inventory_item_id = p_inventory_item_id
AND NVL(ora.corrected_agreement_id, ora.agreement_id) = p_request_header_id
AND orl.resale_line_id = ora.resale_line_id
AND ora.agreement_type = 'SPO'
AND ora.status_code = 'CLOSED'
GROUP BY orl.uom_code;
SELECT a.request_line_id,
a.uom,
a.quantity,
a.item_price,
a.approved_type,
a.approved_amount,
a.approved_max_qty,
a.approved_min_qty
FROM ozf_request_lines_all a,
ozf_request_headers_all_vl b
WHERE a.item_type = 'PRODUCT'
AND a.item_id = p_inventory_id
AND a.request_header_id = b.request_header_id
AND b.agreement_number = p_agreement_num
AND b.status_code = 'APPROVED'
AND b.request_class = G_SPECIAL_PRICE_CLASS
AND b.partner_id = p_partner_id;
SELECT sum(l.scan_unit) * a.quantity quantity_remaining,
a.uom_code
FROM ozf_funds_utilized_all_b u,
ozf_claim_lines_util_all l,
ams_act_products a
WHERE u.utilization_id = l.utilization_id
AND u.activity_product_id = a.activity_product_id
AND u.plan_type = 'OFFR'
AND u.plan_id = p_offer_id
AND u.product_level_type = 'PRODUCT'
AND u.product_id = p_product_id
group by a.quantity, a.uom_code;
SELECT r.request_header_id,
sum(fu.acctd_amount_remaining) amount_remaining
FROM ozf_funds_utilized_all_b fu,
ozf_request_headers_all_b r
WHERE r.offer_id = fu.plan_id
AND request_header_id = p_request_header_id
GROUP BY r.request_header_id;
select LINE_TOLERANCE_OPERAND, LINE_TOLERANCE_CALC_CODE
from ozf_resale_batches
where resale_batch_id = p_id;
l_all_order_set_tbl.DELETE;
OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
p_id_value => l_all_order_set_tbl(i).resale_line_int_id,
p_id_type => OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE,
p_error_code => 'OZF_RESALE_INV_LEVEL_ERROR',
p_column_name => NULL,
p_column_value => NULL,
x_return_status => l_return_status);
UPDATE ozf_resale_lines_int_all
SET status_code = 'DISPUTED',
dispute_code = 'OZF_LT_INVT',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_resale_int_rec.resale_line_int_id;
UPDATE ozf_resale_lines_int_all
SET status_code= 'PROCESSED'
WHERE resale_line_int_id = l_resale_int_rec.resale_line_int_id
AND tracing_flag = 'T';
-- 7570302 update stock sale line to PROCESSED if inventory validation disabled
UPDATE ozf_resale_lines_int_all
SET status_code= 'PROCESSED'
WHERE resale_line_int_id = l_resale_int_rec.resale_line_int_id
AND tracing_flag = 'T';
/* UPDATE ozf_resale_lines_int_all
SET status_code = 'PROCESSED'
WHERE status_code = 'OPEN'
AND order_number = p_order_number
AND sold_from_cust_account_id = p_sold_from_cust_account_id
AND date_ordered = p_date_ordered
AND tracing_flag = 'T'
AND resale_batch_id = p_resale_batch_id; -- bug 5222273 */
l_order_set_tbl.DELETE;
OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
p_id_value => l_order_set_tbl(J).resale_line_int_id,
p_id_type => OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE,
p_error_code => 'OZF_RESALE_INV_LEVEL_ERROR',
p_column_name => NULL,
p_column_value => NULL,
x_return_status => l_return_status);
UPDATE ozf_resale_lines_int_all
SET status_code = 'DISPUTED',
dispute_code = 'OZF_LT_INVT',
followup_action_code = 'C',
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_resale_int_rec.resale_line_int_id;
OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
p_id_value => l_order_set_tbl(J).resale_line_int_id,
p_id_type => OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE,
p_error_code => 'OZF_RESALE_AGRM_WNG',
p_column_name => NULL,
p_column_value => NULL,
x_return_status => l_return_status
);
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
p_id_value => l_order_set_tbl(J).resale_line_int_id,
p_id_type => OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE,
p_error_code => 'OZF_RESALE_AGRM_RANG_WNG',
p_column_name => NULL,
p_column_value => NULL,
x_return_status => l_return_status
);
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_RANG_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_CURRENCY_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_END_CUST_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_RESELL_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_RESELL_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_RESELL_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_OFF_NULL',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_OFF_OFF_INV',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
p_id_value => l_order_set_tbl(J).resale_line_int_id,
p_id_type => OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE,
p_error_code => 'OZF_RESALE_AGRM_PROD_WNG',
p_column_name => 'ITEM_NUMBER',
p_column_value => l_order_set_tbl(J).item_number,
x_return_status => l_return_status
);
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_LINE_WNG',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_SPP_NO_UOM_CONV_MAX',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_SPP_NO_UOM_CONV_MIN',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_SPP_NO_UOM_CONV_CURR',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_QUN_GT_MAX',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
UPDATE ozf_resale_lines_int
SET status_code=OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_RESALE_AGRM_QUN_LT_MIN',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
WHERE resale_line_int_id = l_order_set_tbl(J).resale_line_int_id
AND resale_batch_id = p_resale_batch_id;
OZF_RESALE_COMMON_PVT.Update_Line_Calculations(
p_resale_line_int_rec => l_order_set_tbl(J),
p_unit_price => l_reqeust_line_item_price,
p_line_quantity => l_current_quantity,
p_allowed_amount => l_request_line_apprv_amt,
x_return_status => l_return_status);
SELECT partner_id
, report_start_date
, report_end_date
FROM ozf_resale_batches
where resale_batch_id = p_resale_batch_id;
SELECT DISTINCT order_number,
sold_from_cust_account_id,
date_ordered
FROM ozf_resale_lines_int
WHERE status_code = 'OPEN'
--status_code in(OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN, OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DUPLICATED)
AND duplicated_adjustment_id IS NULL
AND resale_batch_id = p_resale_batch_id
ORDER BY date_ordered;
OZF_RESALE_COMMON_PVT.Delete_Log(
p_api_version => 1.0
,p_init_msg_list => FND_API.G_FALSE
,p_commit => FND_API.G_FALSE
,p_validation_level => FND_API.G_VALID_LEVEL_FULL
,p_resale_batch_id => p_resale_batch_id
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data
);
update ozf_resale_lines_int
set status_code =OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,
dispute_code = 'OZF_PROC_PRIC_RESLT_ERR',
followup_action_code = NVL2(followup_action_code,followup_action_code,'C'),
response_type = 'CA',
response_code = 'N'
where status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_OPEN
and order_number = l_order_num_tbl(i)
and sold_from_cust_account_id =l_cust_account_id_tbl(i)
and date_ordered = l_order_date_tbl(i)
and resale_batch_id = p_resale_batch_id;
OZF_RESALE_COMMON_PVT.Update_Batch_Calculations (
p_api_version => 1.0
,p_init_msg_list => FND_API.G_FALSE
,p_commit => FND_API.G_FALSE
,p_validation_level => FND_API.G_VALID_LEVEL_FULL
,p_resale_batch_id => p_resale_batch_id
,x_return_status => l_return_status
,x_msg_data => l_msg_data
,x_msg_count => l_msg_count
);