[Home] [Help]
129: WHERE a.list_header_id = h.list_header_id
130: and a.list_header_id = l.list_header_id
131: and l.list_line_id = p_listLineId
132: and a.offer_adjustment_id = p_offerAdjustmentId;
133: ozf_utility_pvt.debug_message('in getEndDate :-Adjustment Id:'||p_offerAdjustmentId || '-List Line Id:' || p_listLineId);
134:
135: l_allDtNull := 'N';
136: IF (l_lineStDt is null) THEN
137: IF (l_headerStDt is null) THEN
1292: -- check if list_line_id is passed in, in case not, get the list_line_id from the offer_adjustment_line_id, if cannot be located
1293: -- raise error
1294:
1295: IF p_offerAdjustmentLineId IS NULL OR p_offerAdjustmentLineId = FND_API.G_MISS_NUM THEN
1296: OZF_Utility_PVT.Error_Message(p_message_name => 'INVALID_ADJUSTMENT_LINE');
1297: x_return_status := FND_API.g_ret_sts_error;
1298: RETURN;
1299: END IF;
1300: /*
1301: IF (p_listLineId IS NULL OR p_listLineId = FND_API.G_MISS_NUM) THEN
1302: OPEN c_listLineId(cp_offerAdjustmentLineId => p_offerAdjustmentLineId);
1303: FETCH c_listLineId INTO l_listLineId;
1304: IF c_listLineId%NOTFOUND THEN
1305: OZF_Utility_PVT.Error_Message(p_message_name => 'INVALID_LIST_LINE');
1306: x_return_status := FND_API.g_ret_sts_error;
1307: CLOSE c_listLineId;
1308: RETURN;
1309: END IF;
1678: x_return_status := FND_API.G_RET_STS_SUCCESS;
1679: -- check if list_line_id is passed in, in case not, get the list_line_id from the offer_adjustment_line_id, if cannot be located
1680: -- raise error
1681: /*IF p_offerAdjustmentLineId IS NULL OR p_offerAdjustmentLineId = FND_API.G_MISS_NUM THEN
1682: OZF_Utility_PVT.Error_Message(p_message_name => 'INVALID_ADJUSTMENT_LINE');
1683: x_return_status := FND_API.g_ret_sts_error;
1684: RETURN;
1685: END IF;
1686: */
2443: -- populate end date lines
2444: -- process end date lines
2445: -- end date line
2446: x_return_status := FND_API.G_RET_STS_SUCCESS;
2447: ozf_utility_pvt.debug_message('before populateTdUpdLines :'||x_return_status);
2448: populateTdUpdLines
2449: (
2450: x_modifier_line_rec => l_modifier_line_tbl(1)
2451: , p_listLineId => p_listLineId
2452: ,x_return_status => x_return_status
2453: ,x_msg_count => x_msg_count
2454: ,x_msg_data => x_msg_data
2455: );
2456: ozf_utility_pvt.debug_message('after populateTdUpdLines :'||x_return_status);
2457: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2458: RAISE FND_API.G_EXC_ERROR;
2459: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2460: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2458: RAISE FND_API.G_EXC_ERROR;
2459: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2460: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2461: END IF;
2462: ozf_utility_pvt.debug_message('before processTdUpdLines :'||x_return_status);
2463:
2464: processTdUpdLines
2465: (
2466: px_modifier_line_rec => l_modifier_line_tbl(1)
2469: ,x_return_status => x_return_status
2470: ,x_msg_count => x_msg_count
2471: ,x_msg_data => x_msg_data
2472: );
2473: ozf_utility_pvt.debug_message('after processTdUpdLines :'||x_return_status);
2474: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2475: RAISE FND_API.G_EXC_ERROR;
2476: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2477: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2475: RAISE FND_API.G_EXC_ERROR;
2476: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2477: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2478: END IF;
2479: ozf_utility_pvt.debug_message('before process_qp_list_lines :'||x_return_status);
2480: ozf_offer_pvt.process_qp_list_lines
2481: (
2482: x_return_status => x_return_status
2483: ,x_msg_count => x_msg_count
2487: ,p_list_header_id => l_modifier_line_tbl(1).list_header_id
2488: ,x_modifier_line_tbl => lx_modifier_tbl --QP_MODIFIERS_PUB.modifiers_tbl_type
2489: ,x_error_location => l_errorLocation
2490: );
2491: ozf_utility_pvt.debug_message('after process_qp_list_lines :'||x_return_status);
2492: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2493: RAISE FND_API.G_EXC_ERROR;
2494: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2495: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2517: l_modifier_tbl QP_MODIFIERS_PUB.modifiers_tbl_type;
2518: l_listLineId number;
2519: BEGIN
2520: x_return_status := FND_API.G_RET_STS_SUCCESS;
2521: ozf_utility_pvt.debug_message('before endDateTdLine :'||x_return_status);
2522: endDateTdLine
2523: (
2524: x_return_status => x_return_status
2525: ,x_msg_count => x_msg_count
2526: ,x_msg_data => x_msg_data
2527: ,p_offerAdjustmentId => p_offerAdjustmentId
2528: , p_listLineId => p_listLineId
2529: );
2530: ozf_utility_pvt.debug_message('after endDateTdLine :'||x_return_status);
2531: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2532: RAISE FND_API.G_EXC_ERROR;
2533: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2534: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2532: RAISE FND_API.G_EXC_ERROR;
2533: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2534: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2535: END IF;
2536: ozf_utility_pvt.debug_message('before copyTdLine :'||x_return_status);
2537: copyTdLine
2538: (
2539: x_return_status => x_return_status
2540: ,x_msg_count => x_msg_count
2543: , p_listLineId => p_listLineId
2544: , x_listLineId => l_listLineId
2545: , x_modifier_tbl => l_modifier_tbl
2546: );
2547: ozf_utility_pvt.debug_message('after copyTdLine :'||x_return_status);
2548:
2549: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2550: RAISE FND_API.G_EXC_ERROR;
2551: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2550: RAISE FND_API.G_EXC_ERROR;
2551: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2552: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2553: END IF;
2554: ozf_utility_pvt.debug_message('before relateTdLine :'||x_return_status);
2555: relateTdLines
2556: (
2557: x_return_status => x_return_status
2558: ,x_msg_count => x_msg_count
2560: ,p_offerAdjustmentId => p_offerAdjustmentId
2561: , p_listLineId => p_listLineId
2562: , p_modifier_tbl => l_modifier_tbl
2563: );
2564: ozf_utility_pvt.debug_message('after relateTdLine :'||x_return_status);
2565: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2566: RAISE FND_API.G_EXC_ERROR;
2567: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2568: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2594: -- relate list_lines
2595: x_return_status := FND_API.G_RET_STS_SUCCESS;
2596: FOR l_adjLines in c_adjLines(cp_offerAdjustmentId => p_offerAdjustmentId) LOOP
2597: --dbms_output.put_line('Processiung :'||l_adjLines.list_line_id);
2598: ozf_utility_pvt.debug_message('before process old td line discounts :'||x_return_status);
2599:
2600: processOldTdLine
2601: (
2602: x_return_status => x_return_status
2604: ,x_msg_data => x_msg_data
2605: ,p_offerAdjustmentId => p_offerAdjustmentId
2606: , p_listLineId => l_adjLines.list_line_id
2607: );
2608: ozf_utility_pvt.debug_message('after process old td line discounts :'||x_return_status);
2609: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2610: RAISE FND_API.G_EXC_ERROR;
2611: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2612: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2634: OPEN c_offerType(cp_offerAdjustmentId => p_offerAdjustmentId);
2635: FETCH c_offerType INTO l_offerType;
2636: CLOSE c_offerType;
2637: IF l_offerType.offer_type = 'DEAL' THEN
2638: ozf_utility_pvt.debug_message('before process old td discounts :'||x_return_status);
2639: process_old_td_discount
2640: (
2641: x_return_status => x_return_status
2642: , x_msg_count => x_msg_count
2642: , x_msg_count => x_msg_count
2643: , x_msg_data => x_msg_data
2644: , p_offerAdjustmentId => p_offerAdjustmentId
2645: );
2646: ozf_utility_pvt.debug_message('after process old td discounts :'||x_return_status);
2647: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
2648: RAISE FND_API.G_EXC_ERROR;
2649: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
2650: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4189: ,x_msg_count => x_msg_count
4190: ,x_msg_data => x_msg_data
4191: ,p_offerAdjustmentId => p_offerAdjustmentId
4192: );
4193: ozf_utility_pvt.debug_message('GR Updated header date:'||x_return_status);
4194: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
4195: RAISE FND_API.G_EXC_ERROR;
4196: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4197: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4202: ,x_msg_count => x_msg_count
4203: ,x_msg_data => x_msg_data
4204: ,p_offerAdjustmentId => p_offerAdjustmentId
4205: );
4206: ozf_utility_pvt.debug_message('after process old discounts :'||x_return_status);
4207: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
4208: RAISE FND_API.G_EXC_ERROR;
4209: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4210: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4215: ,x_msg_count => x_msg_count
4216: ,x_msg_data => x_msg_data
4217: ,p_offerAdjustmentId => p_offerAdjustmentId
4218: );
4219: ozf_utility_pvt.debug_message('process new products :'||x_return_status);
4220: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
4221: RAISE FND_API.G_EXC_ERROR;
4222: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4223: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;