DBA Data[Home] [Help]

APPS.AP_WEB_DB_EXPLINE_PKG dependencies on AP_EXPENSE_REPORT_LINES

Line 16: FROM AP_EXPENSE_REPORT_LINES

12: l_debugInfo := 'Get ids and amts from expense report lines';
13:
14: OPEN p_cc_cursor FOR
15: SELECT credit_card_trx_id, amount
16: FROM AP_EXPENSE_REPORT_LINES
17: WHERE (REPORT_HEADER_ID = p_reportId)
18: AND (credit_card_trx_id is not null);
19:
20: return TRUE;

Line 86: FROM AP_EXPENSE_REPORT_LINES AERL

82: TO_CHAR(AERL.TASK_ID),
83: AERL.TASK_NUMBER,
84: EXPENDITURE_TYPE,
85: AERL.DISTRIBUTION_LINE_NUMBER
86: FROM AP_EXPENSE_REPORT_LINES AERL
87: WHERE REPORT_HEADER_ID = p_reportId
88: ORDER BY AERL.DISTRIBUTION_LINE_NUMBER;
89: return TRUE;
90: EXCEPTION

Line 198: ap_expense_report_lines XL,

194: nvl(GMS.award_number, '&' || 'nbsp'),
195: av.displayed_field,
196: XL.merchant_name
197: FROM ap_expense_report_params XP,
198: ap_expense_report_lines XL,
199: ap_lookup_codes LC,
200: PA_PROJECTS_ALL PAP, -- AP_WEB_PA_PROJECTS_V PAP, -- bug 1652647
201: PA_TASKS PAT, -- AP_WEB_PA_PROJECTS_TASKS_V PAT, -- bug 1652647
202: GMS_AWARDS GMS,

Line 236: ap_expense_report_lines XL,

232: NULL,
233: av.displayed_field,
234: XL.merchant_name
235: FROM ap_expense_report_params XP,
236: ap_expense_report_lines XL,
237: ap_lookup_codes LC,
238: AP_POL_VIOLATIONS_V AV
239: WHERE XL.report_header_id = p_report_header_id
240: AND XL.web_parameter_id = XP.parameter_id

Line 301: ap_expense_report_lines XL,

297: XL.merchant_name,
298: nvl(XL.flex_concatenated, XH.flex_concatenated),
299: XL.mileage_rate_adjusted_flag
300: FROM ap_expense_report_params XP,
301: ap_expense_report_lines XL,
302: ap_expense_report_headers XH,
303: ap_credit_card_trxns CC,
304: ap_lookup_codes LC,
305: PA_PROJECTS_ALL PAP, -- AP_WEB_PA_PROJECTS_V PAP, -- bug 1652647

Line 348: ap_expense_report_lines XL,

344: XL.merchant_name,
345: nvl(XL.flex_concatenated, XH.flex_concatenated),
346: XL.mileage_rate_adjusted_flag
347: FROM ap_expense_report_params XP,
348: ap_expense_report_lines XL,
349: ap_expense_report_headers XH,
350: ap_credit_card_trxns CC,
351: ap_lookup_codes LC,
352: AP_POL_VIOLATIONS_V AV

Line 393: ap_expense_report_lines XL,

389: XL.merchant_name,
390: nvl(XL.flex_concatenated, XH.flex_concatenated),
391: XL.mileage_rate_adjusted_flag
392: FROM ap_expense_report_params XP,
393: ap_expense_report_lines XL,
394: ap_expense_report_headers XH,
395: ap_lookup_codes LC,
396: PA_PROJECTS_ALL PAP, -- AP_WEB_PA_PROJECTS_V PAP, -- bug 1652647
397: PA_TASKS PAT, -- AP_WEB_PA_PROJECTS_TASKS_V PAT -- bug 1652647

Line 436: ap_expense_report_lines XL,

432: XL.merchant_name,
433: nvl(XL.flex_concatenated, XH.flex_concatenated),
434: XL.mileage_rate_adjusted_flag
435: FROM ap_expense_report_params XP,
436: ap_expense_report_lines XL,
437: ap_expense_report_headers XH,
438: ap_lookup_codes LC,
439: AP_POL_VIOLATIONS_V av
440: WHERE XL.report_header_id = p_report_header_id

Line 498: ap_expense_report_lines XL,

494: XL.credit_card_trx_id,
495: XL.distribution_line_number,
496: XL.MERCHANT_NAME --Bug 2942773
497: FROM ap_expense_report_params XP,
498: ap_expense_report_lines XL,
499: ap_credit_card_trxns CC,
500: ap_lookup_codes LC,
501: PA_PROJECTS_ALL PAP, -- AP_WEB_PA_PROJECTS_V PAP, -- bug 1652647
502: PA_TASKS PAT -- AP_WEB_PA_PROJECTS_TASKS_V PAT -- bug 1652647

Line 532: ap_expense_report_lines XL,

528: XL.credit_card_trx_id,
529: XL.distribution_line_number,
530: XL.MERCHANT_NAME --Bug 2942773
531: FROM ap_expense_report_params XP,
532: ap_expense_report_lines XL,
533: ap_credit_card_trxns CC,
534: ap_lookup_codes LC
535: WHERE XL.report_header_id = p_report_header_id
536: AND XL.web_parameter_id = XP.parameter_id

Line 569: FROM ap_expense_report_lines aerl

565: BEGIN
566:
567: SELECT 'Y'
568: INTO l_temp
569: FROM ap_expense_report_lines aerl
570: WHERE aerl.report_header_id = p_report_header_id
571: AND aerl.adjustment_reason_code is not null
572: AND rownum = 1;
573:

Line 639: FROM ap_expense_report_lines aerl

635: AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','Y')) credit_card_expense_disp,
636: DECODE(aerl.itemization_parent_id,
637: null,AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','N'),
638: AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','Y')) itemized_expense_disp
639: FROM ap_expense_report_lines aerl
640: WHERE aerl.report_header_id in (select p_report_header_id from dual
641: union
642: select aerh1.report_header_id
643: from ap_expense_report_headers_all aerh1

Line 671: FROM ap_expense_report_lines aerl

667: AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','Y')) credit_card_expense_disp,
668: DECODE(aerl.itemization_parent_id,
669: null,AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','N'),
670: AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','Y')) itemized_expense_disp
671: FROM ap_expense_report_lines aerl
672: WHERE aerl.report_header_id = p_report_header_id
673: AND (itemization_parent_id is null OR itemization_parent_id = -1)
674: AND aerl.adjustment_reason_code is not null
675: AND aerl.web_parameter_id <> l_roundingParameterId

Line 698: FROM ap_expense_report_lines aerl

694: AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','Y')) credit_card_expense_disp,
695: DECODE(aerl.itemization_parent_id,
696: null,AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','N'),
697: AP_WEB_POLICY_UTILS.get_lookup_meaning('OIE_AUDIT_YES_NO','Y')) itemized_expense_disp
698: FROM ap_expense_report_lines aerl
699: WHERE aerl.report_header_id = p_report_header_id
700: AND (itemization_parent_id is null OR itemization_parent_id = -1)
701: AND aerl.web_parameter_id <> l_roundingParameterId
702: ORDER BY aerl.distribution_line_number;

Line 764: ap_expense_report_lines XL,

760: XD.cost_center,
761: XL.AP_VALIDATION_ERROR,
762: XL.Report_Line_id
763: FROM ap_expense_report_params XP,
764: ap_expense_report_lines XL,
765: ap_exp_report_dists XD
766: WHERE XL.report_header_id = p_exp_report_id
767: AND XL.web_parameter_id = XP.parameter_id
768: AND XD.report_line_id(+) = XL.report_line_id

Line 794: FROM ap_expense_report_lines aerl,

790: BEGIN
791: SELECT sum(DECODE(aerl.credit_card_trx_id,null,0,aerl.amount)),
792: sum(DECODE(aerl.credit_card_trx_id, null, aerl.amount,0))
793: INTO p_no_receipts_ccard_amt, p_no_receipts_emp_amt
794: FROM ap_expense_report_lines aerl,
795: ap_expense_report_headers aerh
796: WHERE aerl.report_header_id = p_report_header_id
797: AND aerh.report_header_id = aerl.report_header_id
798: AND nvl(aerh.receipts_status,'NONE') <> AP_WEB_RECEIPT_MANAGEMENT_UTIL.C_STATUS_WAIVED

Line 824: FROM ap_expense_report_lines erl,

820: -------------------------------------------------------------------
821: BEGIN
822: SELECT nvl(sum(erl.amount),0)
823: INTO p_personal_total
824: FROM ap_expense_report_lines erl,
825: ap_expense_report_headers aerh,
826: ap_credit_card_trxns cct
827: WHERE erl.report_header_id = p_report_header_id
828: AND aerh.report_header_id = erl.report_header_id

Line 859: FROM ap_expense_report_lines

855: BEGIN
856: --bug 5518553 : exclude itemization parent line
857: SELECT sum(DECODE(credit_card_trx_id, null,amount,0)), sum(DECODE(credit_card_trx_id, null,0,amount))
858: INTO p_policy_emp_amt, p_policy_ccard_amt
859: FROM ap_expense_report_lines
860: WHERE report_header_id = P_report_header_id
861: AND nvl(policy_shortpay_flag, 'N') = 'Y'
862: AND (itemization_parent_id is null OR itemization_parent_id <> -1);
863:

Line 889: FROM ap_expense_report_lines

885: BEGIN
886: -- bug 5518553 : exclude itemization parent line
887: SELECT sum(amount)
888: INTO p_sum_missing_receipts
889: FROM ap_expense_report_lines
890: WHERE report_header_id = p_report_header_id
891: AND amount >= 0
892: AND receipt_missing_flag = 'Y'
893: AND (itemization_parent_id is null OR itemization_parent_id <> -1);

Line 916: from ap_expense_report_lines_all

912: select sum(daily_amount *
913: LPAD(to_char((nvl(end_expense_date,start_expense_date) -
914: start_expense_date)+1),4)) violation_total
915: into p_sum_violations
916: from ap_expense_report_lines_all
917: where report_header_id = p_report_header_id
918: and amount >= 0
919: and receipt_missing_flag <> 'Y'
920: and distribution_line_number in (

Line 952: FROM ap_expense_report_lines erl

948: -- used (itemization_parent_id is null OR itemization_parent_id <> -1)
949: -- as the same condition is used in CalculateAmtsDue
950: SELECT nvl(sum(amount),0)
951: INTO p_personal_total
952: FROM ap_expense_report_lines erl
953: WHERE erl.report_header_id = p_report_header_id
954: AND erl.web_parameter_id = l_personalParameterId
955: AND (itemization_parent_id is null OR itemization_parent_id <> -1);
956:

Line 979: FROM ap_expense_report_lines

975: BEGIN
976: SELECT sum(DECODE(credit_card_trx_id, null,amount,0)),
977: sum(DECODE(credit_card_trx_id, null,0,amount))
978: INTO p_emp_amt, p_ccard_amt
979: FROM ap_expense_report_lines
980: WHERE report_header_id = p_report_header_id
981: AND (itemization_parent_id is null OR itemization_parent_id <> -1);
982:
983: return TRUE;

Line 1003: FROM ap_expense_report_lines

999: -------------------------------------------------------------------
1000: BEGIN
1001: SELECT count(*)
1002: INTO p_num_req_receipts
1003: FROM ap_expense_report_lines
1004: WHERE report_header_id = p_report_header_id
1005: AND nvl(receipt_required_flag, 'N') = 'Y';
1006:
1007: RETURN true;

Line 1027: FROM ap_expense_report_lines aerl,

1023: -----------------------------------------------------------------------------------------------------
1024: BEGIN
1025: SELECT count(*)
1026: INTO p_num_req_receipt_not_verified
1027: FROM ap_expense_report_lines aerl,
1028: ap_expense_report_headers aerh
1029: WHERE aerl.report_header_id = p_report_header_id
1030: AND aerh.report_header_id = aerl.report_header_id
1031: AND nvl(aerh.receipts_status,'NONE') <> AP_WEB_RECEIPT_MANAGEMENT_UTIL.C_STATUS_WAIVED

Line 1055: FROM ap_expense_report_lines aerl,

1051: -------------------------------------------------------------------
1052: BEGIN
1053: SELECT count(*)
1054: INTO p_count
1055: FROM ap_expense_report_lines aerl,
1056: ap_expense_report_headers aerh
1057: WHERE aerl.report_header_id = p_report_header_id
1058: AND aerh.report_header_id = aerl.report_header_id
1059: AND (nvl(aerl.policy_shortpay_flag,'N') = 'Y'

Line 1085: FROM ap_expense_report_lines

1081: -------------------------------------------------------------------
1082: BEGIN
1083: SELECT count(*)
1084: INTO p_num_req_receipts
1085: FROM ap_expense_report_lines
1086: WHERE report_header_id = p_report_header_id
1087: AND nvl(justification_required_flag, 'V') = 'Y'
1088: AND amount >= 0;
1089:

Line 1110: FROM ap_expense_report_lines

1106: -------------------------------------------------------------------
1107: BEGIN
1108: SELECT count(*)
1109: INTO p_count
1110: FROM ap_expense_report_lines
1111: WHERE report_header_id = p_report_header_id;
1112:
1113: return true;
1114:

Line 1132: FROM ap_expense_report_lines

1128: -------------------------------------------------------------------
1129: BEGIN
1130: SELECT count(*)
1131: INTO p_crd_card_count
1132: FROM ap_expense_report_lines
1133: WHERE report_header_id = p_report_header_id
1134: AND credit_card_trx_id IS NOT NULL;
1135:
1136: return TRUE;

Line 1160: FROM ap_expense_report_lines XL,

1156: END IF; /* GetPersonalParamID */
1157:
1158: SELECT count(*)
1159: INTO p_personal_count
1160: FROM ap_expense_report_lines XL,
1161: ap_credit_card_trxns CC
1162: WHERE XL.report_header_id = p_report_header_id
1163: AND XL.credit_card_trx_id is not null
1164: AND CC.trx_id = XL.credit_card_trx_id

Line 1232: C_LinesDescFlexName CONSTANT VARCHAR2(50) := 'AP_EXPENSE_REPORT_LINES';

1228: P_AttributeCol IN AP_WEB_PARENT_PKG.BigString_Array,
1229: i IN NUMBER
1230: ) RETURN BOOLEAN IS
1231: --------------------------------------------------------------------------------
1232: C_LinesDescFlexName CONSTANT VARCHAR2(50) := 'AP_EXPENSE_REPORT_LINES';
1233: l_context_enabled VARCHAR2(1) := 'N';
1234: l_flexfield FND_DFLEX.DFLEX_R;
1235: l_flexinfo FND_DFLEX.DFLEX_DR;
1236: BEGIN

Line 1258: INSERT INTO AP_EXPENSE_REPORT_LINES

1254: END;
1255:
1256: -- chiho: dealing with the case of having invalid parameter id(NULL) hereL:
1257: IF ( p_expLines.parameter_id IS NOT NULL ) THEN
1258: INSERT INTO AP_EXPENSE_REPORT_LINES
1259: (report_header_id,
1260: code_combination_id,
1261: web_parameter_id,
1262: set_of_books_id,

Line 1381: ap_expense_report_lines_s.nextval,

1377: P_AttributeCol(12),
1378: P_AttributeCol(13),
1379: P_AttributeCol(14),
1380: P_AttributeCol(15),
1381: ap_expense_report_lines_s.nextval,
1382: mo_global.get_current_org_id()
1383: FROM ap_expense_report_params
1384: WHERE parameter_id = p_expLines.parameter_id;
1385:

Line 1387: INSERT INTO AP_EXPENSE_REPORT_LINES

1383: FROM ap_expense_report_params
1384: WHERE parameter_id = p_expLines.parameter_id;
1385:
1386: ELSE -- parameter_id IS NULL
1387: INSERT INTO AP_EXPENSE_REPORT_LINES
1388: (report_header_id,
1389: code_combination_id,
1390: web_parameter_id,
1391: set_of_books_id,

Line 1508: ap_expense_report_lines_s.nextval,

1504: P_AttributeCol(12),
1505: P_AttributeCol(13),
1506: P_AttributeCol(14),
1507: P_AttributeCol(15),
1508: ap_expense_report_lines_s.nextval,
1509: mo_global.get_current_org_id() );
1510: END IF;
1511:
1512: RETURN TRUE;

Line 1532: FROM AP_EXPENSE_REPORT_LINES

1528: --------------------------------------------------------------------------------
1529:
1530: CURSOR ReportLines IS
1531: SELECT REPORT_LINE_ID, ITEMIZATION_PARENT_ID
1532: FROM AP_EXPENSE_REPORT_LINES
1533: WHERE REPORT_HEADER_ID = p_orig_expense_report_id
1534: AND nvl(policy_shortpay_flag,'N') = 'Y'
1535: AND nvl(itemization_parent_id,-1) = -1;/*Bug:6131435*/
1536:

Line 1539: FROM AP_EXPENSE_REPORT_LINES

1535: AND nvl(itemization_parent_id,-1) = -1;/*Bug:6131435*/
1536:
1537: CURSOR ItemizationChildLines(p_report_line_id in number) IS
1538: SELECT REPORT_LINE_ID
1539: FROM AP_EXPENSE_REPORT_LINES
1540: WHERE itemization_parent_id = p_report_line_id
1541: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1542:
1543: l_OrigReportLineID expLines_report_line_id;

Line 1544: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

1540: WHERE itemization_parent_id = p_report_line_id
1541: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1542:
1543: l_OrigReportLineID expLines_report_line_id;
1544: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
1545: i number;
1546:
1547: BEGIN
1548:

Line 1556: UPDATE AP_EXPENSE_REPORT_LINES_ALL

1552: LOOP
1553: FETCH ReportLines into l_OrigReportLineID, l_itemization_parent_id;
1554: EXIT WHEN ReportLines%NOTFOUND;
1555:
1556: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1557: SET report_header_id = p_new_expense_report_id,
1558: mileage_rate_adjusted_flag = C_Unchanged,
1559: last_update_date = sysdate,
1560: creation_date = sysdate

Line 1566: UPDATE AP_EXPENSE_REPORT_LINES_ALL

1562:
1563: if (l_itemization_parent_id = -1) then
1564: for i in ItemizationChildLines(l_OrigReportLineID) loop
1565:
1566: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1567: SET report_header_id = p_new_expense_report_id,
1568: mileage_rate_adjusted_flag = C_Unchanged,
1569: last_update_date = sysdate,
1570: creation_date = sysdate

Line 1624: FROM ap_expense_report_lines aerl1

1620: ) RETURN BOOLEAN IS
1621: --------------------------------------------------------------------------------
1622: CURSOR ReportLines IS
1623: SELECT REPORT_LINE_ID, ITEMIZATION_PARENT_ID
1624: FROM ap_expense_report_lines aerl1
1625: WHERE aerl1.report_header_id = p_orig_expense_report_id
1626: AND nvl(itemization_parent_id,-1) = -1 /*Bug# 6131435*/
1627: /* jrautiai ADJ Fix
1628: * We need to move all lines in the itemization when one of them is missing a receipt

Line 1637: FROM ap_expense_report_lines aerl2

1633: AND nvl(aerl1.policy_shortpay_flag, 'N') = 'N'
1634: )
1635: OR
1636: ( EXISTS (SELECT aerl2.report_header_id
1637: FROM ap_expense_report_lines aerl2
1638: WHERE aerl2.report_header_id = aerl1.report_header_id
1639: AND ((aerl1.credit_card_trx_id IS NULL AND aerl2.credit_card_trx_id is NULL AND aerl1.itemization_parent_id = -1 AND aerl2.itemization_parent_id = aerl1.report_line_id)
1640: OR
1641: (aerl1.credit_card_trx_id IS NOT NULL AND aerl2.credit_card_trx_id = aerl1.credit_card_trx_id)

Line 1653: FROM AP_EXPENSE_REPORT_LINES

1649:
1650:
1651: CURSOR ItemizationChildLines(p_report_line_id in number) IS
1652: SELECT REPORT_LINE_ID
1653: FROM AP_EXPENSE_REPORT_LINES
1654: WHERE itemization_parent_id = p_report_line_id
1655: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1656:
1657: l_OrigReportLineID expLines_report_line_id;

Line 1658: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

1654: WHERE itemization_parent_id = p_report_line_id
1655: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1656:
1657: l_OrigReportLineID expLines_report_line_id;
1658: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
1659: i number;
1660:
1661: BEGIN
1662:

Line 1671: UPDATE AP_EXPENSE_REPORT_LINES_all

1667: FETCH ReportLines into l_OrigReportLineID, l_itemization_parent_id;
1668: EXIT WHEN ReportLines%NOTFOUND;
1669:
1670:
1671: UPDATE AP_EXPENSE_REPORT_LINES_all
1672: SET report_header_id = p_new_expense_report_id,
1673: mileage_rate_adjusted_flag = C_Unchanged,
1674: last_update_date = sysdate,
1675: creation_date = sysdate

Line 1681: UPDATE AP_EXPENSE_REPORT_LINES_ALL

1677:
1678: if (l_itemization_parent_id = -1) then
1679: for i in ItemizationChildLines(l_OrigReportLineID) loop
1680:
1681: UPDATE AP_EXPENSE_REPORT_LINES_ALL
1682: SET report_header_id = p_new_expense_report_id,
1683: mileage_rate_adjusted_flag = C_Unchanged,
1684: last_update_date = sysdate,
1685: creation_date = sysdate

Line 1805: AP_EXPENSE_REPORT_LINES_ALL DL

1801: DT.PREPARER_MODIFIED_FLAG,
1802: DT.AMOUNT,
1803: DT.COST_CENTER
1804: FROM AP_EXP_REPORT_DISTS_ALL DT,
1805: AP_EXPENSE_REPORT_LINES_ALL DL
1806: WHERE DT.REPORT_LINE_ID = p_line_id
1807: AND DT.REPORT_LINE_ID = DL.REPORT_LINE_ID
1808: AND (DL.ITEMIZATION_PARENT_ID IS NULL
1809: OR

Line 1818: FROM ap_expense_report_lines erl

1814: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'Start InsertCCLine');
1815:
1816: SELECT AP_WEB_DB_AP_INT_PKG.GetExpenseClearingCCID(credit_card_trx_id)
1817: INTO l_clearning_ccid
1818: FROM ap_expense_report_lines erl
1819: WHERE report_line_id = p_report_line_id;
1820:
1821: INSERT INTO ap_expense_report_lines
1822: (report_header_id,

Line 1821: INSERT INTO ap_expense_report_lines

1817: INTO l_clearning_ccid
1818: FROM ap_expense_report_lines erl
1819: WHERE report_line_id = p_report_line_id;
1820:
1821: INSERT INTO ap_expense_report_lines
1822: (report_header_id,
1823: last_update_date,
1824: last_updated_by,
1825: code_combination_id,

Line 1931: FROM ap_expense_report_lines erl

1927: adjustment_reason_code, -- jrautiai ADJ Fix
1928: submitted_amount, -- jrautiai ADJ Fix
1929: p_new_report_line_id,
1930: allocation_split_code --Bug#6870253
1931: FROM ap_expense_report_lines erl
1932: WHERE report_line_id = p_report_line_id;
1933:
1934: -- for bug 5288256: insert a new row in ap_exp_report_dists_all table
1935: SELECT GL.SEGMENT1, GL.SEGMENT2,GL.SEGMENT3,GL.SEGMENT4, GL.SEGMENT5, GL.SEGMENT6,

Line 2086: FROM AP_EXPENSE_REPORT_LINES

2082: i number;
2083:
2084: CURSOR ReportLines IS
2085: SELECT REPORT_LINE_ID
2086: FROM AP_EXPENSE_REPORT_LINES
2087: WHERE REPORT_HEADER_ID = P_source_report_header_id
2088: AND ITEMIZATION_PARENT_ID = p_source_parent_report_line_id;
2089:
2090: BEGIN

Line 2098: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

2094:
2095: FOR i in ReportLines LOOP
2096:
2097: -- Get new ID from sequence
2098: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
2099: INTO l_NewReportLineID
2100: FROM DUAL;
2101:
2102: InsertCCLine(p_new_report_header_id => p_target_report_header_id,

Line 2126: FROM ap_expense_report_lines

2122: ) RETURN BOOLEAN IS
2123: --------------------------------------------------------------------------------
2124: CURSOR CCReportLines IS
2125: SELECT report_line_id, itemization_parent_id, distribution_line_number
2126: FROM ap_expense_report_lines
2127: WHERE report_header_id = p_report_header_id
2128: AND credit_card_trx_id IS NOT NULL
2129: AND (itemization_parent_id is null
2130: OR

Line 2141: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

2137:
2138: for i in CCReportLines loop
2139:
2140: -- Get new ID from sequence
2141: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
2142: INTO l_NewReportLineID
2143: FROM DUAL;
2144:
2145: InsertCCLine(p_new_report_header_id => p_new_report_id,

Line 2183: FROM OIE_ADDON_MILEAGE_RATES addon, AP_EXPENSE_REPORT_LINES el

2179: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2180: -- EMPLOYEE_FLAG is used as a place holder.
2181: CURSOR addonRates IS
2182: SELECT ADDON_RATE_TYPE
2183: FROM OIE_ADDON_MILEAGE_RATES addon, AP_EXPENSE_REPORT_LINES el
2184: WHERE (el.REPORT_HEADER_ID = P_ReportID AND
2185: el.REPORT_LINE_ID = addon.REPORT_LINE_ID)
2186: FOR UPDATE OF ADDON_RATE_TYPE NOWAIT;
2187:

Line 2225: FROM OIE_PDM_DAILY_BREAKUPS db, AP_EXPENSE_REPORT_LINES el

2221: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2222: -- EMPLOYEE_FLAG is used as a place holder.
2223: CURSOR dailyBreakup IS
2224: SELECT PDM_DAILY_BREAKUP_ID
2225: FROM OIE_PDM_DAILY_BREAKUPS db, AP_EXPENSE_REPORT_LINES el
2226: WHERE (el.REPORT_HEADER_ID = P_ReportID AND
2227: el.REPORT_LINE_ID = db.REPORT_LINE_ID)
2228: FOR UPDATE OF PDM_DESTINATION_ID NOWAIT;
2229:

Line 2267: FROM OIE_PDM_DESTINATIONS db, AP_EXPENSE_REPORT_LINES el

2263: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2264: -- EMPLOYEE_FLAG is used as a place holder.
2265: CURSOR pdmDestination IS
2266: SELECT PDM_DESTINATION_ID
2267: FROM OIE_PDM_DESTINATIONS db, AP_EXPENSE_REPORT_LINES el
2268: WHERE (el.REPORT_HEADER_ID = P_ReportID AND
2269: el.REPORT_LINE_ID = db.REPORT_LINE_ID)
2270: FOR UPDATE OF PDM_DESTINATION_ID NOWAIT;
2271:

Line 2312: FROM AP_EXPENSE_REPORT_LINES

2308: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2309: -- REPORT_HEADER_ID is used as a place holder.
2310: CURSOR ReportLines IS
2311: SELECT REPORT_HEADER_ID, REPORT_LINE_ID
2312: FROM AP_EXPENSE_REPORT_LINES
2313: WHERE (REPORT_HEADER_ID = P_ReportID)
2314: FOR UPDATE OF REPORT_HEADER_ID NOWAIT;
2315:
2316: BEGIN

Line 2340: DELETE AP_EXPENSE_REPORT_LINES WHERE CURRENT OF ReportLines;

2336: FETCH ReportLines into l_TempReportHeaderID, l_TempReportLineID;
2337: EXIT WHEN ReportLines%NOTFOUND;
2338:
2339: -- Delete matching line
2340: DELETE AP_EXPENSE_REPORT_LINES WHERE CURRENT OF ReportLines;
2341:
2342: /* Delete attachments assocated with the line */
2343: fnd_attached_documents2_pkg.delete_attachments(
2344: X_entity_name => 'OIE_LINE_ATTACHMENTS',

Line 2378: DELETE FROM ap_expense_report_lines

2374: return FALSE;
2375: END IF; /* GetPersonalParamID */
2376:
2377:
2378: DELETE FROM ap_expense_report_lines
2379: WHERE web_parameter_id = l_personalParameterId
2380: AND report_header_id = p_report_header_id;
2381:
2382: return TRUE;

Line 2397: DELETE FROM ap_expense_report_lines

2393: --------------------------------------------------------------------------------
2394: FUNCTION DeleteCreditReportLines(p_report_header_id IN expLines_headerID) RETURN BOOLEAN IS
2395: --------------------------------------------------------------------------------
2396: BEGIN
2397: DELETE FROM ap_expense_report_lines
2398: WHERE report_header_id = p_report_header_id
2399: AND credit_card_trx_id IS NOT NULL;
2400:
2401: return TRUE;

Line 2420: UPDATE ap_expense_report_lines RL

2416: p_ven_awt_group_id IN expLines_awtGroupID
2417: ) RETURN BOOLEAN IS
2418: --------------------------------------------------------------------------------
2419: BEGIN
2420: UPDATE ap_expense_report_lines RL
2421: SET awt_group_id = decode(p_sys_allow_awt_flag, 'Y',
2422: decode(p_ven_allow_awt_flag, 'Y', p_ven_awt_group_id,
2423: null), null),
2424: justification_required_flag = (SELECT nvl(justification_required_flag,'V')

Line 2445: UPDATE ap_expense_report_lines

2441: p_flag IN expLines_receiptMissingFlag)
2442: RETURN BOOLEAN IS
2443: -------------------------------------------------------------------
2444: BEGIN
2445: UPDATE ap_expense_report_lines
2446: SET receipt_missing_flag = p_flag
2447: WHERE report_header_id = p_report_header_id;
2448:
2449: return TRUE;

Line 2466: UPDATE ap_expense_report_lines

2462: p_required_flag IN expLines_receiptReqdFlag
2463: ) RETURN BOOLEAN IS
2464: --------------------------------------------------------------------------------
2465: BEGIN
2466: UPDATE ap_expense_report_lines
2467: SET receipt_required_flag = p_required_flag
2468: WHERE nvl(receipt_missing_flag, 'N') = 'Y'
2469: AND report_header_id = p_report_header_id;
2470:

Line 2502: FROM ap_expense_report_lines erl,

2498: decode(erl.web_parameter_id,l_parameterId, 'PERSONAL', 'BUSINESS'),
2499: erl.org_id,
2500: nvl(cc.transaction_date,sysdate),
2501: erh.employee_id
2502: FROM ap_expense_report_lines erl,
2503: ap_credit_card_trxns cc,
2504: ap_expense_report_headers erh
2505: WHERE erl.report_header_id = erh.report_header_id
2506: AND nvl(erl.itemization_parent_id,0) <> -1 /* Itemization Project */

Line 2554: FROM ap_expense_report_lines erl,

2550: end if;
2551:
2552: SELECT sum(erl.amount)
2553: INTO l_prepaid_amt
2554: FROM ap_expense_report_lines erl,
2555: ap_credit_card_trxns cc
2556: WHERE erl.report_header_id = p_expReportHeaderId
2557: AND cc.trx_id = erl.credit_card_trx_id -- is a credit card transaction
2558: AND (cc.category is null OR cc.category <> 'PERSONAL') -- not a personal expense

Line 2610: from ap_expense_report_lines

2606:
2607: BEGIN
2608: select receipt_missing_flag
2609: into p_missing_receipts_flag
2610: from ap_expense_report_lines
2611: where report_header_id = p_report_header_id
2612: and receipt_missing_flag = 'Y'
2613: and rownum = 1;
2614:

Line 2670: ap_expense_report_lines XL,

2666: XL.attribute14,
2667: XL.attribute15,
2668: XL.report_line_id
2669: FROM ap_expense_report_params XP,
2670: ap_expense_report_lines XL,
2671: ap_lookup_codes LC,
2672: PA_PROJECTS_ALL PAP,
2673: PA_TASKS PAT,
2674: GMS_AWARDS GMS

Line 2719: ap_expense_report_lines XL,

2715: XL.attribute14,
2716: XL.attribute15,
2717: XL.report_line_id
2718: FROM ap_expense_report_params XP,
2719: ap_expense_report_lines XL,
2720: ap_lookup_codes LC
2721: WHERE XL.report_header_id = p_report_header_id
2722: AND XL.web_parameter_id = XP.parameter_id
2723: AND XL.line_type_lookup_code = LC.lookup_code

Line 2757: UPDATE ap_expense_report_lines

2753: --------------------------------------------------------------------------------
2754: l_debug_info VARCHAR2(200);
2755: BEGIN
2756:
2757: UPDATE ap_expense_report_lines
2758: SET avg_mileage_rate = p_avg_mileage_rate,
2759: amount = p_amount,
2760: distribution_line_number = p_new_dist_line_number,
2761: trip_distance = p_trip_distance,

Line 2872: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

2868: BEGIN
2869:
2870: l_debug_info := 'start of AddMileageExpLine';
2871:
2872: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
2873: INTO l_report_line_id
2874: FROM DUAL;
2875:
2876:

Line 2877: INSERT INTO ap_expense_report_lines

2873: INTO l_report_line_id
2874: FROM DUAL;
2875:
2876:
2877: INSERT INTO ap_expense_report_lines
2878: (REPORT_HEADER_ID,
2879: LAST_UPDATE_DATE,
2880: LAST_UPDATED_BY,
2881: CODE_COMBINATION_ID,

Line 3170: FROM ap_expense_report_lines

3166: ADJUSTMENT_REASON_CODE,
3167: LOCATION,
3168: AP_VALIDATION_ERROR,
3169: l_report_line_id
3170: FROM ap_expense_report_lines
3171: WHERE report_header_id = p_orig_expense_report_id
3172: AND distribution_line_number = p_orig_dist_line_number;
3173:
3174: ---------------------------------------------------------------

Line 3200: FROM AP_EXPENSE_REPORT_LINES

3196: CREATED_BY,
3197: SYSDATE
3198: FROM OIE_ADDON_MILEAGE_RATES
3199: WHERE REPORT_LINE_ID = (SELECT REPORT_LINE_ID
3200: FROM AP_EXPENSE_REPORT_LINES
3201: WHERE REPORT_HEADER_ID = P_ORIG_EXPENSE_REPORT_ID
3202: AND DISTRIBUTION_LINE_NUMBER = P_ORIG_DIST_LINE_NUMBER
3203: AND ROWNUM = 1);
3204:

Line 3225: FROM AP_EXPENSE_REPORT_LINES

3221: IS
3222: l_category_code VARCHAR2(30);
3223: BEGIN
3224: SELECT CATEGORY_CODE INTO L_CATEGORY_CODE
3225: FROM AP_EXPENSE_REPORT_LINES
3226: WHERE REPORT_LINE_ID = P_FROM_REPORT_LINE_ID;
3227:
3228: IF (L_CATEGORY_CODE = 'MILEAGE') THEN
3229: -- COPY ADDITIONAL MILEAGE RATE

Line 3262: FROM AP_EXPENSE_REPORT_LINES

3258: IS
3259: l_category_code VARCHAR2(30);
3260: BEGIN
3261: SELECT CATEGORY_CODE INTO L_CATEGORY_CODE
3262: FROM AP_EXPENSE_REPORT_LINES
3263: WHERE REPORT_LINE_ID = P_FROM_REPORT_LINE_ID;
3264:
3265: IF (L_CATEGORY_CODE = 'PER_DIEM') THEN
3266: -- COPY PDM DAILY BREAKUP

Line 3326: FROM AP_EXPENSE_REPORT_LINES

3322: IS
3323: l_category_code VARCHAR2(30);
3324: BEGIN
3325: SELECT CATEGORY_CODE INTO L_CATEGORY_CODE
3326: FROM AP_EXPENSE_REPORT_LINES
3327: WHERE REPORT_LINE_ID = P_FROM_REPORT_LINE_ID;
3328:
3329: IF (L_CATEGORY_CODE = 'PER_DIEM') THEN
3330: -- COPY PDM DESTINATION

Line 3380: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;

3376: l_TempReportLineID expLines_report_line_id;
3377: l_NewReportLineID expLines_report_line_id;
3378:
3379: -- Bug 6689280 (sodash)
3380: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3381: -- Bug 7555144 - Swapping to and from Currency Codes
3382: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

Line 3382: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;

3378:
3379: -- Bug 6689280 (sodash)
3380: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3381: -- Bug 7555144 - Swapping to and from Currency Codes
3382: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;

Line 3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;

3379: -- Bug 6689280 (sodash)
3380: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3381: -- Bug 7555144 - Swapping to and from Currency Codes
3382: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3387: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;

Line 3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

3380: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3381: -- Bug 7555144 - Swapping to and from Currency Codes
3382: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3387: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3388: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

Line 3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;

3381: -- Bug 7555144 - Swapping to and from Currency Codes
3382: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3387: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3388: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3389: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.

Line 3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;

3382: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3387: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3388: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3389: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3390: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;

Line 3387: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;

3383: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3387: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3388: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3389: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3390: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
3391:

Line 3388: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

3384: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3385: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3386: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3387: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3388: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3389: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3390: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
3391:
3392: -- Bug 7555144 - Changing the order to match with the from and to currencies

Line 3395: FROM AP_EXPENSE_REPORT_LINES

3391:
3392: -- Bug 7555144 - Changing the order to match with the from and to currencies
3393: CURSOR ReportLines IS
3394: SELECT report_line_id, receipt_currency_code, currency_code, (start_expense_date+AP_WEB_DB_EXPLINE_PKG.C_NumDaysRollForward), receipt_currency_amount
3395: FROM AP_EXPENSE_REPORT_LINES
3396: WHERE REPORT_HEADER_ID = P_source_report_header_id
3397: AND CREDIT_CARD_TRX_ID is null
3398: AND ITEMIZATION_PARENT_ID = p_source_parent_report_line_id;
3399: -- Bug 7150383(sodash) get the total of child lines and update the total of the parent line

Line 3402: FROM ap_expense_report_lines ael

3398: AND ITEMIZATION_PARENT_ID = p_source_parent_report_line_id;
3399: -- Bug 7150383(sodash) get the total of child lines and update the total of the parent line
3400: CURSOR update_new_parent_line_amt_c IS
3401: SELECT ael.*
3402: FROM ap_expense_report_lines ael
3403: WHERE report_header_id = p_target_report_header_id
3404: AND report_line_id = p_target_parent_report_line_id
3405: FOR UPDATE OF report_header_id, report_line_id NOWAIT;
3406:

Line 3422: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

3418: FETCH ReportLines into l_TempReportLineID, l_from_currency_code, l_to_currency_code, l_exchange_date, l_amount;
3419: EXIT WHEN ReportLines%NOTFOUND;
3420:
3421: -- Get new ID from sequence
3422: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
3423: INTO l_NewReportLineID
3424: FROM DUAL;
3425:
3426: -- Bug 6689280 (sodash)

Line 3459: insert into AP_EXPENSE_REPORT_LINES

3455: l_amount := null;
3456: END IF;
3457:
3458: -- For each line, duplicate its columns
3459: insert into AP_EXPENSE_REPORT_LINES
3460: (
3461: REPORT_HEADER_ID,
3462: CODE_COMBINATION_ID,
3463: ITEM_DESCRIPTION,

Line 3723: from AP_EXPENSE_REPORT_LINES

3719: p_user_id AS CREATED_BY,
3720: sysdate AS LAST_UPDATE_DATE,
3721: p_user_id AS LAST_UPDATED_BY,
3722: l_NewReportLineID
3723: from AP_EXPENSE_REPORT_LINES
3724: where REPORT_LINE_ID = l_TempReportLineID;
3725: l_lines_total := l_lines_total+l_amount;
3726: -- Duplicate distribution lines associated with this line
3727: AP_WEB_DB_EXPDIST_PKG.DuplicateDistributions(

Line 3755: UPDATE ap_expense_report_lines

3751: -- Bug 7150383(sodash) get the total of child lines and update the total of the parent line
3752: OPEN update_new_parent_line_amt_c;
3753: FETCH update_new_parent_line_amt_c into l_parent_line_rec;
3754:
3755: UPDATE ap_expense_report_lines
3756: SET amount = l_lines_total
3757: WHERE CURRENT OF update_new_parent_line_amt_c;
3758:
3759: CLOSE update_new_parent_line_amt_c;

Line 3783: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;

3779: l_TempReportLineID expLines_report_line_id;
3780: l_NewReportLineID expLines_report_line_id;
3781:
3782: -- Bug 6689280 (sodash)
3783: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3784: -- Bug 7555144 - Swapping to and from Currency Codes
3785: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

Line 3785: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;

3781:
3782: -- Bug 6689280 (sodash)
3783: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3784: -- Bug 7555144 - Swapping to and from Currency Codes
3785: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3788: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;

Line 3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;

3782: -- Bug 6689280 (sodash)
3783: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3784: -- Bug 7555144 - Swapping to and from Currency Codes
3785: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3788: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3790: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

Line 3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

3783: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3784: -- Bug 7555144 - Swapping to and from Currency Codes
3785: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3788: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3790: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3791: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.

Line 3788: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;

3784: -- Bug 7555144 - Swapping to and from Currency Codes
3785: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3788: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3790: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3791: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3792: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;

Line 3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;

3785: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3788: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3790: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3791: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3792: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
3793: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

Line 3790: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

3786: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3787: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3788: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3790: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3791: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3792: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
3793: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
3794:

Line 3793: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

3789: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type;
3790: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3791: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3792: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
3793: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
3794:
3795: -- Bug 7555144 - Changing the Order to match with the from and to currencies
3796: CURSOR ReportLines IS
3797: SELECT report_line_id, itemization_parent_id, receipt_currency_code, currency_code, (start_expense_date+AP_WEB_DB_EXPLINE_PKG.C_NumDaysRollForward), receipt_currency_amount

Line 3798: FROM AP_EXPENSE_REPORT_LINES

3794:
3795: -- Bug 7555144 - Changing the Order to match with the from and to currencies
3796: CURSOR ReportLines IS
3797: SELECT report_line_id, itemization_parent_id, receipt_currency_code, currency_code, (start_expense_date+AP_WEB_DB_EXPLINE_PKG.C_NumDaysRollForward), receipt_currency_amount
3798: FROM AP_EXPENSE_REPORT_LINES
3799: WHERE REPORT_HEADER_ID = P_source_report_header_id
3800: AND CREDIT_CARD_TRX_ID is null
3801: AND (ITEMIZATION_PARENT_ID is null
3802: OR

Line 3818: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

3814: FETCH ReportLines into l_TempReportLineID,l_itemization_parent_id,l_from_currency_code, l_to_currency_code, l_exchange_date, l_amount;
3815: EXIT WHEN ReportLines%NOTFOUND;
3816:
3817: -- Get new ID from sequence
3818: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
3819: INTO l_NewReportLineID
3820: FROM DUAL;
3821:
3822: -- Bug 6689280 (sodash)

Line 3854: insert into AP_EXPENSE_REPORT_LINES

3850: l_amount := null;
3851: END IF;
3852:
3853: -- For each line, duplicate its columns
3854: insert into AP_EXPENSE_REPORT_LINES
3855: (
3856: REPORT_HEADER_ID,
3857: CODE_COMBINATION_ID,
3858: ITEM_DESCRIPTION,

Line 4118: from AP_EXPENSE_REPORT_LINES

4114: p_user_id AS CREATED_BY,
4115: sysdate AS LAST_UPDATE_DATE,
4116: p_user_id AS LAST_UPDATED_BY,
4117: l_NewReportLineID
4118: from AP_EXPENSE_REPORT_LINES
4119: where REPORT_LINE_ID = l_TempReportLineID;
4120:
4121: if (l_itemization_parent_id = '-1') then
4122: CopyItemizationChildLines(p_user_id,

Line 4166: UPDATE ap_expense_report_lines

4162: BEGIN
4163:
4164: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'start ResetAPValidationErrors');
4165:
4166: UPDATE ap_expense_report_lines
4167: SET ap_validation_error = ''
4168: WHERE report_header_id = p_report_header_id;
4169:
4170: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'end ResetAPValidationErrors');

Line 4194: UPDATE ap_expense_report_lines

4190: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'start UpdateAPValidationError');
4191:
4192: /* Bug 3637166 : Doing a substrb before updation */
4193:
4194: UPDATE ap_expense_report_lines
4195: SET ap_validation_error = substrb(ap_validation_error||p_ap_validation_error,1,240)
4196: WHERE report_header_id = p_report_header_id
4197: AND distribution_line_number = p_dist_line_number;
4198:

Line 4219: UPDATE ap_expense_report_lines

4215: BEGIN
4216:
4217: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'start resetAPflags');
4218:
4219: UPDATE ap_expense_report_lines
4220: SET receipt_verified_flag = null,
4221: policy_shortpay_flag = null,
4222: adjustment_reason = null
4223: WHERE report_header_id = p_report_header_id;

Line 4250: FROM ap_expense_report_lines

4246: -------------------------------------------------------------------
4247: BEGIN
4248: SELECT count(*)
4249: INTO p_count
4250: FROM ap_expense_report_lines
4251: WHERE report_header_id = p_report_header_id
4252: AND merchant_name IS NOT NULL
4253: AND credit_card_trx_id IS NULL;
4254:

Line 4276: PROCEDURE InsertLine(expense_line_rec in AP_EXPENSE_REPORT_LINES_ALL%ROWTYPE) IS

4272: * jrautiai ADJ Fix
4273: * Need the ability to insert a single row, this procedure inserts a row in the
4274: * database, using the data provided in the record given as parameter.
4275: */
4276: PROCEDURE InsertLine(expense_line_rec in AP_EXPENSE_REPORT_LINES_ALL%ROWTYPE) IS
4277: l_debug_info varchar2(240);
4278: BEGIN
4279:
4280: l_debug_info := 'InsertLine';

Line 4282: INSERT INTO AP_EXPENSE_REPORT_LINES_ALL

4278: BEGIN
4279:
4280: l_debug_info := 'InsertLine';
4281:
4282: INSERT INTO AP_EXPENSE_REPORT_LINES_ALL
4283: (REPORT_HEADER_ID,
4284: LAST_UPDATE_DATE,
4285: LAST_UPDATED_BY,
4286: CODE_COMBINATION_ID,

Line 4577: ap_expense_report_lines_s.nextval);

4573: expense_line_rec.CATEGORY_CODE,
4574: expense_line_rec.ADJUSTMENT_REASON_CODE,
4575: expense_line_rec.AP_VALIDATION_ERROR,
4576: expense_line_rec.SUBMITTED_AMOUNT,
4577: ap_expense_report_lines_s.nextval);
4578:
4579: EXCEPTION
4580: WHEN TOO_MANY_ROWS OR NO_DATA_FOUND THEN
4581: AP_WEB_DB_UTIL_PKG.RaiseException('InsertLine','',

Line 4638: FROM ap_expense_report_lines

4634: sum(DECODE(web_parameter_id,
4635: l_personalParameterId,0,
4636: AMOUNT))
4637: INTO l_cash_amt, l_ccard_amt, l_total_amt
4638: FROM ap_expense_report_lines
4639: WHERE report_header_id = p_report_header_id
4640: AND (itemization_parent_id is null OR itemization_parent_id <> -1);
4641:
4642: l_cash_amt := NVL(l_cash_amt,0);

Line 4747: FROM ap_expense_report_lines

4743: -----------------------------------------------------------------------------------------------------
4744: BEGIN
4745: SELECT count(*)
4746: INTO p_count
4747: FROM ap_expense_report_lines
4748: WHERE report_header_id = p_report_header_id
4749: AND nvl(policy_shortpay_flag, 'N') = 'Y';
4750:
4751: RETURN true;

Line 4767: FROM ap_expense_report_lines aerl

4763: RETURN BOOLEAN IS
4764:
4765: CURSOR result_cur IS
4766: SELECT sum(amount), sum(nvl(submitted_amount,0))
4767: FROM ap_expense_report_lines aerl
4768: WHERE aerl.report_header_id = p_report_header_id
4769: AND (itemization_parent_id is null OR itemization_parent_id = -1)
4770: AND aerl.credit_card_trx_id is null ;
4771:

Line 4774: FROM ap_expense_report_lines aerl

4770: AND aerl.credit_card_trx_id is null ;
4771:
4772: CURSOR cc_result_cur IS
4773: SELECT report_header_id
4774: FROM ap_expense_report_lines aerl
4775: WHERE aerl.report_header_id = p_report_header_id
4776: AND (itemization_parent_id is null OR itemization_parent_id = -1)
4777: AND aerl.credit_card_trx_id is not null
4778: AND NVL(submitted_amount,amount) <> amount;

Line 4821: UPDATE ap_expense_report_lines

4817: PROCEDURE ResetShortpayAdjustmentInfo(p_report_header_id IN expLines_headerID) IS
4818: BEGIN
4819:
4820:
4821: UPDATE ap_expense_report_lines
4822: SET submitted_amount = amount
4823: WHERE report_header_id = p_report_header_id;
4824:
4825: EXCEPTION

Line 4932: AND NOT EXISTS(SELECT 1 from AP_EXPENSE_REPORT_LINES XL

4928: AND XH.total = 0
4929: AND alc.lookup_type = 'PAYMENT_DUE_FROM'
4930: AND alc.lookup_code = CC.payment_due_from_code
4931: AND alc.lookup_code = 'BOTH'
4932: AND NOT EXISTS(SELECT 1 from AP_EXPENSE_REPORT_LINES XL
4933: WHERE XH.report_header_id = XL.report_header_id);
4934: return TRUE;
4935: EXCEPTION
4936: WHEN NO_DATA_FOUND THEN

Line 4967: AND NOT EXISTS(SELECT 1 from AP_EXPENSE_REPORT_LINES XL

4963: AND XH.total = 0
4964: AND alc.lookup_type = 'PAYMENT_DUE_FROM'
4965: AND alc.lookup_code = CC.payment_due_from_code
4966: AND alc.lookup_code = 'BOTH'
4967: AND NOT EXISTS(SELECT 1 from AP_EXPENSE_REPORT_LINES XL
4968: WHERE XH.report_header_id = XL.report_header_id);
4969: return true;
4970:
4971: EXCEPTION

Line 4993: UPDATE ap_expense_report_lines aerl

4989:
4990: BEGIN
4991: AP_WEB_UTILITIES_PKG.logProcedure('AP_WEB_DB_EXPRPT_PKG', 'start clearAuditReturnReasonInstr');
4992:
4993: UPDATE ap_expense_report_lines aerl
4994: SET aerl.adjustment_reason_code = '',
4995: aerl.adjustment_reason = '',
4996: aerl.policy_shortpay_flag = '' -- Bug 3683276
4997: WHERE aerl.report_header_id = p_report_header_id;

Line 5046: FROM AP_EXPENSE_REPORT_LINES AERL

5042: OPEN p_line_cursor FOR
5043: SELECT AERL.report_line_id,
5044: AERL.code_combination_id,
5045: AERL.amount
5046: FROM AP_EXPENSE_REPORT_LINES AERL
5047: WHERE REPORT_HEADER_ID = p_reportId;
5048:
5049: return TRUE;
5050:

Line 5102: from ap_expense_report_lines_all

5098: BEGIN
5099: l_cc_lines_exist := 'N';
5100:
5101: select 'Y' into l_cc_lines_exist
5102: from ap_expense_report_lines_all
5103: where report_header_id = p_report_header_id
5104: and credit_card_trx_id is not null
5105: and rownum = 1;
5106: