[Home] [Help]
914: select sum(daily_amount *
915: LPAD(to_char((nvl(end_expense_date,start_expense_date) -
916: start_expense_date)+1),4)) violation_total
917: into p_sum_violations
918: from ap_expense_report_lines_all
919: where report_header_id = p_report_header_id
920: and amount >= 0
921: and receipt_missing_flag <> 'Y'
922: and distribution_line_number in (
1557: LOOP
1558: FETCH ReportLines into l_OrigReportLineID, l_itemization_parent_id;
1559: EXIT WHEN ReportLines%NOTFOUND;
1560:
1561: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1562: SET report_header_id = p_new_expense_report_id,
1563: mileage_rate_adjusted_flag = C_Unchanged,
1564: last_update_date = sysdate,
1565: creation_date = sysdate
1567:
1568: if (l_itemization_parent_id = -1) then
1569: for i in ItemizationChildLines(l_OrigReportLineID) loop
1570:
1571: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1572: SET report_header_id = p_new_expense_report_id,
1573: mileage_rate_adjusted_flag = C_Unchanged,
1574: last_update_date = sysdate,
1575: creation_date = sysdate
1674: FETCH ReportLines into l_OrigReportLineID, l_itemization_parent_id;
1675: EXIT WHEN ReportLines%NOTFOUND;
1676:
1677:
1678: UPDATE AP_EXPENSE_REPORT_LINES_all
1679: SET report_header_id = p_new_expense_report_id,
1680: mileage_rate_adjusted_flag = C_Unchanged,
1681: last_update_date = sysdate,
1682: creation_date = sysdate
1684:
1685: if (l_itemization_parent_id = -1) then
1686: for i in ItemizationChildLines(l_OrigReportLineID) loop
1687:
1688: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1689: SET report_header_id = p_new_expense_report_id,
1690: mileage_rate_adjusted_flag = C_Unchanged,
1691: last_update_date = sysdate,
1692: creation_date = sysdate
1792: FETCH ReportLines into l_OrigReportLineID, l_itemization_parent_id;
1793: EXIT WHEN ReportLines%NOTFOUND;
1794:
1795:
1796: UPDATE AP_EXPENSE_REPORT_LINES_all
1797: SET report_header_id = p_new_expense_report_id,
1798: mileage_rate_adjusted_flag = C_Unchanged,
1799: last_update_date = sysdate,
1800: creation_date = sysdate
1802:
1803: if (l_itemization_parent_id = -1) then
1804: for i in ItemizationChildLines(l_OrigReportLineID) loop
1805:
1806: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1807: SET report_header_id = p_new_expense_report_id,
1808: mileage_rate_adjusted_flag = C_Unchanged,
1809: last_update_date = sysdate,
1810: creation_date = sysdate
1911: FETCH ReportLines into l_OrigReportLineID, l_itemization_parent_id;
1912: EXIT WHEN ReportLines%NOTFOUND;
1913:
1914:
1915: UPDATE AP_EXPENSE_REPORT_LINES_all
1916: SET report_header_id = p_new_expense_report_id,
1917: mileage_rate_adjusted_flag = C_Unchanged,
1918: last_update_date = sysdate,
1919: creation_date = sysdate
1921:
1922: if (l_itemization_parent_id = -1) then
1923: for i in ItemizationChildLines(l_OrigReportLineID) loop
1924:
1925: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1926: SET report_header_id = p_new_expense_report_id,
1927: mileage_rate_adjusted_flag = C_Unchanged,
1928: last_update_date = sysdate,
1929: creation_date = sysdate
2045: DT.PREPARER_MODIFIED_FLAG,
2046: DT.AMOUNT,
2047: DT.COST_CENTER
2048: FROM AP_EXP_REPORT_DISTS_ALL DT,
2049: AP_EXPENSE_REPORT_LINES_ALL DL
2050: WHERE DT.REPORT_LINE_ID = p_line_id
2051: AND DT.REPORT_LINE_ID = DL.REPORT_LINE_ID
2052: AND (DL.ITEMIZATION_PARENT_ID IS NULL
2053: OR
3015:
3016: -- Bug: 8271275, Amount on Parent Line Distributions Not updated
3017: select report_line_id, receipt_currency_code
3018: into l_report_line_id, l_currency_code
3019: from ap_expense_report_lines_all
3020: where report_header_id = p_report_header_id and
3021: distribution_line_number = p_distribution_line_number;
3022:
3023: UPDATE ap_expense_report_lines
3076: -- Bug: 7526203, Populate distributions for split mileage lines
3077: -- Get the parent line to duplicate distributions.
3078: select report_line_id, receipt_currency_code
3079: into l_parent_line_number, l_currency_code
3080: from ap_expense_report_lines_all
3081: where report_header_id = p_mileage_line_array(i).report_header_id and
3082: distribution_line_number = p_mileage_line_array(i).copy_From;
3083:
3084: AddMileageExpLine(
4586: * jrautiai ADJ Fix
4587: * Need the ability to insert a single row, this procedure inserts a row in the
4588: * database, using the data provided in the record given as parameter.
4589: */
4590: PROCEDURE InsertLine(expense_line_rec in AP_EXPENSE_REPORT_LINES_ALL%ROWTYPE) IS
4591: l_debug_info varchar2(240);
4592: BEGIN
4593:
4594: l_debug_info := 'InsertLine';
4592: BEGIN
4593:
4594: l_debug_info := 'InsertLine';
4595:
4596: INSERT INTO AP_EXPENSE_REPORT_LINES_ALL
4597: (REPORT_HEADER_ID,
4598: LAST_UPDATE_DATE,
4599: LAST_UPDATED_BY,
4600: CODE_COMBINATION_ID,
5414: BEGIN
5415: l_cc_lines_exist := 'N';
5416:
5417: /*select 'Y' into l_cc_lines_exist
5418: from ap_expense_report_lines_all
5419: where report_header_id = p_report_header_id
5420: and credit_card_trx_id is not null
5421: and rownum = 1; */
5422: