DBA Data[Home] [Help]

APPS.AP_WEB_EXPENSE_WF dependencies on AP_EXPENSE_REPORT_HEADERS

Line 288: from ap_expense_report_headers_all

284:
285: -- Fix 2178792 : Added the below select
286: select nvl(AMT_DUE_CCARD_COMPANY,0)+nvl(AMT_DUE_EMPLOYEE,0)+nvl(MAXIMUM_AMOUNT_TO_APPLY,0)
287: into l_total
288: from ap_expense_report_headers_all
289: where report_header_id = p_report_header_id;
290:
291: l_total_dsp := to_char(l_total,
292: FND_CURRENCY.Get_Format_Mask(p_reimb_curr,22));

Line 352: FROM ap_expense_report_headers_all

348: -- FND_PROFILE.GET('ORG_ID' , l_n_org_id );
349:
350: SELECT org_id
351: INTO l_n_org_id
352: FROM ap_expense_report_headers_all
353: WHERE report_header_id = l_item_key;
354:
355:
356: -- ORG_ID was added later; therefore, it needs to be tested for upgrade purpose, and

Line 881: UPDATE ap_expense_report_headers erh

877:
878: -- Bug 3248874 : Also set expense_status_code as NULL.
879: -- Source as NonValidateWebExpense.
880:
881: UPDATE ap_expense_report_headers erh
882: SET workflow_approved_flag = 'S',
883: expense_status_code = null,
884: source = 'NonValidatedWebExpense'
885: WHERE report_header_id = p_report_header_id;

