DBA Data[Home] [Help]

APPS.AP_WEB_UTILITIES_PKG dependencies on AP_EXPENSE_REPORT_HEADERS_ALL

Line 2998: FROM AP_EXPENSE_REPORT_HEADERS_ALL

2994:
2995: SELECT OVERRIDE_APPROVER_ID into p_ApproverId
2996: FROM
2997: ( SELECT OVERRIDE_APPROVER_ID
2998: FROM AP_EXPENSE_REPORT_HEADERS_ALL
2999: WHERE EMPLOYEE_ID = p_EmpId AND BOTHPAY_PARENT_ID IS NULL
3000: ORDER BY report_header_id DESC
3001: ) WHERE ROWNUM=1;
3002:

Line 3180: l_parent_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;

3176: t_invoiced_status CONSTANT VARCHAR2(10) := 'INVOICED';
3177:
3178: l_expenses_to_update ExpensesToUpdate;
3179:
3180: l_parent_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3181: l_parent_invoice_status varchar2(100);
3182: l_main_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3183: l_main_invoice_status varchar2(100);
3184: l_child_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;

Line 3182: l_main_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;

3178: l_expenses_to_update ExpensesToUpdate;
3179:
3180: l_parent_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3181: l_parent_invoice_status varchar2(100);
3182: l_main_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3183: l_main_invoice_status varchar2(100);
3184: l_child_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3185: l_child_invoice_status varchar2(100);
3186:

Line 3184: l_child_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;

3180: l_parent_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3181: l_parent_invoice_status varchar2(100);
3182: l_main_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3183: l_main_invoice_status varchar2(100);
3184: l_child_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3185: l_child_invoice_status varchar2(100);
3186:
3187: l_parent_report_status VARCHAR2(100);
3188: l_main_report_status VARCHAR2(100);

Line 3192: l_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;

3188: l_main_report_status VARCHAR2(100);
3189:
3190: l_payment_status AP_INVOICES_ALL.payment_status_flag%TYPE;
3191:
3192: l_report_header_id AP_EXPENSE_REPORT_HEADERS_ALL.report_header_id%TYPE;
3193: l_invoice_status VARCHAR2(100);
3194: l_identifier VARCHAR2(100);
3195: -- Bug: 9158198
3196: l_web_user_id Number := FND_PROFILE.VALUE('USER_ID');

Line 3305: UPDATE ap_expense_report_headers_all

3301: IF ( l_parent_report_status IS NOT NULL )
3302: THEN
3303:
3304: -- Bug: 9158198, WHO Columns not updated.
3305: UPDATE ap_expense_report_headers_all
3306: SET expense_status_code = l_parent_report_status,
3307: last_update_date = sysdate,
3308: last_updated_by = nvl(l_web_user_id, last_updated_by),
3309: -- Bug: 10044058, to update expense_last_status_date

Line 3318: UPDATE ap_expense_report_headers_all

3314: IF ( l_main_report_status IS NOT NULL )
3315: THEN
3316:
3317: -- Bug: 9158198, WHO Columns not updated.
3318: UPDATE ap_expense_report_headers_all
3319: SET expense_status_code = l_main_report_status,
3320: last_update_date = sysdate,
3321: last_updated_by = nvl(l_web_user_id, last_updated_by),
3322: -- Bug: 10044058, to update expense_last_status_date

Line 3369: FROM ap_expense_report_headers_all parent_aerh,

