4: -- Package private constants
5: -------------------------------------------------------------------------------
6: -- Debug constants
7: D_PACKAGE_BASE CONSTANT VARCHAR2(50) :=
8: PO_LOG.get_package_base('PO_DOCUMENT_TOTALS_PVT');
9:
10: -- Shipment type constants
11: C_ship_type_STANDARD CONSTANT
12: PO_LINE_LOCATIONS_ALL.shipment_type%TYPE
180: , p_draft_id IN NUMBER DEFAULT -1 --
181: ) RETURN NUMBER
182: IS
183: d_mod CONSTANT VARCHAR2(100) :=
184: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountOrdered');
185: d_position NUMBER := 0;
186: l_return_val NUMBER := 0;
187: l_precision GL_CURRENCIES.precision%TYPE;
188: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
187: l_precision GL_CURRENCIES.precision%TYPE;
188: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
189: BEGIN
190:
191: IF PO_LOG.d_proc THEN
192: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
193: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
194: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
195: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
188: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
189: BEGIN
190:
191: IF PO_LOG.d_proc THEN
192: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
193: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
194: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
195: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
196: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
189: BEGIN
190:
191: IF PO_LOG.d_proc THEN
192: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
193: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
194: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
195: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
196: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
197: END IF;
190:
191: IF PO_LOG.d_proc THEN
192: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
193: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
194: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
195: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
196: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
197: END IF;
198:
191: IF PO_LOG.d_proc THEN
192: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
193: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
194: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
195: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
196: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
197: END IF;
198:
199: do_org_currency_setups(
192: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
193: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
194: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
195: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
196: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
197: END IF;
198:
199: do_org_currency_setups(
200: p_doc_level => p_doc_level
203: , x_min_acct_unit => l_mau
204: );
205:
206: d_position := 10;
207: IF PO_LOG.d_stmt THEN
208: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
209: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
210: END IF;
211:
204: );
205:
206: d_position := 10;
207: IF PO_LOG.d_stmt THEN
208: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
209: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
210: END IF;
211:
212: IF p_doc_level = g_doc_level_HEADER THEN
205:
206: d_position := 10;
207: IF PO_LOG.d_stmt THEN
208: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
209: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
210: END IF;
211:
212: IF p_doc_level = g_doc_level_HEADER THEN
213:
254:
255: ELSE
256:
257: d_position := 40;
258: IF PO_LOG.d_stmt THEN
259: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
260: END IF;
261:
262: END IF; --p_data_source check
255: ELSE
256:
257: d_position := 40;
258: IF PO_LOG.d_stmt THEN
259: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
260: END IF;
261:
262: END IF; --p_data_source check
263:
304:
305: ELSE
306:
307: d_position := 70;
308: IF PO_LOG.d_stmt THEN
309: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
310: END IF;
311:
312: END IF; --p_data_source check
305: ELSE
306:
307: d_position := 70;
308: IF PO_LOG.d_stmt THEN
309: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
310: END IF;
311:
312: END IF; --p_data_source check
313:
358:
359: ELSE
360:
361: d_position := 100;
362: IF PO_LOG.d_stmt THEN
363: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
364: END IF;
365:
366: END IF; --p_data_source check
359: ELSE
360:
361: d_position := 100;
362: IF PO_LOG.d_stmt THEN
363: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
364: END IF;
365:
366: END IF; --p_data_source check
367:
424:
425: ELSE
426:
427: d_position := 130;
428: IF PO_LOG.d_stmt THEN
429: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
430: END IF;
431:
432: END IF; --p_data_source check
425: ELSE
426:
427: d_position := 130;
428: IF PO_LOG.d_stmt THEN
429: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
430: END IF;
431:
432: END IF; --p_data_source check
433:
433:
434: ELSE
435:
436: d_position := 140;
437: IF PO_LOG.d_stmt THEN
438: PO_LOG.stmt(d_mod,d_position,'Invalid doc level: ', p_doc_level);
439: END IF;
440:
441: END IF; --p_doc_level check
434: ELSE
435:
436: d_position := 140;
437: IF PO_LOG.d_stmt THEN
438: PO_LOG.stmt(d_mod,d_position,'Invalid doc level: ', p_doc_level);
439: END IF;
440:
441: END IF; --p_doc_level check
442:
439: END IF;
440:
441: END IF; --p_doc_level check
442:
443: IF PO_LOG.d_proc THEN
444: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
445: END IF;
446:
447: IF(l_return_val IS NULL ) THEN
440:
441: END IF; --p_doc_level check
442:
443: IF PO_LOG.d_proc THEN
444: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
445: END IF;
446:
447: IF(l_return_val IS NULL ) THEN
448: l_return_val := 0;
451: RETURN l_return_val;
452:
453: EXCEPTION
454: WHEN OTHERS THEN
455: IF PO_LOG.d_exc THEN
456: PO_LOG.exc(d_mod,d_position,NULL);
457: END IF;
458: RAISE;
459: END getAmountOrdered;
452:
453: EXCEPTION
454: WHEN OTHERS THEN
455: IF PO_LOG.d_exc THEN
456: PO_LOG.exc(d_mod,d_position,NULL);
457: END IF;
458: RAISE;
459: END getAmountOrdered;
460:
502: , p_doc_revision_num IN NUMBER --default null
503: ) RETURN NUMBER
504: IS
505: d_mod CONSTANT VARCHAR2(100) :=
506: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountApprovedForLine');
507: d_position NUMBER := 0;
508: l_return_val NUMBER := 0;
509: l_precision GL_CURRENCIES.precision%TYPE;
510: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
509: l_precision GL_CURRENCIES.precision%TYPE;
510: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
511: BEGIN
512:
513: IF PO_LOG.d_proc THEN
514: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
515: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
516: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
517: END IF;
510: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
511: BEGIN
512:
513: IF PO_LOG.d_proc THEN
514: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
515: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
516: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
517: END IF;
518:
511: BEGIN
512:
513: IF PO_LOG.d_proc THEN
514: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
515: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
516: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
517: END IF;
518:
519: do_org_currency_setups(
512:
513: IF PO_LOG.d_proc THEN
514: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
515: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
516: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
517: END IF;
518:
519: do_org_currency_setups(
520: p_doc_level => g_doc_level_LINE
523: , x_min_acct_unit => l_mau
524: );
525:
526: d_position := 5;
527: IF PO_LOG.d_stmt THEN
528: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
529: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
530: END IF;
531:
524: );
525:
526: d_position := 5;
527: IF PO_LOG.d_stmt THEN
528: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
529: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
530: END IF;
531:
532: IF p_data_source = g_data_source_TRANSACTION THEN
525:
526: d_position := 5;
527: IF PO_LOG.d_stmt THEN
528: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
529: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
530: END IF;
531:
532: IF p_data_source = g_data_source_TRANSACTION THEN
533:
547: AND nvl(poll.payment_type, 'NULL') IN ('RATE', 'LUMPSUM', 'MILESTONE') --Bug5391045
548: ;
549: EXCEPTION
550: WHEN NO_DATA_FOUND THEN
551: IF PO_LOG.d_stmt THEN
552: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
553: END IF;
554: l_return_val := 0;
555: END;
548: ;
549: EXCEPTION
550: WHEN NO_DATA_FOUND THEN
551: IF PO_LOG.d_stmt THEN
552: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
553: END IF;
554: l_return_val := 0;
555: END;
556:
581: )
582: ;
583: EXCEPTION
584: WHEN NO_DATA_FOUND THEN
585: IF PO_LOG.d_stmt THEN
586: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
587: END IF;
588: l_return_val := 0;
589: END;
582: ;
583: EXCEPTION
584: WHEN NO_DATA_FOUND THEN
585: IF PO_LOG.d_stmt THEN
586: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
587: END IF;
588: l_return_val := 0;
589: END;
590:
590:
591: ELSE
592:
593: d_position := 30;
594: IF PO_LOG.d_stmt THEN
595: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
596: END IF;
597:
598: END IF;
591: ELSE
592:
593: d_position := 30;
594: IF PO_LOG.d_stmt THEN
595: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
596: END IF;
597:
598: END IF;
599:
596: END IF;
597:
598: END IF;
599:
600: IF PO_LOG.d_proc THEN
601: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
602: END IF;
603:
604: RETURN l_return_val;
597:
598: END IF;
599:
600: IF PO_LOG.d_proc THEN
601: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
602: END IF;
603:
604: RETURN l_return_val;
605:
604: RETURN l_return_val;
605:
606: EXCEPTION
607: WHEN OTHERS THEN
608: IF PO_LOG.d_exc THEN
609: PO_LOG.exc(d_mod,d_position,NULL);
610: END IF;
611: RAISE;
612: END getAmountApprovedForLine;
605:
606: EXCEPTION
607: WHEN OTHERS THEN
608: IF PO_LOG.d_exc THEN
609: PO_LOG.exc(d_mod,d_position,NULL);
610: END IF;
611: RAISE;
612: END getAmountApprovedForLine;
613:
655: , p_doc_revision_num IN NUMBER --default null
656: ) RETURN NUMBER
657: IS
658: d_mod CONSTANT VARCHAR2(100) :=
659: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountApprovedForHeader');
660: d_position NUMBER := 0;
661: l_return_val NUMBER := 0;
662: l_precision GL_CURRENCIES.precision%TYPE;
663: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
662: l_precision GL_CURRENCIES.precision%TYPE;
663: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
664: BEGIN
665:
666: IF PO_LOG.d_proc THEN
667: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
668: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
669: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
670: END IF;
663: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
664: BEGIN
665:
666: IF PO_LOG.d_proc THEN
667: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
668: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
669: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
670: END IF;
671:
664: BEGIN
665:
666: IF PO_LOG.d_proc THEN
667: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
668: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
669: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
670: END IF;
671:
672: do_org_currency_setups(
665:
666: IF PO_LOG.d_proc THEN
667: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
668: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
669: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
670: END IF;
671:
672: do_org_currency_setups(
673: p_doc_level => g_doc_level_HEADER
676: , x_min_acct_unit => l_mau
677: );
678:
679: d_position := 5;
680: IF PO_LOG.d_stmt THEN
681: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
682: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
683: END IF;
684:
677: );
678:
679: d_position := 5;
680: IF PO_LOG.d_stmt THEN
681: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
682: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
683: END IF;
684:
685: IF p_data_source = g_data_source_TRANSACTION THEN
678:
679: d_position := 5;
680: IF PO_LOG.d_stmt THEN
681: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
682: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
683: END IF;
684:
685: IF p_data_source = g_data_source_TRANSACTION THEN
686:
700: AND nvl(poll.payment_type, 'NULL') IN ('RATE', 'LUMPSUM', 'MILESTONE') --Bug5391045
701: ;
702: EXCEPTION
703: WHEN NO_DATA_FOUND THEN
704: IF PO_LOG.d_stmt THEN
705: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
706: END IF;
707: l_return_val := 0;
708: END;
701: ;
702: EXCEPTION
703: WHEN NO_DATA_FOUND THEN
704: IF PO_LOG.d_stmt THEN
705: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
706: END IF;
707: l_return_val := 0;
708: END;
709:
734: )
735: ;
736: EXCEPTION
737: WHEN NO_DATA_FOUND THEN
738: IF PO_LOG.d_stmt THEN
739: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
740: END IF;
741: l_return_val := 0;
742: END;
735: ;
736: EXCEPTION
737: WHEN NO_DATA_FOUND THEN
738: IF PO_LOG.d_stmt THEN
739: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
740: END IF;
741: l_return_val := 0;
742: END;
743:
743:
744: ELSE
745:
746: d_position := 30;
747: IF PO_LOG.d_stmt THEN
748: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
749: END IF;
750:
751: END IF;
744: ELSE
745:
746: d_position := 30;
747: IF PO_LOG.d_stmt THEN
748: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
749: END IF;
750:
751: END IF;
752:
749: END IF;
750:
751: END IF;
752:
753: IF PO_LOG.d_proc THEN
754: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
755: END IF;
756:
757: RETURN l_return_val;
750:
751: END IF;
752:
753: IF PO_LOG.d_proc THEN
754: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
755: END IF;
756:
757: RETURN l_return_val;
758:
757: RETURN l_return_val;
758:
759: EXCEPTION
760: WHEN OTHERS THEN
761: IF PO_LOG.d_exc THEN
762: PO_LOG.exc(d_mod,d_position,NULL);
763: END IF;
764: RAISE;
765: END getAmountApprovedForHeader;
758:
759: EXCEPTION
760: WHEN OTHERS THEN
761: IF PO_LOG.d_exc THEN
762: PO_LOG.exc(d_mod,d_position,NULL);
763: END IF;
764: RAISE;
765: END getAmountApprovedForHeader;
766:
811: , p_doc_revision_num IN NUMBER --default null
812: ) RETURN NUMBER
813: IS
814: d_mod CONSTANT VARCHAR2(100) :=
815: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountDeliveredForLine');
816: d_position NUMBER := 0;
817: l_return_val NUMBER := 0;
818: l_precision GL_CURRENCIES.precision%TYPE;
819: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
818: l_precision GL_CURRENCIES.precision%TYPE;
819: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
820: BEGIN
821:
822: IF PO_LOG.d_proc THEN
823: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
824: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
825: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
826: END IF;
819: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
820: BEGIN
821:
822: IF PO_LOG.d_proc THEN
823: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
824: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
825: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
826: END IF;
827:
820: BEGIN
821:
822: IF PO_LOG.d_proc THEN
823: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
824: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
825: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
826: END IF;
827:
828: do_org_currency_setups(
821:
822: IF PO_LOG.d_proc THEN
823: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
824: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
825: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
826: END IF;
827:
828: do_org_currency_setups(
829: p_doc_level => g_doc_level_LINE
832: , x_min_acct_unit => l_mau
833: );
834:
835: d_position := 5;
836: IF PO_LOG.d_stmt THEN
837: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
838: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
839: END IF;
840:
833: );
834:
835: d_position := 5;
836: IF PO_LOG.d_stmt THEN
837: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
838: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
839: END IF;
840:
841: IF p_data_source = g_data_source_TRANSACTION THEN
834:
835: d_position := 5;
836: IF PO_LOG.d_stmt THEN
837: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
838: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
839: END IF;
840:
841: IF p_data_source = g_data_source_TRANSACTION THEN
842:
858: AND pod.distribution_type = 'STANDARD'
859: ;
860: EXCEPTION
861: WHEN NO_DATA_FOUND THEN
862: IF PO_LOG.d_stmt THEN
863: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
864: END IF;
865: l_return_val := 0;
866: END;
859: ;
860: EXCEPTION
861: WHEN NO_DATA_FOUND THEN
862: IF PO_LOG.d_stmt THEN
863: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
864: END IF;
865: l_return_val := 0;
866: END;
867:
901: )
902: ;
903: EXCEPTION
904: WHEN NO_DATA_FOUND THEN
905: IF PO_LOG.d_stmt THEN
906: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
907: END IF;
908: l_return_val := 0;
909: END;
902: ;
903: EXCEPTION
904: WHEN NO_DATA_FOUND THEN
905: IF PO_LOG.d_stmt THEN
906: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
907: END IF;
908: l_return_val := 0;
909: END;
910:
910:
911: ELSE
912:
913: d_position := 30;
914: IF PO_LOG.d_stmt THEN
915: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
916: END IF;
917:
918: END IF;
911: ELSE
912:
913: d_position := 30;
914: IF PO_LOG.d_stmt THEN
915: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
916: END IF;
917:
918: END IF;
919:
916: END IF;
917:
918: END IF;
919:
920: IF PO_LOG.d_proc THEN
921: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
922: END IF;
923:
924: RETURN l_return_val;
917:
918: END IF;
919:
920: IF PO_LOG.d_proc THEN
921: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
922: END IF;
923:
924: RETURN l_return_val;
925:
924: RETURN l_return_val;
925:
926: EXCEPTION
927: WHEN OTHERS THEN
928: IF PO_LOG.d_exc THEN
929: PO_LOG.exc(d_mod,d_position,NULL);
930: END IF;
931: RAISE;
932: END getAmountDeliveredForLine;
925:
926: EXCEPTION
927: WHEN OTHERS THEN
928: IF PO_LOG.d_exc THEN
929: PO_LOG.exc(d_mod,d_position,NULL);
930: END IF;
931: RAISE;
932: END getAmountDeliveredForLine;
933:
978: , p_doc_revision_num IN NUMBER --default null
979: ) RETURN NUMBER
980: IS
981: d_mod CONSTANT VARCHAR2(100) :=
982: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountDeliveredForHeader');
983: d_position NUMBER := 0;
984: l_return_val NUMBER := 0;
985: l_precision GL_CURRENCIES.precision%TYPE;
986: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
985: l_precision GL_CURRENCIES.precision%TYPE;
986: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
987: BEGIN
988:
989: IF PO_LOG.d_proc THEN
990: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
991: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
992: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
993: END IF;
986: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
987: BEGIN
988:
989: IF PO_LOG.d_proc THEN
990: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
991: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
992: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
993: END IF;
994:
987: BEGIN
988:
989: IF PO_LOG.d_proc THEN
990: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
991: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
992: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
993: END IF;
994:
995: do_org_currency_setups(
988:
989: IF PO_LOG.d_proc THEN
990: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
991: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
992: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
993: END IF;
994:
995: do_org_currency_setups(
996: p_doc_level => g_doc_level_HEADER
999: , x_min_acct_unit => l_mau
1000: );
1001:
1002: d_position := 5;
1003: IF PO_LOG.d_stmt THEN
1004: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
1005: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
1006: END IF;
1007:
1000: );
1001:
1002: d_position := 5;
1003: IF PO_LOG.d_stmt THEN
1004: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
1005: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
1006: END IF;
1007:
1008: IF p_data_source = g_data_source_TRANSACTION THEN
1001:
1002: d_position := 5;
1003: IF PO_LOG.d_stmt THEN
1004: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
1005: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
1006: END IF;
1007:
1008: IF p_data_source = g_data_source_TRANSACTION THEN
1009:
1025: AND pod.distribution_type = 'STANDARD'
1026: ;
1027: EXCEPTION
1028: WHEN NO_DATA_FOUND THEN
1029: IF PO_LOG.d_stmt THEN
1030: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
1031: END IF;
1032: l_return_val := 0;
1033: END;
1026: ;
1027: EXCEPTION
1028: WHEN NO_DATA_FOUND THEN
1029: IF PO_LOG.d_stmt THEN
1030: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
1031: END IF;
1032: l_return_val := 0;
1033: END;
1034:
1068: )
1069: ;
1070: EXCEPTION
1071: WHEN NO_DATA_FOUND THEN
1072: IF PO_LOG.d_stmt THEN
1073: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
1074: END IF;
1075: l_return_val := 0;
1076: END;
1069: ;
1070: EXCEPTION
1071: WHEN NO_DATA_FOUND THEN
1072: IF PO_LOG.d_stmt THEN
1073: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
1074: END IF;
1075: l_return_val := 0;
1076: END;
1077:
1077:
1078: ELSE
1079:
1080: d_position := 30;
1081: IF PO_LOG.d_stmt THEN
1082: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1083: END IF;
1084:
1085: END IF;
1078: ELSE
1079:
1080: d_position := 30;
1081: IF PO_LOG.d_stmt THEN
1082: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1083: END IF;
1084:
1085: END IF;
1086:
1083: END IF;
1084:
1085: END IF;
1086:
1087: IF PO_LOG.d_proc THEN
1088: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1089: END IF;
1090:
1091: RETURN l_return_val;
1084:
1085: END IF;
1086:
1087: IF PO_LOG.d_proc THEN
1088: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1089: END IF;
1090:
1091: RETURN l_return_val;
1092:
1091: RETURN l_return_val;
1092:
1093: EXCEPTION
1094: WHEN OTHERS THEN
1095: IF PO_LOG.d_exc THEN
1096: PO_LOG.exc(d_mod,d_position,NULL);
1097: END IF;
1098: RAISE;
1099: END getAmountDeliveredForHeader;
1092:
1093: EXCEPTION
1094: WHEN OTHERS THEN
1095: IF PO_LOG.d_exc THEN
1096: PO_LOG.exc(d_mod,d_position,NULL);
1097: END IF;
1098: RAISE;
1099: END getAmountDeliveredForHeader;
1100:
1142: , p_doc_revision_num IN NUMBER --default null
1143: ) RETURN NUMBER
1144: IS
1145: d_mod CONSTANT VARCHAR2(100) :=
1146: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountBilledForLine');
1147: d_position NUMBER := 0;
1148: l_return_val NUMBER := 0;
1149: l_org_id PO_LINES_ALL.org_id%type;
1150: BEGIN
1148: l_return_val NUMBER := 0;
1149: l_org_id PO_LINES_ALL.org_id%type;
1150: BEGIN
1151:
1152: IF PO_LOG.d_proc THEN
1153: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1154: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1155: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1156: END IF;
1149: l_org_id PO_LINES_ALL.org_id%type;
1150: BEGIN
1151:
1152: IF PO_LOG.d_proc THEN
1153: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1154: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1155: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1156: END IF;
1157:
1150: BEGIN
1151:
1152: IF PO_LOG.d_proc THEN
1153: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1154: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1155: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1156: END IF;
1157:
1158: d_position := 10;
1151:
1152: IF PO_LOG.d_proc THEN
1153: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1154: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1155: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1156: END IF;
1157:
1158: d_position := 10;
1159:
1162: FROM po_lines_all pol
1163: WHERE pol.po_line_id = p_line_id;
1164:
1165: d_position := 20;
1166: IF PO_LOG.d_stmt THEN
1167: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1168: END IF;
1169:
1170: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1163: WHERE pol.po_line_id = p_line_id;
1164:
1165: d_position := 20;
1166: IF PO_LOG.d_stmt THEN
1167: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1168: END IF;
1169:
1170: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1171:
1181: AND poll.shipment_type = 'STANDARD'
1182: ;
1183: EXCEPTION
1184: WHEN NO_DATA_FOUND THEN
1185: IF PO_LOG.d_stmt THEN
1186: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1187: END IF;
1188: l_return_val := 0;
1189: END;
1182: ;
1183: EXCEPTION
1184: WHEN NO_DATA_FOUND THEN
1185: IF PO_LOG.d_stmt THEN
1186: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1187: END IF;
1188: l_return_val := 0;
1189: END;
1190:
1209: )
1210: ;
1211: EXCEPTION
1212: WHEN NO_DATA_FOUND THEN
1213: IF PO_LOG.d_stmt THEN
1214: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1215: END IF;
1216: l_return_val := 0;
1217: END;
1210: ;
1211: EXCEPTION
1212: WHEN NO_DATA_FOUND THEN
1213: IF PO_LOG.d_stmt THEN
1214: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1215: END IF;
1216: l_return_val := 0;
1217: END;
1218:
1218:
1219: ELSE
1220:
1221: d_position := 50;
1222: IF PO_LOG.d_stmt THEN
1223: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1224: END IF;
1225:
1226: END IF;
1219: ELSE
1220:
1221: d_position := 50;
1222: IF PO_LOG.d_stmt THEN
1223: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1224: END IF;
1225:
1226: END IF;
1227:
1224: END IF;
1225:
1226: END IF;
1227:
1228: IF PO_LOG.d_proc THEN
1229: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1230: END IF;
1231:
1232: RETURN l_return_val;
1225:
1226: END IF;
1227:
1228: IF PO_LOG.d_proc THEN
1229: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1230: END IF;
1231:
1232: RETURN l_return_val;
1233:
1232: RETURN l_return_val;
1233:
1234: EXCEPTION
1235: WHEN OTHERS THEN
1236: IF PO_LOG.d_exc THEN
1237: PO_LOG.exc(d_mod,d_position,NULL);
1238: END IF;
1239: RAISE;
1240: END getAmountBilledForLine;
1233:
1234: EXCEPTION
1235: WHEN OTHERS THEN
1236: IF PO_LOG.d_exc THEN
1237: PO_LOG.exc(d_mod,d_position,NULL);
1238: END IF;
1239: RAISE;
1240: END getAmountBilledForLine;
1241:
1283: , p_doc_revision_num IN NUMBER --default null
1284: ) RETURN NUMBER
1285: IS
1286: d_mod CONSTANT VARCHAR2(100) :=
1287: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountBilledForHeader');
1288: d_position NUMBER := 0;
1289: l_return_val NUMBER := 0;
1290: l_org_id PO_HEADERS_ALL.org_id%type;
1291: BEGIN
1289: l_return_val NUMBER := 0;
1290: l_org_id PO_HEADERS_ALL.org_id%type;
1291: BEGIN
1292:
1293: IF PO_LOG.d_proc THEN
1294: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1295: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1296: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1297: END IF;
1290: l_org_id PO_HEADERS_ALL.org_id%type;
1291: BEGIN
1292:
1293: IF PO_LOG.d_proc THEN
1294: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1295: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1296: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1297: END IF;
1298:
1291: BEGIN
1292:
1293: IF PO_LOG.d_proc THEN
1294: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1295: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1296: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1297: END IF;
1298:
1299: d_position := 10;
1292:
1293: IF PO_LOG.d_proc THEN
1294: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1295: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1296: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1297: END IF;
1298:
1299: d_position := 10;
1300:
1304: WHERE poh.po_header_id = p_header_id
1305: ;
1306:
1307: d_position := 20;
1308: IF PO_LOG.d_stmt THEN
1309: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1310: END IF;
1311:
1312: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1305: ;
1306:
1307: d_position := 20;
1308: IF PO_LOG.d_stmt THEN
1309: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1310: END IF;
1311:
1312: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1313:
1323: AND poll.shipment_type = 'STANDARD'
1324: ;
1325: EXCEPTION
1326: WHEN NO_DATA_FOUND THEN
1327: IF PO_LOG.d_stmt THEN
1328: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1329: END IF;
1330: l_return_val := 0;
1331: END;
1324: ;
1325: EXCEPTION
1326: WHEN NO_DATA_FOUND THEN
1327: IF PO_LOG.d_stmt THEN
1328: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1329: END IF;
1330: l_return_val := 0;
1331: END;
1332:
1351: )
1352: ;
1353: EXCEPTION
1354: WHEN NO_DATA_FOUND THEN
1355: IF PO_LOG.d_stmt THEN
1356: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1357: END IF;
1358: l_return_val := 0;
1359: END;
1352: ;
1353: EXCEPTION
1354: WHEN NO_DATA_FOUND THEN
1355: IF PO_LOG.d_stmt THEN
1356: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1357: END IF;
1358: l_return_val := 0;
1359: END;
1360:
1360:
1361: ELSE
1362:
1363: d_position := 50;
1364: IF PO_LOG.d_stmt THEN
1365: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1366: END IF;
1367:
1368: END IF;
1361: ELSE
1362:
1363: d_position := 50;
1364: IF PO_LOG.d_stmt THEN
1365: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1366: END IF;
1367:
1368: END IF;
1369:
1366: END IF;
1367:
1368: END IF;
1369:
1370: IF PO_LOG.d_proc THEN
1371: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1372: END IF;
1373:
1374: RETURN l_return_val;
1367:
1368: END IF;
1369:
1370: IF PO_LOG.d_proc THEN
1371: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1372: END IF;
1373:
1374: RETURN l_return_val;
1375:
1374: RETURN l_return_val;
1375:
1376: EXCEPTION
1377: WHEN OTHERS THEN
1378: IF PO_LOG.d_exc THEN
1379: PO_LOG.exc(d_mod,d_position,NULL);
1380: END IF;
1381: RAISE;
1382: END getAmountBilledForHeader;
1375:
1376: EXCEPTION
1377: WHEN OTHERS THEN
1378: IF PO_LOG.d_exc THEN
1379: PO_LOG.exc(d_mod,d_position,NULL);
1380: END IF;
1381: RAISE;
1382: END getAmountBilledForHeader;
1383:
1425: , p_doc_revision_num IN NUMBER --default null
1426: ) RETURN NUMBER
1427: IS
1428: d_mod CONSTANT VARCHAR2(100) :=
1429: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountFinancedForLine');
1430: d_position NUMBER := 0;
1431: l_return_val NUMBER := 0;
1432: l_org_id PO_LINES_ALL.org_id%type;
1433: BEGIN
1431: l_return_val NUMBER := 0;
1432: l_org_id PO_LINES_ALL.org_id%type;
1433: BEGIN
1434:
1435: IF PO_LOG.d_proc THEN
1436: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1437: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1438: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1439: END IF;
1432: l_org_id PO_LINES_ALL.org_id%type;
1433: BEGIN
1434:
1435: IF PO_LOG.d_proc THEN
1436: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1437: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1438: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1439: END IF;
1440:
1433: BEGIN
1434:
1435: IF PO_LOG.d_proc THEN
1436: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1437: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1438: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1439: END IF;
1440:
1441: d_position := 10;
1434:
1435: IF PO_LOG.d_proc THEN
1436: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1437: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1438: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1439: END IF;
1440:
1441: d_position := 10;
1442:
1445: FROM po_lines_all pol
1446: WHERE pol.po_line_id = p_line_id;
1447:
1448: d_position := 20;
1449: IF PO_LOG.d_stmt THEN
1450: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1451: END IF;
1452:
1453: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1446: WHERE pol.po_line_id = p_line_id;
1447:
1448: d_position := 20;
1449: IF PO_LOG.d_stmt THEN
1450: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1451: END IF;
1452:
1453: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1454:
1464: AND poll.shipment_type = 'PREPAYMENT'
1465: ;
1466: EXCEPTION
1467: WHEN NO_DATA_FOUND THEN
1468: IF PO_LOG.d_stmt THEN
1469: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1470: END IF;
1471: l_return_val := 0;
1472: END;
1465: ;
1466: EXCEPTION
1467: WHEN NO_DATA_FOUND THEN
1468: IF PO_LOG.d_stmt THEN
1469: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1470: END IF;
1471: l_return_val := 0;
1472: END;
1473:
1492: )
1493: ;
1494: EXCEPTION
1495: WHEN NO_DATA_FOUND THEN
1496: IF PO_LOG.d_stmt THEN
1497: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1498: END IF;
1499: l_return_val := 0;
1500: END;
1493: ;
1494: EXCEPTION
1495: WHEN NO_DATA_FOUND THEN
1496: IF PO_LOG.d_stmt THEN
1497: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1498: END IF;
1499: l_return_val := 0;
1500: END;
1501:
1501:
1502: ELSE
1503:
1504: d_position := 50;
1505: IF PO_LOG.d_stmt THEN
1506: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1507: END IF;
1508:
1509: END IF;
1502: ELSE
1503:
1504: d_position := 50;
1505: IF PO_LOG.d_stmt THEN
1506: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1507: END IF;
1508:
1509: END IF;
1510:
1507: END IF;
1508:
1509: END IF;
1510:
1511: IF PO_LOG.d_proc THEN
1512: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1513: END IF;
1514:
1515: RETURN l_return_val;
1508:
1509: END IF;
1510:
1511: IF PO_LOG.d_proc THEN
1512: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1513: END IF;
1514:
1515: RETURN l_return_val;
1516:
1515: RETURN l_return_val;
1516:
1517: EXCEPTION
1518: WHEN OTHERS THEN
1519: IF PO_LOG.d_exc THEN
1520: PO_LOG.exc(d_mod,d_position,NULL);
1521: END IF;
1522: RAISE;
1523: END getAmountFinancedForLine;
1516:
1517: EXCEPTION
1518: WHEN OTHERS THEN
1519: IF PO_LOG.d_exc THEN
1520: PO_LOG.exc(d_mod,d_position,NULL);
1521: END IF;
1522: RAISE;
1523: END getAmountFinancedForLine;
1524:
1566: , p_doc_revision_num IN NUMBER --default null
1567: ) RETURN NUMBER
1568: IS
1569: d_mod CONSTANT VARCHAR2(100) :=
1570: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountFinancedForHeader');
1571: d_position NUMBER := 0;
1572: l_return_val NUMBER := 0;
1573: l_org_id PO_HEADERS_ALL.org_id%type;
1574: BEGIN
1572: l_return_val NUMBER := 0;
1573: l_org_id PO_HEADERS_ALL.org_id%type;
1574: BEGIN
1575:
1576: IF PO_LOG.d_proc THEN
1577: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1578: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1579: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1580: END IF;
1573: l_org_id PO_HEADERS_ALL.org_id%type;
1574: BEGIN
1575:
1576: IF PO_LOG.d_proc THEN
1577: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1578: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1579: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1580: END IF;
1581:
1574: BEGIN
1575:
1576: IF PO_LOG.d_proc THEN
1577: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1578: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1579: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1580: END IF;
1581:
1582: d_position := 10;
1575:
1576: IF PO_LOG.d_proc THEN
1577: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1578: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1579: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1580: END IF;
1581:
1582: d_position := 10;
1583:
1587: WHERE poh.po_header_id = p_header_id
1588: ;
1589:
1590: d_position := 20;
1591: IF PO_LOG.d_stmt THEN
1592: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1593: END IF;
1594:
1595: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1588: ;
1589:
1590: d_position := 20;
1591: IF PO_LOG.d_stmt THEN
1592: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1593: END IF;
1594:
1595: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1596:
1606: AND poll.shipment_type = 'PREPAYMENT'
1607: ;
1608: EXCEPTION
1609: WHEN NO_DATA_FOUND THEN
1610: IF PO_LOG.d_stmt THEN
1611: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1612: END IF;
1613: l_return_val := 0;
1614: END;
1607: ;
1608: EXCEPTION
1609: WHEN NO_DATA_FOUND THEN
1610: IF PO_LOG.d_stmt THEN
1611: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1612: END IF;
1613: l_return_val := 0;
1614: END;
1615:
1634: )
1635: ;
1636: EXCEPTION
1637: WHEN NO_DATA_FOUND THEN
1638: IF PO_LOG.d_stmt THEN
1639: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1640: END IF;
1641: l_return_val := 0;
1642: END;
1635: ;
1636: EXCEPTION
1637: WHEN NO_DATA_FOUND THEN
1638: IF PO_LOG.d_stmt THEN
1639: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1640: END IF;
1641: l_return_val := 0;
1642: END;
1643:
1643:
1644: ELSE
1645:
1646: d_position := 50;
1647: IF PO_LOG.d_stmt THEN
1648: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1649: END IF;
1650:
1651: END IF;
1644: ELSE
1645:
1646: d_position := 50;
1647: IF PO_LOG.d_stmt THEN
1648: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1649: END IF;
1650:
1651: END IF;
1652:
1649: END IF;
1650:
1651: END IF;
1652:
1653: IF PO_LOG.d_proc THEN
1654: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1655: END IF;
1656:
1657: RETURN l_return_val;
1650:
1651: END IF;
1652:
1653: IF PO_LOG.d_proc THEN
1654: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1655: END IF;
1656:
1657: RETURN l_return_val;
1658:
1657: RETURN l_return_val;
1658:
1659: EXCEPTION
1660: WHEN OTHERS THEN
1661: IF PO_LOG.d_exc THEN
1662: PO_LOG.exc(d_mod,d_position,NULL);
1663: END IF;
1664: RAISE;
1665: END getAmountFinancedForHeader;
1658:
1659: EXCEPTION
1660: WHEN OTHERS THEN
1661: IF PO_LOG.d_exc THEN
1662: PO_LOG.exc(d_mod,d_position,NULL);
1663: END IF;
1664: RAISE;
1665: END getAmountFinancedForHeader;
1666:
1705: , p_doc_revision_num IN NUMBER --default null
1706: ) RETURN NUMBER
1707: IS
1708: d_mod CONSTANT VARCHAR2(100) :=
1709: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountRecoupedForLine');
1710: d_position NUMBER := 0;
1711: l_return_val NUMBER := 0;
1712: l_org_id PO_LINES_ALL.org_id%type;
1713: BEGIN
1711: l_return_val NUMBER := 0;
1712: l_org_id PO_LINES_ALL.org_id%type;
1713: BEGIN
1714:
1715: IF PO_LOG.d_proc THEN
1716: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1717: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1718: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1719: END IF;
1712: l_org_id PO_LINES_ALL.org_id%type;
1713: BEGIN
1714:
1715: IF PO_LOG.d_proc THEN
1716: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1717: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1718: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1719: END IF;
1720:
1713: BEGIN
1714:
1715: IF PO_LOG.d_proc THEN
1716: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1717: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1718: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1719: END IF;
1720:
1721: d_position := 10;
1714:
1715: IF PO_LOG.d_proc THEN
1716: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1717: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1718: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1719: END IF;
1720:
1721: d_position := 10;
1722:
1725: FROM po_lines_all pol
1726: WHERE pol.po_line_id = p_line_id;
1727:
1728: d_position := 20;
1729: IF PO_LOG.d_stmt THEN
1730: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1731: END IF;
1732:
1733: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1726: WHERE pol.po_line_id = p_line_id;
1727:
1728: d_position := 20;
1729: IF PO_LOG.d_stmt THEN
1730: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1731: END IF;
1732:
1733: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1734:
1744: AND poll.shipment_type = 'PREPAYMENT'
1745: ;
1746: EXCEPTION
1747: WHEN NO_DATA_FOUND THEN
1748: IF PO_LOG.d_stmt THEN
1749: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1750: END IF;
1751: l_return_val := 0;
1752: END;
1745: ;
1746: EXCEPTION
1747: WHEN NO_DATA_FOUND THEN
1748: IF PO_LOG.d_stmt THEN
1749: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1750: END IF;
1751: l_return_val := 0;
1752: END;
1753:
1772: )
1773: ;
1774: EXCEPTION
1775: WHEN NO_DATA_FOUND THEN
1776: IF PO_LOG.d_stmt THEN
1777: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1778: END IF;
1779: l_return_val := 0;
1780: END;
1773: ;
1774: EXCEPTION
1775: WHEN NO_DATA_FOUND THEN
1776: IF PO_LOG.d_stmt THEN
1777: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1778: END IF;
1779: l_return_val := 0;
1780: END;
1781:
1781:
1782: ELSE
1783:
1784: d_position := 30;
1785: IF PO_LOG.d_stmt THEN
1786: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1787: END IF;
1788:
1789: END IF;
1782: ELSE
1783:
1784: d_position := 30;
1785: IF PO_LOG.d_stmt THEN
1786: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1787: END IF;
1788:
1789: END IF;
1790:
1787: END IF;
1788:
1789: END IF;
1790:
1791: IF PO_LOG.d_proc THEN
1792: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1793: END IF;
1794:
1795: RETURN l_return_val;
1788:
1789: END IF;
1790:
1791: IF PO_LOG.d_proc THEN
1792: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1793: END IF;
1794:
1795: RETURN l_return_val;
1796:
1795: RETURN l_return_val;
1796:
1797: EXCEPTION
1798: WHEN OTHERS THEN
1799: IF PO_LOG.d_exc THEN
1800: PO_LOG.exc(d_mod,d_position,NULL);
1801: END IF;
1802: RAISE;
1803: END getAmountRecoupedForLine;
1796:
1797: EXCEPTION
1798: WHEN OTHERS THEN
1799: IF PO_LOG.d_exc THEN
1800: PO_LOG.exc(d_mod,d_position,NULL);
1801: END IF;
1802: RAISE;
1803: END getAmountRecoupedForLine;
1804:
1843: , p_doc_revision_num IN NUMBER --default null
1844: ) RETURN NUMBER
1845: IS
1846: d_mod CONSTANT VARCHAR2(100) :=
1847: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountRecoupedForHeader');
1848: d_position NUMBER := 0;
1849: l_return_val NUMBER := 0;
1850: l_org_id PO_HEADERS_ALL.org_id%type;
1851: BEGIN
1849: l_return_val NUMBER := 0;
1850: l_org_id PO_HEADERS_ALL.org_id%type;
1851: BEGIN
1852:
1853: IF PO_LOG.d_proc THEN
1854: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1855: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1856: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1857: END IF;
1850: l_org_id PO_HEADERS_ALL.org_id%type;
1851: BEGIN
1852:
1853: IF PO_LOG.d_proc THEN
1854: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1855: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1856: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1857: END IF;
1858:
1851: BEGIN
1852:
1853: IF PO_LOG.d_proc THEN
1854: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1855: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1856: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1857: END IF;
1858:
1859: d_position := 10;
1852:
1853: IF PO_LOG.d_proc THEN
1854: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
1855: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1856: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1857: END IF;
1858:
1859: d_position := 10;
1860:
1864: WHERE poh.po_header_id = p_header_id
1865: ;
1866:
1867: d_position := 20;
1868: IF PO_LOG.d_stmt THEN
1869: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1870: END IF;
1871:
1872: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1865: ;
1866:
1867: d_position := 20;
1868: IF PO_LOG.d_stmt THEN
1869: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
1870: END IF;
1871:
1872: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
1873:
1883: AND poll.shipment_type = 'PREPAYMENT'
1884: ;
1885: EXCEPTION
1886: WHEN NO_DATA_FOUND THEN
1887: IF PO_LOG.d_stmt THEN
1888: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1889: END IF;
1890: l_return_val := 0;
1891: END;
1884: ;
1885: EXCEPTION
1886: WHEN NO_DATA_FOUND THEN
1887: IF PO_LOG.d_stmt THEN
1888: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1889: END IF;
1890: l_return_val := 0;
1891: END;
1892:
1911: )
1912: ;
1913: EXCEPTION
1914: WHEN NO_DATA_FOUND THEN
1915: IF PO_LOG.d_stmt THEN
1916: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1917: END IF;
1918: l_return_val := 0;
1919: END;
1912: ;
1913: EXCEPTION
1914: WHEN NO_DATA_FOUND THEN
1915: IF PO_LOG.d_stmt THEN
1916: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
1917: END IF;
1918: l_return_val := 0;
1919: END;
1920:
1920:
1921: ELSE
1922:
1923: d_position := 50;
1924: IF PO_LOG.d_stmt THEN
1925: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1926: END IF;
1927:
1928: END IF;
1921: ELSE
1922:
1923: d_position := 50;
1924: IF PO_LOG.d_stmt THEN
1925: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
1926: END IF;
1927:
1928: END IF;
1929:
1926: END IF;
1927:
1928: END IF;
1929:
1930: IF PO_LOG.d_proc THEN
1931: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1932: END IF;
1933:
1934: RETURN l_return_val;
1927:
1928: END IF;
1929:
1930: IF PO_LOG.d_proc THEN
1931: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
1932: END IF;
1933:
1934: RETURN l_return_val;
1935:
1934: RETURN l_return_val;
1935:
1936: EXCEPTION
1937: WHEN OTHERS THEN
1938: IF PO_LOG.d_exc THEN
1939: PO_LOG.exc(d_mod,d_position,NULL);
1940: END IF;
1941: RAISE;
1942: END getAmountRecoupedForHeader;
1935:
1936: EXCEPTION
1937: WHEN OTHERS THEN
1938: IF PO_LOG.d_exc THEN
1939: PO_LOG.exc(d_mod,d_position,NULL);
1940: END IF;
1941: RAISE;
1942: END getAmountRecoupedForHeader;
1943:
1983: , p_doc_revision_num IN NUMBER --default null
1984: ) RETURN NUMBER
1985: IS
1986: d_mod CONSTANT VARCHAR2(100) :=
1987: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountRetainedForLine');
1988: d_position NUMBER := 0;
1989: l_return_val NUMBER := 0;
1990: l_org_id PO_LINES_ALL.org_id%type;
1991: BEGIN
1989: l_return_val NUMBER := 0;
1990: l_org_id PO_LINES_ALL.org_id%type;
1991: BEGIN
1992:
1993: IF PO_LOG.d_proc THEN
1994: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1995: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1996: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1997: END IF;
1990: l_org_id PO_LINES_ALL.org_id%type;
1991: BEGIN
1992:
1993: IF PO_LOG.d_proc THEN
1994: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1995: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1996: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1997: END IF;
1998:
1991: BEGIN
1992:
1993: IF PO_LOG.d_proc THEN
1994: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1995: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1996: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1997: END IF;
1998:
1999: d_position := 10;
1992:
1993: IF PO_LOG.d_proc THEN
1994: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
1995: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
1996: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
1997: END IF;
1998:
1999: d_position := 10;
2000:
2003: FROM po_lines_all pol
2004: WHERE pol.po_line_id = p_line_id;
2005:
2006: d_position := 20;
2007: IF PO_LOG.d_stmt THEN
2008: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
2009: END IF;
2010:
2011: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
2004: WHERE pol.po_line_id = p_line_id;
2005:
2006: d_position := 20;
2007: IF PO_LOG.d_stmt THEN
2008: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
2009: END IF;
2010:
2011: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
2012:
2023: AND poll.shipment_type = 'STANDARD'
2024: ;
2025: EXCEPTION
2026: WHEN NO_DATA_FOUND THEN
2027: IF PO_LOG.d_stmt THEN
2028: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2029: END IF;
2030: l_return_val := 0;
2031: END;
2024: ;
2025: EXCEPTION
2026: WHEN NO_DATA_FOUND THEN
2027: IF PO_LOG.d_stmt THEN
2028: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2029: END IF;
2030: l_return_val := 0;
2031: END;
2032:
2052: )
2053: ;
2054: EXCEPTION
2055: WHEN NO_DATA_FOUND THEN
2056: IF PO_LOG.d_stmt THEN
2057: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2058: END IF;
2059: l_return_val := 0;
2060: END;
2053: ;
2054: EXCEPTION
2055: WHEN NO_DATA_FOUND THEN
2056: IF PO_LOG.d_stmt THEN
2057: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2058: END IF;
2059: l_return_val := 0;
2060: END;
2061:
2061:
2062: ELSE
2063:
2064: d_position := 50;
2065: IF PO_LOG.d_stmt THEN
2066: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
2067: END IF;
2068:
2069: END IF;
2062: ELSE
2063:
2064: d_position := 50;
2065: IF PO_LOG.d_stmt THEN
2066: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
2067: END IF;
2068:
2069: END IF;
2070:
2067: END IF;
2068:
2069: END IF;
2070:
2071: IF PO_LOG.d_proc THEN
2072: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2073: END IF;
2074:
2075: RETURN l_return_val;
2068:
2069: END IF;
2070:
2071: IF PO_LOG.d_proc THEN
2072: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2073: END IF;
2074:
2075: RETURN l_return_val;
2076:
2075: RETURN l_return_val;
2076:
2077: EXCEPTION
2078: WHEN OTHERS THEN
2079: IF PO_LOG.d_exc THEN
2080: PO_LOG.exc(d_mod,d_position,NULL);
2081: END IF;
2082: RAISE;
2083: END getAmountRetainedForLine;
2076:
2077: EXCEPTION
2078: WHEN OTHERS THEN
2079: IF PO_LOG.d_exc THEN
2080: PO_LOG.exc(d_mod,d_position,NULL);
2081: END IF;
2082: RAISE;
2083: END getAmountRetainedForLine;
2084:
2124: , p_doc_revision_num IN NUMBER --default null
2125: ) RETURN NUMBER
2126: IS
2127: d_mod CONSTANT VARCHAR2(100) :=
2128: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountRetainedForHeader');
2129: d_position NUMBER := 0;
2130: l_return_val NUMBER := 0;
2131: l_org_id PO_HEADERS_ALL.org_id%type;
2132: BEGIN
2130: l_return_val NUMBER := 0;
2131: l_org_id PO_HEADERS_ALL.org_id%type;
2132: BEGIN
2133:
2134: IF PO_LOG.d_proc THEN
2135: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
2136: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
2137: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
2138: END IF;
2131: l_org_id PO_HEADERS_ALL.org_id%type;
2132: BEGIN
2133:
2134: IF PO_LOG.d_proc THEN
2135: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
2136: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
2137: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
2138: END IF;
2139:
2132: BEGIN
2133:
2134: IF PO_LOG.d_proc THEN
2135: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
2136: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
2137: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
2138: END IF;
2139:
2140: d_position := 10;
2133:
2134: IF PO_LOG.d_proc THEN
2135: PO_LOG.proc_begin(d_mod,'p_header_id',p_header_id);
2136: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
2137: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
2138: END IF;
2139:
2140: d_position := 10;
2141:
2145: WHERE poh.po_header_id = p_header_id
2146: ;
2147:
2148: d_position := 20;
2149: IF PO_LOG.d_stmt THEN
2150: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
2151: END IF;
2152:
2153: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
2146: ;
2147:
2148: d_position := 20;
2149: IF PO_LOG.d_stmt THEN
2150: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
2151: END IF;
2152:
2153: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
2154:
2165: AND poll.shipment_type = 'STANDARD'
2166: ;
2167: EXCEPTION
2168: WHEN NO_DATA_FOUND THEN
2169: IF PO_LOG.d_stmt THEN
2170: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2171: END IF;
2172: l_return_val := 0;
2173: END;
2166: ;
2167: EXCEPTION
2168: WHEN NO_DATA_FOUND THEN
2169: IF PO_LOG.d_stmt THEN
2170: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2171: END IF;
2172: l_return_val := 0;
2173: END;
2174:
2194: )
2195: ;
2196: EXCEPTION
2197: WHEN NO_DATA_FOUND THEN
2198: IF PO_LOG.d_stmt THEN
2199: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2200: END IF;
2201: l_return_val := 0;
2202: END;
2195: ;
2196: EXCEPTION
2197: WHEN NO_DATA_FOUND THEN
2198: IF PO_LOG.d_stmt THEN
2199: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2200: END IF;
2201: l_return_val := 0;
2202: END;
2203:
2203:
2204: ELSE
2205:
2206: d_position := 50;
2207: IF PO_LOG.d_stmt THEN
2208: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
2209: END IF;
2210:
2211: END IF;
2204: ELSE
2205:
2206: d_position := 50;
2207: IF PO_LOG.d_stmt THEN
2208: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
2209: END IF;
2210:
2211: END IF;
2212:
2209: END IF;
2210:
2211: END IF;
2212:
2213: IF PO_LOG.d_proc THEN
2214: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2215: END IF;
2216:
2217: RETURN l_return_val;
2210:
2211: END IF;
2212:
2213: IF PO_LOG.d_proc THEN
2214: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2215: END IF;
2216:
2217: RETURN l_return_val;
2218:
2217: RETURN l_return_val;
2218:
2219: EXCEPTION
2220: WHEN OTHERS THEN
2221: IF PO_LOG.d_exc THEN
2222: PO_LOG.exc(d_mod,d_position,NULL);
2223: END IF;
2224: RAISE;
2225: END getAmountRetainedForHeader;
2218:
2219: EXCEPTION
2220: WHEN OTHERS THEN
2221: IF PO_LOG.d_exc THEN
2222: PO_LOG.exc(d_mod,d_position,NULL);
2223: END IF;
2224: RAISE;
2225: END getAmountRetainedForHeader;
2226:
2255: p_draft_id IN NUMBER DEFAULT -1 --
2256: ) RETURN NUMBER
2257: IS
2258: d_mod CONSTANT VARCHAR2(100) :=
2259: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getLineLocQuantityForLine');
2260: d_position NUMBER := 0;
2261: l_return_val NUMBER := 0;
2262: l_header_id PO_HEADERS_ALL.po_header_id%TYPE;
2263: l_is_complex_work_po BOOLEAN := FALSE;
2262: l_header_id PO_HEADERS_ALL.po_header_id%TYPE;
2263: l_is_complex_work_po BOOLEAN := FALSE;
2264: BEGIN
2265:
2266: IF PO_LOG.d_proc THEN
2267: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
2268: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2269: END IF;
2270:
2263: l_is_complex_work_po BOOLEAN := FALSE;
2264: BEGIN
2265:
2266: IF PO_LOG.d_proc THEN
2267: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
2268: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2269: END IF;
2270:
2271: d_position := 10;
2264: BEGIN
2265:
2266: IF PO_LOG.d_proc THEN
2267: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
2268: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2269: END IF;
2270:
2271: d_position := 10;
2272:
2276: WHERE pol.po_line_id = p_line_id
2277: AND pol.draft_id = p_draft_id;
2278:
2279: d_position := 20;
2280: IF PO_LOG.d_stmt THEN
2281: PO_LOG.stmt(d_mod,d_position,'l_header_id:',l_header_id);
2282: END IF;
2283:
2284: l_is_complex_work_po
2277: AND pol.draft_id = p_draft_id;
2278:
2279: d_position := 20;
2280: IF PO_LOG.d_stmt THEN
2281: PO_LOG.stmt(d_mod,d_position,'l_header_id:',l_header_id);
2282: END IF;
2283:
2284: l_is_complex_work_po
2285: := PO_COMPLEX_WORK_PVT.is_complex_work_po(l_header_id);
2297: AND poll.draft_id = p_draft_id
2298: AND poll.shipment_type = 'STANDARD';
2299: EXCEPTION
2300: WHEN NO_DATA_FOUND THEN
2301: IF PO_LOG.d_stmt THEN
2302: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2303: END IF;
2304: l_return_val := 0;
2305: END;
2298: AND poll.shipment_type = 'STANDARD';
2299: EXCEPTION
2300: WHEN NO_DATA_FOUND THEN
2301: IF PO_LOG.d_stmt THEN
2302: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2303: END IF;
2304: l_return_val := 0;
2305: END;
2306:
2319:
2320: END IF;
2321:
2322:
2323: IF PO_LOG.d_proc THEN
2324: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2325: END IF;
2326:
2327: RETURN l_return_val;
2320: END IF;
2321:
2322:
2323: IF PO_LOG.d_proc THEN
2324: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2325: END IF;
2326:
2327: RETURN l_return_val;
2328:
2327: RETURN l_return_val;
2328:
2329: EXCEPTION
2330: WHEN OTHERS THEN
2331: IF PO_LOG.d_exc THEN
2332: PO_LOG.exc(d_mod,d_position,NULL);
2333: END IF;
2334: RAISE;
2335: END getLineLocQuantityForLine;
2328:
2329: EXCEPTION
2330: WHEN OTHERS THEN
2331: IF PO_LOG.d_exc THEN
2332: PO_LOG.exc(d_mod,d_position,NULL);
2333: END IF;
2334: RAISE;
2335: END getLineLocQuantityForLine;
2336:
2362: p_draft_id IN NUMBER DEFAULT -1 --
2363: ) RETURN NUMBER
2364: IS
2365: d_mod CONSTANT VARCHAR2(100) :=
2366: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getLineLocAmountForLine');
2367: d_position NUMBER := 0;
2368: l_return_val NUMBER := 0;
2369: l_header_id PO_HEADERS_ALL.po_header_id%TYPE;
2370: l_is_complex_work_po BOOLEAN := FALSE;
2371: l_precision GL_CURRENCIES.precision%TYPE;
2372: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
2373: BEGIN
2374:
2375: IF PO_LOG.d_proc THEN
2376: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
2377: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2378: END IF;
2379:
2372: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
2373: BEGIN
2374:
2375: IF PO_LOG.d_proc THEN
2376: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
2377: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2378: END IF;
2379:
2380: do_org_currency_setups(
2373: BEGIN
2374:
2375: IF PO_LOG.d_proc THEN
2376: PO_LOG.proc_begin(d_mod,'p_line_id',p_line_id);
2377: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2378: END IF;
2379:
2380: do_org_currency_setups(
2381: p_doc_level => g_doc_level_LINE
2384: , x_min_acct_unit => l_mau
2385: );
2386:
2387: d_position := 5;
2388: IF PO_LOG.d_stmt THEN
2389: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
2390: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
2391: END IF;
2392:
2385: );
2386:
2387: d_position := 5;
2388: IF PO_LOG.d_stmt THEN
2389: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
2390: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
2391: END IF;
2392:
2393: d_position := 10;
2386:
2387: d_position := 5;
2388: IF PO_LOG.d_stmt THEN
2389: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
2390: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
2391: END IF;
2392:
2393: d_position := 10;
2394:
2409: AND poll.shipment_type = 'STANDARD'
2410: ;
2411: EXCEPTION
2412: WHEN NO_DATA_FOUND THEN
2413: IF PO_LOG.d_stmt THEN
2414: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2415: END IF;
2416: l_return_val := 0;
2417: END;
2410: ;
2411: EXCEPTION
2412: WHEN NO_DATA_FOUND THEN
2413: IF PO_LOG.d_stmt THEN
2414: PO_LOG.stmt(d_mod,d_position,'No line locations exist');
2415: END IF;
2416: l_return_val := 0;
2417: END;
2418:
2417: END;
2418:
2419: d_position := 20;
2420:
2421: IF PO_LOG.d_proc THEN
2422: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2423: END IF;
2424:
2425: RETURN l_return_val;
2418:
2419: d_position := 20;
2420:
2421: IF PO_LOG.d_proc THEN
2422: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2423: END IF;
2424:
2425: RETURN l_return_val;
2426:
2425: RETURN l_return_val;
2426:
2427: EXCEPTION
2428: WHEN OTHERS THEN
2429: IF PO_LOG.d_exc THEN
2430: PO_LOG.exc(d_mod,d_position,NULL);
2431: END IF;
2432: RAISE;
2433: END getLineLocAmountForLine;
2426:
2427: EXCEPTION
2428: WHEN OTHERS THEN
2429: IF PO_LOG.d_exc THEN
2430: PO_LOG.exc(d_mod,d_position,NULL);
2431: END IF;
2432: RAISE;
2433: END getLineLocAmountForLine;
2434:
2460: p_draft_id IN NUMBER DEFAULT -1 --
2461: ) RETURN NUMBER
2462: IS
2463: d_mod CONSTANT VARCHAR2(100) :=
2464: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getDistQuantityForLineLoc');
2465: d_position NUMBER := 0;
2466: l_return_val NUMBER := 0;
2467: BEGIN
2468:
2465: d_position NUMBER := 0;
2466: l_return_val NUMBER := 0;
2467: BEGIN
2468:
2469: IF PO_LOG.d_proc THEN
2470: PO_LOG.proc_begin(d_mod,'p_line_loc_id',p_line_loc_id);
2471: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2472: END IF;
2473:
2466: l_return_val NUMBER := 0;
2467: BEGIN
2468:
2469: IF PO_LOG.d_proc THEN
2470: PO_LOG.proc_begin(d_mod,'p_line_loc_id',p_line_loc_id);
2471: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2472: END IF;
2473:
2474: d_position := 10;
2467: BEGIN
2468:
2469: IF PO_LOG.d_proc THEN
2470: PO_LOG.proc_begin(d_mod,'p_line_loc_id',p_line_loc_id);
2471: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2472: END IF;
2473:
2474: d_position := 10;
2475:
2480: WHERE pod.line_location_id = p_line_loc_id
2481: AND pod.draft_id = p_draft_id;
2482: EXCEPTION
2483: WHEN NO_DATA_FOUND THEN
2484: IF PO_LOG.d_stmt THEN
2485: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
2486: END IF;
2487: l_return_val := 0;
2488: END;
2481: AND pod.draft_id = p_draft_id;
2482: EXCEPTION
2483: WHEN NO_DATA_FOUND THEN
2484: IF PO_LOG.d_stmt THEN
2485: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
2486: END IF;
2487: l_return_val := 0;
2488: END;
2489:
2488: END;
2489:
2490: d_position := 20;
2491:
2492: IF PO_LOG.d_proc THEN
2493: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2494: END IF;
2495:
2496: RETURN l_return_val;
2489:
2490: d_position := 20;
2491:
2492: IF PO_LOG.d_proc THEN
2493: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2494: END IF;
2495:
2496: RETURN l_return_val;
2497:
2496: RETURN l_return_val;
2497:
2498: EXCEPTION
2499: WHEN OTHERS THEN
2500: IF PO_LOG.d_exc THEN
2501: PO_LOG.exc(d_mod,d_position,NULL);
2502: END IF;
2503: RAISE;
2504: END getDistQuantityForLineLoc;
2497:
2498: EXCEPTION
2499: WHEN OTHERS THEN
2500: IF PO_LOG.d_exc THEN
2501: PO_LOG.exc(d_mod,d_position,NULL);
2502: END IF;
2503: RAISE;
2504: END getDistQuantityForLineLoc;
2505:
2531: p_draft_id IN NUMBER DEFAULT -1 --
2532: ) RETURN NUMBER
2533: IS
2534: d_mod CONSTANT VARCHAR2(100) :=
2535: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getDistAmountForLineLoc');
2536: d_position NUMBER := 0;
2537: l_return_val NUMBER := 0;
2538: BEGIN
2539:
2536: d_position NUMBER := 0;
2537: l_return_val NUMBER := 0;
2538: BEGIN
2539:
2540: IF PO_LOG.d_proc THEN
2541: PO_LOG.proc_begin(d_mod,'p_line_loc_id',p_line_loc_id);
2542: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2543: END IF;
2544:
2537: l_return_val NUMBER := 0;
2538: BEGIN
2539:
2540: IF PO_LOG.d_proc THEN
2541: PO_LOG.proc_begin(d_mod,'p_line_loc_id',p_line_loc_id);
2542: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2543: END IF;
2544:
2545: d_position := 10;
2538: BEGIN
2539:
2540: IF PO_LOG.d_proc THEN
2541: PO_LOG.proc_begin(d_mod,'p_line_loc_id',p_line_loc_id);
2542: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
2543: END IF;
2544:
2545: d_position := 10;
2546:
2551: WHERE pod.line_location_id = p_line_loc_id
2552: AND pod.draft_id = p_draft_id;
2553: EXCEPTION
2554: WHEN NO_DATA_FOUND THEN
2555: IF PO_LOG.d_stmt THEN
2556: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
2557: END IF;
2558: l_return_val := 0;
2559: END;
2552: AND pod.draft_id = p_draft_id;
2553: EXCEPTION
2554: WHEN NO_DATA_FOUND THEN
2555: IF PO_LOG.d_stmt THEN
2556: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
2557: END IF;
2558: l_return_val := 0;
2559: END;
2560:
2559: END;
2560:
2561: d_position := 20;
2562:
2563: IF PO_LOG.d_proc THEN
2564: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2565: END IF;
2566:
2567: RETURN l_return_val;
2560:
2561: d_position := 20;
2562:
2563: IF PO_LOG.d_proc THEN
2564: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2565: END IF;
2566:
2567: RETURN l_return_val;
2568:
2567: RETURN l_return_val;
2568:
2569: EXCEPTION
2570: WHEN OTHERS THEN
2571: IF PO_LOG.d_exc THEN
2572: PO_LOG.exc(d_mod,d_position,NULL);
2573: END IF;
2574: RAISE;
2575: END getDistAmountForLineLoc;
2568:
2569: EXCEPTION
2570: WHEN OTHERS THEN
2571: IF PO_LOG.d_exc THEN
2572: PO_LOG.exc(d_mod,d_position,NULL);
2573: END IF;
2574: RAISE;
2575: END getDistAmountForLineLoc;
2576:
2603: p_distribution_id IN NUMBER
2604: ) RETURN NUMBER
2605: IS
2606: d_mod CONSTANT VARCHAR2(100) :=
2607: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getEncumberedAmountForDist');
2608: d_position NUMBER := 0;
2609: l_return_val NUMBER := 0;
2610: l_amount_ordered NUMBER := 0;
2611: l_precision GL_CURRENCIES.precision%TYPE;
2611: l_precision GL_CURRENCIES.precision%TYPE;
2612: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
2613: BEGIN
2614:
2615: IF PO_LOG.d_proc THEN
2616: PO_LOG.proc_begin(d_mod,'p_distribution_id ',p_distribution_id);
2617: END IF;
2618:
2619: do_org_currency_setups(
2612: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
2613: BEGIN
2614:
2615: IF PO_LOG.d_proc THEN
2616: PO_LOG.proc_begin(d_mod,'p_distribution_id ',p_distribution_id);
2617: END IF;
2618:
2619: do_org_currency_setups(
2620: p_doc_level => g_doc_level_DISTRIBUTION
2630: , p_doc_level_id => p_distribution_id
2631: , p_data_source => g_data_source_TRANSACTION
2632: );
2633:
2634: IF PO_LOG.d_proc THEN
2635: PO_LOG.proc_begin(d_mod,'Amount Ordered with out including Non Recoverable Tax '
2636: ,l_amount_ordered);
2637: END IF;
2638:
2631: , p_data_source => g_data_source_TRANSACTION
2632: );
2633:
2634: IF PO_LOG.d_proc THEN
2635: PO_LOG.proc_begin(d_mod,'Amount Ordered with out including Non Recoverable Tax '
2636: ,l_amount_ordered);
2637: END IF;
2638:
2639: d_position := 20;
2646: INTO l_return_val
2647: FROM po_distributions_all
2648: WHERE po_distribution_id = p_distribution_id;
2649:
2650: IF PO_LOG.d_proc THEN
2651: PO_LOG.proc_begin(d_mod,'Amount Ordered including Non Recoverable Tax ',l_return_val);
2652: END IF;
2653:
2654: EXCEPTION
2647: FROM po_distributions_all
2648: WHERE po_distribution_id = p_distribution_id;
2649:
2650: IF PO_LOG.d_proc THEN
2651: PO_LOG.proc_begin(d_mod,'Amount Ordered including Non Recoverable Tax ',l_return_val);
2652: END IF;
2653:
2654: EXCEPTION
2655: WHEN NO_DATA_FOUND THEN
2652: END IF;
2653:
2654: EXCEPTION
2655: WHEN NO_DATA_FOUND THEN
2656: IF PO_LOG.d_stmt THEN
2657: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
2658: END IF;
2659: l_return_val := 0;
2660: END;
2653:
2654: EXCEPTION
2655: WHEN NO_DATA_FOUND THEN
2656: IF PO_LOG.d_stmt THEN
2657: PO_LOG.stmt(d_mod,d_position,'No distributions exist');
2658: END IF;
2659: l_return_val := 0;
2660: END;
2661:
2660: END;
2661:
2662: d_position := 30;
2663:
2664: IF PO_LOG.d_proc THEN
2665: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2666: END IF;
2667:
2668: RETURN l_return_val;
2661:
2662: d_position := 30;
2663:
2664: IF PO_LOG.d_proc THEN
2665: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
2666: END IF;
2667:
2668: RETURN l_return_val;
2669:
2668: RETURN l_return_val;
2669:
2670: EXCEPTION
2671: WHEN OTHERS THEN
2672: IF PO_LOG.d_exc THEN
2673: PO_LOG.exc(d_mod,d_position,NULL);
2674: END IF;
2675: RAISE;
2676: END getEncumberedAmountForDist;
2669:
2670: EXCEPTION
2671: WHEN OTHERS THEN
2672: IF PO_LOG.d_exc THEN
2673: PO_LOG.exc(d_mod,d_position,NULL);
2674: END IF;
2675: RAISE;
2676: END getEncumberedAmountForDist;
2677:
2715: , x_currency_precision OUT NOCOPY NUMBER
2716: , x_min_acct_unit OUT NOCOPY NUMBER
2717: ) IS
2718: d_mod CONSTANT VARCHAR2(100) :=
2719: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'do_org_currency_setups');
2720: d_position NUMBER := 0;
2721: l_header_id PO_HEADERS_ALL.po_header_id%type;
2722: l_org_id PO_HEADERS_ALL.org_id%type;
2723: l_po_currency PO_HEADERS_ALL.currency_code%type;
2722: l_org_id PO_HEADERS_ALL.org_id%type;
2723: l_po_currency PO_HEADERS_ALL.currency_code%type;
2724: BEGIN
2725:
2726: IF PO_LOG.d_proc THEN
2727: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2728: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2729: END IF;
2730:
2723: l_po_currency PO_HEADERS_ALL.currency_code%type;
2724: BEGIN
2725:
2726: IF PO_LOG.d_proc THEN
2727: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2728: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2729: END IF;
2730:
2731: d_position := 10;
2724: BEGIN
2725:
2726: IF PO_LOG.d_proc THEN
2727: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2728: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2729: END IF;
2730:
2731: d_position := 10;
2732:
2761:
2762: END IF;
2763:
2764: d_position := 60;
2765: IF PO_LOG.d_stmt THEN
2766: PO_LOG.stmt(d_mod,d_position,'l_header_id:',l_header_id);
2767: END IF;
2768:
2769: SELECT poh.currency_code, poh.org_id
2762: END IF;
2763:
2764: d_position := 60;
2765: IF PO_LOG.d_stmt THEN
2766: PO_LOG.stmt(d_mod,d_position,'l_header_id:',l_header_id);
2767: END IF;
2768:
2769: SELECT poh.currency_code, poh.org_id
2770: INTO l_po_currency, l_org_id
2772: WHERE poh.po_header_id = l_header_id
2773: ;
2774:
2775: d_position := 70;
2776: IF PO_LOG.d_stmt THEN
2777: PO_LOG.stmt(d_mod,d_position,'l_po_currency:',l_po_currency);
2778: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
2779: END IF;
2780:
2773: ;
2774:
2775: d_position := 70;
2776: IF PO_LOG.d_stmt THEN
2777: PO_LOG.stmt(d_mod,d_position,'l_po_currency:',l_po_currency);
2778: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
2779: END IF;
2780:
2781: d_position := 80;
2774:
2775: d_position := 70;
2776: IF PO_LOG.d_stmt THEN
2777: PO_LOG.stmt(d_mod,d_position,'l_po_currency:',l_po_currency);
2778: PO_LOG.stmt(d_mod,d_position,'l_org_id:',l_org_id);
2779: END IF;
2780:
2781: d_position := 80;
2782: PO_MOAC_UTILS_PVT.set_org_context(l_org_id);
2789: );
2790:
2791: d_position := 100;
2792:
2793: IF PO_LOG.d_proc THEN
2794: PO_LOG.proc_end(d_mod,'x_currency_precision:',x_currency_precision);
2795: PO_LOG.proc_end(d_mod,'x_min_acct_unit:', x_min_acct_unit);
2796: END IF;
2797:
2790:
2791: d_position := 100;
2792:
2793: IF PO_LOG.d_proc THEN
2794: PO_LOG.proc_end(d_mod,'x_currency_precision:',x_currency_precision);
2795: PO_LOG.proc_end(d_mod,'x_min_acct_unit:', x_min_acct_unit);
2796: END IF;
2797:
2798: EXCEPTION
2791: d_position := 100;
2792:
2793: IF PO_LOG.d_proc THEN
2794: PO_LOG.proc_end(d_mod,'x_currency_precision:',x_currency_precision);
2795: PO_LOG.proc_end(d_mod,'x_min_acct_unit:', x_min_acct_unit);
2796: END IF;
2797:
2798: EXCEPTION
2799: WHEN OTHERS THEN
2796: END IF;
2797:
2798: EXCEPTION
2799: WHEN OTHERS THEN
2800: IF PO_LOG.d_exc THEN
2801: PO_LOG.exc(d_mod,d_position,NULL);
2802: END IF;
2803: RAISE;
2804: END do_org_currency_setups;
2797:
2798: EXCEPTION
2799: WHEN OTHERS THEN
2800: IF PO_LOG.d_exc THEN
2801: PO_LOG.exc(d_mod,d_position,NULL);
2802: END IF;
2803: RAISE;
2804: END do_org_currency_setups;
2805:
2918: x_retainage_released_amount OUT NOCOPY NUMBER
2919: )
2920: IS
2921: d_mod CONSTANT VARCHAR2(100) :=
2922: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'get_order_totals');
2923: d_position NUMBER := 0;
2924:
2925: BEGIN
2926:
2923: d_position NUMBER := 0;
2924:
2925: BEGIN
2926:
2927: IF PO_LOG.d_proc THEN
2928: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
2929: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
2930: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2931: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2924:
2925: BEGIN
2926:
2927: IF PO_LOG.d_proc THEN
2928: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
2929: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
2930: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2931: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2932: END IF;
2925: BEGIN
2926:
2927: IF PO_LOG.d_proc THEN
2928: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
2929: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
2930: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2931: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2932: END IF;
2933:
2926:
2927: IF PO_LOG.d_proc THEN
2928: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
2929: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
2930: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2931: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2932: END IF;
2933:
2934: -- Logic: call the PVT signature get_totals
2927: IF PO_LOG.d_proc THEN
2928: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
2929: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
2930: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
2931: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
2932: END IF;
2933:
2934: -- Logic: call the PVT signature get_totals
2935:
2961: );
2962:
2963: d_position := 20;
2964:
2965: IF PO_LOG.d_proc THEN
2966: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
2967: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2962:
2963: d_position := 20;
2964:
2965: IF PO_LOG.d_proc THEN
2966: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
2967: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2963: d_position := 20;
2964:
2965: IF PO_LOG.d_proc THEN
2966: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
2967: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2964:
2965: IF PO_LOG.d_proc THEN
2966: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
2967: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2965: IF PO_LOG.d_proc THEN
2966: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
2967: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2966: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
2967: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2967: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2968: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2969: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2970: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2971: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2979: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
2972: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2979: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
2980: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
2973: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2979: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
2980: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
2981: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
2974: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2979: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
2980: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
2981: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
2982: END IF;
2975: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2979: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
2980: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
2981: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
2982: END IF;
2983:
2976: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2979: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
2980: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
2981: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
2982: END IF;
2983:
2984: EXCEPTION
2977: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
2978: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
2979: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
2980: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
2981: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
2982: END IF;
2983:
2984: EXCEPTION
2985: WHEN OTHERS THEN
2982: END IF;
2983:
2984: EXCEPTION
2985: WHEN OTHERS THEN
2986: IF PO_LOG.d_exc THEN
2987: PO_LOG.exc(d_mod,d_position,NULL);
2988: END IF;
2989: RAISE;
2990:
2983:
2984: EXCEPTION
2985: WHEN OTHERS THEN
2986: IF PO_LOG.d_exc THEN
2987: PO_LOG.exc(d_mod,d_position,NULL);
2988: END IF;
2989: RAISE;
2990:
2991: END get_order_totals;
3094: x_retainage_released_amount OUT NOCOPY NUMBER
3095: )
3096: IS
3097: d_mod CONSTANT VARCHAR2(100) :=
3098: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'get_order_totals_from_archive');
3099: d_position NUMBER := 0;
3100:
3101: l_doc_currency_code GL_CURRENCIES.currency_code%TYPE;
3102: BEGIN
3100:
3101: l_doc_currency_code GL_CURRENCIES.currency_code%TYPE;
3102: BEGIN
3103:
3104: IF PO_LOG.d_proc THEN
3105: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3106: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3107: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3108: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3101: l_doc_currency_code GL_CURRENCIES.currency_code%TYPE;
3102: BEGIN
3103:
3104: IF PO_LOG.d_proc THEN
3105: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3106: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3107: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3108: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3109: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3102: BEGIN
3103:
3104: IF PO_LOG.d_proc THEN
3105: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3106: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3107: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3108: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3109: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3110: END IF;
3103:
3104: IF PO_LOG.d_proc THEN
3105: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3106: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3107: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3108: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3109: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3110: END IF;
3111:
3104: IF PO_LOG.d_proc THEN
3105: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3106: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3107: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3108: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3109: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3110: END IF;
3111:
3112: -- Logic: call the PVT signature get_totals
3105: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3106: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3107: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3108: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3109: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3110: END IF;
3111:
3112: -- Logic: call the PVT signature get_totals
3113:
3139: );
3140:
3141: d_position := 20;
3142:
3143: IF PO_LOG.d_proc THEN
3144: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3145: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3140:
3141: d_position := 20;
3142:
3143: IF PO_LOG.d_proc THEN
3144: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3145: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3141: d_position := 20;
3142:
3143: IF PO_LOG.d_proc THEN
3144: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3145: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3142:
3143: IF PO_LOG.d_proc THEN
3144: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3145: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3143: IF PO_LOG.d_proc THEN
3144: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3145: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3144: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3145: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3145: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3146: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3147: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3148: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3149: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3157: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3150: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3157: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3158: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3151: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3157: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3158: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3159: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3152: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3157: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3158: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3159: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3160: END IF;
3153: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3157: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3158: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3159: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3160: END IF;
3161:
3154: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3157: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3158: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3159: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3160: END IF;
3161:
3162: EXCEPTION
3155: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3156: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3157: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3158: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3159: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3160: END IF;
3161:
3162: EXCEPTION
3163: WHEN OTHERS THEN
3160: END IF;
3161:
3162: EXCEPTION
3163: WHEN OTHERS THEN
3164: IF PO_LOG.d_exc THEN
3165: PO_LOG.exc(d_mod,d_position,NULL);
3166: END IF;
3167: RAISE;
3168:
3161:
3162: EXCEPTION
3163: WHEN OTHERS THEN
3164: IF PO_LOG.d_exc THEN
3165: PO_LOG.exc(d_mod,d_position,NULL);
3166: END IF;
3167: RAISE;
3168:
3169: END get_order_totals_from_archive;
3278: x_retainage_released_amount OUT NOCOPY NUMBER
3279: )
3280: IS
3281: d_mod CONSTANT VARCHAR2(100) :=
3282: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'get_order_totals');
3283: d_position NUMBER := 0;
3284:
3285: l_org_id HR_ALL_ORGANIZATION_UNITS.organization_id%type;
3286: l_distribution_id_tbl po_tbl_number;
3292: l_temp_table_row_count NUMBER;
3293:
3294: BEGIN
3295:
3296: IF PO_LOG.d_proc THEN
3297: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3298: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3299: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3300: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3293:
3294: BEGIN
3295:
3296: IF PO_LOG.d_proc THEN
3297: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3298: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3299: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3300: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3301: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
3294: BEGIN
3295:
3296: IF PO_LOG.d_proc THEN
3297: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3298: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3299: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3300: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3301: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
3302: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3295:
3296: IF PO_LOG.d_proc THEN
3297: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3298: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3299: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3300: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3301: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
3302: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3303: END IF;
3296: IF PO_LOG.d_proc THEN
3297: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3298: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3299: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3300: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3301: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
3302: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3303: END IF;
3304:
3297: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3298: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3299: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3300: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3301: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
3302: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3303: END IF;
3304:
3305: -- Logic:
3298: PO_LOG.proc_begin(d_mod,'p_doc_subtype',p_doc_subtype);
3299: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3300: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3301: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
3302: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
3303: END IF;
3304:
3305: -- Logic:
3306: -- Based on doc type and doc level, get the list of distribution ids
3401: );
3402:
3403: d_position := 60;
3404:
3405: IF PO_LOG.d_proc THEN
3406: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3407: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3402:
3403: d_position := 60;
3404:
3405: IF PO_LOG.d_proc THEN
3406: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3407: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3403: d_position := 60;
3404:
3405: IF PO_LOG.d_proc THEN
3406: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3407: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3404:
3405: IF PO_LOG.d_proc THEN
3406: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3407: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3405: IF PO_LOG.d_proc THEN
3406: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3407: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3406: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
3407: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3407: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3408: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3409: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3410: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3411: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3419: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3412: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3419: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3420: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3413: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3419: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3420: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3421: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3414: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3419: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3420: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3421: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3422: END IF;
3415: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3419: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3420: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3421: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3422: END IF;
3423:
3416: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3419: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3420: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3421: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3422: END IF;
3423:
3424: EXCEPTION
3417: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
3418: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
3419: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
3420: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
3421: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
3422: END IF;
3423:
3424: EXCEPTION
3425: WHEN OTHERS THEN
3422: END IF;
3423:
3424: EXCEPTION
3425: WHEN OTHERS THEN
3426: IF PO_LOG.d_exc THEN
3427: PO_LOG.exc(d_mod,d_position,NULL);
3428: END IF;
3429: RAISE;
3430:
3423:
3424: EXCEPTION
3425: WHEN OTHERS THEN
3426: IF PO_LOG.d_exc THEN
3427: PO_LOG.exc(d_mod,d_position,NULL);
3428: END IF;
3429: RAISE;
3430:
3431: END get_totals;
3489: x_count OUT NOCOPY NUMBER
3490: )
3491: IS
3492: d_mod CONSTANT VARCHAR2(100) :=
3493: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'populate_temp_table');
3494: d_position NUMBER := 0;
3495:
3496: l_distribution_id_tbl PO_TBL_NUMBER;
3497: l_distribution_rev_num_tbl po_tbl_number;
3498: l_temp_table_key PO_DOCUMENT_TOTALS_GT.key%TYPE;
3499: l_distribution_type_filter PO_DISTRIBUTIONS_ALL.distribution_type%TYPE;
3500: BEGIN
3501:
3502: IF PO_LOG.d_proc THEN
3503: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3504: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3505: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3506: END IF;
3499: l_distribution_type_filter PO_DISTRIBUTIONS_ALL.distribution_type%TYPE;
3500: BEGIN
3501:
3502: IF PO_LOG.d_proc THEN
3503: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3504: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3505: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3506: END IF;
3507:
3500: BEGIN
3501:
3502: IF PO_LOG.d_proc THEN
3503: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3504: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3505: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3506: END IF;
3507:
3508: d_position := 5;
3501:
3502: IF PO_LOG.d_proc THEN
3503: PO_LOG.proc_begin(d_mod,'p_doc_type',p_doc_type);
3504: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3505: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
3506: END IF;
3507:
3508: d_position := 5;
3509:
3596:
3597: x_count := nvl(SQL%ROWCOUNT, 0);
3598:
3599: d_position := 30;
3600: IF PO_LOG.d_stmt THEN
3601: PO_LOG.stmt(d_mod,d_position,'Inserted data - rowcount:',x_count);
3602: END IF;
3603:
3604: ELSIF p_data_source = g_data_source_ARCHIVE THEN
3597: x_count := nvl(SQL%ROWCOUNT, 0);
3598:
3599: d_position := 30;
3600: IF PO_LOG.d_stmt THEN
3601: PO_LOG.stmt(d_mod,d_position,'Inserted data - rowcount:',x_count);
3602: END IF;
3603:
3604: ELSIF p_data_source = g_data_source_ARCHIVE THEN
3605:
3699:
3700: x_count := nvl(SQL%ROWCOUNT, 0);
3701:
3702: d_position := 60;
3703: IF PO_LOG.d_stmt THEN
3704: PO_LOG.stmt(d_mod,d_position,'Inserted data - rowcount:',x_count);
3705: END IF;
3706:
3707: ELSE
3700: x_count := nvl(SQL%ROWCOUNT, 0);
3701:
3702: d_position := 60;
3703: IF PO_LOG.d_stmt THEN
3704: PO_LOG.stmt(d_mod,d_position,'Inserted data - rowcount:',x_count);
3705: END IF;
3706:
3707: ELSE
3708:
3706:
3707: ELSE
3708:
3709: d_position := 70;
3710: IF PO_LOG.d_stmt THEN
3711: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
3712: END IF;
3713:
3714: END IF;
3707: ELSE
3708:
3709: d_position := 70;
3710: IF PO_LOG.d_stmt THEN
3711: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
3712: END IF;
3713:
3714: END IF;
3715:
3714: END IF;
3715:
3716: x_temp_table_key := l_temp_table_key;
3717:
3718: IF PO_LOG.d_proc THEN
3719: PO_LOG.proc_end(d_mod,'x_temp_table_key',x_count);
3720: PO_LOG.proc_end(d_mod,'x_temp_table_key',x_temp_table_key);
3721: END IF;
3722:
3715:
3716: x_temp_table_key := l_temp_table_key;
3717:
3718: IF PO_LOG.d_proc THEN
3719: PO_LOG.proc_end(d_mod,'x_temp_table_key',x_count);
3720: PO_LOG.proc_end(d_mod,'x_temp_table_key',x_temp_table_key);
3721: END IF;
3722:
3723: EXCEPTION
3716: x_temp_table_key := l_temp_table_key;
3717:
3718: IF PO_LOG.d_proc THEN
3719: PO_LOG.proc_end(d_mod,'x_temp_table_key',x_count);
3720: PO_LOG.proc_end(d_mod,'x_temp_table_key',x_temp_table_key);
3721: END IF;
3722:
3723: EXCEPTION
3724: WHEN OTHERS THEN
3721: END IF;
3722:
3723: EXCEPTION
3724: WHEN OTHERS THEN
3725: IF PO_LOG.d_exc THEN
3726: PO_LOG.exc(d_mod,d_position,NULL);
3727: END IF;
3728: RAISE;
3729: END populate_temp_table;
3722:
3723: EXCEPTION
3724: WHEN OTHERS THEN
3725: IF PO_LOG.d_exc THEN
3726: PO_LOG.exc(d_mod,d_position,NULL);
3727: END IF;
3728: RAISE;
3729: END populate_temp_table;
3730:
3758: p_document_id IN NUMBER
3759: )
3760: IS
3761: d_mod CONSTANT VARCHAR2(100) :=
3762: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'prepare_temp_table_data');
3763: d_position NUMBER := 0;
3764:
3765: l_base_currency_code GL_CURRENCIES.currency_code%TYPE;
3766: l_doc_currency_code GL_CURRENCIES.currency_code%TYPE;
3767: l_precision GL_CURRENCIES.precision%TYPE;
3768: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
3769: BEGIN
3770:
3771: IF PO_LOG.d_proc THEN
3772: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
3773: PO_LOG.proc_begin(d_mod,'p_document_id',p_document_id);
3774: END IF;
3775:
3768: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
3769: BEGIN
3770:
3771: IF PO_LOG.d_proc THEN
3772: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
3773: PO_LOG.proc_begin(d_mod,'p_document_id',p_document_id);
3774: END IF;
3775:
3776: -- The results will be in PO currency (foreign currency).
3769: BEGIN
3770:
3771: IF PO_LOG.d_proc THEN
3772: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
3773: PO_LOG.proc_begin(d_mod,'p_document_id',p_document_id);
3774: END IF;
3775:
3776: -- The results will be in PO currency (foreign currency).
3777: -- arusingh
3837: ;
3838:
3839: d_position := 40;
3840:
3841: IF PO_LOG.d_stmt THEN
3842: PO_LOG.stmt(d_mod,d_position,'Updated amts - rowcount:',SQL%ROWCOUNT);
3843: PO_LOG.proc_end(d_mod);
3844: END IF;
3845:
3838:
3839: d_position := 40;
3840:
3841: IF PO_LOG.d_stmt THEN
3842: PO_LOG.stmt(d_mod,d_position,'Updated amts - rowcount:',SQL%ROWCOUNT);
3843: PO_LOG.proc_end(d_mod);
3844: END IF;
3845:
3846: EXCEPTION
3839: d_position := 40;
3840:
3841: IF PO_LOG.d_stmt THEN
3842: PO_LOG.stmt(d_mod,d_position,'Updated amts - rowcount:',SQL%ROWCOUNT);
3843: PO_LOG.proc_end(d_mod);
3844: END IF;
3845:
3846: EXCEPTION
3847: WHEN OTHERS THEN
3844: END IF;
3845:
3846: EXCEPTION
3847: WHEN OTHERS THEN
3848: IF PO_LOG.d_exc THEN
3849: PO_LOG.exc(d_mod,d_position,NULL);
3850: END IF;
3851: RAISE;
3852: END prepare_temp_table_data;
3845:
3846: EXCEPTION
3847: WHEN OTHERS THEN
3848: IF PO_LOG.d_exc THEN
3849: PO_LOG.exc(d_mod,d_position,NULL);
3850: END IF;
3851: RAISE;
3852: END prepare_temp_table_data;
3853:
3941: x_retainage_released_amount OUT NOCOPY NUMBER
3942: )
3943: IS
3944: d_mod CONSTANT VARCHAR2(100) :=
3945: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'calculate_totals');
3946: d_position NUMBER := 0;
3947:
3948: l_quantity_total_actuals NUMBER :=0;
3949: l_quantity_total_financing NUMBER := 0;
3971: l_retainage_released_amount NUMBER := 0;
3972: l_is_complex_work_po BOOLEAN := FALSE;
3973: BEGIN
3974:
3975: IF PO_LOG.d_proc THEN
3976: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
3977: PO_LOG.proc_begin(d_mod,'p_document_id',p_document_id);
3978: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3979: END IF;
3972: l_is_complex_work_po BOOLEAN := FALSE;
3973: BEGIN
3974:
3975: IF PO_LOG.d_proc THEN
3976: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
3977: PO_LOG.proc_begin(d_mod,'p_document_id',p_document_id);
3978: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3979: END IF;
3980:
3973: BEGIN
3974:
3975: IF PO_LOG.d_proc THEN
3976: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
3977: PO_LOG.proc_begin(d_mod,'p_document_id',p_document_id);
3978: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3979: END IF;
3980:
3981: l_is_complex_work_po :=
3974:
3975: IF PO_LOG.d_proc THEN
3976: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
3977: PO_LOG.proc_begin(d_mod,'p_document_id',p_document_id);
3978: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
3979: END IF;
3980:
3981: l_is_complex_work_po :=
3982: PO_COMPLEX_WORK_PVT.is_complex_work_po(p_document_id);
4037: WHERE key = p_temp_table_key
4038: ;
4039:
4040: d_position := 20;
4041: IF PO_LOG.d_stmt THEN
4042: PO_LOG.stmt(d_mod,d_position,'Amount totals - rowcount:',SQL%ROWCOUNT);
4043: END IF;
4044:
4045: -- Next, do the calculations for the quantity rows, which is broken into
4038: ;
4039:
4040: d_position := 20;
4041: IF PO_LOG.d_stmt THEN
4042: PO_LOG.stmt(d_mod,d_position,'Amount totals - rowcount:',SQL%ROWCOUNT);
4043: END IF;
4044:
4045: -- Next, do the calculations for the quantity rows, which is broken into
4046: -- 2 cases: a summation case and a max-value case
4074: AND nvl(GTT.payment_type, 'NULL') <> C_payment_type_RATE
4075: ;
4076:
4077: d_position := 40;
4078: IF PO_LOG.d_stmt THEN
4079: PO_LOG.stmt(d_mod,d_position,'Sum Qty totals - rowcount:',SQL%ROWCOUNT);
4080: END IF;
4081:
4082: ELSE
4075: ;
4076:
4077: d_position := 40;
4078: IF PO_LOG.d_stmt THEN
4079: PO_LOG.stmt(d_mod,d_position,'Sum Qty totals - rowcount:',SQL%ROWCOUNT);
4080: END IF;
4081:
4082: ELSE
4083: -- Qty Milestone Pay Items case for Header, Line, Line Loc level totals
4149: ) GTTSUM
4150: ;
4151:
4152: d_position := 50;
4153: IF PO_LOG.d_stmt THEN
4154: PO_LOG.stmt(d_mod,d_position,'Max Qty totals - rowcount:',SQL%ROWCOUNT);
4155: END IF;
4156:
4157: END IF;
4150: ;
4151:
4152: d_position := 50;
4153: IF PO_LOG.d_stmt THEN
4154: PO_LOG.stmt(d_mod,d_position,'Max Qty totals - rowcount:',SQL%ROWCOUNT);
4155: END IF;
4156:
4157: END IF;
4158:
4199: x_retainage_withheld_amount := l_retainage_withheld_amount;
4200: x_retainage_released_amount := l_retainage_released_amount;
4201:
4202:
4203: IF PO_LOG.d_proc THEN
4204: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
4205: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4200: x_retainage_released_amount := l_retainage_released_amount;
4201:
4202:
4203: IF PO_LOG.d_proc THEN
4204: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
4205: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4201:
4202:
4203: IF PO_LOG.d_proc THEN
4204: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
4205: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4202:
4203: IF PO_LOG.d_proc THEN
4204: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
4205: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4203: IF PO_LOG.d_proc THEN
4204: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
4205: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4204: PO_LOG.proc_end(d_mod,'x_quantity_total',x_quantity_total);
4205: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4205: PO_LOG.proc_end(d_mod,'x_amount_total', x_amount_total);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4206: PO_LOG.proc_end(d_mod,'x_quantity_delivered', x_quantity_delivered);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4207: PO_LOG.proc_end(d_mod,'x_amount_delivered', x_amount_delivered);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4208: PO_LOG.proc_end(d_mod,'x_quantity_received', x_quantity_received);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4209: PO_LOG.proc_end(d_mod,'x_amount_received', x_amount_received);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4217: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
4210: PO_LOG.proc_end(d_mod,'x_quantity_shipped', x_quantity_shipped);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4217: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
4218: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
4211: PO_LOG.proc_end(d_mod,'x_amount_shipped', x_amount_shipped);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4217: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
4218: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
4219: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
4212: PO_LOG.proc_end(d_mod,'x_quantity_billed', x_quantity_billed);
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4217: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
4218: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
4219: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
4220: END IF;
4213: PO_LOG.proc_end(d_mod,'x_amount_billed', x_amount_billed);
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4217: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
4218: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
4219: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
4220: END IF;
4221:
4214: PO_LOG.proc_end(d_mod,'x_quantity_financed', x_quantity_financed);
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4217: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
4218: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
4219: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
4220: END IF;
4221:
4222: EXCEPTION
4215: PO_LOG.proc_end(d_mod,'x_amount_financed', x_amount_financed);
4216: PO_LOG.proc_end(d_mod,'x_quantity_recouped', x_quantity_recouped);
4217: PO_LOG.proc_end(d_mod,'x_amount_recouped', x_amount_recouped);
4218: PO_LOG.proc_end(d_mod,'x_retainage_withheld_amount', x_retainage_withheld_amount);
4219: PO_LOG.proc_end(d_mod,'x_retainage_released_amount', x_retainage_released_amount);
4220: END IF;
4221:
4222: EXCEPTION
4223: WHEN OTHERS THEN
4220: END IF;
4221:
4222: EXCEPTION
4223: WHEN OTHERS THEN
4224: IF PO_LOG.d_exc THEN
4225: PO_LOG.exc(d_mod,d_position,NULL);
4226: END IF;
4227: RAISE;
4228: END calculate_totals;
4221:
4222: EXCEPTION
4223: WHEN OTHERS THEN
4224: IF PO_LOG.d_exc THEN
4225: PO_LOG.exc(d_mod,d_position,NULL);
4226: END IF;
4227: RAISE;
4228: END calculate_totals;
4229:
4252: p_temp_table_key IN NUMBER
4253: )
4254: IS
4255: d_mod CONSTANT VARCHAR2(100) :=
4256: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'clear_temp_table');
4257: d_position NUMBER := 0;
4258:
4259: BEGIN
4260:
4257: d_position NUMBER := 0;
4258:
4259: BEGIN
4260:
4261: IF PO_LOG.d_proc THEN
4262: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
4263: END IF;
4264:
4265: d_position := 10;
4258:
4259: BEGIN
4260:
4261: IF PO_LOG.d_proc THEN
4262: PO_LOG.proc_begin(d_mod,'p_temp_table_key',p_temp_table_key);
4263: END IF;
4264:
4265: d_position := 10;
4266:
4270: WHERE key = p_temp_table_key
4271: ;
4272:
4273: d_position := 20;
4274: IF PO_LOG.d_stmt THEN
4275: PO_LOG.stmt(d_mod,d_position,'Deleted data - rowcount:',SQL%ROWCOUNT);
4276: END IF;
4277:
4278: IF PO_LOG.d_proc THEN
4271: ;
4272:
4273: d_position := 20;
4274: IF PO_LOG.d_stmt THEN
4275: PO_LOG.stmt(d_mod,d_position,'Deleted data - rowcount:',SQL%ROWCOUNT);
4276: END IF;
4277:
4278: IF PO_LOG.d_proc THEN
4279: PO_LOG.proc_end(d_mod);
4274: IF PO_LOG.d_stmt THEN
4275: PO_LOG.stmt(d_mod,d_position,'Deleted data - rowcount:',SQL%ROWCOUNT);
4276: END IF;
4277:
4278: IF PO_LOG.d_proc THEN
4279: PO_LOG.proc_end(d_mod);
4280: END IF;
4281:
4282: EXCEPTION
4275: PO_LOG.stmt(d_mod,d_position,'Deleted data - rowcount:',SQL%ROWCOUNT);
4276: END IF;
4277:
4278: IF PO_LOG.d_proc THEN
4279: PO_LOG.proc_end(d_mod);
4280: END IF;
4281:
4282: EXCEPTION
4283: WHEN OTHERS THEN
4280: END IF;
4281:
4282: EXCEPTION
4283: WHEN OTHERS THEN
4284: IF PO_LOG.d_exc THEN
4285: PO_LOG.exc(d_mod,d_position,NULL);
4286: END IF;
4287: RAISE;
4288: END clear_temp_table;
4281:
4282: EXCEPTION
4283: WHEN OTHERS THEN
4284: IF PO_LOG.d_exc THEN
4285: PO_LOG.exc(d_mod,d_position,NULL);
4286: END IF;
4287: RAISE;
4288: END clear_temp_table;
4289:
4333: , p_draft_id IN NUMBER DEFAULT -1 --
4334: ) RETURN NUMBER
4335: IS
4336: d_mod CONSTANT VARCHAR2(100) :=
4337: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getAmountOrderedExclOptions');
4338: d_position NUMBER := 0;
4339: l_return_val NUMBER := 0;
4340: l_precision GL_CURRENCIES.precision%TYPE;
4341: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
4340: l_precision GL_CURRENCIES.precision%TYPE;
4341: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
4342: BEGIN
4343:
4344: IF PO_LOG.d_proc THEN
4345: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
4346: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
4347: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4348: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
4341: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
4342: BEGIN
4343:
4344: IF PO_LOG.d_proc THEN
4345: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
4346: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
4347: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4348: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
4349: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4342: BEGIN
4343:
4344: IF PO_LOG.d_proc THEN
4345: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
4346: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
4347: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4348: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
4349: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4350: END IF;
4343:
4344: IF PO_LOG.d_proc THEN
4345: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
4346: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
4347: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4348: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
4349: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4350: END IF;
4351:
4344: IF PO_LOG.d_proc THEN
4345: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
4346: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
4347: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4348: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
4349: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4350: END IF;
4351:
4352: do_org_currency_setups(
4345: PO_LOG.proc_begin(d_mod,'p_doc_level',p_doc_level);
4346: PO_LOG.proc_begin(d_mod,'p_doc_level_id',p_doc_level_id);
4347: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4348: PO_LOG.proc_begin(d_mod,'p_doc_revision_num',p_doc_revision_num);
4349: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4350: END IF;
4351:
4352: do_org_currency_setups(
4353: p_doc_level => p_doc_level
4356: , x_min_acct_unit => l_mau
4357: );
4358:
4359: d_position := 10;
4360: IF PO_LOG.d_stmt THEN
4361: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
4362: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
4363: END IF;
4364:
4357: );
4358:
4359: d_position := 10;
4360: IF PO_LOG.d_stmt THEN
4361: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
4362: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
4363: END IF;
4364:
4365: IF p_doc_level = g_doc_level_HEADER THEN
4358:
4359: d_position := 10;
4360: IF PO_LOG.d_stmt THEN
4361: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
4362: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
4363: END IF;
4364:
4365: IF p_doc_level = g_doc_level_HEADER THEN
4366:
4409:
4410: ELSE
4411:
4412: d_position := 40;
4413: IF PO_LOG.d_stmt THEN
4414: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
4415: END IF;
4416:
4417: END IF; --p_data_source check
4410: ELSE
4411:
4412: d_position := 40;
4413: IF PO_LOG.d_stmt THEN
4414: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
4415: END IF;
4416:
4417: END IF; --p_data_source check
4418:
4461:
4462: ELSE
4463:
4464: d_position := 70;
4465: IF PO_LOG.d_stmt THEN
4466: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
4467: END IF;
4468:
4469: END IF; --p_data_source check
4462: ELSE
4463:
4464: d_position := 70;
4465: IF PO_LOG.d_stmt THEN
4466: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
4467: END IF;
4468:
4469: END IF; --p_data_source check
4470:
4470:
4471: ELSE
4472:
4473: d_position := 140;
4474: IF PO_LOG.d_stmt THEN
4475: PO_LOG.stmt(d_mod,d_position,'Invalid doc level: ', p_doc_level);
4476: END IF;
4477:
4478: END IF; --p_doc_level check
4471: ELSE
4472:
4473: d_position := 140;
4474: IF PO_LOG.d_stmt THEN
4475: PO_LOG.stmt(d_mod,d_position,'Invalid doc level: ', p_doc_level);
4476: END IF;
4477:
4478: END IF; --p_doc_level check
4479:
4476: END IF;
4477:
4478: END IF; --p_doc_level check
4479:
4480: IF PO_LOG.d_proc THEN
4481: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
4482: END IF;
4483:
4484: RETURN l_return_val;
4477:
4478: END IF; --p_doc_level check
4479:
4480: IF PO_LOG.d_proc THEN
4481: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
4482: END IF;
4483:
4484: RETURN l_return_val;
4485:
4484: RETURN l_return_val;
4485:
4486: EXCEPTION
4487: WHEN OTHERS THEN
4488: IF PO_LOG.d_exc THEN
4489: PO_LOG.exc(d_mod,d_position,NULL);
4490: END IF;
4491: RAISE;
4492: END getAmountOrderedExclOptions;
4485:
4486: EXCEPTION
4487: WHEN OTHERS THEN
4488: IF PO_LOG.d_exc THEN
4489: PO_LOG.exc(d_mod,d_position,NULL);
4490: END IF;
4491: RAISE;
4492: END getAmountOrderedExclOptions;
4493:
4519: , p_draft_id IN NUMBER DEFAULT -1 --
4520: ) RETURN NUMBER
4521: IS
4522: d_mod CONSTANT VARCHAR2(100) :=
4523: PO_LOG.get_subprogram_base(D_PACKAGE_BASE,'getValueForExhibit');
4524: d_position NUMBER := 0;
4525: l_return_val NUMBER := 0;
4526: l_precision GL_CURRENCIES.precision%TYPE;
4527: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
4526: l_precision GL_CURRENCIES.precision%TYPE;
4527: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
4528: BEGIN
4529:
4530: IF PO_LOG.d_proc THEN
4531: PO_LOG.proc_begin(d_mod,'p_doc_id',p_doc_id);
4532: PO_LOG.proc_begin(d_mod,'p_exhibit_name',p_exhibit_name);
4533: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4534: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4527: l_mau GL_CURRENCIES.minimum_accountable_unit%TYPE;
4528: BEGIN
4529:
4530: IF PO_LOG.d_proc THEN
4531: PO_LOG.proc_begin(d_mod,'p_doc_id',p_doc_id);
4532: PO_LOG.proc_begin(d_mod,'p_exhibit_name',p_exhibit_name);
4533: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4534: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4535: END IF;
4528: BEGIN
4529:
4530: IF PO_LOG.d_proc THEN
4531: PO_LOG.proc_begin(d_mod,'p_doc_id',p_doc_id);
4532: PO_LOG.proc_begin(d_mod,'p_exhibit_name',p_exhibit_name);
4533: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4534: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4535: END IF;
4536:
4529:
4530: IF PO_LOG.d_proc THEN
4531: PO_LOG.proc_begin(d_mod,'p_doc_id',p_doc_id);
4532: PO_LOG.proc_begin(d_mod,'p_exhibit_name',p_exhibit_name);
4533: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4534: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4535: END IF;
4536:
4537: do_org_currency_setups(
4530: IF PO_LOG.d_proc THEN
4531: PO_LOG.proc_begin(d_mod,'p_doc_id',p_doc_id);
4532: PO_LOG.proc_begin(d_mod,'p_exhibit_name',p_exhibit_name);
4533: PO_LOG.proc_begin(d_mod,'p_draft_id',p_draft_id);
4534: PO_LOG.proc_begin(d_mod,'p_data_source',p_data_source);
4535: END IF;
4536:
4537: do_org_currency_setups(
4538: p_doc_level => g_doc_level_HEADER
4541: , x_min_acct_unit => l_mau
4542: );
4543:
4544: d_position := 10;
4545: IF PO_LOG.d_stmt THEN
4546: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
4547: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
4548: END IF;
4549:
4542: );
4543:
4544: d_position := 10;
4545: IF PO_LOG.d_stmt THEN
4546: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
4547: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
4548: END IF;
4549:
4550: d_position := 50;
4543:
4544: d_position := 10;
4545: IF PO_LOG.d_stmt THEN
4546: PO_LOG.stmt(d_mod,d_position,'l_precision:',l_precision);
4547: PO_LOG.stmt(d_mod,d_position,'l_mau:',l_mau);
4548: END IF;
4549:
4550: d_position := 50;
4551:
4586:
4587: ELSE
4588:
4589: d_position := 40;
4590: IF PO_LOG.d_stmt THEN
4591: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
4592: END IF;
4593:
4594: END IF; --p_data_source check
4587: ELSE
4588:
4589: d_position := 40;
4590: IF PO_LOG.d_stmt THEN
4591: PO_LOG.stmt(d_mod,d_position,'Invalid data source: ', p_data_source);
4592: END IF;
4593:
4594: END IF; --p_data_source check
4595:
4592: END IF;
4593:
4594: END IF; --p_data_source check
4595:
4596: IF PO_LOG.d_proc THEN
4597: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
4598: END IF;
4599:
4600:
4593:
4594: END IF; --p_data_source check
4595:
4596: IF PO_LOG.d_proc THEN
4597: PO_LOG.proc_end(d_mod, 'l_return_val', l_return_val);
4598: END IF;
4599:
4600:
4601:
4602: RETURN l_return_val;
4603:
4604: EXCEPTION
4605: WHEN OTHERS THEN
4606: IF PO_LOG.d_exc THEN
4607: PO_LOG.exc(d_mod,d_position,NULL);
4608: END IF;
4609: RAISE;
4610: END getValueForExhibit;
4603:
4604: EXCEPTION
4605: WHEN OTHERS THEN
4606: IF PO_LOG.d_exc THEN
4607: PO_LOG.exc(d_mod,d_position,NULL);
4608: END IF;
4609: RAISE;
4610: END getValueForExhibit;
4611: