[Home] [Help]
1: PACKAGE BODY AP_WEB_DB_EXPTEMPLATE_PKG AS
2: /* $Header: apwdbetb.pls 120.8.12020000.3 2012/08/29 14:52:35 saprayag 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
324: FUNCTION IsExpTemplateWebEnabled(p_expense_report_id IN ap_expense_reports.expense_report_id%TYPE)
325: RETURN VARCHAR2 IS
326: -------------------------------------------------------------------
327:
328: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
329: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
330: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
331: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
332: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
325: RETURN VARCHAR2 IS
326: -------------------------------------------------------------------
327:
328: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
329: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
330: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
331: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
332: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
333: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
326: -------------------------------------------------------------------
327:
328: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
329: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
330: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
331: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
332: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
333: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
334: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
327:
328: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
329: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
330: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
331: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
332: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
333: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
334: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
335:
328: l_exp_types_cursor AP_WEB_DB_EXPTEMPLATE_PKG.ExpenseTypesCursor;
329: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
330: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
331: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
332: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
333: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
334: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
335:
336: BEGIN
329: l_parameter_id AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_paramID;
330: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
331: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
332: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
333: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
334: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
335:
336: BEGIN
337:
330: l_web_FriendlyPrompt AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_webFriendlyPrompt;
331: l_require_receipt_amount AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_requireReceiptAmt;
332: l_card_exp_type_lookup_code AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_cardExpTypeLookupCode;
333: l_amount_includes_tax_flag AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_amtInclTaxFlag;
334: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
335:
336: BEGIN
337:
338: IF (AP_WEB_DB_EXPTEMPLATE_PKG.GetExpTypesCursor(to_number(p_expense_report_id), l_exp_types_cursor)) THEN
334: l_justif_req AP_WEB_DB_EXPTEMPLATE_PKG.expTempl_justificationReqdFlag;
335:
336: BEGIN
337:
338: IF (AP_WEB_DB_EXPTEMPLATE_PKG.GetExpTypesCursor(to_number(p_expense_report_id), l_exp_types_cursor)) THEN
339: LOOP
340: FETCH l_exp_types_cursor
341: INTO l_parameter_id,
342: l_web_FriendlyPrompt,
383: INTO p_count
384: FROM ap_expense_reports
385: WHERE web_enabled_flag = 'Y'
386: AND trunc(sysdate) <= trunc(nvl(inactive_date, sysdate))
387: AND AP_WEB_DB_EXPTEMPLATE_PKG.IsExpTemplateWebEnabled(expense_report_id) = 'Y';
388:
389: return TRUE;
390: EXCEPTION
391: WHEN NO_DATA_FOUND THEN
570: return FALSE;
571: END GetRoundingParamID;
572: /* jrautiai ADJ Fix End */
573:
574: END AP_WEB_DB_EXPTEMPLATE_PKG;