3365: parent_aerh.report_header_id report_header_id,
3366: DECODE(parent_APS.GROSS_AMOUNT ,0,'PAID',
3367: DECODE(parent_AI.Payment_status_flag,
3368: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3369: FROM ap_expense_report_headers_all parent_aerh,
3370: ap_expense_report_headers_all main_aerh,
3371: ap_invoices_all parent_ai,
3372: ap_payment_schedules_all parent_aps
3373: WHERE

Line 3370: ap_expense_report_headers_all main_aerh,

3366: DECODE(parent_APS.GROSS_AMOUNT ,0,'PAID',
3367: DECODE(parent_AI.Payment_status_flag,
3368: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3369: FROM ap_expense_report_headers_all parent_aerh,
3370: ap_expense_report_headers_all main_aerh,
3371: ap_invoices_all parent_ai,
3372: ap_payment_schedules_all parent_aps
3373: WHERE
3374: main_aerh.bothpay_parent_id = parent_aerh.report_header_id (+) and

Line 3386: ap_expense_report_headers_all main_aerh,

3382: DECODE(main_APS.GROSS_AMOUNT ,0,'PAID',
3383: DECODE(main_AI.Payment_status_flag,
3384: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3385: FROM
3386: ap_expense_report_headers_all main_aerh,
3387: ap_invoices_all main_ai,
3388: ap_payment_schedules_all main_aps
3389: WHERE
3390: main_aerh.vouchno = main_ai.invoice_id and

Line 3401: ap_expense_report_headers_all child_aerh,

3397: DECODE(child_APS.GROSS_AMOUNT ,0,'PAID',
3398: DECODE(child_AI.Payment_status_flag,
3399: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3400: FROM
3401: ap_expense_report_headers_all child_aerh,
3402: ap_expense_report_headers_all main_aerh,
3403: ap_invoices_all child_ai,
3404: ap_payment_schedules_all child_aps
3405: WHERE child_aerh.bothpay_parent_id (+) = main_aerh.report_header_id and

Line 3402: ap_expense_report_headers_all main_aerh,

3398: DECODE(child_AI.Payment_status_flag,
3399: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3400: FROM
3401: ap_expense_report_headers_all child_aerh,
3402: ap_expense_report_headers_all main_aerh,
3403: ap_invoices_all child_ai,
3404: ap_payment_schedules_all child_aps
3405: WHERE child_aerh.bothpay_parent_id (+) = main_aerh.report_header_id and
3406: child_aerh.vouchno = child_ai.invoice_id and

Line 3418: FROM ap_expense_report_headers_all parent_aerh,

3414: parent_aerh.report_header_id report_header_id,
3415: DECODE(parent_APS.GROSS_AMOUNT ,0,'PAID',
3416: DECODE(p_pay_status_flag,
3417: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3418: FROM ap_expense_report_headers_all parent_aerh,
3419: ap_expense_report_headers_all main_aerh,
3420: ap_payment_schedules_all parent_aps
3421: WHERE
3422: main_aerh.bothpay_parent_id = parent_aerh.report_header_id (+) and

Line 3419: ap_expense_report_headers_all main_aerh,

3415: DECODE(parent_APS.GROSS_AMOUNT ,0,'PAID',
3416: DECODE(p_pay_status_flag,
3417: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3418: FROM ap_expense_report_headers_all parent_aerh,
3419: ap_expense_report_headers_all main_aerh,
3420: ap_payment_schedules_all parent_aps
3421: WHERE
3422: main_aerh.bothpay_parent_id = parent_aerh.report_header_id (+) and
3423: parent_aerh.vouchno = parent_aps.invoice_id and

Line 3433: ap_expense_report_headers_all main_aerh,

3429: DECODE(main_APS.GROSS_AMOUNT ,0,'PAID',
3430: DECODE(p_pay_status_flag,
3431: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3432: FROM
3433: ap_expense_report_headers_all main_aerh,
3434: ap_payment_schedules_all main_aps
3435: WHERE
3436: main_aerh.vouchno = main_aps.invoice_id and
3437: main_aerh.vouchno = p_invoice_id

Line 3446: ap_expense_report_headers_all child_aerh,

3442: DECODE(child_APS.GROSS_AMOUNT ,0,'PAID',
3443: DECODE(p_pay_status_flag,
3444: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3445: FROM
3446: ap_expense_report_headers_all child_aerh,
3447: ap_expense_report_headers_all main_aerh,
3448: ap_payment_schedules_all child_aps
3449: WHERE child_aerh.bothpay_parent_id (+) = main_aerh.report_header_id and
3450: child_aerh.vouchno = child_aps.invoice_id and

Line 3447: ap_expense_report_headers_all main_aerh,

3443: DECODE(p_pay_status_flag,
3444: 'Y','PAID','N','INVOICED','P','PARPAID',NULL) ) invoice_status
3445: FROM
3446: ap_expense_report_headers_all child_aerh,
3447: ap_expense_report_headers_all main_aerh,
3448: ap_payment_schedules_all child_aps
3449: WHERE child_aerh.bothpay_parent_id (+) = main_aerh.report_header_id and
3450: child_aerh.vouchno = child_aps.invoice_id and
3451: main_aerh.vouchno = p_invoice_id;

Line 3496: SELECT nvl(workflow_approved_flag,'X') into l_mgr_appr_flag FROM AP_EXPENSE_REPORT_HEADERS_ALL

3492: BEGIN
3493:
3494: AP_WEB_EXPENSE_WF.CompleteReceiptsBlock(to_char(p_report_header_id));
3495:
3496: SELECT nvl(workflow_approved_flag,'X') into l_mgr_appr_flag FROM AP_EXPENSE_REPORT_HEADERS_ALL
3497: WHERE report_header_id = p_report_header_id;
3498:
3499: UPDATE ap_expense_report_headers_all SET image_receipts_status = 'RECEIVED',
3500: image_receipts_received_date = sysdate,

Line 3499: UPDATE ap_expense_report_headers_all SET image_receipts_status = 'RECEIVED',

3495:
3496: SELECT nvl(workflow_approved_flag,'X') into l_mgr_appr_flag FROM AP_EXPENSE_REPORT_HEADERS_ALL
3497: WHERE report_header_id = p_report_header_id;
3498:
3499: UPDATE ap_expense_report_headers_all SET image_receipts_status = 'RECEIVED',
3500: image_receipts_received_date = sysdate,
3501: last_update_date = sysdate,
3502: last_updated_by = Decode(Nvl(fnd_global.user_id,-1),-1,last_updated_by,fnd_global.user_id)
3503: WHERE report_header_id = to_number(p_report_header_id);

Line 3511: UPDATE ap_expense_report_headers_all

3507: WHERE report_header_id = to_number(p_report_header_id)
3508: AND NVL(receipt_required_flag, 'N') = 'Y';
3509:
3510: IF (l_org_count = 0) THEN
3511: UPDATE ap_expense_report_headers_all
3512: SET receipts_status = 'NOT_REQUIRED'
3513: WHERE report_header_id = to_number(p_report_header_id)
3514: and receipts_status IN ('OVERDUE', 'MISSING', 'REQUIRED');
3515: END IF;

Line 3525: from ap_expense_report_headers_all aerh,

3521: AP_WEB_RECEIPTS_WF.RaiseReceivedEvent(p_report_header_id, 'IMAGE');
3522: AP_WEB_UTILITIES_PKG.AddReportToAuditQueue(p_report_header_id);
3523: /*
3524: select nvl(rs.recpt_assign_stage_code,'X') into l_stage_code
3525: from ap_expense_report_headers_all aerh,
3526: ap_aud_rule_sets rs,
3527: ap_aud_rule_assignments_all rsa
3528: where aerh.report_header_id = p_report_header_id
3529: and aerh.org_id = rsa.org_id

Line 3558: SELECT nvl(workflow_approved_flag,'X') into l_mgr_appr_flag FROM AP_EXPENSE_REPORT_HEADERS_ALL

3554: l_auditor_id := null;
3555: END;
3556:
3557: IF (l_auditor_id IS NULL) THEN
3558: SELECT nvl(workflow_approved_flag,'X') into l_mgr_appr_flag FROM AP_EXPENSE_REPORT_HEADERS_ALL
3559: WHERE report_header_id = p_report_header_id;
3560: select nvl(rs.recpt_assign_stage_code,'X'), NVL(rs.AUD_IMG_RECEIPT_REQUIRED, 'N') ,
3561: nvl(rs.AUD_PAPER_RECEIPT_REQUIRED, 'N')
3562: into l_stage_code, l_aud_img_required, l_aud_org_required

Line 3563: from ap_expense_report_headers_all aerh,

3559: WHERE report_header_id = p_report_header_id;
3560: select nvl(rs.recpt_assign_stage_code,'X'), NVL(rs.AUD_IMG_RECEIPT_REQUIRED, 'N') ,
3561: nvl(rs.AUD_PAPER_RECEIPT_REQUIRED, 'N')
3562: into l_stage_code, l_aud_img_required, l_aud_org_required
3563: from ap_expense_report_headers_all aerh,
3564: ap_aud_rule_sets rs,
3565: ap_aud_rule_assignments_all rsa
3566: where aerh.report_header_id = p_report_header_id
3567: and aerh.org_id = rsa.org_id

Line 3663: SELECT invoice_num FROM AP_EXPENSE_REPORT_HEADERS_ALL

3659: END GetAttachmentExists;
3660:
3661: FUNCTION GetShortPaidReportMsg(p_report_header_id in NUMBER) RETURN VARCHAR2 IS
3662: CURSOR shortpay_reports IS
3663: SELECT invoice_num FROM AP_EXPENSE_REPORT_HEADERS_ALL
3664: WHERE shortpay_parent_id = p_report_header_id
3665: AND receipts_status = 'IN_PARENT_PACKET';
3666:
3667: l_invoice_num AP_EXPENSE_REPORT_HEADERS_ALL.INVOICE_NUM%TYPE;

Line 3667: l_invoice_num AP_EXPENSE_REPORT_HEADERS_ALL.INVOICE_NUM%TYPE;

3663: SELECT invoice_num FROM AP_EXPENSE_REPORT_HEADERS_ALL
3664: WHERE shortpay_parent_id = p_report_header_id
3665: AND receipts_status = 'IN_PARENT_PACKET';
3666:
3667: l_invoice_num AP_EXPENSE_REPORT_HEADERS_ALL.INVOICE_NUM%TYPE;
3668: l_concat VARCHAR2(2000) := '';
3669: BEGIN
3670: OPEN shortpay_reports;
3671: LOOP

Line 3708: FROM AP_EXPENSE_REPORT_HEADERS_ALL WHERE report_header_id = p_report_header_id;

3704: IF p_report_header_id = -1 THEN
3705: l_report_date := sysdate;
3706: ELSE
3707: SELECT NVL(report_submitted_date, sysdate) INTO l_report_date
3708: FROM AP_EXPENSE_REPORT_HEADERS_ALL WHERE report_header_id = p_report_header_id;
3709: END IF;
3710:
3711: OPEN ReceiptRuleCur(l_report_date);
3712: FETCH ReceiptRuleCur INTO ReceiptRuleRec;

Line 3736: FROM AP_EXPENSE_REPORT_HEADERS_ALL WHERE report_header_id = p_report_header_id;

3732:
3733: IF p_receipt_type = 'ORIGINAL' THEN
3734:
3735: SELECT DECODE(image_receipts_status,'NOT_REQUIRED','N','RECEIVED','N','Y') INTO l_receipts_status
3736: FROM AP_EXPENSE_REPORT_HEADERS_ALL WHERE report_header_id = p_report_header_id;
3737:
3738: ELSIF p_receipt_type = 'IMAGE' THEN
3739:
3740: SELECT DECODE(receipts_status,'NOT_REQUIRED','N','RECEIVED','N','Y') INTO l_receipts_status

Line 3741: FROM AP_EXPENSE_REPORT_HEADERS_ALL WHERE report_header_id = p_report_header_id;

3737:
3738: ELSIF p_receipt_type = 'IMAGE' THEN
3739:
3740: SELECT DECODE(receipts_status,'NOT_REQUIRED','N','RECEIVED','N','Y') INTO l_receipts_status
3741: FROM AP_EXPENSE_REPORT_HEADERS_ALL WHERE report_header_id = p_report_header_id;
3742:
3743: END IF;
3744:
3745: END IF;

Line 3855: FROM ap_expense_report_headers_all

3851: l_img_receipts_status VARCHAR2(30);
3852: BEGIN
3853: SELECT nvl(receipts_status, 'NOT_REQUIRED'), nvl(image_receipts_status, 'NOT_REQUIRED')
3854: INTO l_receipts_status, l_img_receipts_status
3855: FROM ap_expense_report_headers_all
3856: WHERE report_header_id = p_report_header_id;
3857:
3858: IF (l_receipts_status = 'MISSING' AND l_img_receipts_status = 'MISSING') THEN
3859: RETURN 'BOTH';