DBA Data[Home] [Help]

APPS.AP_WEB_HOLDS_WF dependencies on AP_WEB_RECEIPTS_WF

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

1160: ------------------------------------------------------------
1161: l_debug_info := 'Release Hold for: '||p_report_header_id;
1162: fnd_file.put_line(fnd_file.log, l_debug_info);
1163: ------------------------------------------------------------
1164: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS, null);
1165:
1166: EXCEPTION
1167: WHEN OTHERS THEN
1168: BEGIN

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

1195: ------------------------------------------------------------
1196: l_debug_info := 'Place Hold on: '||p_report_header_id||' because of: '||p_holding_report_header_id;
1197: fnd_file.put_line(fnd_file.log, l_debug_info);
1198: ------------------------------------------------------------
1199: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, p_holding_report_header_id);
1200:
1201: EXCEPTION
1202: WHEN OTHERS THEN
1203: BEGIN

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

1229: ------------------------------------------------------------
1230: l_debug_info := 'Ready for Payment for: '||p_report_header_id;
1231: fnd_file.put_line(fnd_file.log, l_debug_info);
1232: ------------------------------------------------------------
1233: UpdateExpenseStatus(p_report_header_id, AP_WEB_RECEIPTS_WF.C_INVOICED, null);
1234:
1235: EXCEPTION
1236: WHEN OTHERS THEN
1237: BEGIN

Line 1322: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE

1318: aerh.org_id
1319: from AP_EXPENSE_REPORT_HEADERS aerh,
1320: AP_AUD_RULE_SETS rs,
1321: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1322: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1323: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1324: and aerh.bothpay_parent_id is null
1325: and rsa.org_id = aerh.org_id
1326: and rsa.rule_set_id = rs.rule_set_id

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

1319: from AP_EXPENSE_REPORT_HEADERS aerh,
1320: AP_AUD_RULE_SETS rs,
1321: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1322: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1323: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1324: and aerh.bothpay_parent_id is null
1325: and rsa.org_id = aerh.org_id
1326: and rsa.rule_set_id = rs.rule_set_id
1327: and rs.rule_set_type = C_HOLD_RULE

Line 1356: 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)) OR

