DBA Data[Home] [Help]

APPS.AP_WEB_EXPENSE_WF dependencies on AP_EXPENSE_REPORT_LINES

Line 1239: from ap_expense_report_lines

1235: l_debug_info := 'Checking number of credit card lines with errors';
1236: ------------------------------------------------------------
1237: select count(*)
1238: into l_num_lines
1239: from ap_expense_report_lines
1240: where report_header_id = l_report_header_id
1241: and credit_card_trx_id is not null
1242: and ap_validation_error is not null;
1243:

Line 1255: from ap_expense_report_lines

1251: l_debug_info := 'Checking number of cash lines with errors';
1252: ------------------------------------------------------------
1253: select count(*)
1254: into l_num_lines
1255: from ap_expense_report_lines
1256: where report_header_id = l_report_header_id
1257: and credit_card_trx_id is null
1258: and ap_validation_error is not null;
1259:

Line 1671: from ap_expense_report_lines

1667: l_debug_info := 'Get number of line errors';
1668: -----------------------------------------------------------------
1669: select count(*)
1670: into l_num_line_errors
1671: from ap_expense_report_lines
1672: where report_header_id = l_report_header_id
1673: and ap_validation_error is not null;
1674:
1675: ----------------------------------------------------------------

Line 2638: l_debug_info := 'Update ap_expense_report_lines';

2634: NULL;
2635: END IF; /* SetExpenseHeaderInfo */
2636:
2637: ---------------------------------------------------
2638: l_debug_info := 'Update ap_expense_report_lines';
2639: ---------------------------------------------------
2640: -- 7/24: insertion of receipt_required_flag is moved to the submit package.
2641: IF (NOT AP_WEB_DB_EXPLINE_PKG.SetAWTGroupIDAndJustif(p_report_header_id,
2642: l_sys_allow_awt_flag,

Line 4424: ap_expense_report_lines with new report_header_id';

4420:
4421: IF (p_shortpay_type = 'POLICY') THEN
4422: --------------------------------------------------------------------
4423: l_debug_info := 'Insert the lines that cannot be paid into
4424: ap_expense_report_lines with new report_header_id';
4425: --------------------------------------------------------------------
4426:
4427: IF (AP_WEB_DB_EXPLINE_PKG.AddPolicyShortPaidExpLines(p_new_expense_report_id, p_orig_expense_report_id)) THEN
4428: NULL;

Line 4451: ap_expense_report_lines with new report_header_id for

4447: ELSE
4448:
4449: --------------------------------------------------------------------
4450: l_debug_info := 'Insert the lines that cannot be paid into
4451: ap_expense_report_lines with new report_header_id for
4452: missing receipts shortpay';
4453: --------------------------------------------------------------------
4454:
4455: IF (p_shortpay_type = 'NO_RECEIPTS') THEN

Line 5630: update ap_expense_report_lines

5626: l_debug_info := 'Reset Receipt Verified Flag to N';
5627: ----------------------------------------------------------
5628: -- Bug 4094871
5629: begin
5630: update ap_expense_report_lines
5631: set receipt_verified_flag = l_No
5632: where report_header_id = l_report_header_id;
5633: exception
5634: when others then null;

Line 5992: update ap_expense_report_lines

5988: ----------------------------------------------------------
5989: l_debug_info := 'Reset Receipt Missing Flag';
5990: ----------------------------------------------------------
5991: -- Bug 4075372
5992: update ap_expense_report_lines
5993: set receipt_missing_flag = l_No
5994: where report_header_id = l_report_header_id;
5995:
5996: ------------------------------------------------------------

Line 6299: ap_expense_report_lines with new report_header_id';

6295: 'OIE_HEADER_ATTACHMENTS');
6296:
6297: ------------------------------------------------------------------
6298: l_debug_info := 'Insert the lines for the credit card company into
6299: ap_expense_report_lines with new report_header_id';
6300: ------------------------------------------------------------------
6301: IF (NOT AP_WEB_DB_EXPLINE_PKG.AddCCReportLines(l_report_header_id,
6302: l_new_report_id)) THEN
6303: NULL;

Line 11178: update ap_expense_report_lines

11174: l_debug_info := 'Reset Receipt Verified Flag to N';
11175: ----------------------------------------------------------
11176: -- Bug 4094871
11177: begin
11178: update ap_expense_report_lines
11179: set receipt_verified_flag = l_No
11180: where report_header_id = l_report_header_id;
11181: exception
11182: when others then null;

Line 11640: p_rep_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE)

11636: | none |
11637: *----------------------------------------------------------------------------*/
11638:
11639: PROCEDURE WithdrawExpenseRep(
11640: p_rep_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE)
11641: IS
11642: l_itemkey wf_items.item_key%TYPE;
11643: l_itemtype wf_items.item_type%TYPE := 'APEXP';
11644: l_document_number AP_WEB_DB_EXPRPT_PKG.expHdr_invNum;

Line 11823: update ap_expense_report_lines

11819: l_debug_info := 'Reset Receipt Verified Flag to N';
11820: ----------------------------------------------------------
11821: -- Bug 4094871
11822: begin
11823: update ap_expense_report_lines
11824: set receipt_verified_flag = l_No
11825: where report_header_id = p_rep_header_id;
11826: exception
11827: when others then null;

Line 12021: l_flex_concatenated AP_EXPENSE_REPORT_LINES.flex_concatenated%TYPE;

12017: := -1;
12018:
12019: l_document long;
12020:
12021: l_flex_concatenated AP_EXPENSE_REPORT_LINES.flex_concatenated%TYPE;
12022: l_line_accounting_enabled VARCHAR2(30);
12023: l_line_accounting_defined BOOLEAN;
12024: l_policy_violation_value VARCHAR2(50);
12025: l_policy_violation_defined BOOLEAN;

Line 12027: l_mrate_adjusted_flag AP_EXPENSE_REPORT_LINES.mileage_rate_adjusted_flag%TYPE;

12023: l_line_accounting_defined BOOLEAN;
12024: l_policy_violation_value VARCHAR2(50);
12025: l_policy_violation_defined BOOLEAN;
12026: l_n_resp_id Number;
12027: l_mrate_adjusted_flag AP_EXPENSE_REPORT_LINES.mileage_rate_adjusted_flag%TYPE;
12028: l_mileage_note VARCHAR2(2000);
12029: l_notification_type VARCHAR2(10);
12030: l_print_violation VARCHAR2(1) := 'N';
12031: l_merchant_name AP_EXPENSE_REPORT_LINES.merchant_name%TYPE;

Line 12031: l_merchant_name AP_EXPENSE_REPORT_LINES.merchant_name%TYPE;

12027: l_mrate_adjusted_flag AP_EXPENSE_REPORT_LINES.mileage_rate_adjusted_flag%TYPE;
12028: l_mileage_note VARCHAR2(2000);
12029: l_notification_type VARCHAR2(10);
12030: l_print_violation VARCHAR2(1) := 'N';
12031: l_merchant_name AP_EXPENSE_REPORT_LINES.merchant_name%TYPE;
12032: l_co_merchant_count NUMBER;
12033:
12034: l_num_both_personal_lines NUMBER := 0; --Bug 2944363
12035: l_payment VARCHAR2(10);--Bug 2944363

Line 12999: FROM ap_expense_report_lines xl

