DBA Data[Home] [Help]

APPS.OE_MARGIN_PVT dependencies on OE_MARGIN_PVT

Line 1: PACKAGE BODY OE_MARGIN_PVT AS

1: PACKAGE BODY OE_MARGIN_PVT AS
2: /* $Header: OEXVMRGB.pls 120.8.12010000.3 2008/11/03 22:56:07 rbadadar ship $ */
3:
4: G_CUSTOM_COST VARCHAR2(3);
5: G_SHIP_FROM_ORG_ID NUMBER:=-1;

Line 60: debug('Inside oe_margin_pvt_1.cost_action',1);

56: --
57: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
58: --
59: begin
60: debug('Inside oe_margin_pvt_1.cost_action',1);
61: If P_cost_level ='LINE' then
62: debug('Inside cost level- line',1);
63:
64: --MOAC PI

Line 74: l_unit_cost := Oe_Margin_Pvt.Get_Cost(p_request_rec => l_request_rec);

70: MO_GLOBAL.set_policy_context(p_access_mode => 'S', p_org_id => l_Org_Id);
71: l_prev_org_id := l_org_id;
72: End If;
73: l_request_rec.entity_id := l_line_id ;
74: l_unit_cost := Oe_Margin_Pvt.Get_Cost(p_request_rec => l_request_rec);
75: i := p_selected_records.next(i);
76: End loop;
77: --MOAC PI
78:

Line 96: l_unit_cost := Oe_Margin_Pvt.Get_Cost(p_request_rec => l_request_rec,p_line_rec => l_Line_Tbl(j), p_header_flag => l_header_flag);

92: While j Is not null loop
93: l_request_rec.entity_id := l_Line_Tbl(j).line_id;
94: debug('l_request_rec.entity_id = '||l_request_rec.entity_id,1);
95: l_header_flag := TRUE;
96: l_unit_cost := Oe_Margin_Pvt.Get_Cost(p_request_rec => l_request_rec,p_line_rec => l_Line_Tbl(j), p_header_flag => l_header_flag);
97: j := l_Line_Tbl.Next(j);
98: End loop;
99: i := p_selected_records.next(i);
100: End Loop;

Line 292: debug('Entering Oe_Margin_Pvt.get_cost');

288: AND OEDSS.PO_RELEASE_ID IS NOT NULL;
289:
290:
291: BEGIN
292: debug('Entering Oe_Margin_Pvt.get_cost');
293:
294: --Not yet decided. We might allow user to write their
295: --own api to get a custom code...
296: IF G_CUSTOM_COST IS NOT NULL THEN

Line 753: debug('just before return oe_margin_pvt.get_cost');

749: RAISE FND_API.G_EXC_ERROR;
750: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
751: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
752: END IF;
753: debug('just before return oe_margin_pvt.get_cost');
754: debug('l_unit_cost ='||l_unit_cost);
755:
756: RETURN l_unit_cost;
757:

Line 758: debug('Leaving Oe_Margin_Pvt.get_cost');

754: debug('l_unit_cost ='||l_unit_cost);
755:
756: RETURN l_unit_cost;
757:
758: debug('Leaving Oe_Margin_Pvt.get_cost');
759:
760: EXCEPTION
761: WHEN OTHERS THEN
762: DEBUG(' OE_MARGIN_PVT:Unable to get cost:'||SQLERRM);

Line 762: DEBUG(' OE_MARGIN_PVT:Unable to get cost:'||SQLERRM);

758: debug('Leaving Oe_Margin_Pvt.get_cost');
759:
760: EXCEPTION
761: WHEN OTHERS THEN
762: DEBUG(' OE_MARGIN_PVT:Unable to get cost:'||SQLERRM);
763: Return null;
764: END GET_COST;
765:
766: --------------------------------------------------

Line 836: debug('Entering Oe_Margin_Pvt.Get_Order_Margin');

832: --
833: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
834: --
835: BEGIN
836: debug('Entering Oe_Margin_Pvt.Get_Order_Margin');
837: --retrive margin calculation method perference
838: l_compute_method:=Oe_Sys_Parameters.Value('COMPUTE_MARGIN', p_org_id);
839:
840: debug(' Margin_Compute_Method:'||l_compute_method);