1352:
1353: l_receipts_required := GetReceiptsRequired(l_report_submitted_date, l_org_id);
1354:
1355: if ((l_receipts_required in ('B', 'O', 'N') AND
1356: 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)) OR
1357: (l_receipts_required = 'I' AND (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED) OR
1358: nvl(l_image_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
1359:
1360: ------------------------------------------------------------

Line 1357: (l_receipts_required = 'I' AND (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED) OR

1353: l_receipts_required := GetReceiptsRequired(l_report_submitted_date, l_org_id);
1354:
1355: if ((l_receipts_required in ('B', 'O', 'N') AND
1356: 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)) OR
1357: (l_receipts_required = 'I' AND (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED) OR
1358: nvl(l_image_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
1359:
1360: ------------------------------------------------------------
1361: l_debug_info := 'Receipts not required or have been received/waived';

Line 1358: nvl(l_image_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

1354:
1355: if ((l_receipts_required in ('B', 'O', 'N') AND
1356: 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)) OR
1357: (l_receipts_required = 'I' AND (nvl(l_receipts_status, AP_WEB_RECEIPTS_WF.C_NOT_REQUIRED) in (AP_WEB_RECEIPTS_WF.C_RECEIVED, AP_WEB_RECEIPTS_WF.C_RECEIVED_RESUBMITTED) OR
1358: nvl(l_image_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
1359:
1360: ------------------------------------------------------------
1361: l_debug_info := 'Receipts not required or have been received/waived';
1362: fnd_file.put_line(fnd_file.log, l_debug_info);

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

1369:
1370: ------------------------------------------------------------
1371: l_debug_info := 'If previously Held, then raise Released event';
1372: ------------------------------------------------------------
1373: if (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
1374:
1375: ------------------------------------------------------------
1376: l_debug_info := 'Raise hold released event for: '||l_report_header_id;
1377: ------------------------------------------------------------

Line 1382: /*elsif (nvl(l_image_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

1378: RaiseReleasedEvent(l_report_header_id);
1379:
1380: end if;
1381:
1382: /*elsif (nvl(l_image_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
1383:
1384: ------------------------------------------------------------
1385: l_debug_info := 'Image Receipts not required or have been received/waived';
1386: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1394: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS or

1390: fnd_file.put_line(fnd_file.log, l_debug_info);
1391: ------------------------------------------------------------
1392: ReadyForPayment(l_report_header_id);*/
1393:
1394: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS or
1395: (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and l_holding_report_header_id <> l_report_header_id)) then
1396:
1397: ------------------------------------------------------------
1398: l_debug_info := 'Set status Payment Held and set holding_report_header_id to current report_header_id for: '||l_report_header_id;

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

1391: ------------------------------------------------------------
1392: ReadyForPayment(l_report_header_id);*/
1393:
1394: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS or
1395: (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and l_holding_report_header_id <> l_report_header_id)) then
1396:
1397: ------------------------------------------------------------
1398: l_debug_info := 'Set status Payment Held and set holding_report_header_id to current report_header_id for: '||l_report_header_id;
1399: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1409: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and

1405: fnd_file.put_line(fnd_file.log, l_debug_info);
1406: ------------------------------------------------------------
1407: RaiseHeldEvent(l_report_header_id);
1408:
1409: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and
1410: 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
1411:
1412: ------------------------------------------------------------
1413: l_debug_info := 'Payment Held status untouched for: '||l_report_header_id;

Line 1410: 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

1406: ------------------------------------------------------------
1407: RaiseHeldEvent(l_report_header_id);
1408:
1409: elsif (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD and
1410: 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
1411:
1412: ------------------------------------------------------------
1413: l_debug_info := 'Payment Held status untouched for: '||l_report_header_id;
1414: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 1474: 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)

1470: select aerh.report_header_id
1471: from AP_EXPENSE_REPORT_HEADERS aerh
1472: where (aerh.source <> 'NonValidatedWebExpense' or aerh.workflow_approved_flag is null)
1473: and aerh.receipts_status is not null
1474: 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)
1475: -- and aerh.expense_status_code not in (AP_WEB_RECEIPTS_WF.C_INVOICED, AP_WEB_RECEIPTS_WF.C_PARPAID, AP_WEB_RECEIPTS_WF.C_PAID)
1476: and aerh.bothpay_parent_id is null
1477: and trunc(sysdate) - (trunc(aerh.report_submitted_date) + p_hold_rct_overdue_days) > 0
1478: and aerh.employee_id = p_employee_id

Line 1475: -- and aerh.expense_status_code not in (AP_WEB_RECEIPTS_WF.C_INVOICED, AP_WEB_RECEIPTS_WF.C_PARPAID, AP_WEB_RECEIPTS_WF.C_PAID)

1471: from AP_EXPENSE_REPORT_HEADERS aerh
1472: where (aerh.source <> 'NonValidatedWebExpense' or aerh.workflow_approved_flag is null)
1473: and aerh.receipts_status is not null
1474: 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)
1475: -- and aerh.expense_status_code not in (AP_WEB_RECEIPTS_WF.C_INVOICED, AP_WEB_RECEIPTS_WF.C_PARPAID, AP_WEB_RECEIPTS_WF.C_PAID)
1476: and aerh.bothpay_parent_id is null
1477: and trunc(sysdate) - (trunc(aerh.report_submitted_date) + p_hold_rct_overdue_days) > 0
1478: and aerh.employee_id = p_employee_id
1479: order by aerh.report_submitted_date asc;

Line 1539: and aerh.image_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)

1535: select aerh.report_header_id
1536: from AP_EXPENSE_REPORT_HEADERS aerh
1537: where (aerh.source <> 'NonValidatedWebExpense' or aerh.workflow_approved_flag is null)
1538: and aerh.image_receipts_status is not null
1539: and aerh.image_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)
1540: -- and aerh.expense_status_code not in (AP_WEB_RECEIPTS_WF.C_INVOICED, AP_WEB_RECEIPTS_WF.C_PARPAID, AP_WEB_RECEIPTS_WF.C_PAID)
1541: and aerh.receipts_status is not null
1542: 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)
1543: and aerh.bothpay_parent_id is null

Line 1540: -- and aerh.expense_status_code not in (AP_WEB_RECEIPTS_WF.C_INVOICED, AP_WEB_RECEIPTS_WF.C_PARPAID, AP_WEB_RECEIPTS_WF.C_PAID)

1536: from AP_EXPENSE_REPORT_HEADERS aerh
1537: where (aerh.source <> 'NonValidatedWebExpense' or aerh.workflow_approved_flag is null)
1538: and aerh.image_receipts_status is not null
1539: and aerh.image_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)
1540: -- and aerh.expense_status_code not in (AP_WEB_RECEIPTS_WF.C_INVOICED, AP_WEB_RECEIPTS_WF.C_PARPAID, AP_WEB_RECEIPTS_WF.C_PAID)
1541: and aerh.receipts_status is not null
1542: 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)
1543: and aerh.bothpay_parent_id is null
1544: and trunc(sysdate) - (trunc(aerh.report_submitted_date) + p_hold_rct_overdue_days) > 0

Line 1542: 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)

1538: and aerh.image_receipts_status is not null
1539: and aerh.image_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)
1540: -- and aerh.expense_status_code not in (AP_WEB_RECEIPTS_WF.C_INVOICED, AP_WEB_RECEIPTS_WF.C_PARPAID, AP_WEB_RECEIPTS_WF.C_PAID)
1541: and aerh.receipts_status is not null
1542: 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)
1543: and aerh.bothpay_parent_id is null
1544: and trunc(sysdate) - (trunc(aerh.report_submitted_date) + p_hold_rct_overdue_days) > 0
1545: and aerh.employee_id = p_employee_id
1546: order by aerh.report_submitted_date asc;

Line 1650: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE

1646: rs.hold_rct_overdue_days
1647: from AP_EXPENSE_REPORT_HEADERS aerh,
1648: AP_AUD_RULE_SETS rs,
1649: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1650: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1651: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1652: and aerh.bothpay_parent_id is null
1653: and rsa.org_id = aerh.org_id
1654: and rsa.rule_set_id = rs.rule_set_id

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

1647: from AP_EXPENSE_REPORT_HEADERS aerh,
1648: AP_AUD_RULE_SETS rs,
1649: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1650: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
1651: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1652: and aerh.bothpay_parent_id is null
1653: and rsa.org_id = aerh.org_id
1654: and rsa.rule_set_id = rs.rule_set_id
1655: and rs.rule_set_type = C_HOLD_RULE

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

