DBA Data[Home] [Help]

APPS.OZF_CHARGEBACK_PVT dependencies on OZF_UTILITY_PVT

Line 238: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');

234: END IF;
235:
236: -- Debug Message
237: IF OZF_DEBUG_HIGH_ON THEN
238: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
239: END IF;
240:
241: -- Initialize API return status to sucess
242: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 258: OZF_UTILITY_PVT.debug_message('status ' ||l_batch_status);

254: l_partner_claim_num;
255: CLOSE batch_info_csr;
256:
257: IF OZF_DEBUG_LOW_ON THEN
258: OZF_UTILITY_PVT.debug_message('status ' ||l_batch_status);
259: OZF_UTILITY_PVT.debug_message('compare to ' ||OZF_RESALE_COMMON_PVT.G_BATCH_PENDING_PAYMENT);
260: END IF;
261:
262: -- --------------------------------------------------

Line 259: OZF_UTILITY_PVT.debug_message('compare to ' ||OZF_RESALE_COMMON_PVT.G_BATCH_PENDING_PAYMENT);

255: CLOSE batch_info_csr;
256:
257: IF OZF_DEBUG_LOW_ON THEN
258: OZF_UTILITY_PVT.debug_message('status ' ||l_batch_status);
259: OZF_UTILITY_PVT.debug_message('compare to ' ||OZF_RESALE_COMMON_PVT.G_BATCH_PENDING_PAYMENT);
260: END IF;
261:
262: -- --------------------------------------------------
263: -- Stop Initiate_Payment if

Line 270: OZF_UTILITY_PVT.error_message('OZF_RESALE_WRONG_STAUS_TO_PAY');

266: -- --------------------------------------------------
267:
268: IF l_batch_status <> OZF_RESALE_COMMON_PVT.G_BATCH_PENDING_PAYMENT THEN
269: -- Only DISPUTED AND PROCESSED batch can be paid.
270: OZF_UTILITY_PVT.error_message('OZF_RESALE_WRONG_STAUS_TO_PAY');
271: RAISE FND_API.g_exc_error;
272: END IF;
273:
274: OPEN open_line_count_csr(p_resale_batch_id);

Line 280: OZF_UTILITY_PVT.error_message('OZF_RESALE_OPEN_LINE_EXIST');

276: CLOSE open_line_count_csr;
277:
278: IF l_count IS NOT NULL AND l_count <> 0 THEN
279: --Can not pay if there is an OPEN line
280: OZF_UTILITY_PVT.error_message('OZF_RESALE_OPEN_LINE_EXIST');
281: RAISE FND_API.g_exc_error;
282: END IF;
283:
284:

Line 290: --OZF_UTILITY_PVT.error_message('OZF_CHBK_BUDGET_NULL');

286: -- Get the budget where accruals are posted
287: l_chargeback_fund_id := FND_PROFILE.value('OZF_CHARGEBACK_BUDGET');
288: --
289: IF l_chargeback_fund_id IS NULL THEN
290: --OZF_UTILITY_PVT.error_message('OZF_CHBK_BUDGET_NULL');
291:
292: OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
293: p_id_value => p_resale_batch_id
294: ,p_id_type => OZF_RESALE_COMMON_PVT.G_ID_TYPE_BATCH

Line 315: OZF_UTILITY_PVT.debug_message('Chargeback Budget: ' || l_chargeback_fund_id);

311: --RAISE FND_API.g_exc_error;
312: END IF;
313: --
314: IF OZF_DEBUG_HIGH_ON THEN
315: OZF_UTILITY_PVT.debug_message('Chargeback Budget: ' || l_chargeback_fund_id);
316: END IF;
317:
318: -- Check whether there is a need to do inventory_verification
319: OPEN OZF_RESALE_COMMON_PVT.g_inventory_tracking_csr;

Line 336: OZF_UTILITY_PVT.error_message('OZF_RESALE_INIT_INV_TMP_ERR');

332: ,x_msg_count => l_msg_count
333: ,x_msg_data => l_msg_data
334: );
335: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
336: OZF_UTILITY_PVT.error_message('OZF_RESALE_INIT_INV_TMP_ERR');
337: RAISE FND_API.G_EXC_ERROR;
338: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
339: OZF_UTILITY_PVT.error_message('OZF_RESALE_INIT_INV_TMP_ERR');
340: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 339: OZF_UTILITY_PVT.error_message('OZF_RESALE_INIT_INV_TMP_ERR');

335: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
336: OZF_UTILITY_PVT.error_message('OZF_RESALE_INIT_INV_TMP_ERR');
337: RAISE FND_API.G_EXC_ERROR;
338: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
339: OZF_UTILITY_PVT.error_message('OZF_RESALE_INIT_INV_TMP_ERR');
340: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
341: END IF;
342: END IF;
343:

Line 472: ozf_utility_PVT.debug_message('PROCESS ORDER: ');

468:
469: IF l_order_num_tbl.EXISTS(1) THEN -- IF B
470: FOR k in 1..l_order_num_tbl.LAST LOOP -- FOR C
471: IF OZF_DEBUG_LOW_ON THEN
472: ozf_utility_PVT.debug_message('PROCESS ORDER: ');
473: ozf_utility_PVT.debug_message('ORDER NUMBER: '||l_order_num_tbl(k).order_number);
474: ozf_utility_PVT.debug_message('SOLD_FROM_ACCT: '||l_order_num_tbl(k).sold_from_cust_account_id);
475: ozf_utility_PVT.debug_message('DATE ORDERED: '||l_order_num_tbl(k).date_ordered);
476: END IF;

Line 473: ozf_utility_PVT.debug_message('ORDER NUMBER: '||l_order_num_tbl(k).order_number);

469: IF l_order_num_tbl.EXISTS(1) THEN -- IF B
470: FOR k in 1..l_order_num_tbl.LAST LOOP -- FOR C
471: IF OZF_DEBUG_LOW_ON THEN
472: ozf_utility_PVT.debug_message('PROCESS ORDER: ');
473: ozf_utility_PVT.debug_message('ORDER NUMBER: '||l_order_num_tbl(k).order_number);
474: ozf_utility_PVT.debug_message('SOLD_FROM_ACCT: '||l_order_num_tbl(k).sold_from_cust_account_id);
475: ozf_utility_PVT.debug_message('DATE ORDERED: '||l_order_num_tbl(k).date_ordered);
476: END IF;
477:

Line 474: ozf_utility_PVT.debug_message('SOLD_FROM_ACCT: '||l_order_num_tbl(k).sold_from_cust_account_id);

470: FOR k in 1..l_order_num_tbl.LAST LOOP -- FOR C
471: IF OZF_DEBUG_LOW_ON THEN
472: ozf_utility_PVT.debug_message('PROCESS ORDER: ');
473: ozf_utility_PVT.debug_message('ORDER NUMBER: '||l_order_num_tbl(k).order_number);
474: ozf_utility_PVT.debug_message('SOLD_FROM_ACCT: '||l_order_num_tbl(k).sold_from_cust_account_id);
475: ozf_utility_PVT.debug_message('DATE ORDERED: '||l_order_num_tbl(k).date_ordered);
476: END IF;
477:
478: -- [begin jxwu header_fix]:

Line 475: ozf_utility_PVT.debug_message('DATE ORDERED: '||l_order_num_tbl(k).date_ordered);

471: IF OZF_DEBUG_LOW_ON THEN
472: ozf_utility_PVT.debug_message('PROCESS ORDER: ');
473: ozf_utility_PVT.debug_message('ORDER NUMBER: '||l_order_num_tbl(k).order_number);
474: ozf_utility_PVT.debug_message('SOLD_FROM_ACCT: '||l_order_num_tbl(k).sold_from_cust_account_id);
475: ozf_utility_PVT.debug_message('DATE ORDERED: '||l_order_num_tbl(k).date_ordered);
476: END IF;
477:
478: -- [begin jxwu header_fix]:
479: -- Here, I assume if a line is the duplicate of another line, then they share

Line 552: OZF_UTILITY_PVT.debug_message('Current line_int_id:' || l_valid_line_id_tbl(j).id);

548: -- I then try to create resale data.
549: FOR j in 1..l_valid_line_id_tbl.last -- FOR E
550: LOOP
551: IF OZF_DEBUG_LOW_ON THEN
552: OZF_UTILITY_PVT.debug_message('Current line_int_id:' || l_valid_line_id_tbl(j).id);
553: END IF;
554:
555: OPEN OZF_RESALE_COMMON_PVT.g_interface_rec_csr(l_valid_line_id_tbl(j).id);
556: FETCH OZF_RESALE_COMMON_PVT.g_interface_rec_csr INTO l_line_int_rec;

Line 578: OZF_UTILITY_PVT.debug_message('Did NOT pass inventory checking');

574: ,x_msg_data => l_msg_data
575: );
576: IF NOT l_inventory_level_valid THEN
577: IF OZF_DEBUG_LOW_ON THEN
578: OZF_UTILITY_PVT.debug_message('Did NOT pass inventory checking');
579: END IF;
580: -- Here turn thIS line to DISPUTED AND create a dISput code FOR it.
581: UPDATE ozf_resale_lines_int
582: SET status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,

Line 628: OZF_UTILITY_PVT.debug_message('header_id is '|| l_header_id);

624: END IF;
625: END IF;
626:
627: IF OZF_DEBUG_LOW_ON THEN
628: OZF_UTILITY_PVT.debug_message('header_id is '|| l_header_id);
629: END IF;
630:
631: IF l_line_int_rec.status_code = OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_PROCESSED THEN
632: IF (l_line_int_rec.duplicated_line_id IS NULL) OR

Line 709: OZF_UTILITY_PVT.debug_message('line_id is '|| l_line_id);

705: l_line_id := l_line_int_rec.duplicated_line_id;
706: END IF;
707:
708: IF OZF_DEBUG_LOW_ON THEN
709: OZF_UTILITY_PVT.debug_message('line_id is '|| l_line_id);
710: END IF;
711:
712: IF l_line_int_rec.status_code = 'PROCESSED' THEN
713: -- Create Resale Line Mappings only for Processed Lines

Line 816: OZF_UTILITY_PVT.debug_message('new claim_id:' || l_claim_id);

812: END IF;
813:
814:
815: IF OZF_DEBUG_LOW_ON THEN
816: OZF_UTILITY_PVT.debug_message('new claim_id:' || l_claim_id);
817: END IF;
818:
819: -- Claim is created successfully.
820: IF l_claim_id IS NOT NULL THEN

Line 851: OZF_UTILITY_PVT.error_message('OZF_UPD_RESALE_WRG','TEXT',l_full_name||': End');

847: WHERE resale_batch_id = p_resale_batch_id;
848:
849: EXCEPTION
850: WHEN OTHERS THEN
851: OZF_UTILITY_PVT.error_message('OZF_UPD_RESALE_WRG','TEXT',l_full_name||': End');
852: RAISE FND_API.g_exc_unexpected_error;
853: END;
854:
855: -- mchang: Run Third Party Accrual After Chargeback Calculation was

Line 870: OZF_UTILITY_PVT.debug_message(l_full_name||': End');

866: END IF; -- END IF batch processed or disputed
867:
868: -- Debug Message
869: IF OZF_DEBUG_HIGH_ON THEN
870: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
871: END IF;
872:
873: --Standard call to get message count AND if count=1, get the message
874: FND_MSG_PUB.Count_and_Get (

Line 978: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');

974: END IF;
975:
976: -- Debug Message
977: IF OZF_DEBUG_HIGH_ON THEN
978: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
979: END IF;
980:
981: --Initialize message lISt if p_init_msg_list IS TRUE.
982: IF FND_API.To_BOOLEAN (p_init_msg_list) THEN

Line 1039: OZF_UTILITY_PVT.debug_message(l_full_name||': End');

1035: --
1036:
1037: -- Debug Message
1038: IF OZF_DEBUG_HIGH_ON THEN
1039: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
1040: END IF;
1041:
1042: --Standard call to get message count AND if count=1, get the message
1043: FND_MSG_PUB.Count_and_Get (

Line 1172: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');

1168: x_return_status := FND_API.G_RET_STS_SUCCESS;
1169:
1170: -- Debug Message
1171: IF OZF_DEBUG_HIGH_ON THEN
1172: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
1173: END IF;
1174:
1175: -- First check whether the order result collection EXISTS or NOT
1176: IF p_line_tbl.EXISTS(1) THEN

Line 1179: OZF_UTILITY_PVT.debug_message('There is one line');

1175: -- First check whether the order result collection EXISTS or NOT
1176: IF p_line_tbl.EXISTS(1) THEN
1177:
1178: IF OZF_DEBUG_LOW_ON THEN
1179: OZF_UTILITY_PVT.debug_message('There is one line');
1180: END IF;
1181:
1182: OPEN order_identifiers_csr(p_line_tbl(1).chargeback_int_id);
1183: FETCH order_identifiers_csr INTO l_order_number, l_cust_account_id, l_date_ordered;

Line 1193: OZF_UTILITY_PVT.debug_message('pricing status code ' || p_line_tbl(i).pricing_status_code);

1189: l_is_error := p_line_tbl(i).pricing_status_code <> QP_PREQ_PUB.G_STATUS_NEW AND
1190: p_line_tbl(i).pricing_status_code <> QP_PREQ_PUB.G_STATUS_UNCHANGED AND
1191: p_line_tbl(i).pricing_status_code <> QP_PREQ_PUB.G_STATUS_UPDATED;
1192: IF OZF_DEBUG_LOW_ON THEN
1193: OZF_UTILITY_PVT.debug_message('pricing status code ' || p_line_tbl(i).pricing_status_code);
1194: END IF;
1195:
1196: IF l_is_error then
1197: IF OZF_DEBUG_LOW_ON THEN

Line 1198: OZF_UTILITY_PVT.debug_message('line '||p_line_tbl(i).chargeback_int_id || ' has pricing error' );

1194: END IF;
1195:
1196: IF l_is_error then
1197: IF OZF_DEBUG_LOW_ON THEN
1198: OZF_UTILITY_PVT.debug_message('line '||p_line_tbl(i).chargeback_int_id || ' has pricing error' );
1199: END IF;
1200: BEGIN
1201: update ozf_resale_lines_int
1202: set status_code =OZF_RESALE_COMMON_PVT.G_BATCH_ADJ_DISPUTED,

Line 1210: ozf_utility_pvt.error_message('OZF_UPD_RESALE_INT_WRG');

1206: response_code = 'N'
1207: where resale_line_int_id = p_line_tbl(i).chargeback_int_id;
1208: EXCEPTION
1209: WHEN OTHERS THEN
1210: ozf_utility_pvt.error_message('OZF_UPD_RESALE_INT_WRG');
1211: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1212: END;
1213:
1214: OZF_RESALE_COMMON_PVT.Insert_Resale_Log (

Line 1297: ozf_utility_pvt.error_message( 'OZF_UPD_RESALE_INT_WRG');

1293: AND dispute_code is null
1294: AND resale_batch_id = p_resale_batch_id;
1295: EXCEPTION
1296: WHEN OTHERS THEN
1297: ozf_utility_pvt.error_message( 'OZF_UPD_RESALE_INT_WRG');
1298: RAISE FND_API.g_exc_unexpected_error;
1299: END;
1300:
1301: ELSE

Line 1304: OZF_UTILITY_PVT.debug_message('No Error in the result' );

1300:
1301: ELSE
1302: -- There is no error in the result. We need to process the result one by one.
1303: IF OZF_DEBUG_LOW_ON THEN
1304: OZF_UTILITY_PVT.debug_message('No Error in the result' );
1305: END IF;
1306:
1307: -- get functional currency code AND convertion type
1308: OPEN func_currency_cd_csr;

Line 1331: OZF_UTILITY_PVT.debug_message('Need inventory tracking' );

1327: l_resale_int_rec.duplicated_line_id IS NULL AND
1328: ( l_resale_int_rec.duplicated_adjustment_id IS NULL
1329: OR l_resale_int_rec.duplicated_adjustment_id = -1 ) THEN
1330: IF OZF_DEBUG_LOW_ON THEN
1331: OZF_UTILITY_PVT.debug_message('Need inventory tracking' );
1332: END IF;
1333:
1334: -- Check inventory level first
1335: OZF_SALES_TRANSACTIONS_PVT.Validate_Inventory_level (

Line 1348: OZF_UTILITY_PVT.debug_message('Did not pass inventory checking');

1344: );
1345:
1346: IF NOT l_inventory_level_valid THEN
1347: IF OZF_DEBUG_LOW_ON THEN
1348: OZF_UTILITY_PVT.debug_message('Did not pass inventory checking');
1349: END IF;
1350: --
1351: OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
1352: p_id_value => p_line_tbl(i).chargeback_int_id,

Line 1382: OZF_UTILITY_PVT.debug_message('Pass inventory test' );

1378: --
1379: GOTO END_LOOP3;
1380: ELSE
1381: IF OZF_DEBUG_LOW_ON THEN
1382: OZF_UTILITY_PVT.debug_message('Pass inventory test' );
1383: END IF;
1384: END IF;
1385: --
1386: END IF;

Line 1402: OZF_UTILITY_PVT.error_message('OZF_CLAIM_CONTYPE_MISSING');

1398: l_exchange_type := l_default_exchange_type;
1399: END IF;
1400:
1401: IF l_exchange_type IS NULL THEN
1402: OZF_UTILITY_PVT.error_message('OZF_CLAIM_CONTYPE_MISSING');
1403: RAISE FND_API.g_exc_unexpected_error;
1404: END IF;
1405:
1406: IF l_exchange_date IS NULL THEN

Line 1410: OZF_UTILITY_PVT.debug_message('FROM currency:' || l_resale_int_rec.currency_code);

1406: IF l_exchange_date IS NULL THEN
1407: l_exchange_date := sysdate;
1408: END IF;
1409: IF OZF_DEBUG_LOW_ON THEN
1410: OZF_UTILITY_PVT.debug_message('FROM currency:' || l_resale_int_rec.currency_code);
1411: OZF_UTILITY_PVT.debug_message('to currency:' || l_func_currency_code);
1412: OZF_UTILITY_PVT.debug_message('rate:' || l_rate);
1413: OZF_UTILITY_PVT.debug_message('exchange DATE:' || l_exchange_date);
1414: OZF_UTILITY_PVT.debug_message('exchange type:' || l_exchange_type);

Line 1411: OZF_UTILITY_PVT.debug_message('to currency:' || l_func_currency_code);

1407: l_exchange_date := sysdate;
1408: END IF;
1409: IF OZF_DEBUG_LOW_ON THEN
1410: OZF_UTILITY_PVT.debug_message('FROM currency:' || l_resale_int_rec.currency_code);
1411: OZF_UTILITY_PVT.debug_message('to currency:' || l_func_currency_code);
1412: OZF_UTILITY_PVT.debug_message('rate:' || l_rate);
1413: OZF_UTILITY_PVT.debug_message('exchange DATE:' || l_exchange_date);
1414: OZF_UTILITY_PVT.debug_message('exchange type:' || l_exchange_type);
1415: END IF;

Line 1412: OZF_UTILITY_PVT.debug_message('rate:' || l_rate);

1408: END IF;
1409: IF OZF_DEBUG_LOW_ON THEN
1410: OZF_UTILITY_PVT.debug_message('FROM currency:' || l_resale_int_rec.currency_code);
1411: OZF_UTILITY_PVT.debug_message('to currency:' || l_func_currency_code);
1412: OZF_UTILITY_PVT.debug_message('rate:' || l_rate);
1413: OZF_UTILITY_PVT.debug_message('exchange DATE:' || l_exchange_date);
1414: OZF_UTILITY_PVT.debug_message('exchange type:' || l_exchange_type);
1415: END IF;
1416:

Line 1413: OZF_UTILITY_PVT.debug_message('exchange DATE:' || l_exchange_date);

1409: IF OZF_DEBUG_LOW_ON THEN
1410: OZF_UTILITY_PVT.debug_message('FROM currency:' || l_resale_int_rec.currency_code);
1411: OZF_UTILITY_PVT.debug_message('to currency:' || l_func_currency_code);
1412: OZF_UTILITY_PVT.debug_message('rate:' || l_rate);
1413: OZF_UTILITY_PVT.debug_message('exchange DATE:' || l_exchange_date);
1414: OZF_UTILITY_PVT.debug_message('exchange type:' || l_exchange_type);
1415: END IF;
1416:
1417: -- convert unit price

Line 1414: OZF_UTILITY_PVT.debug_message('exchange type:' || l_exchange_type);

1410: OZF_UTILITY_PVT.debug_message('FROM currency:' || l_resale_int_rec.currency_code);
1411: OZF_UTILITY_PVT.debug_message('to currency:' || l_func_currency_code);
1412: OZF_UTILITY_PVT.debug_message('rate:' || l_rate);
1413: OZF_UTILITY_PVT.debug_message('exchange DATE:' || l_exchange_date);
1414: OZF_UTILITY_PVT.debug_message('exchange type:' || l_exchange_type);
1415: END IF;
1416:
1417: -- convert unit price
1418: OZF_UTILITY_PVT.Convert_Currency(

Line 1418: OZF_UTILITY_PVT.Convert_Currency(

1414: OZF_UTILITY_PVT.debug_message('exchange type:' || l_exchange_type);
1415: END IF;
1416:
1417: -- convert unit price
1418: OZF_UTILITY_PVT.Convert_Currency(
1419: p_from_currency => l_resale_int_rec.CURRENCY_CODE
1420: ,p_to_currency => l_func_currency_code
1421: ,p_conv_type => l_exchange_type
1422: ,p_conv_rate => l_rate

Line 1435: OZF_UTILITY_PVT.Convert_Currency(

1431: RAISE FND_API.g_exc_unexpected_error;
1432: END IF;
1433:
1434: -- convert adjusted selling price
1435: OZF_UTILITY_PVT.Convert_Currency(
1436: p_from_currency => l_resale_int_rec.CURRENCY_CODE
1437: ,p_to_currency => l_func_currency_code
1438: ,p_conv_type => l_exchange_type
1439: ,p_conv_rate => l_rate

Line 1451: l_acctd_adj_unit_price := OZF_UTILITY_PVT.CurrRound(p_line_tbl(i).unit_price*l_rate, l_func_currency_code);

1447: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1448: RAISE FND_API.g_exc_unexpected_error;
1449: END IF;
1450: ELSE
1451: l_acctd_adj_unit_price := OZF_UTILITY_PVT.CurrRound(p_line_tbl(i).unit_price*l_rate, l_func_currency_code);
1452: l_acctd_selling_price := OZF_UTILITY_PVT.CurrRound(l_resale_int_rec.selling_price*l_rate, l_func_currency_code);
1453: END IF;
1454: ELSE
1455: l_rate := 1;

Line 1452: l_acctd_selling_price := OZF_UTILITY_PVT.CurrRound(l_resale_int_rec.selling_price*l_rate, l_func_currency_code);

1448: RAISE FND_API.g_exc_unexpected_error;
1449: END IF;
1450: ELSE
1451: l_acctd_adj_unit_price := OZF_UTILITY_PVT.CurrRound(p_line_tbl(i).unit_price*l_rate, l_func_currency_code);
1452: l_acctd_selling_price := OZF_UTILITY_PVT.CurrRound(l_resale_int_rec.selling_price*l_rate, l_func_currency_code);
1453: END IF;
1454: ELSE
1455: l_rate := 1;
1456: l_acctd_adj_unit_price := p_line_tbl(i).unit_price;

Line 1479: l_unit_purchase_price := OZF_UTILITY_PVT.CurrRound(l_resale_int_rec.purchase_price/l_uom_ratio

1475: 1,
1476: l_resale_int_rec.purchase_uom_code,
1477: l_resale_int_rec.uom_code,
1478: null, null);
1479: l_unit_purchase_price := OZF_UTILITY_PVT.CurrRound(l_resale_int_rec.purchase_price/l_uom_ratio
1480: , l_resale_int_rec.currency_code);
1481: END IF;
1482:
1483: IF OZF_DEBUG_LOW_ON THEN

Line 1484: OZF_UTILITY_PVT.debug_message('Unit Purchase Price:' || l_unit_purchase_price);

1480: , l_resale_int_rec.currency_code);
1481: END IF;
1482:
1483: IF OZF_DEBUG_LOW_ON THEN
1484: OZF_UTILITY_PVT.debug_message('Unit Purchase Price:' || l_unit_purchase_price);
1485: END IF;
1486: -- Get allowed amount
1487: IF p_line_tbl(i).unit_price < l_unit_purchase_price THEN
1488: IF SIGN(p_line_tbl(i).line_quantity) = -1 THEN

Line 1499: OZF_UTILITY_PVT.debug_message('Allowed amount:' || l_allowed_amount);

1495: l_allowed_amount := 0;
1496: END IF;
1497:
1498: IF OZF_DEBUG_LOW_ON THEN
1499: OZF_UTILITY_PVT.debug_message('Allowed amount:' || l_allowed_amount);
1500: END IF;
1501:
1502: -- Update the results of Chargeback Calculation
1503: OZF_RESALE_COMMON_PVT.Update_Line_Calculations(

Line 1537: OZF_UTILITY_PVT.debug_message('There is no line to be processed');

1533: --
1534: END IF; -- END of l_has_error
1535: ELSE
1536: IF OZF_DEBUG_LOW_ON THEN
1537: OZF_UTILITY_PVT.debug_message('There is no line to be processed');
1538: END IF;
1539: END IF; -- END of EXISTS
1540:
1541: -- Debug Message

Line 1543: OZF_UTILITY_PVT.debug_message(l_full_name||': End');

1539: END IF; -- END of EXISTS
1540:
1541: -- Debug Message
1542: IF OZF_DEBUG_HIGH_ON THEN
1543: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
1544: END IF;
1545:
1546: EXCEPTION
1547: WHEN FND_API.g_exc_error THEN

Line 1650: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');

1646: --
1647: BEGIN
1648: -- Debug Message
1649: IF OZF_DEBUG_HIGH_ON THEN
1650: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
1651: END IF;
1652:
1653: SAVEPOINT Get_Order_Price;
1654:

Line 1673: OZF_UTILITY_PVT.debug_message(l_full_name || ' Validating tracing line ' || l_order_set_trc_tbl(i).resale_line_int_id);

1669: CLOSE c_order_set_trc;
1670:
1671: IF l_order_set_trc_tbl.COUNT > 0 THEN
1672: FOR i IN 1..l_order_set_trc_tbl.COUNT LOOP
1673: OZF_UTILITY_PVT.debug_message(l_full_name || ' Validating tracing line ' || l_order_set_trc_tbl(i).resale_line_int_id);
1674: OPEN OZF_RESALE_COMMON_PVT.g_interface_rec_csr(l_order_set_trc_tbl(i).resale_line_int_id);
1675: FETCH OZF_RESALE_COMMON_PVT.g_interface_rec_csr INTO l_resale_int_rec;
1676: CLOSE OZF_RESALE_COMMON_PVT.g_interface_rec_csr;
1677:

Line 1693: OZF_UTILITY_PVT.debug_message('Did NOT pass inventory checking');

1689: );
1690:
1691: IF NOT l_inventory_level_valid THEN
1692: IF OZF_DEBUG_LOW_ON THEN
1693: OZF_UTILITY_PVT.debug_message('Did NOT pass inventory checking');
1694: END IF;
1695:
1696: -- log
1697: OZF_RESALE_COMMON_PVT.Insert_Resale_Log (

Line 1744: OZF_UTILITY_PVT.debug_message('Event:' ||l_control_rec.pricing_event );

1740: l_control_rec.gsa_dup_check_flag := 'N';
1741: l_control_rec.temp_table_insert_flag := 'N';
1742:
1743: IF OZF_DEBUG_LOW_ON THEN
1744: OZF_UTILITY_PVT.debug_message('Event:' ||l_control_rec.pricing_event );
1745: END IF;
1746:
1747: -- Price flag has to be Y to get the price.
1748: l_price_flag := 'Y';

Line 1751: OZF_UTILITY_PVT.debug_message('Price flag:' ||l_price_flag );

1747: -- Price flag has to be Y to get the price.
1748: l_price_flag := 'Y';
1749:
1750: IF OZF_DEBUG_LOW_ON THEN
1751: OZF_UTILITY_PVT.debug_message('Price flag:' ||l_price_flag );
1752: END IF;
1753:
1754: QP_Price_Request_Context.Set_Request_Id;
1755:

Line 1757: OZF_UTILITY_PVT.debug_message('/*--- Processing order for order number:'||p_order_number||'---*/');

1753:
1754: QP_Price_Request_Context.Set_Request_Id;
1755:
1756: IF OZF_DEBUG_LOW_ON THEN
1757: OZF_UTILITY_PVT.debug_message('/*--- Processing order for order number:'||p_order_number||'---*/');
1758: OZF_UTILITY_PVT.debug_message('/*--- and cusomter:'||p_sold_from_cust_acct_id||'---*/');
1759: END IF;
1760:
1761: -- Before start process, clean up the data structures if necessary.

Line 1758: OZF_UTILITY_PVT.debug_message('/*--- and cusomter:'||p_sold_from_cust_acct_id||'---*/');

1754: QP_Price_Request_Context.Set_Request_Id;
1755:
1756: IF OZF_DEBUG_LOW_ON THEN
1757: OZF_UTILITY_PVT.debug_message('/*--- Processing order for order number:'||p_order_number||'---*/');
1758: OZF_UTILITY_PVT.debug_message('/*--- and cusomter:'||p_sold_from_cust_acct_id||'---*/');
1759: END IF;
1760:
1761: -- Before start process, clean up the data structures if necessary.
1762: IF l_order_set_tbl.EXISTS(1) THEN l_order_set_tbl.DELETE; END IF;

Line 1783: OZF_UTILITY_PVT.debug_message('after order set'||l_order_set_tbl.count);

1779: --END LOOP;
1780: CLOSE order_set_csr;
1781:
1782: IF OZF_DEBUG_LOW_ON THEN
1783: OZF_UTILITY_PVT.debug_message('after order set'||l_order_set_tbl.count);
1784: END IF;
1785:
1786: IF l_order_set_tbl.EXISTS(1) THEN
1787: FOR J in 1..l_order_set_tbl.LAST

Line 1803: OZF_UTILITY_PVT.debug_message('/*--- Buidling order line info for inteface id: '||l_order_set_tbl(J).resale_line_int_id ||'---*/');

1799: END IF;
1800: RAISE FND_API.g_exc_unexpected_error;
1801: END;
1802: IF OZF_DEBUG_LOW_ON THEN
1803: OZF_UTILITY_PVT.debug_message('/*--- Buidling order line info for inteface id: '||l_order_set_tbl(J).resale_line_int_id ||'---*/');
1804: END IF;
1805:
1806: -- insert INTO l_line_tbl
1807: l_line_tbl(J).line_index := J;

Line 1945: OZF_UTILITY_PVT.debug_message('/*---END Buidling order line FOR inteface id: '||l_order_set_tbl(J).resale_line_int_id ||'---*/');

1941: -- R12 Populate Global Resale Structure (-)
1942:
1943:
1944: IF OZF_DEBUG_LOW_ON THEN
1945: OZF_UTILITY_PVT.debug_message('/*---END Buidling order line FOR inteface id: '||l_order_set_tbl(J).resale_line_int_id ||'---*/');
1946: END IF;
1947: END LOOP;
1948: IF OZF_DEBUG_LOW_ON THEN
1949: OZF_UTILITY_PVT.debug_message('/*--- Buidling order header FOR order ---*/');

Line 1949: OZF_UTILITY_PVT.debug_message('/*--- Buidling order header FOR order ---*/');

1945: OZF_UTILITY_PVT.debug_message('/*---END Buidling order line FOR inteface id: '||l_order_set_tbl(J).resale_line_int_id ||'---*/');
1946: END IF;
1947: END LOOP;
1948: IF OZF_DEBUG_LOW_ON THEN
1949: OZF_UTILITY_PVT.debug_message('/*--- Buidling order header FOR order ---*/');
1950: END IF;
1951:
1952: -- build summary line
1953: k := l_order_set_tbl.LAST +1;

Line 2012: OZF_UTILITY_PVT.debug_message('/*---END Buidling order header FOR order ---*/');

2008: OZF_ORDER_PRICE_PVT.G_HEADER_REC.price_list_id := l_line_tbl(1).price_list_id;
2009: OZF_ORDER_PRICE_PVT.G_HEADER_REC.request_date := l_order_set_tbl(1).date_ordered;
2010: OZF_ORDER_PRICE_PVT.G_HEADER_REC.pricing_date := l_order_set_tbl(1).date_ordered;
2011: IF OZF_DEBUG_HIGH_ON THEN
2012: OZF_UTILITY_PVT.debug_message('/*---END Buidling order header FOR order ---*/');
2013: OZF_UTILITY_PVT.debug_message('/*--- Calling get order price ---*/');
2014: END IF;
2015:
2016: -- Get the agreement price for order lines

Line 2013: OZF_UTILITY_PVT.debug_message('/*--- Calling get order price ---*/');

2009: OZF_ORDER_PRICE_PVT.G_HEADER_REC.request_date := l_order_set_tbl(1).date_ordered;
2010: OZF_ORDER_PRICE_PVT.G_HEADER_REC.pricing_date := l_order_set_tbl(1).date_ordered;
2011: IF OZF_DEBUG_HIGH_ON THEN
2012: OZF_UTILITY_PVT.debug_message('/*---END Buidling order header FOR order ---*/');
2013: OZF_UTILITY_PVT.debug_message('/*--- Calling get order price ---*/');
2014: END IF;
2015:
2016: -- Get the agreement price for order lines
2017: OZF_ORDER_PRICE_PVT.Get_Order_Price (

Line 2041: OZF_UTILITY_PVT.debug_message(l_full_name||': End');

2037: END IF;
2038:
2039: -- Debug Message
2040: IF OZF_DEBUG_HIGH_ON THEN
2041: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
2042: END IF;
2043: EXCEPTION
2044: WHEN FND_API.g_exc_error THEN
2045: ROLLBACK TO Get_Order_Price;

Line 2146: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||': Start');

2142: END IF;
2143:
2144: -- Debug Message
2145: IF OZF_DEBUG_HIGH_ON THEN
2146: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||': Start');
2147: END IF;
2148:
2149: -- Initialize API return status to sucess
2150: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 2174: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||': inventory flag = ' || l_inventory_tracking);

2170: -- Check whether there IS a need to do inventory_verification
2171: OPEN OZF_RESALE_COMMON_PVT.g_inventory_tracking_csr;
2172: FETCH OZF_RESALE_COMMON_PVT.g_inventory_tracking_csr INTO l_inventory_tracking;
2173: CLOSE OZF_RESALE_COMMON_PVT.g_inventory_tracking_csr;
2174: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||': inventory flag = ' || l_inventory_tracking);
2175: -- populates the temp tables
2176: IF l_inventory_tracking = 'T' THEN
2177: OPEN batch_info_csr(p_resale_batch_id);
2178: FETCH batch_info_csr INTO l_partner_party_id

Line 2215: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||' order count = ' || l_order_num_tbl.count);

2211: END IF;
2212: OPEN order_num_csr;
2213: FETCH order_num_csr BULK COLLECT INTO l_order_num_tbl,l_cust_account_id_tbl, l_order_date_tbl;
2214: CLOSE order_num_csr;
2215: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||' order count = ' || l_order_num_tbl.count);
2216: --
2217: -- Get agreement price for all lines order by order
2218: IF l_order_num_tbl.EXISTS(1) THEN
2219: -- Loop through each order record

Line 2246: OZF_UTILITY_PVT.debug_message('/*--- before get_order_price Insert resale log done ---*/');

2242: FOR j in 1..l_line_tbl.LAST
2243: LOOP
2244:
2245: IF OZF_DEBUG_LOW_ON THEN
2246: OZF_UTILITY_PVT.debug_message('/*--- before get_order_price Insert resale log done ---*/');
2247: OZF_UTILITY_PVT.debug_message('/*--- chargeback int id:' || l_line_tbl(j).chargeback_int_id);
2248: OZF_UTILITY_PVT.debug_message('/*--- Message type: '||OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE);
2249: END IF;
2250:

Line 2247: OZF_UTILITY_PVT.debug_message('/*--- chargeback int id:' || l_line_tbl(j).chargeback_int_id);

2243: LOOP
2244:
2245: IF OZF_DEBUG_LOW_ON THEN
2246: OZF_UTILITY_PVT.debug_message('/*--- before get_order_price Insert resale log done ---*/');
2247: OZF_UTILITY_PVT.debug_message('/*--- chargeback int id:' || l_line_tbl(j).chargeback_int_id);
2248: OZF_UTILITY_PVT.debug_message('/*--- Message type: '||OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE);
2249: END IF;
2250:
2251: OZF_RESALE_COMMON_PVT.Insert_Resale_Log (

Line 2248: OZF_UTILITY_PVT.debug_message('/*--- Message type: '||OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE);

2244:
2245: IF OZF_DEBUG_LOW_ON THEN
2246: OZF_UTILITY_PVT.debug_message('/*--- before get_order_price Insert resale log done ---*/');
2247: OZF_UTILITY_PVT.debug_message('/*--- chargeback int id:' || l_line_tbl(j).chargeback_int_id);
2248: OZF_UTILITY_PVT.debug_message('/*--- Message type: '||OZF_RESALE_COMMON_PVT.G_ID_TYPE_IFACE);
2249: END IF;
2250:
2251: OZF_RESALE_COMMON_PVT.Insert_Resale_Log (
2252: p_id_value => l_line_tbl(j).chargeback_int_id,

Line 2267: OZF_UTILITY_PVT.debug_message('/*--- After get_order_price Insert resale log done ---*/');

2263: END IF;
2264: --
2265: END LOOP;
2266: IF OZF_DEBUG_LOW_ON THEN
2267: OZF_UTILITY_PVT.debug_message('/*--- After get_order_price Insert resale log done ---*/');
2268: END IF;
2269:
2270: -- Dispute all the lines from this order
2271: OZF_RESALE_COMMON_PVT.Bulk_Dispute_Line (

Line 2283: OZF_UTILITY_PVT.debug_message('/*--- Get order price failed ---*/');

2279: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2280: RAISE FND_API.g_exc_unexpected_error;
2281: END IF;
2282: IF OZF_DEBUG_LOW_ON THEN
2283: OZF_UTILITY_PVT.debug_message('/*--- Get order price failed ---*/');
2284: END IF;
2285: GOTO END_LOOP;
2286: ELSE
2287: IF l_return_status = FND_API.G_RET_STS_ERROR THEN

Line 2296: OZF_UTILITY_PVT.debug_message('/*--- Get order price succeeded ---*/');

2292: END IF;
2293: END IF; -- not success status
2294:
2295: IF OZF_DEBUG_LOW_ON THEN
2296: OZF_UTILITY_PVT.debug_message('/*--- Get order price succeeded ---*/');
2297: OZF_UTILITY_PVT.debug_message('/*--- Calling process_price_result: ---*/');
2298: END IF;
2299:
2300: -- Process pricing result

Line 2297: OZF_UTILITY_PVT.debug_message('/*--- Calling process_price_result: ---*/');

2293: END IF; -- not success status
2294:
2295: IF OZF_DEBUG_LOW_ON THEN
2296: OZF_UTILITY_PVT.debug_message('/*--- Get order price succeeded ---*/');
2297: OZF_UTILITY_PVT.debug_message('/*--- Calling process_price_result: ---*/');
2298: END IF;
2299:
2300: -- Process pricing result
2301: Process_Pricing_Result(

Line 2329: OZF_UTILITY_PVT.debug_message('/*--- After process_pricing_result Insert resale log done ---*/');

2325: --
2326: END LOOP;
2327:
2328: IF OZF_DEBUG_LOW_ON THEN
2329: OZF_UTILITY_PVT.debug_message('/*--- After process_pricing_result Insert resale log done ---*/');
2330: END IF;
2331:
2332: BEGIN
2333: UPDATE ozf_resale_lines_int

Line 2347: ozf_utility_pvt.error_message( 'OZF_UPD_RESALE_INT_WRG');

2343: AND dispute_code is null
2344: AND resale_batch_id = p_resale_batch_id;
2345: EXCEPTION
2346: WHEN OTHERS THEN
2347: ozf_utility_pvt.error_message( 'OZF_UPD_RESALE_INT_WRG');
2348: RAISE FND_API.g_exc_unexpected_error;
2349: END;
2350: --
2351: IF OZF_DEBUG_LOW_ON THEN

Line 2352: OZF_UTILITY_PVT.debug_message('/*--- Process Pricing Result Failed ---*/');

2348: RAISE FND_API.g_exc_unexpected_error;
2349: END;
2350: --
2351: IF OZF_DEBUG_LOW_ON THEN
2352: OZF_UTILITY_PVT.debug_message('/*--- Process Pricing Result Failed ---*/');
2353: END IF;
2354: GOTO END_LOOP;
2355: END IF;
2356:

Line 2369: OZF_UTILITY_PVT.debug_message('/*--- Success: Processing order for order number:'||l_order_num_tbl(i)||'---*/');

2365: AND resale_batch_id = p_resale_batch_id; -- bug 5222273
2366: -- Bug 4387465 (-)
2367:
2368: IF OZF_DEBUG_LOW_ON THEN
2369: OZF_UTILITY_PVT.debug_message('/*--- Success: Processing order for order number:'||l_order_num_tbl(i)||'---*/');
2370: OZF_UTILITY_PVT.debug_message('/*--- and cusomter:'||l_cust_account_id_tbl(i)||'---*/');
2371: END IF;
2372: END IF; -- END if FOR order_number, sold_from cust, date_ordered NOT NULL
2373: << END_LOOP >>

Line 2370: OZF_UTILITY_PVT.debug_message('/*--- and cusomter:'||l_cust_account_id_tbl(i)||'---*/');

2366: -- Bug 4387465 (-)
2367:
2368: IF OZF_DEBUG_LOW_ON THEN
2369: OZF_UTILITY_PVT.debug_message('/*--- Success: Processing order for order number:'||l_order_num_tbl(i)||'---*/');
2370: OZF_UTILITY_PVT.debug_message('/*--- and cusomter:'||l_cust_account_id_tbl(i)||'---*/');
2371: END IF;
2372: END IF; -- END if FOR order_number, sold_from cust, date_ordered NOT NULL
2373: << END_LOOP >>
2374: NULL;

Line 2378: OZF_UTILITY_PVT.debug_message('/*--- No order to process ---*/');

2374: NULL;
2375: END LOOP; -- END LOOP FOR l_order_num_tbl
2376: ELSE
2377: IF OZF_DEBUG_LOW_ON THEN
2378: OZF_UTILITY_PVT.debug_message('/*--- No order to process ---*/');
2379: END IF;
2380: END IF;
2381:
2382: -- Update Chargeback header with processing detail

Line 2401: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||': End');

2397: END IF;
2398:
2399: -- Debug Message
2400: IF OZF_DEBUG_HIGH_ON THEN
2401: OZF_UTILITY_PVT.debug_message(p_message_text => l_full_name||': End');
2402: END IF;
2403: --Standard call to get message count AND if count=1, get the message
2404: FND_MSG_PUB.Count_and_Get (
2405: p_encoded => FND_API.G_FALSE,