DBA Data[Home] [Help]

APPS.AHL_VWP_VISIT_CST_PR_PVT dependencies on AHL_VWP_VISIT_CST_PR_PVT

Line 1: PACKAGE BODY AHL_VWP_VISIT_CST_PR_PVT AS

1: PACKAGE BODY AHL_VWP_VISIT_CST_PR_PVT AS
2: /* $Header: AHLVVCPB.pls 120.4 2007/12/18 09:59:26 sowsubra ship $ */
3:
4: -- PACKAGE
5: -- Ahl_VWP_VISIT_CST_PR_PVT

Line 5: -- Ahl_VWP_VISIT_CST_PR_PVT

1: PACKAGE BODY AHL_VWP_VISIT_CST_PR_PVT AS
2: /* $Header: AHLVVCPB.pls 120.4 2007/12/18 09:59:26 sowsubra ship $ */
3:
4: -- PACKAGE
5: -- Ahl_VWP_VISIT_CST_PR_PVT
6: --
7: -- PURPOSE
8: -- This package is a Private API to process Estimating Cost and Price
9: -- for a Visit It contains specification for pl/sql records and tables

Line 27: G_PKG_NAME CONSTANT VARCHAR(30) := 'AHL_VWP_VISIT_CST_PR_PVT';

23: -- get_visit_items_no_price -- check_for_release_visit
24:
25: --
26: -- Package/App Name
27: G_PKG_NAME CONSTANT VARCHAR(30) := 'AHL_VWP_VISIT_CST_PR_PVT';
28: G_APP_NAME CONSTANT VARCHAR2(3) := 'AHL';
29:
30: --------------------------------------------------------------------------
31: -- Procedure to estimate price for a specific SR --

Line 34: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

30: --------------------------------------------------------------------------
31: -- Procedure to estimate price for a specific SR --
32: --------------------------------------------------------------------------
33: PROCEDURE Estimate_SR_Price(
34: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
35: x_return_status OUT NOCOPY VARCHAR2);
36:
37: --------------------------------------------------------------------------
38: -- Procedure to get visit cost details for a specific visit --

Line 46: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

42: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
43: p_commit IN VARCHAR2 := FND_API.G_FALSE,
44: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
45: p_module_type IN VARCHAR2 := 'JSP',
46: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
47: x_return_status OUT NOCOPY VARCHAR2,
48: x_msg_count OUT NOCOPY NUMBER,
49: x_msg_data OUT NOCOPY VARCHAR2) IS
50:

Line 56: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.Cost_Price_Rec_Type;

52: L_API_VERSION CONSTANT NUMBER := 1.0;
53: L_API_NAME CONSTANT VARCHAR2(30) := 'get_visit_cost_details';
54: L_FULL_NAME CONSTANT VARCHAR2(60) := G_PKG_NAME || '.' || L_API_NAME;
55:
56: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.Cost_Price_Rec_Type;
57: l_error_msg_code VARCHAR2(240);
58: l_exists VARCHAR2(1);
59:
60: l_visit_status VARCHAR2(30);

Line 89: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details.begin',

85: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
86: fnd_log.string
87: (
88: fnd_log.level_procedure,
89: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details.begin',
90: 'At the start of PLSQL procedure'
91: );
92: END IF;
93:

Line 119: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

115: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
116: fnd_log.string
117: (
118: fnd_log.level_statement,
119: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
120: 'Got request for cost record of Visit ID : ' || p_x_cost_price_rec.visit_id
121: );
122: fnd_log.string
123: (

Line 125: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

121: );
122: fnd_log.string
123: (
124: fnd_log.level_statement,
125: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
126: 'Got request for update visit cost details of mr session ID : ' || p_x_cost_price_rec.mr_session_id
127: );
128: fnd_log.string
129: (

Line 131: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

127: );
128: fnd_log.string
129: (
130: fnd_log.level_statement,
131: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
132: 'Got request for update visit cost details of cost session ID : ' || p_x_cost_price_rec.cost_session_id
133: );
134: END IF;
135:

Line 144: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

140: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
141: fnd_log.string
142: (
143: fnd_log.level_exception,
144: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
145: 'Visit id is mandatory but found null in input '
146: );
147: END IF;
148: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 166: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

162: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
163: fnd_log.string
164: (
165: fnd_log.level_exception,
166: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
167: 'Visit id not found in ahl_visits_b table'
168: );
169: END IF;
170: CLOSE visit_info_csr;

Line 189: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