Line 889: debug('Leaving Oe_Margin_Pvt.Get_Order_Margin');

885: ELSE
886: x_order_margin_percent := l_margin_ratio * 100;
887: END IF;
888: -- 3756821
889: debug('Leaving Oe_Margin_Pvt.Get_Order_Margin');
890: RETURN;
891:
892: END IF;
893:

Line 919: debug('Leaving Oe_Margin_Pvt.Get_Order_Margin');

915: END IF;
916: -- 3756821
917: END IF;
918:
919: debug('Leaving Oe_Margin_Pvt.Get_Order_Margin');
920:
921: EXCEPTION
922: WHEN ZERO_DIVIDE THEN
923: IF l_compute_method = 'P' THEN

Line 924: debug(' Oe_Margin_Pvt.Get_Order_Margin ZERO price');

920:
921: EXCEPTION
922: WHEN ZERO_DIVIDE THEN
923: IF l_compute_method = 'P' THEN
924: debug(' Oe_Margin_Pvt.Get_Order_Margin ZERO price');
925:
926: --Good problem to have, user has infinite margin, for sure it should
927: --pass order margin hold check.
928: --When null, caller will not continue margin hold/check process

Line 935: debug(' Oe_Margin_Pvt.Get_Order_Margin ZERO cost:');

931: x_order_margin_percent:= null;
932:
933: ElSIF l_compute_method = 'C' THEN
934:
935: debug(' Oe_Margin_Pvt.Get_Order_Margin ZERO cost:');
936: --Good problem to have, user has infinite margin, for sure should
937: --pass order margin hold check
938: --When null, caller will not continue margin hold/check process
939:

Line 945: debug(' Oe_Margin_Pvt.Get_Order_Margin:'||SQLERRM);

941: x_order_margin_percent:= null;
942:
943: ELSE
944:
945: debug(' Oe_Margin_Pvt.Get_Order_Margin:'||SQLERRM);
946:
947: END IF;
948:
949: WHEN OTHERS THEN

Line 950: debug(' Oe_Margin_Pvt.Get_Order_Margin unable get margin:'||SQLERRM);

946:
947: END IF;
948:
949: WHEN OTHERS THEN
950: debug(' Oe_Margin_Pvt.Get_Order_Margin unable get margin:'||SQLERRM);
951: End;
952:
953: ----------------------------------------------
954: PROCEDURE Margin_Hold

Line 974: debug('Entering Oe_Margin_Pvt.Margin_Hold');

970: --
971: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
972: --
973: BEGIN
974: debug('Entering Oe_Margin_Pvt.Margin_Hold');
975:
976: Get_Order_Margin(p_header_id=>p_header_id,
977: x_order_margin_percent=>l_order_margin_percent,
978: x_order_margin_amount =>l_order_margin_amount);

Line 1073: debug('Leaving Oe_Margin_Pvt.Margin_Hold');

1069: END IF;
1070: END IF;
1071:
1072:
1073: debug('Leaving Oe_Margin_Pvt.Margin_Hold');
1074: END;
1075:
1076: --------------------------------------------------------------------
1077: --Margin should only avail for pack I

Line 1112: oe_debug_pub.add('Exiting oe_margin_pvt.get_line_margin');

1108: l_cost:=Get_Cost(p_line_rec=>p_line_rec);
1109: x_unit_cost:=l_cost;
1110: If p_line_rec.unit_selling_price is Null Then
1111: oe_debug_pub.add('Warning:- unit selling price is null,margin not relevant');
1112: oe_debug_pub.add('Exiting oe_margin_pvt.get_line_margin');
1113: Return;
1114: End If;
1115: l_margin_amt := nvl(p_line_rec.unit_selling_price,0) - nvl(l_cost,0); --bug 5155086
1116: x_unit_margin_amount:=l_margin_amt;

Line 1139: End OE_MARGIN_PVT;

1135: x_margin_percent := l_margin_amt/l_cost*100; --added * 100 for bug5155086;
1136: End If;
1137: End;
1138:
1139: End OE_MARGIN_PVT;