The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE DeleteExpenseReport(
ReportID IN expHdr_headerID)
IS
BEGIN
AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_OA_MAINFLOW_PKG',
'start DeleteExpenseReport');
DeleteReport(ReportID);
'end DeleteExpenseReport');
END DeleteExpenseReport;
p_last_update_date IN DATE, --Bug 2510993
receipt_cost_center IN VARCHAR2 DEFAULT NULL,
-- skaneshi: temporarily put default null so does not cause plsql error
p_transaction_currency_type IN VARCHAR2,
p_inverse_rate_flag IN VARCHAR2,
p_report_header_id IN NUMBER,
p_category_code IN VARCHAR2, --Bug 2292854
-- Per Diem data
p_nFreeBreakfasts1 IN NUMBER,
p_nFreeBreakfasts2 IN NUMBER,
p_nFreeBreakfasts3 IN NUMBER,
p_nFreeLunches1 IN NUMBER,
p_nFreeLunches2 IN NUMBER,
p_nFreeLunches3 IN NUMBER,
p_nFreeDinners1 IN NUMBER,
p_nFreeDinners2 IN NUMBER,
p_nFreeDinners3 IN NUMBER,
p_nFreeAccommodations1 IN NUMBER,
p_nFreeAccommodations2 IN NUMBER,
p_nFreeAccommodations3 IN NUMBER,
p_location IN VARCHAR2,
-- Mileage data
p_dailyDistance IN NUMBER,
p_tripDistance IN NUMBER,
p_mileageRate IN NUMBER,
p_vehicleCategory IN VARCHAR2,
p_vehicleType IN VARCHAR2,
p_fuelType IN VARCHAR2,
p_numberPassengers IN NUMBER,
p_default_currency_code IN VARCHAR2,
p_default_exchange_rate_type IN VARCHAR2,
p_header_attribute_category IN VARCHAR2,
p_header_attribute1 IN VARCHAR2,
p_header_attribute2 IN VARCHAR2,
p_header_attribute3 IN VARCHAR2,
p_header_attribute4 IN VARCHAR2,
p_header_attribute5 IN VARCHAR2,
p_header_attribute6 IN VARCHAR2,
p_header_attribute7 IN VARCHAR2,
p_header_attribute8 IN VARCHAR2,
p_header_attribute9 IN VARCHAR2,
p_header_attribute10 IN VARCHAR2,
p_header_attribute11 IN VARCHAR2,
p_header_attribute12 IN VARCHAR2,
p_header_attribute13 IN VARCHAR2,
p_header_attribute14 IN VARCHAR2,
p_header_attribute15 IN VARCHAR2,
p_receipt_index IN NUMBER,
p_passenger_rate_used IN NUMBER,
p_license_plate_number IN VARCHAR2,
p_destination_from IN VARCHAR2,
p_destination_to IN VARCHAR2,
p_distance_unit_code IN VARCHAR2,
p_addon_rates IN OIE_ADDON_RATES_T DEFAULT NULL,
p_report_line_id IN NUMBER,
p_itemization_parent_id IN NUMBER,
p_daily_breakup_id IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_start_date IN OIE_PDM_DATE_T DEFAULT NULL,
p_end_date IN OIE_PDM_DATE_T DEFAULT NULL,
p_amount IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_number_of_meals IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_meals_amount IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_breakfast_flag IN OIE_PDM_VARCHAR_1_T DEFAULT NULL,
p_lunch_flag IN OIE_PDM_VARCHAR_1_T DEFAULT NULL,
p_dinner_flag IN OIE_PDM_VARCHAR_1_T DEFAULT NULL,
p_accommodation_amount IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_accommodation_flag IN OIE_PDM_VARCHAR_1_T DEFAULT NULL,
p_hotel_name IN OIE_PDM_VARCHAR_80_T DEFAULT NULL,
p_night_rate_Type IN OIE_PDM_VARCHAR_80_T DEFAULT NULL,
p_night_rate_amount IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_pdm_rate IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_rate_Type_code IN OIE_PDM_VARCHAR_80_T DEFAULT NULL,
p_pdm_breakup_dest_id IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_pdm_destination_id IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_dest_start_date IN OIE_PDM_DATE_T DEFAULT NULL,
p_dest_end_date IN OIE_PDM_DATE_T DEFAULT NULL,
p_location_id IN OIE_PDM_NUMBER_T DEFAULT NULL,
p_cust_meals_amount IN OUT NOCOPY OIE_PDM_NUMBER_T,
p_cust_accommodation_amount IN OUT NOCOPY OIE_PDM_NUMBER_T,
p_cust_night_rate_amount IN OUT NOCOPY OIE_PDM_NUMBER_T,
p_cust_pdm_rate IN OUT NOCOPY OIE_PDM_NUMBER_T,
p_vat_code IN VARCHAR2 DEFAULT NULL, -- Bug: 6719467
p_emp_attendee_count IN NUMBER DEFAULT NULL, -- Bug 6919132
p_nonemp_attendee_count IN NUMBER DEFAULT NULL -- Bug 6919132
) IS
-------------------------------------------------------------------
l_debug_info VARCHAR2(1000);
ExpReportHeaderInfo.last_update_date := p_last_update_date;
SELECT
SUM(amount),
SUM(DECODE(SIGN(amount),-1,0,amount))
INTO
l_neg_pos_total,
l_pos_total
FROM AP_EXPENSE_REPORT_LINES_ALL
WHERE REPORT_HEADER_ID = p_report_header_id
AND (itemization_parent_id is null OR itemization_parent_id <> -1);
l_debug_info := 'Select currency information';
-- this selected user id will be used to get profile option
-- values.
EXIT;
select AP_EXPENSE_REPORT_HEADERS_S.NEXTVAL
into p_target_report_header_id
from sys.dual;
PROCEDURE updateExpensedAmount(
p_trxIds IN AP_WEB_PARENT_PKG.Number_Array,
p_expensedAmt IN AP_WEB_PARENT_PKG.Number_Array,
p_reportId IN AP_CREDIT_CARD_TRXNS.report_header_id%TYPE
) IS
l_numCharges number := 0;
l_debugInfo := 'Update the credit card interface table';
IF ( NOT AP_WEB_DB_CCARD_PKG.UpdateExpensedAmount(
l_trxn_id,
p_reportId,
l_exp_amount) ) THEN
NULL;
FND_MESSAGE.SET_TOKEN('CALLING_SEQUENCE', 'updateExpensedAmount');
END updateExpensedAmount;
To update charges used in an Expense Report that is about to be deleted. Specifically,
it will credit the receipt amount back to the Expensed_Amount field of the corresponding
charge.
Input:
p_id_Array : table of credit card transaction ids
p_amtArray: table of expensed amount corresponding to p_idArray
Output:
None
Input Output:
None
Assumption:
None
Date:
11/19/99
*/
PROCEDURE updChargesFromDeletedReport(p_idArray in AP_WEB_PARENT_PKG.number_Array,
p_amtArray in AP_WEB_PARENT_PKG.number_Array)
IS
l_idArray AP_WEB_PARENT_PKG.number_Array;
updateExpensedAmount(l_idArray, l_amtArray, null);
FND_MESSAGE.SET_TOKEN('CALLING_SEQUENCE', 'updChargesFromDeletedReport');
END updChargesFromDeletedReport;
PROCEDURE DeleteReport(
ReportID IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE)
IS
l_DebugInfo VARCHAR2(200);
l_DebugInfo := 'Delete report header';
IF (NOT AP_WEB_DB_EXPRPT_PKG.DeleteReportHeaderAtDate(ReportID)) THEN
raise NO_DATA_FOUND;
l_DebugInfo := 'Delete report lines';
IF (NOT AP_WEB_DB_EXPLINE_PKG.DeleteReportLines(ReportID))THEN
raise NO_DATA_FOUND;
l_DebugInfo := 'update credit card charges';
updChargesFromDeletedReport(l_idArray, l_amtArray);
l_DebugInfo := 'Delete violations';
AP_WEB_DB_VIOLATIONS_PKG.deleteViolationEntry(ReportID);
END DeleteReport;