23: l_under_return_tolerance NUMBER;
24: BEGIN
25: l_inventory_item_id := ONT_Line_Def_Hdlr.g_record.inventory_item_id;
26: select under_shipment_tolerance, under_return_tolerance into l_under_shipment_tolerance, l_under_return_tolerance
27: from oe_cust_item_settings
28: where internal_item_id = l_inventory_item_id
29: and customer_id is null
30: and site_use_id is null;
31: if p_database_object_name = 'SHIP' then
68: l_under_return_tolerance NUMBER;
69: BEGIN
70: l_customer_id := ONT_Line_Def_Hdlr.g_record.sold_to_org_id;
71: select under_shipment_tolerance, under_return_tolerance into l_under_shipment_tolerance, l_under_return_tolerance
72: from oe_cust_item_settings
73: where customer_id = l_customer_id
74: and internal_item_id is null
75: and site_use_id is null;
76: if p_database_object_name = 'SHIP' then
120: return null;
121: end if;
122:
123: select under_shipment_tolerance, under_return_tolerance into l_under_shipment_tolerance, l_under_return_tolerance
124: from oe_cust_item_settings
125: where site_use_id = l_site_use_id
126: and customer_id is null
127: and internal_item_id is null;
128: if p_database_object_name = 'SHIP' then
167: BEGIN
168: l_internal_item_id := ONT_Line_Def_Hdlr.g_record.inventory_item_id;
169: l_customer_id := ONT_Line_Def_Hdlr.g_record.sold_to_org_id;
170: select under_shipment_tolerance, under_return_tolerance into l_under_shipment_tolerance, l_under_return_tolerance
171: from oe_cust_item_settings
172: where internal_item_id = l_internal_item_id
173: and customer_id = l_customer_id
174: and site_use_id is null;
175: if p_database_object_name = 'SHIP' then
220: else
221: return null;
222: end if;
223: select under_shipment_tolerance, under_return_tolerance into l_under_shipment_tolerance, l_under_return_tolerance
224: from oe_cust_item_settings
225: where internal_item_id = l_internal_item_id
226: and site_use_id = l_site_use_id;
227: if p_database_object_name = 'SHIP' then
228: return to_char(l_under_shipment_tolerance);
264: l_Over_return_tolerance NUMBER;
265: BEGIN
266: l_inventory_item_id := ONT_Line_Def_Hdlr.g_record.inventory_item_id;
267: select Over_shipment_tolerance, Over_return_tolerance into l_Over_shipment_tolerance, l_Over_return_tolerance
268: from oe_cust_item_settings
269: where internal_item_id = l_inventory_item_id
270: and customer_id is null
271: and site_use_id is null;
272: if p_database_object_name = 'SHIP' then
309: l_Over_return_tolerance NUMBER;
310: BEGIN
311: l_customer_id := ONT_Line_Def_Hdlr.g_record.sold_to_org_id;
312: select Over_shipment_tolerance, Over_return_tolerance into l_Over_shipment_tolerance, l_Over_return_tolerance
313: from oe_cust_item_settings
314: where customer_id = l_customer_id
315: and internal_item_id is null
316: and site_use_id is null;
317: if p_database_object_name = 'SHIP' then
361: return null;
362: end if;
363:
364: select Over_shipment_tolerance, Over_return_tolerance into l_Over_shipment_tolerance, l_Over_return_tolerance
365: from oe_cust_item_settings
366: where site_use_id = l_site_use_id
367: and customer_id is null
368: and internal_item_id is null;
369: if p_database_object_name = 'SHIP' then
408: BEGIN
409: l_internal_item_id := ONT_Line_Def_Hdlr.g_record.inventory_item_id;
410: l_customer_id := ONT_Line_Def_Hdlr.g_record.sold_to_org_id;
411: select Over_shipment_tolerance, Over_return_tolerance into l_Over_shipment_tolerance, l_Over_return_tolerance
412: from oe_cust_item_settings
413: where internal_item_id = l_internal_item_id
414: and customer_id = l_customer_id
415: and site_use_id is null;
416: if p_database_object_name = 'SHIP' then
461: else
462: return null;
463: end if;
464: select Over_shipment_tolerance, Over_return_tolerance into l_Over_shipment_tolerance, l_Over_return_tolerance
465: from oe_cust_item_settings
466: where internal_item_id = l_internal_item_id
467: and site_use_id = l_site_use_id;
468: if p_database_object_name = 'SHIP' then
469: return to_char(l_Over_shipment_tolerance);