DBA Data[Home] [Help]

APPS.AP_WEB_HOLDS_WF dependencies on AP_WEB_RECEIPTS_WF

Line 1158: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS, null);

1154: ------------------------------------------------------------
1155: l_debug_info := 'Release Hold for: '||p_report_header_id;
1156: fnd_file.put_line(fnd_file.log, l_debug_info);
1157: ------------------------------------------------------------
1158: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS, null);
1159:
1160: EXCEPTION
1161: WHEN OTHERS THEN
1162: BEGIN

Line 1193: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, p_holding_report_header_id);

1189: ------------------------------------------------------------
1190: l_debug_info := 'Place Hold on: '||p_report_header_id||' because of: '||p_holding_report_header_id;
1191: fnd_file.put_line(fnd_file.log, l_debug_info);
1192: ------------------------------------------------------------
1193: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, p_holding_report_header_id);
1194:
1195: EXCEPTION
1196: WHEN OTHERS THEN
1197: BEGIN

Line 1227: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_INVOICED, null);

1223: ------------------------------------------------------------
1224: l_debug_info := 'Ready for Payment for: '||p_report_header_id;
1225: fnd_file.put_line(fnd_file.log, l_debug_info);
1226: ------------------------------------------------------------
1227: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_INVOICED, null);
1228:
1229: EXCEPTION
1230: WHEN OTHERS THEN
1231: BEGIN

Line 1309: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE

1305: aerh.holding_report_header_id
1306: from AP_EXPENSE_REPORT_HEADERS aerh,
1307: AP_AUD_RULE_SETS rs,
1308: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1309: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1310: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1311: and aerh.bothpay_parent_id is null
1312: and rsa.org_id = aerh.org_id
1313: and rsa.rule_set_id = rs.rule_set_id

Line 1310: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)

1306: from AP_EXPENSE_REPORT_HEADERS aerh,
1307: AP_AUD_RULE_SETS rs,
1308: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1309: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1310: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1311: and aerh.bothpay_parent_id is null
1312: and rsa.org_id = aerh.org_id
1313: and rsa.rule_set_id = rs.rule_set_id
1314: and rs.rule_set_type = C_HOLD_RULE

Line 1337: if (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then

1333: l_expense_status_code,
1334: l_holding_report_header_id;
1335: exit when c_hold_each%NOTFOUND;
1336:
1337: if (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then
1338:
1339: ------------------------------------------------------------
1340: l_debug_info := 'Receipts not required or have been received/waived';
1341: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1349: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS or

1345: fnd_file.put_line(fnd_file.log, l_debug_info);
1346: ------------------------------------------------------------
1347: ReadyForPayment(l_report_header_id);
1348:
1349: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS or
1350: (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and l_holding_report_header_id <> l_report_header_id)) then
1351:
1352: ------------------------------------------------------------
1353: l_debug_info := 'Set status Payment Held and set holding_report_header_id to current report_header_id for: '||l_report_header_id;

Line 1350: (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and l_holding_report_header_id <> l_report_header_id)) then

1346: ------------------------------------------------------------
1347: ReadyForPayment(l_report_header_id);
1348:
1349: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS or
1350: (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and l_holding_report_header_id <> l_report_header_id)) then
1351:
1352: ------------------------------------------------------------
1353: l_debug_info := 'Set status Payment Held and set holding_report_header_id to current report_header_id for: '||l_report_header_id;
1354: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1358: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and

1354: fnd_file.put_line(fnd_file.log, l_debug_info);
1355: ------------------------------------------------------------
1356: PlaceHold(l_report_header_id, l_report_header_id);
1357:
1358: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and
1359: nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) not in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then
1360:
1361: ------------------------------------------------------------
1362: l_debug_info := 'Payment Held status untouched for: '||l_report_header_id;

Line 1359: nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) not in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then

1355: ------------------------------------------------------------
1356: PlaceHold(l_report_header_id, l_report_header_id);
1357:
1358: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and
1359: nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) not in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then
1360:
1361: ------------------------------------------------------------
1362: l_debug_info := 'Payment Held status untouched for: '||l_report_header_id;
1363: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1423: and aerh.receipts_status in (AP_WEB_RECEIPTS_WF.C_REQUIRED, AP_WEB_RECEIPTS_WF.C_MISSING, AP_WEB_RECEIPTS_WF.C_OVERDUE, AP_WEB_RECEIPTS_WF.C_IN_TRANSIT, AP_WEB_RECEIPTS_WF.C_RESOLUTN)

1419: select aerh.report_header_id
1420: from AP_EXPENSE_REPORT_HEADERS aerh
1421: where (aerh.source <> 'NonValidatedWebExpense' or aerh.workflow_approved_flag is null)
1422: and aerh.receipts_status is not null
1423: and aerh.receipts_status in (AP_WEB_RECEIPTS_WF.C_REQUIRED, AP_WEB_RECEIPTS_WF.C_MISSING, AP_WEB_RECEIPTS_WF.C_OVERDUE, AP_WEB_RECEIPTS_WF.C_IN_TRANSIT, AP_WEB_RECEIPTS_WF.C_RESOLUTN)
1424: and aerh.bothpay_parent_id is null
1425: and trunc(sysdate) - (trunc(aerh.report_submitted_date) + p_hold_rct_overdue_days) > 0
1426: and aerh.employee_id = p_employee_id
1427: order by aerh.report_submitted_date asc;

Line 1529: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE

1525: rs.hold_rct_overdue_days
1526: from AP_EXPENSE_REPORT_HEADERS aerh,
1527: AP_AUD_RULE_SETS rs,
1528: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1529: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1530: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1531: and aerh.bothpay_parent_id is null
1532: and rsa.org_id = aerh.org_id
1533: and rsa.rule_set_id = rs.rule_set_id

Line 1530: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)

1526: from AP_EXPENSE_REPORT_HEADERS aerh,
1527: AP_AUD_RULE_SETS rs,
1528: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1529: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1530: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1531: and aerh.bothpay_parent_id is null
1532: and rsa.org_id = aerh.org_id
1533: and rsa.rule_set_id = rs.rule_set_id
1534: and rs.rule_set_type = C_HOLD_RULE

Line 1613: if (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then

1609:
1610: ------------------------------------------------------------
1611: l_debug_info := 'If previously Held, then raise Released event';
1612: ------------------------------------------------------------
1613: if (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
1614:
1615: ------------------------------------------------------------
1616: l_debug_info := 'Raise hold released event for: '||l_report_header_id;
1617: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1781: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)

1777: from AP_EXPENSE_REPORT_HEADERS aerh,
1778: AP_EXPENSE_REPORT_HEADERS aerh2,
1779: AP_AUD_RULE_SETS rs,
1780: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1781: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
1782: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1783: and aerh.bothpay_parent_id is not null
1784: and aerh2.report_header_id = aerh.bothpay_parent_id
1785: and rsa.org_id = aerh2.org_id

Line 1782: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)

1778: AP_EXPENSE_REPORT_HEADERS aerh2,
1779: AP_AUD_RULE_SETS rs,
1780: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1781: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
1782: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1783: and aerh.bothpay_parent_id is not null
1784: and aerh2.report_header_id = aerh.bothpay_parent_id
1785: and rsa.org_id = aerh2.org_id
1786: and rsa.rule_set_id = rs.rule_set_id

Line 1813: if (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED) and

1809: l_holding_report_header_id,
1810: l_hold_rct_overdue_bp_cc_code;
1811: exit when c_hold_bothpay%NOTFOUND;
1812:
1813: if (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED) and
1814: l_hold_rct_overdue_bp_cc_code <> C_HOLD_BP_ALWAYS) then
1815: ------------------------------------------------------------
1816: l_debug_info := 'Receipts not required or have been received/waived and not Hold Always';
1817: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1845: nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) not in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then

1841: fnd_file.put_line(fnd_file.log, l_debug_info);
1842: ------------------------------------------------------------
1843:
1844: if (IsCCReceiptsRequired(l_bothpay_parent_id) = 'Y' and
1845: nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) not in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then
1846:
1847: if (l_expense_status_code <> AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
1848:
1849: ------------------------------------------------------------

Line 1847: if (l_expense_status_code <> AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then

1843:
1844: if (IsCCReceiptsRequired(l_bothpay_parent_id) = 'Y' and
1845: nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) not in (AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED, AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED, AP_WEB_RECEIPTS_WF.C_WAIVED)) then
1846:
1847: if (l_expense_status_code <> AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
1848:
1849: ------------------------------------------------------------
1850: l_debug_info := 'Set status Payment Held for: '||l_report_header_id||' and set holding_report_header_id to parent report_header_id: '||l_bothpay_parent_id;
1851: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1873: if (l_parent_status = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then

1869: l_debug_info := 'Hold BothPay Always';
1870: fnd_file.put_line(fnd_file.log, l_debug_info);
1871: ------------------------------------------------------------
1872:
1873: if (l_parent_status = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
1874:
1875: ------------------------------------------------------------
1876: l_debug_info := 'Set status Payment Held for: '||l_report_header_id||' and set holding_report_header_id to parent report_header_id: '||l_bothpay_parent_id;
1877: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1977: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)

1973: select aerh.report_header_id,
1974: aerh.source,
1975: aerh.expense_status_code
1976: from AP_EXPENSE_REPORT_HEADERS aerh
1977: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
1978: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1979: and
1980: not exists
1981: (select 1

Line 1978: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)

1974: aerh.source,
1975: aerh.expense_status_code
1976: from AP_EXPENSE_REPORT_HEADERS aerh
1977: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
1978: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1979: and
1980: not exists
1981: (select 1
1982: from AP_AUD_RULE_SETS rs,

Line 2006: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE

2002: CURSOR c_obsolete_bothpay_holds IS
2003: select aerh.report_header_id,
2004: aerh.expense_status_code
2005: from AP_EXPENSE_REPORT_HEADERS aerh
2006: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
2007: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
2008: and aerh.bothpay_parent_id is null
2009: and
2010: not exists

Line 2007: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)

2003: select aerh.report_header_id,
2004: aerh.expense_status_code
2005: from AP_EXPENSE_REPORT_HEADERS aerh
2006: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
2007: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
2008: and aerh.bothpay_parent_id is null
2009: and
2010: not exists
2011: (select 1

Line 2021: and aerh2.expense_status_code = AP_WEB_RECEIPTS_WF.C_INVOICED

2017: exists
2018: (select 1
2019: from ap_expense_report_headers aerh2
2020: where aerh2.bothpay_parent_id = aerh.report_header_id
2021: and aerh2.expense_status_code = AP_WEB_RECEIPTS_WF.C_INVOICED
2022: and rownum = 1);
2023:
2024:
2025: BEGIN

Line 2053: if (l_source <> AP_WEB_RECEIPTS_WF.C_BOTHPAY and

2049:
2050: ------------------------------------------------------------
2051: l_debug_info := 'If not Both Pay child and previously Held, then raise Released event';
2052: ------------------------------------------------------------
2053: if (l_source <> AP_WEB_RECEIPTS_WF.C_BOTHPAY and
2054: l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2055:
2056: ------------------------------------------------------------
2057: l_debug_info := 'Raise hold released event for: '||l_report_header_id;

Line 2054: l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then

2050: ------------------------------------------------------------
2051: l_debug_info := 'If not Both Pay child and previously Held, then raise Released event';
2052: ------------------------------------------------------------
2053: if (l_source <> AP_WEB_RECEIPTS_WF.C_BOTHPAY and
2054: l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2055:
2056: ------------------------------------------------------------
2057: l_debug_info := 'Raise hold released event for: '||l_report_header_id;
2058: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 2093: if (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then

2089:
2090: ------------------------------------------------------------
2091: l_debug_info := 'If previously Held, then raise Released event';
2092: ------------------------------------------------------------
2093: if (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2094:
2095: ------------------------------------------------------------
2096: l_debug_info := 'Raise hold released event for: '||l_report_header_id;
2097: fnd_file.put_line(fnd_file.log, l_debug_info);