185: IF(fnd_log.level_unexpected >= fnd_log.g_current_runtime_level)THEN
186: fnd_log.string
187: (
188: fnd_log.level_unexpected,
189: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
190: 'Service request associated is invalid as record not found : l_cost_price_rec.service_request_id : '||l_cost_price_rec.service_request_id
191: );
192: END IF;
193: CLOSE customer_id_csr;

Line 224: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

220: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
221: fnd_log.string
222: (
223: fnd_log.level_error,
224: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
225: 'List name not found for stored list id'
226: );
227: END IF;
228: CLOSE price_list_name_csr;

Line 261: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

257: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
258: fnd_log.string
259: (
260: fnd_log.level_exception,
261: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
262: 'AHL_VWP_COST_PVT.Calculate_WO_Cost API threw error : x_return_status : ' || x_return_status
263: );
264: END IF;
265: RAISE FND_API.G_EXC_ERROR;

Line 285: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

281: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
282: fnd_log.string
283: (
284: fnd_log.level_exception,
285: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
286: 'AHL_VWP_COST_PVT.Calculate_Visit_Cost API threw error : x_return_status : ' || x_return_status
287: );
288: END IF;
289: RAISE FND_API.G_EXC_ERROR;

Line 310: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',

306: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
307: fnd_log.string
308: (
309: fnd_log.level_exception,
310: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details',
311: 'AHL_VWP_COST_PVT.Get_Profit_or_Loss API threw error : x_return_status : ' || x_return_status
312: );
313: END IF;
314: RAISE FND_API.G_EXC_ERROR;

Line 361: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details.end',

357: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
358: fnd_log.string
359: (
360: fnd_log.level_procedure,
361: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_cost_details.end',
362: 'At the end of PLSQL procedure'
363: );
364: END IF;
365:

Line 406: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

402: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
403: p_commit IN VARCHAR2 := FND_API.G_FALSE,
404: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
405: p_module_type IN VARCHAR2 := 'JSP',
406: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
407: x_return_status OUT NOCOPY VARCHAR2,
408: x_msg_count OUT NOCOPY NUMBER,
409: x_msg_data OUT NOCOPY VARCHAR2)IS
410:

Line 416: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;

412: L_API_VERSION CONSTANT NUMBER := 1.0;
413: L_API_NAME CONSTANT VARCHAR2(30) := 'update_visit_cost_details';
414: L_FULL_NAME CONSTANT VARCHAR2(60) := G_PKG_NAME || '.' || L_API_NAME;
415:
416: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
417: l_outside_party_flag VARCHAR2(1);
418: l_service_request_id NUMBER;
419: l_visit_status_code VARCHAR2(30);
420: l_start_date_time DATE;

Line 457: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details.begin',

453: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
454: fnd_log.string
455: (
456: fnd_log.level_procedure,
457: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details.begin',
458: 'At the start of PLSQL procedure'
459: );
460: END IF;
461:

Line 478: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

474: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
475: fnd_log.string
476: (
477: fnd_log.level_statement,
478: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
479: 'Got request for update visit cost details of Visit ID : ' || p_x_cost_price_rec.visit_id
480: );
481: fnd_log.string
482: (

Line 484: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

480: );
481: fnd_log.string
482: (
483: fnd_log.level_statement,
484: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
485: 'outside party flag : ' || p_x_cost_price_rec.outside_party_flag
486: );
487: fnd_log.string
488: (

Line 490: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

486: );
487: fnd_log.string
488: (
489: fnd_log.level_statement,
490: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
491: 'Price List Name : ' || p_x_cost_price_rec.price_list_name
492: );
493: END IF;
494:

Line 503: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

499: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
500: fnd_log.string
501: (
502: fnd_log.level_exception,
503: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
504: 'Visit id is mandatory but found null in input '
505: );
506: END IF;
507: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 518: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

514: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
515: fnd_log.string
516: (
517: fnd_log.level_exception,
518: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
519: 'Input OSP Flag is invalid : ' || p_x_cost_price_rec.outside_party_flag
520: );
521: END IF;
522: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 542: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

538: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
539: fnd_log.string
540: (
541: fnd_log.level_exception,
542: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
543: 'Visit id not found in ahl_visits_b table'
544: );
545: END IF;
546:

Line 557: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

553: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
554: fnd_log.string
555: (
556: fnd_log.level_error,
557: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
558: 'Visit is closed so can not update outside party flag or price list'
559: );
560: END IF;
561:

Line 572: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

568: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
569: fnd_log.string
570: (
571: fnd_log.level_error,
572: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
573: 'No service request is attached to visit so can not update outside party flag or price list'
574: );
575: END IF;
576:

Line 592: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

588: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
589: fnd_log.string
590: (
591: fnd_log.level_error,
592: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
593: 'Can not modify outside party flag because tasks has already been created'
594: );
595: END IF;
596:

Line 615: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

611: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
612: fnd_log.string
613: (
614: fnd_log.level_error,
615: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
616: 'Price List is mandatory'
617: );
618: END IF;
619: RAISE FND_API.G_EXC_ERROR;

Line 634: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

630: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
631: fnd_log.string
632: (
633: fnd_log.level_error,
634: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
635: 'AHL_VWP_RULES_PVT.Check_Price_List_Name_Or_Id API Threw error'
636: );
637: END IF;
638: RAISE FND_API.G_EXC_ERROR;

Line 648: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

644: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
645: fnd_log.string
646: (
647: fnd_log.level_error,
648: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
649: 'Price List is mandatory'
650: );
651: END IF;
652: RAISE FND_API.G_EXC_ERROR;

Line 683: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

679: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
680: fnd_log.string
681: (
682: fnd_log.level_error,
683: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
684: 'Price List is not active on visit start date'
685: );
686: END IF;
687:

Line 704: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

700: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
701: fnd_log.string
702: (
703: fnd_log.level_error,
704: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
705: 'Price List is not active on visit end date'
706: );
707: END IF;
708:

Line 726: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',

722: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
723: fnd_log.string
724: (
725: fnd_log.level_error,
726: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details',
727: 'Price List is not active on current todays date'
728: );
729: END IF;
730:

Line 822: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details.end',

818: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
819: fnd_log.string
820: (
821: fnd_log.level_procedure,
822: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.update_visit_cost_details.end',
823: 'At the end of PLSQL procedure'
824: );
825: END IF;
826:

Line 866: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

862: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
863: p_commit IN VARCHAR2 := FND_API.G_FALSE,
864: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
865: p_module_type IN VARCHAR2 := 'JSP',
866: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
867: x_return_status OUT NOCOPY VARCHAR2,
868: x_msg_count OUT NOCOPY NUMBER,
869: x_msg_data OUT NOCOPY VARCHAR2)IS
870:

Line 885: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;

881: l_commit VARCHAR2(30) := Fnd_Api.G_FALSE;
882:
883: l_release_visit_required VARCHAR2(1) :='N';
884:
885: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
886:
887: BEGIN
888:
889: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN

Line 893: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost.begin',

889: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
890: fnd_log.string
891: (
892: fnd_log.level_procedure,
893: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost.begin',
894: 'At the start of PLSQL procedure'
895: );
896: END IF;
897:

Line 924: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',

920: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
921: fnd_log.string
922: (
923: fnd_log.level_statement,
924: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',
925: 'Got request for estimating cost of Visit ID : ' || p_x_cost_price_rec.visit_id
926: );
927:
928: fnd_log.string

Line 931: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',

927:
928: fnd_log.string
929: (
930: fnd_log.level_statement,
931: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',
932: 'input mr session id : ' || p_x_cost_price_rec.mr_session_id
933: );
934:
935: fnd_log.string

Line 938: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',

934:
935: fnd_log.string
936: (
937: fnd_log.level_statement,
938: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',
939: 'input cost session id : ' || p_x_cost_price_rec.cost_session_id
940: );
941: END IF;
942:

Line 953: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',

949: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
950: fnd_log.string
951: (
952: fnd_log.level_exception,
953: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',
954: 'Visit id is mandatory but found null in input '
955: );
956: END IF;
957: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1025: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',

1021: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
1022: fnd_log.string
1023: (
1024: fnd_log.level_exception,
1025: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost',
1026: 'AHL_VWP_COST_PVT.Estimate_WO_Cost API threw error : x_return_status : ' || x_return_status
1027: );
1028: END IF;
1029: RAISE FND_API.G_EXC_ERROR;

Line 1052: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost.end',

1048: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
1049: fnd_log.string
1050: (
1051: fnd_log.level_procedure,
1052: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_cost.end',
1053: 'At the end of PLSQL procedure'
1054: );
1055: END IF;
1056:

Line 1095: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

1091: --bug fix #4181411
1092: -- yazhou 18-Feb-2005
1093: --------------------------------------------------------------------------
1094: PROCEDURE Estimate_SR_Price(
1095: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
1096: x_return_status OUT NOCOPY VARCHAR2)
1097: IS
1098:
1099: -- Get all the root MR in the SR

Line 1124: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;

1120: START WITH visit_task_id = p_task_id
1121: AND NVL(VST.status_code, 'Y') <> NVL ('DELETED', 'X')
1122: CONNECT BY originating_task_id = PRIOR visit_task_id;
1123:
1124: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1125: l_temp_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1126:
1127: l_actual_price NUMBER;
1128: l_estimated_price NUMBER;

Line 1125: l_temp_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;

1121: AND NVL(VST.status_code, 'Y') <> NVL ('DELETED', 'X')
1122: CONNECT BY originating_task_id = PRIOR visit_task_id;
1123:
1124: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1125: l_temp_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1126:
1127: l_actual_price NUMBER;
1128: l_estimated_price NUMBER;
1129:

Line 1138: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.Estimate_SR_Price.begin',

1134: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
1135: fnd_log.string
1136: (
1137: fnd_log.level_procedure,
1138: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.Estimate_SR_Price.begin',
1139: 'At the start of PLSQL procedure'
1140: );
1141: END IF;
1142:

Line 1203: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.Estimate_SR_Price',

1199: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1200: fnd_log.string
1201: (
1202: fnd_log.level_error,
1203: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.Estimate_SR_Price',
1204: 'AHL_VWP_MR_CST_PR_PVT.Estimate_MR_Price API Threw error'
1205: );
1206: END IF;
1207: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1274: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_SR_price',

1270: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1271: fnd_log.string
1272: (
1273: fnd_log.level_error,
1274: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_SR_price',
1275: 'AHL_VWP_TASK_CST_PR_PVT.Estimate_Task_Price API Threw error'
1276: );
1277: END IF;
1278: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1312: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.Estimate_SR_Price.end',

1308: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
1309: fnd_log.string
1310: (
1311: fnd_log.level_procedure,
1312: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.Estimate_SR_Price.end',
1313: 'At the end of PLSQL procedure'
1314: );
1315: END IF;
1316: END Estimate_SR_Price;

Line 1328: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

1324: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
1325: p_commit IN VARCHAR2 := FND_API.G_FALSE,
1326: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
1327: p_module_type IN VARCHAR2 := 'JSP',
1328: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
1329: x_return_status OUT NOCOPY VARCHAR2,
1330: x_msg_count OUT NOCOPY NUMBER,
1331: x_msg_data OUT NOCOPY VARCHAR2)
1332: IS

Line 1334: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;

1330: x_msg_count OUT NOCOPY NUMBER,
1331: x_msg_data OUT NOCOPY VARCHAR2)
1332: IS
1333:
1334: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1335: l_temp_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1336:
1337:
1338: l_job_status_code VARCHAR2(30);

Line 1335: l_temp_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;

1331: x_msg_data OUT NOCOPY VARCHAR2)
1332: IS
1333:
1334: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1335: l_temp_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
1336:
1337:
1338: l_job_status_code VARCHAR2(30);
1339: l_job_status_meaning VARCHAR2(80);

Line 1428: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price.begin',

1424: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
1425: fnd_log.string
1426: (
1427: fnd_log.level_procedure,
1428: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price.begin',
1429: 'At the start of PLSQL procedure'
1430: );
1431: END IF;
1432:

Line 1458: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1454: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
1455: fnd_log.string
1456: (
1457: fnd_log.level_statement,
1458: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1459: 'Got request for estimating of Visit ID : ' || p_x_cost_price_rec.visit_id
1460: );
1461: END IF;
1462:

Line 1472: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1468: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
1469: fnd_log.string
1470: (
1471: fnd_log.level_exception,
1472: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1473: 'Visit id is mandatory but found null in input '
1474: );
1475: END IF;
1476: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1492: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1488: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
1489: fnd_log.string
1490: (
1491: fnd_log.level_exception,
1492: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1493: 'visit info not found for input visit id'
1494: );
1495: END IF;
1496: CLOSE visit_info_csr;

Line 1512: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1508: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1509: fnd_log.string
1510: (
1511: fnd_log.level_error,
1512: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1513: 'Price estimation is restricted to outside party visit only '
1514: );
1515: END IF;
1516: RAISE FND_API.G_EXC_ERROR;

Line 1523: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1519: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1520: fnd_log.string
1521: (
1522: fnd_log.level_error,
1523: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1524: 'Before release_visit cursor'
1525: );
1526: END IF;
1527:

Line 1573: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1569: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1570: fnd_log.string
1571: (
1572: fnd_log.level_error,
1573: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1574: 'Before customer cursor'
1575: );
1576: END IF;
1577:

Line 1589: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1585: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1586: fnd_log.string
1587: (
1588: fnd_log.level_error,
1589: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1590: 'Customer id not found for service request'
1591: );
1592: END IF;
1593: CLOSE customer_id_csr;

Line 1720: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1716: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1717: fnd_log.string
1718: (
1719: fnd_log.level_error,
1720: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1721: 'Before Summary TAsk cursor '
1722: );
1723: END IF;
1724:

Line 1775: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1771: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1772: fnd_log.string
1773: (
1774: fnd_log.level_error,
1775: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1776: 'AHL_VWP_MR_CST_PR_PVT.Estimate_MR_Price API Threw error'
1777: );
1778: END IF;
1779: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1832: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1828: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1829: fnd_log.string
1830: (
1831: fnd_log.level_error,
1832: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1833: 'Estimate_SR_Price API Threw error'
1834: );
1835: END IF;
1836: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1903: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',

1899: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
1900: fnd_log.string
1901: (
1902: fnd_log.level_error,
1903: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price',
1904: 'AHL_VWP_TASK_CST_PR_PVT.Estimate_Task_Price API Threw error'
1905: );
1906: END IF;
1907: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2066: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price.end',

2062: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
2063: fnd_log.string
2064: (
2065: fnd_log.level_procedure,
2066: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.estimate_visit_price.end',
2067: 'At the end of PLSQL procedure'
2068: );
2069: END IF;
2070:

Line 2167: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot.begin',

2163: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
2164: fnd_log.string
2165: (
2166: fnd_log.level_procedure,
2167: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot.begin',
2168: 'At the start of PLSQL procedure'
2169: );
2170: END IF;
2171:

Line 2198: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot',

2194: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
2195: fnd_log.string
2196: (
2197: fnd_log.level_statement,
2198: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot',
2199: 'Got request for tasking a price snapshot of Visit ID : ' || p_visit_id
2200: );
2201: END IF;
2202:

Line 2214: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot',

2210: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
2211: fnd_log.string
2212: (
2213: fnd_log.level_exception,
2214: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot',
2215: 'Visit id is mandatory but found null in input '
2216: );
2217: END IF;
2218: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2238: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot',

2234: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
2235: fnd_log.string
2236: (
2237: fnd_log.level_error,
2238: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot',
2239: 'Price not found for task id : ' || other_tasks_rec.visit_task_id
2240: );
2241: END IF;
2242: EXIT;

Line 2337: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot.end',

2333: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
2334: fnd_log.string
2335: (
2336: fnd_log.level_procedure,
2337: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_price_snapshot.end',
2338: 'At the end of PLSQL procedure'
2339: );
2340: END IF;
2341:

Line 2401: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

2397: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
2398: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2399: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
2400: p_module_type IN VARCHAR2 := 'JSP',
2401: p_x_cost_price_rec IN OUT NOCOPY AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
2402: x_return_status OUT NOCOPY VARCHAR2,
2403: x_msg_count OUT NOCOPY NUMBER,
2404: x_msg_data OUT NOCOPY VARCHAR2)IS
2405:

Line 2406: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;

2402: x_return_status OUT NOCOPY VARCHAR2,
2403: x_msg_count OUT NOCOPY NUMBER,
2404: x_msg_data OUT NOCOPY VARCHAR2)IS
2405:
2406: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type;
2407:
2408: CURSOR summary_tasks_snapshot_csr(p_visit_id IN NUMBER) IS
2409: SELECT visit_task_id, mr_id FROM ahl_visit_tasks_vl
2410: WHERE mr_id IS NULL

Line 2448: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot.begin',

2444: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
2445: fnd_log.string
2446: (
2447: fnd_log.level_procedure,
2448: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot.begin',
2449: 'At the start of PLSQL procedure'
2450: );
2451: END IF;
2452:

Line 2478: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',

2474: IF (fnd_log.level_statement >= fnd_log.g_current_runtime_level)THEN
2475: fnd_log.string
2476: (
2477: fnd_log.level_statement,
2478: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',
2479: 'Got request for tasking a cost snapshot of Visit ID : ' || p_x_cost_price_rec.visit_id
2480: );
2481: END IF;
2482:

Line 2491: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',

2487: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
2488: fnd_log.string
2489: (
2490: fnd_log.level_exception,
2491: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',
2492: 'Visit id is mandatory but found null in input '
2493: );
2494: END IF;
2495: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2517: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',

2513: IF (fnd_log.level_exception >= fnd_log.g_current_runtime_level)THEN
2514: fnd_log.string
2515: (
2516: fnd_log.level_exception,
2517: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',
2518: 'AHL_VWP_COST_PVT.Estimate_WO_Cost API threw error : x_return_status : ' || x_return_status
2519: );
2520: END IF;
2521: RAISE FND_API.G_EXC_ERROR;

Line 2546: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',

2542: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
2543: fnd_log.string
2544: (
2545: fnd_log.level_error,
2546: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',
2547: 'AHL_VWP_COST_PVT.Calculate_Task_Cost API threw error :summary: x_return_status : ' || x_return_status
2548: );
2549: END IF;
2550: CLOSE workorder_csr;

Line 2614: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',

2610: IF (fnd_log.level_error >= fnd_log.g_current_runtime_level)THEN
2611: fnd_log.string
2612: (
2613: fnd_log.level_error,
2614: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot',
2615: 'AHL_VWP_COST_PVT.Calculate_Task_Cost API threw error :other: x_return_status : ' || x_return_status
2616: );
2617: END IF;
2618: EXIT;

Line 2676: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot.end',

2672: IF (fnd_log.level_procedure >= fnd_log.g_current_runtime_level)THEN
2673: fnd_log.string
2674: (
2675: fnd_log.level_procedure,
2676: 'ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.create_cost_snapshot.end',
2677: 'At the end of PLSQL procedure'
2678: );
2679: END IF;
2680: EXCEPTION

Line 2723: p_cost_price_rec IN AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,

2719: p_module_type IN VARCHAR2 := NULL,
2720: x_return_status OUT NOCOPY VARCHAR2,
2721: x_msg_count OUT NOCOPY NUMBER,
2722: x_msg_data OUT NOCOPY VARCHAR2,
2723: p_cost_price_rec IN AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type,
2724: x_cost_price_tbl OUT NOCOPY Cost_Price_Tbl_Type
2725: )
2726: AS
2727: l_api_name VARCHAR2(30) :='GET_VISIT_ITEMS_NO_PRICE';

Line 2733: l_module_name VARCHAR2(200):='ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_items_no_price';

2729: l_return_status VARCHAR2(1);
2730: l_flag VARCHAR2(1);
2731: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2732: l_release_visit_required VARCHAR2(1) :='N';
2733: l_module_name VARCHAR2(200):='ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_items_no_price';
2734:
2735: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type:=p_cost_price_rec;
2736: l_job_status_code AHL_WORKORDERS_V.JOB_STATUS_CODE%TYPE;
2737: l_job_status_meaning AHL_WORKORDERS_V.JOB_STATUS_MEANING%TYPE;

Line 2735: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type:=p_cost_price_rec;

2731: l_commit VARCHAR2(1) := FND_API.G_FALSE;
2732: l_release_visit_required VARCHAR2(1) :='N';
2733: l_module_name VARCHAR2(200):='ahl.plsql.AHL_VWP_VISIT_CST_PR_PVT.get_visit_items_no_price';
2734:
2735: l_cost_price_rec AHL_VWP_VISIT_CST_PR_PVT.cost_price_rec_type:=p_cost_price_rec;
2736: l_job_status_code AHL_WORKORDERS_V.JOB_STATUS_CODE%TYPE;
2737: l_job_status_meaning AHL_WORKORDERS_V.JOB_STATUS_MEANING%TYPE;
2738:
2739: l_cost_price_tbl1 Cost_Price_Tbl_Type;

Line 2870: AHL_VWP_VISIT_CST_PR_PVT.check_for_release_visit

2866: End if;
2867: Close c_visit_csr;
2868:
2869: -- Release visit if required
2870: AHL_VWP_VISIT_CST_PR_PVT.check_for_release_visit
2871: (
2872: p_visit_id =>l_visit_rec.visit_id,
2873: x_release_visit_required =>l_release_visit_required
2874: );

Line 3467: END AHL_VWP_VISIT_CST_PR_PVT;

3463: END IF;
3464:
3465: END Check_for_Release_Visit;
3466:
3467: END AHL_VWP_VISIT_CST_PR_PVT;