1764:
1765: ------------------------------------------------------------
1766: l_debug_info := 'If previously Held, then raise Released event';
1767: ------------------------------------------------------------
1768: if (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
1769:
1770: ------------------------------------------------------------
1771: l_debug_info := 'Raise hold released event for: '||l_report_header_id;
1772: fnd_file.put_line(fnd_file.log, l_debug_info);

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

1987: from AP_EXPENSE_REPORT_HEADERS aerh,
1988: AP_EXPENSE_REPORT_HEADERS aerh2,
1989: AP_AUD_RULE_SETS rs,
1990: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1991: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
1992: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1993: and aerh.bothpay_parent_id is not null
1994: and aerh2.report_header_id = aerh.bothpay_parent_id
1995: and rsa.org_id = aerh2.org_id

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

1988: AP_EXPENSE_REPORT_HEADERS aerh2,
1989: AP_AUD_RULE_SETS rs,
1990: AP_AUD_RULE_ASSIGNMENTS_ALL rsa
1991: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
1992: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
1993: and aerh.bothpay_parent_id is not null
1994: and aerh2.report_header_id = aerh.bothpay_parent_id
1995: and rsa.org_id = aerh2.org_id
1996: and rsa.rule_set_id = rs.rule_set_id

Line 2024: 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

2020: l_holding_report_header_id,
2021: l_hold_rct_overdue_bp_cc_code;
2022: exit when c_hold_bothpay%NOTFOUND;
2023:
2024: 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
2025: nvl(l_image_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
2026: l_hold_rct_overdue_bp_cc_code <> C_HOLD_BP_ALWAYS) then
2027: ------------------------------------------------------------
2028: l_debug_info := 'Receipts not required or have been received/waived and not Hold Always';

Line 2025: nvl(l_image_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

2021: l_hold_rct_overdue_bp_cc_code;
2022: exit when c_hold_bothpay%NOTFOUND;
2023:
2024: 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
2025: nvl(l_image_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
2026: l_hold_rct_overdue_bp_cc_code <> C_HOLD_BP_ALWAYS) then
2027: ------------------------------------------------------------
2028: l_debug_info := 'Receipts not required or have been received/waived and not Hold Always';
2029: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 2038: /*elsif (nvl(l_image_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

2034: fnd_file.put_line(fnd_file.log, l_debug_info);
2035: ------------------------------------------------------------
2036: ReadyForPayment(l_report_header_id);
2037:
2038: /*elsif (nvl(l_image_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
2039: l_hold_rct_overdue_bp_cc_code <> C_HOLD_BP_ALWAYS) then
2040: ------------------------------------------------------------
2041: l_debug_info := 'Receipts not required or have been received/waived and not Hold Always';
2042: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 2070: 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

2066: fnd_file.put_line(fnd_file.log, l_debug_info);
2067: ------------------------------------------------------------
2068:
2069: if (IsCCReceiptsRequired(l_bothpay_parent_id) = 'Y' and
2070: 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
2071:
2072: if (l_expense_status_code <> AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2073:
2074: ------------------------------------------------------------

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

2068:
2069: if (IsCCReceiptsRequired(l_bothpay_parent_id) = 'Y' and
2070: 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
2071:
2072: if (l_expense_status_code <> AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2073:
2074: ------------------------------------------------------------
2075: 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;
2076: fnd_file.put_line(fnd_file.log, l_debug_info);

Line 2083: nvl(l_image_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

2079:
2080: end if;
2081:
2082: elsif (IsCCImgReceiptsRequired(l_bothpay_parent_id) = 'Y' and
2083: nvl(l_image_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
2084:
2085: if (l_expense_status_code <> AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2086:
2087: ------------------------------------------------------------

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

2081:
2082: elsif (IsCCImgReceiptsRequired(l_bothpay_parent_id) = 'Y' and
2083: nvl(l_image_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
2084:
2085: if (l_expense_status_code <> AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2086:
2087: ------------------------------------------------------------
2088: 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;
2089: fnd_file.put_line(fnd_file.log, l_debug_info);

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

2107: l_debug_info := 'Hold BothPay Always';
2108: fnd_file.put_line(fnd_file.log, l_debug_info);
2109: ------------------------------------------------------------
2110:
2111: if (l_parent_status = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2112:
2113: ------------------------------------------------------------
2114: 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;
2115: fnd_file.put_line(fnd_file.log, l_debug_info);

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

2211: select aerh.report_header_id,
2212: aerh.source,
2213: aerh.expense_status_code
2214: from AP_EXPENSE_REPORT_HEADERS aerh
2215: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
2216: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
2217: and
2218: not exists
2219: (select 1

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

2212: aerh.source,
2213: aerh.expense_status_code
2214: from AP_EXPENSE_REPORT_HEADERS aerh
2215: where aerh.source in (AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE, AP_WEB_RECEIPTS_WF.C_BOTHPAY)
2216: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
2217: and
2218: not exists
2219: (select 1
2220: from AP_AUD_RULE_SETS rs,

Line 2244: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE

2240: CURSOR c_obsolete_bothpay_holds IS
2241: select aerh.report_header_id,
2242: aerh.expense_status_code
2243: from AP_EXPENSE_REPORT_HEADERS aerh
2244: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
2245: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
2246: and aerh.bothpay_parent_id is null
2247: and
2248: not exists

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

2241: select aerh.report_header_id,
2242: aerh.expense_status_code
2243: from AP_EXPENSE_REPORT_HEADERS aerh
2244: where aerh.source = AP_WEB_RECEIPTS_WF.C_SELF_SERVICE_SOURCE
2245: and aerh.expense_status_code in (AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD, AP_WEB_RECEIPTS_WF.C_PENDING_HOLDS)
2246: and aerh.bothpay_parent_id is null
2247: and
2248: not exists
2249: (select 1

Line 2259: and aerh2.expense_status_code = AP_WEB_RECEIPTS_WF.C_INVOICED

2255: exists
2256: (select 1
2257: from ap_expense_report_headers aerh2
2258: where aerh2.bothpay_parent_id = aerh.report_header_id
2259: and aerh2.expense_status_code = AP_WEB_RECEIPTS_WF.C_INVOICED
2260: and rownum = 1);
2261:
2262:
2263: BEGIN

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

2287:
2288: ------------------------------------------------------------
2289: l_debug_info := 'If not Both Pay child and previously Held, then raise Released event';
2290: ------------------------------------------------------------
2291: if (l_source <> AP_WEB_RECEIPTS_WF.C_BOTHPAY and
2292: l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2293:
2294: ------------------------------------------------------------
2295: l_debug_info := 'Raise hold released event for: '||l_report_header_id;

Line 2292: l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then

2288: ------------------------------------------------------------
2289: l_debug_info := 'If not Both Pay child and previously Held, then raise Released event';
2290: ------------------------------------------------------------
2291: if (l_source <> AP_WEB_RECEIPTS_WF.C_BOTHPAY and
2292: l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2293:
2294: ------------------------------------------------------------
2295: l_debug_info := 'Raise hold released event for: '||l_report_header_id;
2296: fnd_file.put_line(fnd_file.log, l_debug_info);

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

2327:
2328: ------------------------------------------------------------
2329: l_debug_info := 'If previously Held, then raise Released event';
2330: ------------------------------------------------------------
2331: if (l_expense_status_code = AP_WEB_RECEIPTS_WF.C_PAYMENT_HELD) then
2332:
2333: ------------------------------------------------------------
2334: l_debug_info := 'Raise hold released event for: '||l_report_header_id;
2335: fnd_file.put_line(fnd_file.log, l_debug_info);