1: PACKAGE BODY AP_WEB_DB_EXPTEMPLATE_PKG AS
2: /* $Header: apwdbetb.pls 120.8 2005/05/25 22:18:24 qle ship $ */
3: --------------------------------------------------------------------------------
4: FUNCTION GetWebEnabledTemplatesCursor(p_cursor OUT NOCOPY TemplateCursor)
5: RETURN BOOLEAN IS
9: SELECT expense_report_id, report_type
10: FROM ap_expense_reports
11: WHERE web_enabled_flag = 'Y'
12: AND trunc(sysdate) <= trunc(nvl(inactive_date, sysdate))
13: AND AP_WEB_DB_EXPTEMPLATE_PKG.IsExpTemplateWebEnabled(expense_report_id) = 'Y'
14: ORDER BY UPPER(report_type);
15:
16: return TRUE;
17: EXCEPTION
304: FUNCTION IsExpTemplateWebEnabled(p_expense_report_id IN ap_expense_reports.expense_report_id%TYPE)
305: RETURN VARCHAR2 IS
306: -------------------------------------------------------------------
307:
308: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
309: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
310: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
311: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
312: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
305: RETURN VARCHAR2 IS
306: -------------------------------------------------------------------
307:
308: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
309: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
310: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
311: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
312: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
313: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
306: -------------------------------------------------------------------
307:
308: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
309: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
310: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
311: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
312: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
313: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
314: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
307:
308: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
309: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
310: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
311: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
312: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
313: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
314: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
315:
308: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
309: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
310: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
311: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
312: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
313: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
314: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
315:
316: BEGIN
309: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
310: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
311: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
312: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
313: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
314: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
315:
316: BEGIN
317:
310: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
311: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
312: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
313: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
314: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
315:
316: BEGIN
317:
318: IF (AP_WEB_DB_EXPTEMPLATE_PKG.GetExpTypesCursor(to_number(p_expense_report_id), l_exp_types_cursor)) THEN
314: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
315:
316: BEGIN
317:
318: IF (AP_WEB_DB_EXPTEMPLATE_PKG.GetExpTypesCursor(to_number(p_expense_report_id), l_exp_types_cursor)) THEN
319: LOOP
320: FETCH l_exp_types_cursor
321: INTO l_parameter_id,
322: l_web_FriendlyPrompt,
363: INTO p_count
364: FROM ap_expense_reports
365: WHERE web_enabled_flag = 'Y'
366: AND trunc(sysdate) <= trunc(nvl(inactive_date, sysdate))
367: AND AP_WEB_DB_EXPTEMPLATE_PKG.IsExpTemplateWebEnabled(expense_report_id) = 'Y';
368:
369: return TRUE;
370: EXCEPTION
371: WHEN NO_DATA_FOUND THEN
550: return FALSE;
551: END GetRoundingParamID;
552: /* jrautiai ADJ Fix End */
553:
554: END AP_WEB_DB_EXPTEMPLATE_PKG;