Line 1781: PROCEDURE HandleInvalidDistCCID(p_report_header_id IN AP_EXPENSE_REPORT_HEADERS.report_header_id%TYPE,

1777: END AddToHeaderErrors;
1778:
1779:
1780: ----------------------------------------------------------------------
1781: PROCEDURE HandleInvalidDistCCID(p_report_header_id IN AP_EXPENSE_REPORT_HEADERS.report_header_id%TYPE,
1782: p_report_distribution_id IN AP_WEB_DB_EXPDIST_PKG.expDist_REPORT_DISTRIBUTION_ID,
1783: p_payment_due IN VARCHAR2,
1784: p_exp_type_parameter_id IN AP_WEB_DB_EXPLINE_PKG.expLines_webParamID,
1785: p_personalParameterId IN AP_WEB_DB_EXPLINE_PKG.expLines_webParamID,

Line 1851: p_report_header_id IN AP_EXPENSE_REPORT_HEADERS.report_header_id%TYPE) IS

1847:
1848: ----------------------------------------------------------------------
1849: PROCEDURE DoAPValidation(p_item_type IN VARCHAR2,
1850: p_item_key IN VARCHAR2,
1851: p_report_header_id IN AP_EXPENSE_REPORT_HEADERS.report_header_id%TYPE) IS
1852: ----------------------------------------------------------------------
1853: l_sys_apply_advances_default AP_WEB_DB_AP_INT_PKG.apSetUp_applyAdvDefault;
1854: l_sys_allow_awt_flag AP_WEB_DB_AP_INT_PKG.apSetUp_allowAwtFlag;
1855: l_sys_default_xrate_type AP_WEB_DB_AP_INT_PKG.apSetUp_defaultExchRateType;

Line 2000: UPDATE ap_expense_report_headers erh

1996:
1997: ---------------------------------------------------
1998: l_debug_info := 'Clear out potentially rejected/returned status';
1999: ---------------------------------------------------
2000: UPDATE ap_expense_report_headers erh
2001: SET workflow_approved_flag = '',
2002: source = 'NonValidatedWebExpense'
2003: WHERE report_header_id = p_report_header_id;
2004:

Line 2602: l_debug_info := 'Update ap_expense_report_headers';

2598:
2599: END IF; /* GetVendorAWTSetupForExpRpt */
2600:
2601: ---------------------------------------------------
2602: l_debug_info := 'Update ap_expense_report_headers';
2603: ---------------------------------------------------
2604: IF (NOT AP_WEB_DB_EXPRPT_PKG.SetExpenseHeaderInfo(p_report_header_id,
2605: l_exp_check_address_flag,
2606: 'WebExpense',

Line 2851: update ap_expense_report_headers

2847:
2848: ----------------------------------------------------------
2849: l_debug_info := 'Update Receipts Status to Missing if Pending Resolution';
2850: ----------------------------------------------------------
2851: update ap_expense_report_headers
2852: set receipts_status = 'MISSING'
2853: where report_header_id = l_report_header_id
2854: and receipts_status = 'RESOLUTN';
2855:

Line 3238: FROM ap_expense_report_headers

3234: l_debug_info := 'Retrieve The AP Reviewed Flag';
3235: -------------------------------------------------
3236: SELECT nvl(workflow_approved_flag, 'N')
3237: INTO l_ap_review_status
3238: FROM ap_expense_report_headers
3239: WHERE report_header_id = l_report_header_id;
3240:
3241: ------------------------------------------------------------------
3242: l_debug_info := 'Check flag to determine if AP Review Complete and

Line 3361: UPDATE ap_expense_report_headers_all

3357: IF (C_WF_Version < AP_WEB_EXPENSE_WF.C_OIEH_Version) THEN
3358: -------------------------------------------------------------------
3359: l_debug_info := 'Set Expense Status Code';
3360: -------------------------------------------------------------------
3361: UPDATE ap_expense_report_headers_all
3362: SET expense_status_code = 'MGRAPPR'
3363: WHERE report_header_id = l_report_header_id;
3364: END IF;
3365:

Line 3448: l_reimb_currency ap_expense_report_headers_all.payment_currency_code%type;

3444: l_policy_shortpay_total NUMBER := 0;
3445: /* jrautiai ADJ Fix End */
3446:
3447: l_ExpRec AP_WEB_DB_EXPRPT_PKG.ExpInfoRec;
3448: l_reimb_currency ap_expense_report_headers_all.payment_currency_code%type;
3449: BEGIN
3450:
3451: AP_WEB_UTILITIES_PKG.logProcedure('AP_WEB_EXPENSE_WF', 'start AnyAPAdjustments');
3452:

Line 3913: UPDATE ap_expense_report_headers_all

3909: IF (C_WF_Version < AP_WEB_EXPENSE_WF.C_OIEH_Version) THEN
3910: -------------------------------------------------------------------
3911: l_debug_info := 'Set Expense Status Code';
3912: -------------------------------------------------------------------
3913: UPDATE ap_expense_report_headers_all
3914: SET expense_status_code = 'INVOICED'
3915: WHERE report_header_id = l_report_header_id;
3916: END IF;
3917:

Line 4260: ap_expense_report_headers, with same info as old

4256: AP_WEB_UTILITIES_PKG.logProcedure('AP_WEB_EXPENSE_WF', 'start CreateShortPayExpReport');
4257:
4258: -------------------------------------------------------------------
4259: l_debug_info := 'Create new expense report by creating new record in
4260: ap_expense_report_headers, with same info as old
4261: expense report except new id, number and total';
4262: --------------------------------------------------------------------
4263: l_ExpenseRec.report_header_id := p_new_expense_report_id;
4264: l_ExpenseRec.employee_id := NULL;

Line 5620: update ap_expense_report_headers

5616:
5617: ----------------------------------------------------------
5618: l_debug_info := 'Update Receipts Status to Required if Pending Resolution';
5619: ----------------------------------------------------------
5620: update ap_expense_report_headers
5621: set receipts_status = 'REQUIRED'
5622: where report_header_id = l_report_header_id
5623: and receipts_status = 'RESOLUTN';
5624:

Line 5854: ap_expense_report_headers, with same info as old

5850: IF (l_total - l_ccard_amt <> 0) THEN
5851: */
5852: -------------------------------------------------------------------
5853: l_debug_info := 'Create new expense report by creating new record in
5854: ap_expense_report_headers, with same info as old
5855: expense report except new id, doc number, total,
5856: bothpay parent id, paid on behalf employee id, description,
5857: and amt due ccard company';
5858: --------------------------------------------------------------------

Line 5889: from ap_expense_report_headers

5885: l_debug_info := 'Get Expense Report date';
5886: ----------------------------------------------------------
5887: select report_submitted_date
5888: into l_report_submitted_date
5889: from ap_expense_report_headers
5890: where report_header_id = l_report_header_id;
5891:
5892: ------------------------------------------------------------
5893: l_debug_info := 'Retrieve ORG_ID Item Attribute';

Line 7705: UPDATE ap_expense_report_headers_all

7701: /* Bug 3566496: Need to update expense_current_approver_id since that
7702: * is used to display the approver in the Track expenses page.
7703: */
7704:
7705: UPDATE ap_expense_report_headers_all
7706: SET expense_current_approver_id = p_manager_id
7707: WHERE report_header_id = l_report_header_id;
7708:
7709: END IF;

Line 10778: from ap_expense_report_headers

10774: l_debug_info := 'Get Expense Report data';
10775: ----------------------------------------------------------
10776: select report_submitted_date
10777: into l_report_submitted_date
10778: from ap_expense_report_headers
10779: where report_header_id = l_report_header_id;
10780:
10781: IF (l_expense_status_code = 'INVOICED') THEN
10782:

Line 10799: UPDATE ap_expense_report_headers_all

10795: -- replaced p_item_key with the l_report_header_id
10796: -------------------------------------------------------------------
10797: l_debug_info := 'Set Expense Status Code and Current Approver ID';
10798: -------------------------------------------------------------------
10799: UPDATE ap_expense_report_headers_all
10800: SET expense_status_code = l_expense_status_code,
10801: expense_current_approver_id = l_current_approver_id,
10802: expense_last_status_date=sysdate,
10803: source = nvl(l_source, source)

Line 11047: update ap_expense_report_headers

11043: l_debug_info := 'Reset Report Submitted Date to null And Expense Status Code to WITHDRAWN';
11044: ----------------------------------------------------------
11045: -- Bug 4070441
11046: begin
11047: update ap_expense_report_headers
11048: set report_submitted_date = null,
11049: expense_status_code = AP_WEB_OA_ACTIVE_PKG.C_WITHDRAWN
11050: where report_header_id = p_rep_header_id;
11051: exception

Line 12349: AP_EXPENSE_REPORT_HEADERS XH,

12345: l_web_parameter_id,
12346: l_policy_id,
12347: l_currency_preference
12348: FROM ap_expense_report_lines XL,
12349: AP_EXPENSE_REPORT_HEADERS XH,
12350: AP_EXPENSE_REPORT_PARAMS XP,
12351: AP_POL_HEADERS SH
12352: WHERE XH.report_header_id = p_report_header_id
12353: AND XH.report_header_id = XL.report_header_id

Line 13410: l_debug_info := 'update display_total item attribute if ap_expense_report_headers has been updated';

13406:
13407: AP_WEB_DB_EXPLINE_PKG.updateExpenseMileageLines(l_mileage_line_array, l_bHeaderUpdated);
13408:
13409: -----------------------------------------------------------------------
13410: l_debug_info := 'update display_total item attribute if ap_expense_report_headers has been updated';
13411: -----------------------------------------------------------------------
13412: IF (l_bHeaderUpdated = TRUE) THEN
13413: IF (NOT AP_WEB_DB_EXPRPT_PKG.UpdateHeaderTotal(l_report_header_id)) THEN
13414: NULL;

Line 13621: from ap_expense_report_headers

13617: -------------------------------------------------------------------------------
13618:
13619: CURSOR audit_cur(p_report_header_id IN NUMBER) IS
13620: select audit_code
13621: from ap_expense_report_headers
13622: where report_header_id = p_report_header_id;
13623:
13624: CURSOR rule_cur(p_report_header_id IN NUMBER) IS
13625: select rs.assign_auditor_stage_code

Line 13626: from ap_expense_report_headers aerh,

13622: where report_header_id = p_report_header_id;
13623:
13624: CURSOR rule_cur(p_report_header_id IN NUMBER) IS
13625: select rs.assign_auditor_stage_code
13626: from ap_expense_report_headers aerh,
13627: ap_aud_rule_sets rs,
13628: ap_aud_rule_assignments_all rsa
13629: where aerh.report_header_id = p_report_header_id
13630: and aerh.org_id = rsa.org_id

Line 14115: FROM AP_EXPENSE_REPORT_HEADERS

14111: l_debug_info := 'Retrieve Workflow_Approved_Flag';
14112: ------------------------------------------------------------
14113: SELECT WORKFLOW_APPROVED_FLAG
14114: INTO l_workflow_approved_flag
14115: FROM AP_EXPENSE_REPORT_HEADERS
14116: WHERE REPORT_HEADER_ID = l_report_header_id;
14117:
14118: IF (l_workflow_approved_flag = AP_WEB_DB_EXPRPT_PKG.C_WORKFLOW_APPROVED_REJECTED) THEN
14119: p_result := 'COMPLETE:REJECTED';

Line 14162: from ap_expense_report_headers

14158: l_workflow_flag VARCHAR2(5);
14159:
14160: CURSOR audit_cur(p_report_header_id IN NUMBER) IS
14161: select audit_code, workflow_approved_flag
14162: from ap_expense_report_headers
14163: where report_header_id = p_report_header_id;
14164:
14165: audit_rec audit_cur%ROWTYPE;
14166:

Line 14845: UPDATE AP_EXPENSE_REPORT_HEADERS

14841: END IF;
14842:
14843: IF l_num_both_personal_lines > 0 THEN
14844:
14845: UPDATE AP_EXPENSE_REPORT_HEADERS
14846: SET EXPENSE_STATUS_CODE = 'PAID'
14847: WHERE REPORT_HEADER_ID = p_report_header_id;
14848:
14849: END IF;

Line 14872: UPDATE AP_EXPENSE_REPORT_HEADERS

14868: ----------------------------------------------------------------------------
14869:
14870: BEGIN
14871:
14872: UPDATE AP_EXPENSE_REPORT_HEADERS
14873: SET DESCRIPTION= AP_WEB_UTILITIES_PKG.RtrimMultiByteSpaces(description)
14874: WHERE REPORT_HEADER_ID = p_report_header_id;
14875:
14876: UPDATE AP_EXPENSE_REPORT_LINES

Line 14942: UPDATE ap_expense_report_headers erh

14938:
14939: -- Bug 3248874 : Also set expense_status_code as NULL.
14940: -- Source as NonValidateWebExpense.
14941:
14942: UPDATE ap_expense_report_headers erh
14943: SET workflow_approved_flag = 'S',
14944: expense_status_code = null,
14945: source = 'NonValidatedWebExpense'
14946: WHERE report_header_id = p_report_header_id;

Line 14975: l_report_header_id ap_expense_report_headers.report_header_id%type;

14971: ----------------------------------------------------------------------
14972:
14973: l_debug_info VARCHAR2(200);
14974:
14975: l_report_header_id ap_expense_report_headers.report_header_id%type;
14976: l_preparer_id ap_expense_report_headers.employee_id%type;
14977: l_employee_id ap_expense_report_headers.employee_id%type;
14978: l_document_number ap_expense_report_headers.invoice_num%type;
14979: l_total ap_expense_report_lines.amount%type;

Line 14976: l_preparer_id ap_expense_report_headers.employee_id%type;

14972:
14973: l_debug_info VARCHAR2(200);
14974:
14975: l_report_header_id ap_expense_report_headers.report_header_id%type;
14976: l_preparer_id ap_expense_report_headers.employee_id%type;
14977: l_employee_id ap_expense_report_headers.employee_id%type;
14978: l_document_number ap_expense_report_headers.invoice_num%type;
14979: l_total ap_expense_report_lines.amount%type;
14980: l_new_total ap_expense_report_lines.amount%type;

Line 14977: l_employee_id ap_expense_report_headers.employee_id%type;

14973: l_debug_info VARCHAR2(200);
14974:
14975: l_report_header_id ap_expense_report_headers.report_header_id%type;
14976: l_preparer_id ap_expense_report_headers.employee_id%type;
14977: l_employee_id ap_expense_report_headers.employee_id%type;
14978: l_document_number ap_expense_report_headers.invoice_num%type;
14979: l_total ap_expense_report_lines.amount%type;
14980: l_new_total ap_expense_report_lines.amount%type;
14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;

Line 14978: l_document_number ap_expense_report_headers.invoice_num%type;

14974:
14975: l_report_header_id ap_expense_report_headers.report_header_id%type;
14976: l_preparer_id ap_expense_report_headers.employee_id%type;
14977: l_employee_id ap_expense_report_headers.employee_id%type;
14978: l_document_number ap_expense_report_headers.invoice_num%type;
14979: l_total ap_expense_report_lines.amount%type;
14980: l_new_total ap_expense_report_lines.amount%type;
14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;

Line 14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;

14977: l_employee_id ap_expense_report_headers.employee_id%type;
14978: l_document_number ap_expense_report_headers.invoice_num%type;
14979: l_total ap_expense_report_lines.amount%type;
14980: l_new_total ap_expense_report_lines.amount%type;
14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;
14983: l_purpose ap_expense_report_headers.description%type;
14984: l_approver_id ap_expense_report_headers.override_approver_id%type;
14985: l_week_end_date ap_expense_report_headers.week_end_date%type;

Line 14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;

14978: l_document_number ap_expense_report_headers.invoice_num%type;
14979: l_total ap_expense_report_lines.amount%type;
14980: l_new_total ap_expense_report_lines.amount%type;
14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;
14983: l_purpose ap_expense_report_headers.description%type;
14984: l_approver_id ap_expense_report_headers.override_approver_id%type;
14985: l_week_end_date ap_expense_report_headers.week_end_date%type;
14986: l_workflow_flag ap_expense_report_headers.workflow_approved_flag%type;

Line 14983: l_purpose ap_expense_report_headers.description%type;

14979: l_total ap_expense_report_lines.amount%type;
14980: l_new_total ap_expense_report_lines.amount%type;
14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;
14983: l_purpose ap_expense_report_headers.description%type;
14984: l_approver_id ap_expense_report_headers.override_approver_id%type;
14985: l_week_end_date ap_expense_report_headers.week_end_date%type;
14986: l_workflow_flag ap_expense_report_headers.workflow_approved_flag%type;
14987: l_submit_from_oie varchar2(1);

Line 14984: l_approver_id ap_expense_report_headers.override_approver_id%type;

14980: l_new_total ap_expense_report_lines.amount%type;
14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;
14983: l_purpose ap_expense_report_headers.description%type;
14984: l_approver_id ap_expense_report_headers.override_approver_id%type;
14985: l_week_end_date ap_expense_report_headers.week_end_date%type;
14986: l_workflow_flag ap_expense_report_headers.workflow_approved_flag%type;
14987: l_submit_from_oie varchar2(1);
14988:

Line 14985: l_week_end_date ap_expense_report_headers.week_end_date%type;

14981: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;
14983: l_purpose ap_expense_report_headers.description%type;
14984: l_approver_id ap_expense_report_headers.override_approver_id%type;
14985: l_week_end_date ap_expense_report_headers.week_end_date%type;
14986: l_workflow_flag ap_expense_report_headers.workflow_approved_flag%type;
14987: l_submit_from_oie varchar2(1);
14988:
14989: BEGIN

Line 14986: l_workflow_flag ap_expense_report_headers.workflow_approved_flag%type;

14982: l_cost_center ap_expense_report_headers.flex_concatenated%type;
14983: l_purpose ap_expense_report_headers.description%type;
14984: l_approver_id ap_expense_report_headers.override_approver_id%type;
14985: l_week_end_date ap_expense_report_headers.week_end_date%type;
14986: l_workflow_flag ap_expense_report_headers.workflow_approved_flag%type;
14987: l_submit_from_oie varchar2(1);
14988:
14989: BEGIN
14990:

Line 15015: from ap_expense_report_headers aerh,

15011: l_purpose,
15012: l_approver_id,
15013: l_week_end_date,
15014: l_workflow_flag
15015: from ap_expense_report_headers aerh,
15016: fnd_user fnd
15017: where aerh.report_header_id = l_report_header_id
15018: and fnd.user_id = aerh.created_by;
15019:

Line 16093: UPDATE ap_expense_report_headers_all

16089: approvalprocesscompleteynout => l_approvalProcessCompleteYNOut,
16090: approversout => l_approversOut);
16091:
16092: if (l_approversOut.count > 1) then
16093: UPDATE ap_expense_report_headers_all
16094: SET expense_current_approver_id = C_AME_MULTIPLE_CURR_APPROVER
16095: WHERE report_header_id = l_report_header_id;
16096: elsif (l_approversOut.count = 1) then
16097: UPDATE ap_expense_report_headers_all

Line 16097: UPDATE ap_expense_report_headers_all

16093: UPDATE ap_expense_report_headers_all
16094: SET expense_current_approver_id = C_AME_MULTIPLE_CURR_APPROVER
16095: WHERE report_header_id = l_report_header_id;
16096: elsif (l_approversOut.count = 1) then
16097: UPDATE ap_expense_report_headers_all
16098: SET expense_current_approver_id = l_approversOut(1).orig_system_id
16099: WHERE report_header_id = l_report_header_id;
16100: end if;
16101: