DBA Data[Home] [Help]

APPS.WSH_FREIGHT_COSTS_PVT dependencies on WSH_FREIGHT_COSTS

Line 1: PACKAGE BODY WSH_FREIGHT_COSTS_PVT AS

1: PACKAGE BODY WSH_FREIGHT_COSTS_PVT AS
2: /* $Header: WSHFCTHB.pls 120.2 2007/12/17 06:52:21 brana noship $ */
3: -- Package internal global variables
4: g_Return_Status VARCHAR2(1);
5:

Line 7: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_FREIGHT_COSTS_PVT';

3: -- Package internal global variables
4: g_Return_Status VARCHAR2(1);
5:
6: --
7: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_FREIGHT_COSTS_PVT';
8: --
9:
10: PROCEDURE Create_Freight_Cost(
11: p_freight_cost_info IN Freight_Cost_Rec_Type

Line 19: SELECT wsh_freight_costs_s.nextval

15: )
16: IS
17: CURSOR C_Next_Freight_Cost_Id
18: IS
19: SELECT wsh_freight_costs_s.nextval
20: FROM sys.dual;
21:
22:
23: CURSOR c_new_row_id

Line 26: FROM wsh_freight_costs

22:
23: CURSOR c_new_row_id
24: IS
25: SELECT rowid
26: FROM wsh_freight_costs
27: WHERE freight_cost_id = x_freight_cost_id;
28:
29:
30: create_failure EXCEPTION;

Line 76: INSERT INTO wsh_freight_costs(

72: END IF;
73: END LOOP;
74: END IF;
75:
76: INSERT INTO wsh_freight_costs(
77: freight_cost_id,
78: freight_cost_type_id,
79: unit_amount,
80: /* H Integration: datamodel changes wrudge uncommented 4 columns*/

Line 199: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.CREATE_FREIGHT_COST');

195: END IF;
196: --
197: EXCEPTION
198: WHEN create_failure THEN
199: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.CREATE_FREIGHT_COST');
200: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
201:
202: --
203: -- Debug Statements

Line 298: UPDATE wsh_freight_costs

294: END IF;
295: --
296: x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
297:
298: UPDATE wsh_freight_costs
299: SET
300: freight_cost_id = p_freight_cost_info.freight_cost_id,
301: freight_cost_type_id = p_freight_cost_info.freight_cost_type_id,
302: unit_amount = p_freight_cost_info.unit_amount,

Line 370: wsh_util_core.default_handler ('WSH_FREIGHT_COSTS_PVT.Update_Freight_Cost');

366: --
367: EXCEPTION
368: WHEN OTHERS THEN
369: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR ;
370: wsh_util_core.default_handler ('WSH_FREIGHT_COSTS_PVT.Update_Freight_Cost');
371: IF l_debug_on THEN
372: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||
373: SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
374: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');

Line 441: FROM wsh_freight_costs

437: /* R12 new attributes */
438: billable_quantity,
439: billable_uom,
440: billable_basis
441: FROM wsh_freight_costs
442: WHERE rowid = p_rowid
443: FOR UPDATE OF freight_cost_id NOWAIT;
444:
445: Recinfo lock_row%ROWTYPE;

Line 680: FROM wsh_freight_costs

676: IS
677: CURSOR C_Get_Freight_cost_id
678: IS
679: SELECT freight_cost_id
680: FROM wsh_freight_costs
681: WHERE rowid = p_rowid;
682:
683: l_freight_cost_id NUMBER;
684: others EXCEPTION;

Line 720: DELETE FROM wsh_freight_costs

716: CLOSE C_Get_Freight_cost_id;
717: END IF;
718:
719: IF (l_freight_cost_id IS NOT NULL) THEN
720: DELETE FROM wsh_freight_costs
721: WHERE freight_cost_id = p_freight_cost_id;
722: ELSE
723: RAISE others;
724: END IF;

Line 735: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.DELETE_FREIGHT_COST');

731: END IF;
732: --
733: EXCEPTION
734: WHEN others THEN
735: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.DELETE_FREIGHT_COST');
736: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
737: --
738: -- Debug Statements
739: --

Line 807: FROM WSH_FREIGHT_COSTS

803: CHARGE_SOURCE_CODE,
804: LINE_TYPE_CODE,
805: ESTIMATED_FLAG,
806: COMMODITY_CATEGORY_ID
807: FROM WSH_FREIGHT_COSTS
808: WHERE FREIGHT_COST_ID = c_freight_cost_id FOR UPDATE;
809:
810: l_from_freight_cost_rec c_freight_cost%ROWTYPE;
811: l_new_freight_cost_rec Freight_Cost_Rec_Type;

Line 858: SELECT wsh_freight_costs_s.nextval INTO l_freight_cost_id FROM sys.dual;

854: IF c_freight_cost%NOTFOUND THEN
855: RAISE WSH_FC_NOT_FOUND;
856: END IF;
857:
858: SELECT wsh_freight_costs_s.nextval INTO l_freight_cost_id FROM sys.dual;
859:
860: l_new_freight_cost_rec.FREIGHT_COST_ID := l_freight_cost_id;
861: l_new_freight_cost_rec.FREIGHT_COST_TYPE_ID := l_from_freight_cost_rec.FREIGHT_COST_TYPE_ID ;
862: l_new_unit_amount := l_from_freight_cost_rec.UNIT_AMOUNT *

Line 936: UPDATE WSH_FREIGHT_COSTS

932: , x_return_status => l_return_status
933: );
934:
935: IF l_return_status = WSH_UTIL_CORE.G_RET_STS_SUCCESS THEN
936: UPDATE WSH_FREIGHT_COSTS
937: SET UNIT_AMOUNT = l_remained_unit_amount
938: WHERE CURRENT OF c_freight_cost;
939: ELSE
940: x_return_status := l_return_status;

Line 955: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.SPLIT_FREIGHT_COST');

951: --
952: EXCEPTION
953:
954: WHEN WSH_FC_NOT_FOUND THEN
955: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.SPLIT_FREIGHT_COST');
956: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
957:
958: --
959: -- Debug Statements

Line 989: FROM wsh_freight_costs

985: currency_code,
986: NVL(conversion_type_code, 'Corporate'),
987: NVL(conversion_date, SYSDATE),
988: conversion_rate
989: FROM wsh_freight_costs
990: WHERE delivery_id = c_delivery_id AND
991: NVL(charge_source_code, 'MANUAL') IN ('PRICING_ENGINE','MANUAL') AND
992: NVL(line_type_code, 'CHARGE') IN ('CHARGE', 'PRICE') AND
993: freight_cost_type_id <> -1 AND

Line 1002: FROM wsh_freight_costs a

998: a.currency_code,
999: NVL(conversion_type_code, 'Corporate'),
1000: NVL(conversion_date, SYSDATE),
1001: conversion_rate
1002: FROM wsh_freight_costs a
1003: WHERE a.delivery_detail_id in (
1004: SELECT c.delivery_detail_id
1005: FROM wsh_delivery_assignments_v b,
1006: wsh_delivery_details c

Line 1140: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Total_Freight_Cost');

1136:
1137: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1138:
1139: x_total_amount := NULL;
1140: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Total_Freight_Cost');
1141:
1142: IF l_debug_on THEN
1143: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||
1144: SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);

Line 1169: FROM wsh_freight_costs a, wsh_delivery_details wdd

1165: a.currency_code,
1166: NVL(conversion_type_code, 'Corporate'),
1167: NVL(conversion_date, SYSDATE),
1168: conversion_rate
1169: FROM wsh_freight_costs a, wsh_delivery_details wdd
1170: WHERE wdd.delivery_detail_id=c_det_id AND
1171: wdd.released_status <> 'D' AND
1172: a.delivery_detail_id = wdd.delivery_detail_id AND
1173: NVL(a.charge_source_code, 'MANUAL') IN ('PRICING_ENGINE','MANUAL') AND

Line 1272: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_detail_Freight_Cost');

1268:
1269: WHEN OTHERS THEN
1270: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1271: x_detail_amount := NULL;
1272: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_detail_Freight_Cost');
1273: IF l_debug_on THEN
1274: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1275: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1276: END IF;

Line 1436: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_LPN_Freight_Cost');

1432: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1433: x_main_lpn_amount := NULL;
1434: x_lpn_amount := NULL;
1435: x_detail_amount := NULL;
1436: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_LPN_Freight_Cost');
1437: IF l_debug_on THEN
1438: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1439: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1440: END IF;

Line 1464: FROM wsh_freight_costs

1460: currency_code,
1461: NVL(conversion_type_code, 'Corporate'),
1462: NVL(conversion_date, SYSDATE),
1463: conversion_rate
1464: FROM wsh_freight_costs
1465: WHERE delivery_id = c_delivery_id AND
1466: NVL(charge_source_code, 'MANUAL') IN ('PRICING_ENGINE','MANUAL') AND
1467: NVL(line_type_code, 'CHARGE') IN ('CHARGE', 'PRICE') AND
1468: freight_cost_type_id <> -1 AND

Line 1654: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_delivery_Freight_Cost');

1650: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1651: x_delivery_amount := NULL;
1652: x_lpn_amount := NULL;
1653: x_detail_amount := NULL;
1654: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_delivery_Freight_Cost');
1655: IF l_debug_on THEN
1656: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1657: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1658: END IF;

Line 1679: FROM wsh_freight_costs

1675: currency_code,
1676: NVL(conversion_type_code, 'Corporate'),
1677: NVL(conversion_date, SYSDATE),
1678: conversion_rate
1679: FROM wsh_freight_costs
1680: WHERE stop_id = c_stop_id AND
1681: NVL(charge_source_code, 'MANUAL') IN ('PRICING_ENGINE','MANUAL') AND
1682: NVL(line_type_code, 'CHARGE') IN ('CHARGE', 'PRICE') AND
1683: freight_cost_type_id <> -1 AND

Line 1692: FROM wsh_freight_costs wfc, wsh_freight_cost_types wfct

1688: wfc.currency_code,
1689: NVL(wfc.conversion_type_code, 'Corporate'),
1690: NVL(wfc.conversion_date, SYSDATE),
1691: wfc.conversion_rate
1692: FROM wsh_freight_costs wfc, wsh_freight_cost_types wfct
1693: WHERE wfc.stop_id = c_stop_id AND
1694: NVL(wfc.charge_source_code, 'MANUAL') = 'PRICING_ENGINE' AND
1695: NVL(wfc.line_type_code, 'CHARGE') ='SUMMARY' AND
1696: wfc.freight_cost_type_id <> -1 AND

Line 1801: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_stop_Freight_Cost');

1797:
1798: WHEN OTHERS THEN
1799: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
1800: x_stop_amount := NULL;
1801: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_stop_Freight_Cost');
1802: IF l_debug_on THEN
1803: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
1804: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
1805: END IF;

Line 1841: FROM wsh_freight_costs

1837: currency_code,
1838: NVL(conversion_type_code, 'Corporate'),
1839: NVL(conversion_date, SYSDATE),
1840: conversion_rate
1841: FROM wsh_freight_costs
1842: WHERE trip_id = c_trip_id AND
1843: NVL(charge_source_code, 'MANUAL') IN ('PRICING_ENGINE','MANUAL') AND
1844: NVL(line_type_code, 'CHARGE') IN ('CHARGE', 'PRICE') AND
1845: freight_cost_type_id <> -1 AND

Line 1854: FROM wsh_freight_costs wfc, wsh_freight_cost_types wfct

1850: wfc.currency_code,
1851: NVL(wfc.conversion_type_code, 'Corporate'),
1852: NVL(wfc.conversion_date, SYSDATE),
1853: wfc.conversion_rate
1854: FROM wsh_freight_costs wfc, wsh_freight_cost_types wfct
1855: WHERE wfc.trip_id = c_trip_id AND
1856: NVL(wfc.charge_source_code, 'MANUAL') = 'PRICING_ENGINE' AND
1857: NVL(wfc.line_type_code, 'CHARGE') ='SUMMARY' AND
1858: wfc.freight_cost_type_id <> -1 AND

Line 2034: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Trip_Freight_Cost');

2030: x_stop_amount := NULL;
2031: x_delivery_amount := NULL;
2032: x_lpn_amount := NULL;
2033: x_detail_amount := NULL;
2034: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Trip_Freight_Cost');
2035: IF l_debug_on THEN
2036: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2037: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2038: END IF;

Line 2186: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Total_Freight_Cost');

2182: x_stop_amount := NULL;
2183: x_delivery_amount := NULL;
2184: x_lpn_amount := NULL;
2185: x_detail_amount := NULL;
2186: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Total_Freight_Cost');
2187:
2188: IF l_debug_on THEN
2189: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||
2190: SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);

