[Home] [Help]
176: l_shortpaid_report boolean := false;
177: audit_code VARCHAR2(30);
178: l_audit_code VARCHAR2(30);
179: l_old_audit_code ap_expense_report_headers_all.audit_code%type := null;
180: l_old_audit_reason_code ap_aud_audit_reasons.audit_reason_code%type := null;
181: BEGIN
182:
183: IF p_report_header_id is null THEN
184: return null;
293: from
294: (
295: select audit_code, audit_reason_code
296: from ap_expense_report_headers_all aerh,
297: ap_aud_audit_reasons aud
298: where aerh.report_header_id = p_report_header_id
299: and aerh.report_header_id = aud.report_header_id
300: and aud.audit_reason_code = 'RANDOM'
301: )
1468: --PRAGMA AUTONOMOUS_TRANSACTION;
1469:
1470: BEGIN
1471: IF (p_report_header_id IS NOT NULL AND p_audit_reason_code IS NOT NULL) THEN
1472: INSERT INTO AP_AUD_AUDIT_REASONS(
1473: AUDIT_REASON_ID,
1474: REPORT_HEADER_ID,
1475: AUDIT_REASON_CODE,
1476: CREATION_DATE,
1478: LAST_UPDATE_LOGIN,
1479: LAST_UPDATE_DATE,
1480: LAST_UPDATED_BY)
1481: VALUES (
1482: AP_AUD_AUDIT_REASONS_S.nextval,
1483: p_report_header_id,
1484: p_audit_reason_code,
1485: SYSDATE,
1486: nvl(fnd_global.user_id, -1),
1496: | PRIVATE PROCEDURE update_audit_reason
1497: |
1498: | DESCRIPTION
1499: | This procedure updates the given audit reason code entry
1500: | in AP_AUD_AUDIT_REASONS table for an expense report .
1501: |
1502: | Changes to this procedure may require changes to insert_audit_reason
1503: |
1504: | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
1522:
1523: BEGIN
1524:
1525: IF (p_report_header_id IS NOT NULL AND p_audit_reason_code IS NOT NULL) THEN
1526: UPDATE AP_AUD_AUDIT_REASONS
1527: SET LAST_UPDATE_LOGIN = fnd_global.conc_login_id,
1528: LAST_UPDATE_DATE = SYSDATE,
1529: LAST_UPDATED_BY = nvl(fnd_global.user_id, -1)
1530: WHERE report_header_id = p_report_header_id