351:
352: x_progress := 'PO_DRAFT_MERGE_PKG.INSERT_ACT_HIST_MERGE: Start: 01';
353: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
354: -- CLM Aprvl
355: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
356: itemkey => itemkey,
357: aname => 'DRAFT_ID');
358:
359: If l_draft_id is Null Then
392:
393: x_progress := 'PO_DRAFT_MERGE_PKG.IS_PDF_COMM_ENABLED: Start: 01';
394: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
395: -- CLM Aprvl
396: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
397: itemkey => itemkey,
398: aname => 'DRAFT_ID');
399:
400: If l_draft_id is Null Then
426:
427: x_progress := 'PO_DRAFT_MERGE_PKG.DELETE_PDF_ATTACHMENTS: Start: 01';
428: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
429: -- CLM Aprvl
430: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
431: itemkey => itemkey,
432: aname => 'DRAFT_ID');
433:
434: If l_draft_id is Null Then
460:
461: x_progress := 'PO_DRAFT_MERGE_PKG.INSERT_ACT_HIST_REJECT: Start: 01';
462: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
463: -- CLM Aprvl
464: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
465: itemkey => itemkey,
466: aname => 'DRAFT_ID');
467:
468: If l_draft_id is Null Then
550:
551: x_progress := 'PO_DRAFT_MERGE_PKG.UPDATE_AWARD_WITH_MOD_VALUES: Start: 01';
552: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
553:
554: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
555: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
556: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
557: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
558: l_approval_path_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'APPROVAL_PATH_ID');
551: x_progress := 'PO_DRAFT_MERGE_PKG.UPDATE_AWARD_WITH_MOD_VALUES: Start: 01';
552: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
553:
554: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
555: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
556: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
557: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
558: l_approval_path_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'APPROVAL_PATH_ID');
559: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
552: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
553:
554: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
555: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
556: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
557: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
558: l_approval_path_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'APPROVAL_PATH_ID');
559: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
560: l_note := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'NOTE');
553:
554: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
555: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
556: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
557: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
558: l_approval_path_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'APPROVAL_PATH_ID');
559: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
560: l_note := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'NOTE');
561:
554: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
555: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
556: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
557: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
558: l_approval_path_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'APPROVAL_PATH_ID');
559: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
560: l_note := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'NOTE');
561:
562: Begin
555: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
556: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
557: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
558: l_approval_path_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'APPROVAL_PATH_ID');
559: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
560: l_note := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'NOTE');
561:
562: Begin
563: l_Encumbrance_on := po_core_s.Is_encumbrance_on(p_doc_type => l_document_type,p_org_id => NULL);
556: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
557: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
558: l_approval_path_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'APPROVAL_PATH_ID');
559: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
560: l_note := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'NOTE');
561:
562: Begin
563: l_Encumbrance_on := po_core_s.Is_encumbrance_on(p_doc_type => l_document_type,p_org_id => NULL);
564: EXCEPTION
582: AND ph.draft_id = l_draft_id ;
583:
584: IF(l_preparer_id = l_employee_id) THEN
585:
586: po_wf_util_pkg.SetItemAttrText(itemtype => itemtype,
587: itemkey => itemkey,
588: aname => 'NOTE',
589: avalue => '');
590:
593: END IF;
594:
595: ELSE
596:
597: l_preparer_id := po_wf_util_pkg.GetItemAttrNumber(
598: itemtype => itemtype,
599: itemkey => itemkey,
600: aname => 'PREPARER_ID');
601:
600: aname => 'PREPARER_ID');
601:
602: IF(l_preparer_id = l_employee_id) THEN
603:
604: po_wf_util_pkg.SetItemAttrText(itemtype => itemtype,
605: itemkey => itemkey,
606: aname => 'NOTE',
607: avalue => '');
608:
683: ROLLBACK to UPDATE_AWARD_MOD_VALUES_SP; -- Rolling back to savepoint in case of any errors
684: x_progress := 'PO_DRAFT_MERGE_PKG.UPDATE_AWARD_WITH_MOD_VALUES: Exception';
685: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
686: -- Bug14046925 : Setting workflow attributes with values
687: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
688: itemkey => itemkey,
689: aname => 'MERGE_RESERVE_ACTION',
690: avalue => g_action);
691:
688: itemkey => itemkey,
689: aname => 'MERGE_RESERVE_ACTION',
690: avalue => g_action);
691:
692: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
693: itemkey => itemkey,
694: aname => 'MERGE_RESERVE_RESULT',
695: avalue => g_action);
696:
693: itemkey => itemkey,
694: aname => 'MERGE_RESERVE_RESULT',
695: avalue => g_action);
696:
697: po_wf_util_pkg.SetItemAttrText ( itemtype => itemtype,
698: itemkey => itemkey,
699: aname => 'MERGE_RESERVE_ERROR_MESSAGE',
700: avalue => g_action);
701:
758:
759: x_progress := 'PO_DRAFT_MERGE_PKG.PROCESS_CONTROL_ACTIONS: Start: 01';
760: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
761:
762: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
763: IF l_draft_id IS NOT NULL ANd l_draft_id <> -1 THEN
764: select phd.type_lookup_code,
765: nvl(phd.control_action, 'NULL'),
766: phd.po_header_id,
951:
952: x_progress := 'PO_DRAFT_MERGE_PKG.IS_CLM_DOCUMENT: Start: 01';
953: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
954:
955: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
956: itemkey => itemkey,
957: aname => 'DOCUMENT_ID');
958:
959: BEGIN
1312:
1313: x_progress := 'PO_DRAFT_MERGE_PKG.call_docnum_post_approval: Start: 01';
1314: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,x_progress);
1315:
1316: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
1317: itemkey => itemkey,
1318: aname => 'DRAFT_ID');
1319:
1320: l_po_hdr_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
1316: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
1317: itemkey => itemkey,
1318: aname => 'DRAFT_ID');
1319:
1320: l_po_hdr_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,
1321: itemkey => itemkey,
1322: aname => 'DOCUMENT_ID');
1323:
1324: IF l_draft_id IS NOT NULL AND l_draft_id <> -1 THEN
1393: l_draft_id NUMBER;
1394: x_progress VARCHAR2(1000);
1395: BEGIN
1396:
1397: l_draft_id := po_wf_util_pkg.Getitemattrnumber (itemtype => itemtype,
1398: itemkey => itemkey,
1399: aname => 'DRAFT_ID');
1400:
1401: x_progress := 'PO_DRAFT_MERGE_PKG.IS_MOD_DOCUMENT: Draft_id: '
1913: l_progress VARCHAR2(1000);
1914: BEGIN
1915: l_progress := 'PO_DRAFT_MERGE_PKG.PAR_DOC_APPROVE: Start: 01';
1916:
1917: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
1918: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
1919: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
1920: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
1921: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
1914: BEGIN
1915: l_progress := 'PO_DRAFT_MERGE_PKG.PAR_DOC_APPROVE: Start: 01';
1916:
1917: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
1918: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
1919: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
1920: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
1921: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
1922:
1915: l_progress := 'PO_DRAFT_MERGE_PKG.PAR_DOC_APPROVE: Start: 01';
1916:
1917: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
1918: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
1919: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
1920: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
1921: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
1922:
1923: IF (g_po_wf_debug = 'Y') THEN
1916:
1917: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
1918: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
1919: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
1920: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
1921: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
1922:
1923: IF (g_po_wf_debug = 'Y') THEN
1924: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,l_progress);
1917: l_draft_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DRAFT_ID');
1918: l_document_id := po_wf_util_pkg.GetItemAttrNumber (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_ID');
1919: l_document_type := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_TYPE');
1920: l_document_subtype := po_wf_util_pkg.GetItemAttrText (itemtype => itemtype,itemkey => itemkey,aname => 'DOCUMENT_SUBTYPE');
1921: l_employee_id := po_wf_util_pkg.Getitemattrnumber(itemtype => itemtype,itemkey => itemkey,aname => 'APPROVER_EMPID');
1922:
1923: IF (g_po_wf_debug = 'Y') THEN
1924: PO_WF_DEBUG_PKG.insert_debug(itemtype, itemkey,l_progress);
1925: END IF;