12995: l_debug_info := 'Construct Mileage Note';
12996: ------------------------------------------------------------
12997: SELECT count(*)
12998: INTO l_modified_count
12999: FROM ap_expense_report_lines xl
13000: WHERE xl.report_header_id = l_report_header_id
13001: AND xl.mileage_rate_adjusted_flag = AP_WEB_DB_EXPLINE_PKG.C_Modified;
13002:
13003: /* If the system adjusted the mileage rate by adding new lines

Line 13012: FROM ap_expense_report_lines xl

13008: FND_MESSAGE.SET_NAME('SQLAP','OIE_WF_MRATE_MODIFIED_NOTE');
13009: ELSE
13010: SELECT count(*)
13011: INTO l_new_count
13012: FROM ap_expense_report_lines xl
13013: WHERE xl.report_header_id = l_report_header_id
13014: AND (xl.mileage_rate_adjusted_flag = AP_WEB_DB_EXPLINE_PKG.C_New
13015: OR xl.mileage_rate_adjusted_flag = AP_WEB_DB_EXPLINE_PKG.C_Split);
13016:

Line 13113: FROM ap_expense_report_lines XL,

13109: l_end_expense_date,
13110: l_web_parameter_id,
13111: l_policy_id,
13112: l_currency_preference
13113: FROM ap_expense_report_lines XL,
13114: AP_EXPENSE_REPORT_HEADERS XH,
13115: AP_EXPENSE_REPORT_PARAMS XP,
13116: AP_POL_HEADERS SH
13117: WHERE XH.report_header_id = p_report_header_id

Line 13304: from ap_expense_report_lines

13300: select nvl(sum(mileage_rate),0)
13301: into l_addon_rate_sum
13302: from oie_addon_mileage_rates
13303: where report_line_id = (select report_line_id
13304: from ap_expense_report_lines
13305: where report_header_id = p_report_header_id
13306: and distribution_line_number = p_dist_line_number
13307: and rownum = 1);
13308: return l_addon_rate_sum;

Line 13441: p_new_dist_number IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,

13437:
13438: -------------------------------------------------------------------------------
13439: PROCEDURE addToMileageArray(
13440: p_index IN NUMBER,
13441: p_new_dist_number IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13442: p_trip_dist IN AP_EXPENSE_REPORT_LINES.TRIP_DISTANCE%TYPE,
13443: p_daily_distance IN AP_EXPENSE_REPORT_LINES.DAILY_DISTANCE%TYPE,
13444: p_rate IN AP_EXPENSE_REPORT_LINES.avg_mileage_rate%TYPE,
13445: p_report_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,

Line 13442: p_trip_dist IN AP_EXPENSE_REPORT_LINES.TRIP_DISTANCE%TYPE,

13438: -------------------------------------------------------------------------------
13439: PROCEDURE addToMileageArray(
13440: p_index IN NUMBER,
13441: p_new_dist_number IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13442: p_trip_dist IN AP_EXPENSE_REPORT_LINES.TRIP_DISTANCE%TYPE,
13443: p_daily_distance IN AP_EXPENSE_REPORT_LINES.DAILY_DISTANCE%TYPE,
13444: p_rate IN AP_EXPENSE_REPORT_LINES.avg_mileage_rate%TYPE,
13445: p_report_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,
13446: p_from_index IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,

Line 13443: p_daily_distance IN AP_EXPENSE_REPORT_LINES.DAILY_DISTANCE%TYPE,

13439: PROCEDURE addToMileageArray(
13440: p_index IN NUMBER,
13441: p_new_dist_number IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13442: p_trip_dist IN AP_EXPENSE_REPORT_LINES.TRIP_DISTANCE%TYPE,
13443: p_daily_distance IN AP_EXPENSE_REPORT_LINES.DAILY_DISTANCE%TYPE,
13444: p_rate IN AP_EXPENSE_REPORT_LINES.avg_mileage_rate%TYPE,
13445: p_report_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,
13446: p_from_index IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13447: p_mileage_line_array IN OUT NOCOPY AP_WEB_DB_EXPLINE_PKG.Mileage_Line_Array) IS

Line 13444: p_rate IN AP_EXPENSE_REPORT_LINES.avg_mileage_rate%TYPE,

13440: p_index IN NUMBER,
13441: p_new_dist_number IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13442: p_trip_dist IN AP_EXPENSE_REPORT_LINES.TRIP_DISTANCE%TYPE,
13443: p_daily_distance IN AP_EXPENSE_REPORT_LINES.DAILY_DISTANCE%TYPE,
13444: p_rate IN AP_EXPENSE_REPORT_LINES.avg_mileage_rate%TYPE,
13445: p_report_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,
13446: p_from_index IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13447: p_mileage_line_array IN OUT NOCOPY AP_WEB_DB_EXPLINE_PKG.Mileage_Line_Array) IS
13448: -------------------------------------------------------------------------------

Line 13445: p_report_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,

13441: p_new_dist_number IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13442: p_trip_dist IN AP_EXPENSE_REPORT_LINES.TRIP_DISTANCE%TYPE,
13443: p_daily_distance IN AP_EXPENSE_REPORT_LINES.DAILY_DISTANCE%TYPE,
13444: p_rate IN AP_EXPENSE_REPORT_LINES.avg_mileage_rate%TYPE,
13445: p_report_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,
13446: p_from_index IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13447: p_mileage_line_array IN OUT NOCOPY AP_WEB_DB_EXPLINE_PKG.Mileage_Line_Array) IS
13448: -------------------------------------------------------------------------------
13449: l_debug_info VARCHAR2(200);

Line 13446: p_from_index IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,

13442: p_trip_dist IN AP_EXPENSE_REPORT_LINES.TRIP_DISTANCE%TYPE,
13443: p_daily_distance IN AP_EXPENSE_REPORT_LINES.DAILY_DISTANCE%TYPE,
13444: p_rate IN AP_EXPENSE_REPORT_LINES.avg_mileage_rate%TYPE,
13445: p_report_header_id IN AP_EXPENSE_REPORT_LINES.report_header_id%TYPE,
13446: p_from_index IN AP_EXPENSE_REPORT_LINES.distribution_line_number%TYPE,
13447: p_mileage_line_array IN OUT NOCOPY AP_WEB_DB_EXPLINE_PKG.Mileage_Line_Array) IS
13448: -------------------------------------------------------------------------------
13449: l_debug_info VARCHAR2(200);
13450:

Line 13681: FROM AP_EXPENSE_REPORT_LINES

13677: --------------------------------------------
13678:
13679: SELECT max(distribution_line_number) + 1
13680: INTO l_next_dist_number
13681: FROM AP_EXPENSE_REPORT_LINES
13682: WHERE report_header_id = p_mileage_line_array(p_ml_index).report_header_id;
13683:
13684: --------------------------------------------
13685: l_debug_info := 'Find the trip distance';

Line 13699: in ap_expense_report_lines. -Akita */