Line 2217: FROM wsh_freight_costs a

2213: a.currency_code,
2214: NVL(conversion_type_code, 'Corporate'),
2215: NVL(conversion_date, SYSDATE),
2216: conversion_rate
2217: FROM wsh_freight_costs a
2218: WHERE a.delivery_detail_id in (
2219: SELECT c.delivery_detail_id
2220: FROM wsh_delivery_assignments_v b,
2221: wsh_delivery_details c

Line 2344: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Summary_Freight_Cost');

2340:
2341: WHEN OTHERS THEN
2342:
2343: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
2344: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Summary_Freight_Cost');
2345:
2346: IF l_debug_on THEN
2347: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||
2348: SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);

Line 2603: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Convert_Amount');

2599: IF l_debug_on THEN
2600: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||
2601: SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2602: END IF;
2603: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Convert_Amount');
2604:
2605: END Convert_Amount;
2606:
2607:

Line 2618: FROM wsh_freight_costs

2614: x_return_status OUT NOCOPY VARCHAR2 ) IS
2615:
2616: CURSOR lock_freight_costs(c_delivery_detail_id NUMBER) IS
2617: SELECT freight_cost_id
2618: FROM wsh_freight_costs
2619: WHERE delivery_detail_id = c_delivery_detail_id AND
2620: charge_source_code = 'PRICING_ENGINE'
2621: FOR UPDATE NOWAIT;
2622:

Line 2625: FROM wsh_freight_costs

2621: FOR UPDATE NOWAIT;
2622:
2623: CURSOR get_freight_costs (c_delivery_detail_id NUMBER) IS
2624: SELECT 1
2625: FROM wsh_freight_costs
2626: WHERE delivery_detail_id = c_delivery_detail_id AND
2627: charge_source_code = 'PRICING_ENGINE' AND
2628: rownum = 1;
2629:

Line 2666: DELETE wsh_freight_costs WHERE freight_cost_id = l_freight_cost_id;

2662: OPEN lock_freight_costs(p_delivery_details_tab(i));
2663: LOOP
2664: FETCH lock_freight_costs INTO l_freight_cost_id;
2665: EXIT WHEN lock_freight_costs%NOTFOUND;
2666: DELETE wsh_freight_costs WHERE freight_cost_id = l_freight_cost_id;
2667: IF l_debug_on THEN
2668: WSH_DEBUG_SV.log(l_module_name,'Removed FTE Freight Costs ID: '|| l_freight_cost_id);
2669: END IF;
2670: END LOOP;

Line 2684: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.Remove_FTE_Freight_Costs',l_module_name);

2680:
2681: WHEN OTHERS THEN
2682:
2683: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
2684: wsh_util_core.default_handler('WSH_FREIGHT_COSTS_PVT.Remove_FTE_Freight_Costs',l_module_name);
2685: ROLLBACK TO before_delete;
2686: --
2687: IF l_debug_on THEN
2688: WSH_DEBUG_SV.logmsg(l_module_name,'Cannot lock the fright cost records '|| SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);

Line 2714: FROM wsh_freight_costs

2710: currency_code,
2711: NVL(conversion_type_code, 'Corporate'),
2712: NVL(conversion_date, SYSDATE),
2713: conversion_rate
2714: FROM wsh_freight_costs
2715: WHERE trip_id = c_trip_id AND
2716: NVL(charge_source_code, 'MANUAL') = 'MANUAL' AND
2717: NVL(line_type_code, 'CHARGE') IN ('CHARGE', 'PRICE') AND
2718: freight_cost_type_id <> -1 AND

Line 2815: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Trip_Freight_Cost');

2811:
2812: WHEN OTHERS THEN
2813: x_return_status := WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR;
2814: x_trip_amount := NULL;
2815: WSH_UTIL_CORE.Default_Handler('WSH_FREIGHT_COSTS_PVT.Get_Trip_Freight_Cost');
2816: IF l_debug_on THEN
2817: WSH_DEBUG_SV.logmsg(l_module_name,'Unexpected error has occured. Oracle error message is '||SQLERRM,WSH_DEBUG_SV.C_UNEXPEC_ERR_LEVEL);
2818: WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:OTHERS');
2819: END IF;

Line 2825: END WSH_FREIGHT_COSTS_PVT;

2821: END Get_Trip_Manual_Freight_Cost;
2822:
2823: /************************************************************************/
2824:
2825: END WSH_FREIGHT_COSTS_PVT;