13695: /* The rate from the schedule line array is the rate stored in
13696: ap_pol_headers. The unit of measure will be according to
13697: ap_pol_headers. However, when calculating the rate for the
13698: lines, we need to get convert the rate according to the UOM
13699: in ap_expense_report_lines. -Akita */
13700: l_new_rate := getRate(
13701: p_sh_distance_uom => p_sh_distance_uom,
13702: p_sh_currency_code => p_sh_currency_code,
13703: p_mileage_line => p_mileage_line_array(p_ml_index),

Line 15816: UPDATE AP_EXPENSE_REPORT_LINES

15812: UPDATE AP_EXPENSE_REPORT_HEADERS
15813: SET DESCRIPTION= AP_WEB_UTILITIES_PKG.RtrimMultiByteSpaces(description)
15814: WHERE REPORT_HEADER_ID = p_report_header_id;
15815:
15816: UPDATE AP_EXPENSE_REPORT_LINES
15817: SET JUSTIFICATION = AP_WEB_UTILITIES_PKG.RtrimMultiByteSpaces(justification),
15818: SUBMITTED_AMOUNT = AMOUNT
15819: WHERE REPORT_HEADER_ID = p_report_header_id;
15820:

Line 15825: UPDATE ap_expense_report_lines_all aerl

15821:
15822: -- Bug:12831314 Update the Expensditure Type and Expenditure Item Date
15823: BEGIN
15824:
15825: UPDATE ap_expense_report_lines_all aerl
15826: SET expenditure_type =
15827: (SELECT pa_expenditure_type
15828: FROM ap_expense_report_params_all
15829: WHERE parameter_id = aerl.web_parameter_id

Line 15944: l_total ap_expense_report_lines.amount%type;

15940: l_report_header_id ap_expense_report_headers.report_header_id%type;
15941: l_preparer_id ap_expense_report_headers.employee_id%type;
15942: l_employee_id ap_expense_report_headers.employee_id%type;
15943: l_document_number ap_expense_report_headers.invoice_num%type;
15944: l_total ap_expense_report_lines.amount%type;
15945: l_new_total ap_expense_report_lines.amount%type;
15946: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
15947: l_cost_center ap_expense_report_headers.flex_concatenated%type;
15948: l_purpose ap_expense_report_headers.description%type;

Line 15945: l_new_total ap_expense_report_lines.amount%type;

15941: l_preparer_id ap_expense_report_headers.employee_id%type;
15942: l_employee_id ap_expense_report_headers.employee_id%type;
15943: l_document_number ap_expense_report_headers.invoice_num%type;
15944: l_total ap_expense_report_lines.amount%type;
15945: l_new_total ap_expense_report_lines.amount%type;
15946: l_reimb_curr ap_expense_report_headers.default_currency_code%type;
15947: l_cost_center ap_expense_report_headers.flex_concatenated%type;
15948: l_purpose ap_expense_report_headers.description%type;
15949: l_approver_id ap_expense_report_headers.override_approver_id%type;

Line 15989: from ap_expense_report_lines aerl

15985: select sum(aerl.amount),
15986: sum(decode(sign(aerl.amount),-1,0,aerl.amount))
15987: into l_total,
15988: l_new_total
15989: from ap_expense_report_lines aerl
15990: where aerl.report_header_id = l_report_header_id
15991: and (itemization_parent_id is null OR itemization_parent_id <> -1);
15992:
15993: StartExpenseReportProcess(

Line 17540: SELECT count(*) into l_line_count FROM ap_expense_report_lines

17536: IF (p_funmode = 'RUN') THEN
17537: l_report_header_id := WF_ENGINE.GetItemAttrNumber(p_item_type,
17538: p_item_key,
17539: 'EXPENSE_REPORT_ID');
17540: SELECT count(*) into l_line_count FROM ap_expense_report_lines
17541: WHERE report_header_id = l_report_header_id;
17542:
17543: IF (NOT AP_WEB_DB_EXPLINE_PKG.GetNumShortpaidLines(l_report_header_id, l_shortpay_count)) THEN
17544: l_shortpay_count := 0;