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: AND (itemization_parent_id IS NULL OR
20: itemization_parent_id <> -1);

Line 88: FROM AP_EXPENSE_REPORT_LINES AERL

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

Line 200: ap_expense_report_lines XL,

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

Line 238: ap_expense_report_lines XL,

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

Line 303: ap_expense_report_lines XL,

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

Line 350: ap_expense_report_lines XL,

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

Line 395: ap_expense_report_lines XL,

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

Line 438: ap_expense_report_lines XL,

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

Line 500: ap_expense_report_lines XL,

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

Line 534: ap_expense_report_lines XL,

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

Line 571: FROM ap_expense_report_lines aerl

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

Line 641: FROM ap_expense_report_lines aerl

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

Line 673: FROM ap_expense_report_lines aerl

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

Line 700: FROM ap_expense_report_lines aerl

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

Line 766: ap_expense_report_lines XL,

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

Line 796: FROM ap_expense_report_lines aerl,

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

Line 826: FROM ap_expense_report_lines erl,

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

Line 861: FROM ap_expense_report_lines

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

Line 891: FROM ap_expense_report_lines

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

Line 918: from ap_expense_report_lines_all

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 (

Line 954: FROM ap_expense_report_lines erl

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

Line 981: FROM ap_expense_report_lines

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

Line 1005: FROM ap_expense_report_lines

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

Line 1029: FROM ap_expense_report_lines aerl,

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

Line 1057: FROM ap_expense_report_lines aerl,

1053: -------------------------------------------------------------------
1054: BEGIN
1055: SELECT count(*)
1056: INTO p_count
1057: FROM ap_expense_report_lines aerl,
1058: ap_expense_report_headers aerh
1059: WHERE aerl.report_header_id = p_report_header_id
1060: AND (aerl.itemization_parent_id is null or aerl.itemization_parent_id = -1)
1061: AND aerh.report_header_id = aerl.report_header_id

Line 1090: FROM ap_expense_report_lines

1086: -------------------------------------------------------------------
1087: BEGIN
1088: SELECT count(*)
1089: INTO p_num_req_receipts
1090: FROM ap_expense_report_lines
1091: WHERE report_header_id = p_report_header_id
1092: AND nvl(justification_required_flag, 'V') = 'Y'
1093: AND amount >= 0;
1094:

Line 1115: FROM ap_expense_report_lines

1111: -------------------------------------------------------------------
1112: BEGIN
1113: SELECT count(*)
1114: INTO p_count
1115: FROM ap_expense_report_lines
1116: WHERE report_header_id = p_report_header_id;
1117:
1118: return true;
1119:

Line 1137: FROM ap_expense_report_lines

1133: -------------------------------------------------------------------
1134: BEGIN
1135: SELECT count(*)
1136: INTO p_crd_card_count
1137: FROM ap_expense_report_lines
1138: WHERE report_header_id = p_report_header_id
1139: AND credit_card_trx_id IS NOT NULL;
1140:
1141: return TRUE;

Line 1165: FROM ap_expense_report_lines XL,

1161: END IF; /* GetPersonalParamID */
1162:
1163: SELECT count(*)
1164: INTO p_personal_count
1165: FROM ap_expense_report_lines XL,
1166: ap_credit_card_trxns CC
1167: WHERE XL.report_header_id = p_report_header_id
1168: AND XL.credit_card_trx_id is not null
1169: AND CC.trx_id = XL.credit_card_trx_id

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

1233: P_AttributeCol IN AP_WEB_PARENT_PKG.BigString_Array,
1234: i IN NUMBER
1235: ) RETURN BOOLEAN IS
1236: --------------------------------------------------------------------------------
1237: C_LinesDescFlexName CONSTANT VARCHAR2(50) := 'AP_EXPENSE_REPORT_LINES';
1238: l_context_enabled VARCHAR2(1) := 'N';
1239: l_flexfield FND_DFLEX.DFLEX_R;
1240: l_flexinfo FND_DFLEX.DFLEX_DR;
1241: BEGIN

Line 1263: INSERT INTO AP_EXPENSE_REPORT_LINES

1259: END;
1260:
1261: -- chiho: dealing with the case of having invalid parameter id(NULL) hereL:
1262: IF ( p_expLines.parameter_id IS NOT NULL ) THEN
1263: INSERT INTO AP_EXPENSE_REPORT_LINES
1264: (report_header_id,
1265: code_combination_id,
1266: web_parameter_id,
1267: set_of_books_id,

Line 1386: ap_expense_report_lines_s.nextval,

1382: P_AttributeCol(12),
1383: P_AttributeCol(13),
1384: P_AttributeCol(14),
1385: P_AttributeCol(15),
1386: ap_expense_report_lines_s.nextval,
1387: mo_global.get_current_org_id()
1388: FROM ap_expense_report_params
1389: WHERE parameter_id = p_expLines.parameter_id;
1390:

Line 1392: INSERT INTO AP_EXPENSE_REPORT_LINES

1388: FROM ap_expense_report_params
1389: WHERE parameter_id = p_expLines.parameter_id;
1390:
1391: ELSE -- parameter_id IS NULL
1392: INSERT INTO AP_EXPENSE_REPORT_LINES
1393: (report_header_id,
1394: code_combination_id,
1395: web_parameter_id,
1396: set_of_books_id,

Line 1513: ap_expense_report_lines_s.nextval,

1509: P_AttributeCol(12),
1510: P_AttributeCol(13),
1511: P_AttributeCol(14),
1512: P_AttributeCol(15),
1513: ap_expense_report_lines_s.nextval,
1514: mo_global.get_current_org_id() );
1515: END IF;
1516:
1517: RETURN TRUE;

Line 1537: FROM AP_EXPENSE_REPORT_LINES

1533: --------------------------------------------------------------------------------
1534:
1535: CURSOR ReportLines IS
1536: SELECT REPORT_LINE_ID, ITEMIZATION_PARENT_ID
1537: FROM AP_EXPENSE_REPORT_LINES
1538: WHERE REPORT_HEADER_ID = p_orig_expense_report_id
1539: AND nvl(policy_shortpay_flag,'N') = 'Y'
1540: AND nvl(itemization_parent_id,-1) = -1;/*Bug:6131435*/
1541:

Line 1544: FROM AP_EXPENSE_REPORT_LINES

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

Line 1549: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

1545: WHERE itemization_parent_id = p_report_line_id
1546: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1547:
1548: l_OrigReportLineID expLines_report_line_id;
1549: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
1550: i number;
1551:
1552: BEGIN
1553:

Line 1561: UPDATE AP_EXPENSE_REPORT_LINES_ALL

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

Line 1571: UPDATE AP_EXPENSE_REPORT_LINES_ALL

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

Line 1629: FROM ap_expense_report_lines aerl1

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

Line 1643: FROM ap_expense_report_lines aerl2

1639: AND nvl(aerl1.adjustment_reason_code, nvl(aerl1.adjustment_reason_copy,'X')) IN ('MISSING_RECEIPT', 'ORIGINAL_RECEIPTS_MISSING', 'MISSING_POLICY_INFO', 'POLICY_VIOLATION')
1640: )
1641: OR
1642: ( EXISTS (SELECT aerl2.report_header_id
1643: FROM ap_expense_report_lines aerl2
1644: WHERE aerl2.report_header_id = aerl1.report_header_id
1645: 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)
1646: OR
1647: (aerl1.credit_card_trx_id IS NOT NULL AND aerl2.credit_card_trx_id = aerl1.credit_card_trx_id)

Line 1660: FROM AP_EXPENSE_REPORT_LINES

1656:
1657:
1658: CURSOR ItemizationChildLines(p_report_line_id in number) IS
1659: SELECT REPORT_LINE_ID
1660: FROM AP_EXPENSE_REPORT_LINES
1661: WHERE itemization_parent_id = p_report_line_id
1662: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1663:
1664: l_OrigReportLineID expLines_report_line_id;

Line 1665: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

1661: WHERE itemization_parent_id = p_report_line_id
1662: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1663:
1664: l_OrigReportLineID expLines_report_line_id;
1665: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
1666: i number;
1667:
1668: BEGIN
1669:

Line 1678: UPDATE AP_EXPENSE_REPORT_LINES_all

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

Line 1688: UPDATE AP_EXPENSE_REPORT_LINES_ALL

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

Line 1747: FROM ap_expense_report_lines aerl1

1743: ) RETURN BOOLEAN IS
1744: --------------------------------------------------------------------------------
1745: CURSOR ReportLines IS
1746: SELECT REPORT_LINE_ID, ITEMIZATION_PARENT_ID
1747: FROM ap_expense_report_lines aerl1
1748: WHERE aerl1.report_header_id = p_orig_expense_report_id
1749: AND nvl(itemization_parent_id,-1) = -1 /*Bug# 6131435*/
1750: /* jrautiai ADJ Fix
1751: * We need to move all lines in the itemization when one of them is missing a receipt

Line 1761: FROM ap_expense_report_lines aerl2

1757: AND nvl(aerl1.adjustment_reason_code, aerl1.adjustment_reason_copy) IN ('MISSING_IMAGE_RECEIPTS','IMAGE_RECEIPTS_UNCLEAR', 'MISSING_POLICY_INFO', 'POLICY_VIOLATION')
1758: )
1759: OR
1760: ( EXISTS (SELECT aerl2.report_header_id
1761: FROM ap_expense_report_lines aerl2
1762: WHERE aerl2.report_header_id = aerl1.report_header_id
1763: 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)
1764: OR
1765: (aerl1.credit_card_trx_id IS NOT NULL AND aerl2.credit_card_trx_id = aerl1.credit_card_trx_id)

Line 1778: FROM AP_EXPENSE_REPORT_LINES

1774:
1775:
1776: CURSOR ItemizationChildLines(p_report_line_id in number) IS
1777: SELECT REPORT_LINE_ID
1778: FROM AP_EXPENSE_REPORT_LINES
1779: WHERE itemization_parent_id = p_report_line_id
1780: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1781:
1782: l_OrigReportLineID expLines_report_line_id;

Line 1783: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

1779: WHERE itemization_parent_id = p_report_line_id
1780: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1781:
1782: l_OrigReportLineID expLines_report_line_id;
1783: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
1784: i number;
1785:
1786: BEGIN
1787:

Line 1796: UPDATE AP_EXPENSE_REPORT_LINES_all

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

Line 1806: UPDATE AP_EXPENSE_REPORT_LINES_ALL

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

Line 1866: FROM ap_expense_report_lines aerl1

1862: ) RETURN BOOLEAN IS
1863: --------------------------------------------------------------------------------
1864: CURSOR ReportLines IS
1865: SELECT REPORT_LINE_ID, ITEMIZATION_PARENT_ID
1866: FROM ap_expense_report_lines aerl1
1867: WHERE aerl1.report_header_id = p_orig_expense_report_id
1868: AND nvl(itemization_parent_id,-1) = -1 /*Bug# 6131435*/
1869: /* jrautiai ADJ Fix
1870: * We need to move all lines in the itemization when one of them is missing a receipt

Line 1880: FROM ap_expense_report_lines aerl2

1876: AND nvl(aerl1.adjustment_reason_code, aerl1.adjustment_reason_copy) IN ('ORIG_REQ_IMG_UNCLEAR','RECEIPTS_NOT_RECEIVED', 'MISSING_POLICY_INFO', 'POLICY_VIOLATION')
1877: )
1878: OR
1879: ( EXISTS (SELECT aerl2.report_header_id
1880: FROM ap_expense_report_lines aerl2
1881: WHERE aerl2.report_header_id = aerl1.report_header_id
1882: 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)
1883: OR
1884: (aerl1.credit_card_trx_id IS NOT NULL AND aerl2.credit_card_trx_id = aerl1.credit_card_trx_id)

Line 1897: FROM AP_EXPENSE_REPORT_LINES

1893:
1894:
1895: CURSOR ItemizationChildLines(p_report_line_id in number) IS
1896: SELECT REPORT_LINE_ID
1897: FROM AP_EXPENSE_REPORT_LINES
1898: WHERE itemization_parent_id = p_report_line_id
1899: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1900:
1901: l_OrigReportLineID expLines_report_line_id;

Line 1902: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

1898: WHERE itemization_parent_id = p_report_line_id
1899: and report_header_id = p_orig_expense_report_id; -- Bug: 6705839, Performance Issue during shortpay
1900:
1901: l_OrigReportLineID expLines_report_line_id;
1902: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
1903: i number;
1904:
1905: BEGIN
1906:

Line 1915: UPDATE AP_EXPENSE_REPORT_LINES_all

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

Line 1925: UPDATE AP_EXPENSE_REPORT_LINES_ALL

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

Line 2049: AP_EXPENSE_REPORT_LINES_ALL DL

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

Line 2062: FROM ap_expense_report_lines erl

2058: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'Start InsertCCLine');
2059:
2060: SELECT AP_WEB_DB_AP_INT_PKG.GetExpenseClearingCCID(credit_card_trx_id)
2061: INTO l_clearning_ccid
2062: FROM ap_expense_report_lines erl
2063: WHERE report_line_id = p_report_line_id;
2064:
2065: INSERT INTO ap_expense_report_lines
2066: (report_header_id,

Line 2065: INSERT INTO ap_expense_report_lines

2061: INTO l_clearning_ccid
2062: FROM ap_expense_report_lines erl
2063: WHERE report_line_id = p_report_line_id;
2064:
2065: INSERT INTO ap_expense_report_lines
2066: (report_header_id,
2067: last_update_date,
2068: last_updated_by,
2069: code_combination_id,

Line 2175: FROM ap_expense_report_lines erl

2171: adjustment_reason_code, -- jrautiai ADJ Fix
2172: submitted_amount, -- jrautiai ADJ Fix
2173: p_new_report_line_id,
2174: allocation_split_code --Bug#6870253
2175: FROM ap_expense_report_lines erl
2176: WHERE report_line_id = p_report_line_id;
2177:
2178: -- for bug 5288256: insert a new row in ap_exp_report_dists_all table
2179: SELECT GL.SEGMENT1, GL.SEGMENT2,GL.SEGMENT3,GL.SEGMENT4, GL.SEGMENT5, GL.SEGMENT6,

Line 2335: FROM AP_EXPENSE_REPORT_LINES

2331: i number;
2332:
2333: CURSOR ReportLines IS
2334: SELECT REPORT_LINE_ID
2335: FROM AP_EXPENSE_REPORT_LINES
2336: WHERE REPORT_HEADER_ID = P_source_report_header_id
2337: AND ITEMIZATION_PARENT_ID = p_source_parent_report_line_id;
2338:
2339: BEGIN

Line 2347: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

2343:
2344: FOR i in ReportLines LOOP
2345:
2346: -- Get new ID from sequence
2347: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
2348: INTO l_NewReportLineID
2349: FROM DUAL;
2350:
2351: InsertCCLine(p_new_report_header_id => p_target_report_header_id,

Line 2375: FROM ap_expense_report_lines

2371: ) RETURN BOOLEAN IS
2372: --------------------------------------------------------------------------------
2373: CURSOR CCReportLines IS
2374: SELECT report_line_id, itemization_parent_id, distribution_line_number
2375: FROM ap_expense_report_lines
2376: WHERE report_header_id = p_report_header_id
2377: AND credit_card_trx_id IS NOT NULL
2378: AND (itemization_parent_id is null
2379: OR

Line 2390: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

2386:
2387: for i in CCReportLines loop
2388:
2389: -- Get new ID from sequence
2390: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
2391: INTO l_NewReportLineID
2392: FROM DUAL;
2393:
2394: InsertCCLine(p_new_report_header_id => p_new_report_id,

Line 2432: FROM OIE_ADDON_MILEAGE_RATES addon, AP_EXPENSE_REPORT_LINES el

2428: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2429: -- EMPLOYEE_FLAG is used as a place holder.
2430: CURSOR addonRates IS
2431: SELECT ADDON_RATE_TYPE
2432: FROM OIE_ADDON_MILEAGE_RATES addon, AP_EXPENSE_REPORT_LINES el
2433: WHERE (el.REPORT_HEADER_ID = P_ReportID AND
2434: el.REPORT_LINE_ID = addon.REPORT_LINE_ID)
2435: FOR UPDATE OF ADDON_RATE_TYPE NOWAIT;
2436:

Line 2474: FROM OIE_PDM_DAILY_BREAKUPS db, AP_EXPENSE_REPORT_LINES el

2470: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2471: -- EMPLOYEE_FLAG is used as a place holder.
2472: CURSOR dailyBreakup IS
2473: SELECT PDM_DAILY_BREAKUP_ID
2474: FROM OIE_PDM_DAILY_BREAKUPS db, AP_EXPENSE_REPORT_LINES el
2475: WHERE (el.REPORT_HEADER_ID = P_ReportID AND
2476: el.REPORT_LINE_ID = db.REPORT_LINE_ID)
2477: FOR UPDATE OF PDM_DESTINATION_ID NOWAIT;
2478:

Line 2516: FROM OIE_PDM_DESTINATIONS db, AP_EXPENSE_REPORT_LINES el

2512: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2513: -- EMPLOYEE_FLAG is used as a place holder.
2514: CURSOR pdmDestination IS
2515: SELECT PDM_DESTINATION_ID
2516: FROM OIE_PDM_DESTINATIONS db, AP_EXPENSE_REPORT_LINES el
2517: WHERE (el.REPORT_HEADER_ID = P_ReportID AND
2518: el.REPORT_LINE_ID = db.REPORT_LINE_ID)
2519: FOR UPDATE OF PDM_DESTINATION_ID NOWAIT;
2520:

Line 2561: FROM AP_EXPENSE_REPORT_LINES

2557: -- in the FOR UPDATE is missing and NOWAIT is used, so the OF
2558: -- REPORT_HEADER_ID is used as a place holder.
2559: CURSOR ReportLines IS
2560: SELECT REPORT_HEADER_ID, REPORT_LINE_ID
2561: FROM AP_EXPENSE_REPORT_LINES
2562: WHERE (REPORT_HEADER_ID = P_ReportID)
2563: FOR UPDATE OF REPORT_HEADER_ID NOWAIT;
2564:
2565: BEGIN

Line 2589: DELETE AP_EXPENSE_REPORT_LINES WHERE CURRENT OF ReportLines;

2585: FETCH ReportLines into l_TempReportHeaderID, l_TempReportLineID;
2586: EXIT WHEN ReportLines%NOTFOUND;
2587:
2588: -- Delete matching line
2589: DELETE AP_EXPENSE_REPORT_LINES WHERE CURRENT OF ReportLines;
2590:
2591: /* Delete attachments assocated with the line */
2592: fnd_attached_documents2_pkg.delete_attachments(
2593: X_entity_name => 'OIE_LINE_ATTACHMENTS',

Line 2630: FROM ap_expense_report_lines

2626: -- Bug: 8588537 remove distributions on the personal lines
2627: DELETE FROM ap_exp_report_dists
2628: WHERE report_line_id in
2629: (SELECT report_line_id
2630: FROM ap_expense_report_lines
2631: WHERE web_parameter_id = l_personalParameterId
2632: AND report_header_id = p_report_header_id);
2633:
2634:

Line 2635: DELETE FROM ap_expense_report_lines

2631: WHERE web_parameter_id = l_personalParameterId
2632: AND report_header_id = p_report_header_id);
2633:
2634:
2635: DELETE FROM ap_expense_report_lines
2636: WHERE web_parameter_id = l_personalParameterId
2637: AND report_header_id = p_report_header_id;
2638:
2639: return TRUE;

Line 2654: DELETE FROM ap_expense_report_lines

2650: --------------------------------------------------------------------------------
2651: FUNCTION DeleteCreditReportLines(p_report_header_id IN expLines_headerID) RETURN BOOLEAN IS
2652: --------------------------------------------------------------------------------
2653: BEGIN
2654: DELETE FROM ap_expense_report_lines
2655: WHERE report_header_id = p_report_header_id
2656: AND credit_card_trx_id IS NOT NULL;
2657:
2658: return TRUE;

Line 2677: UPDATE ap_expense_report_lines RL

2673: p_ven_awt_group_id IN expLines_awtGroupID
2674: ) RETURN BOOLEAN IS
2675: --------------------------------------------------------------------------------
2676: BEGIN
2677: UPDATE ap_expense_report_lines RL
2678: SET awt_group_id = decode(p_sys_allow_awt_flag, 'Y',
2679: decode(p_ven_allow_awt_flag, 'Y', p_ven_awt_group_id,
2680: null), null),
2681: justification_required_flag = (SELECT nvl(justification_required_flag,'V')

Line 2702: UPDATE ap_expense_report_lines

2698: p_flag IN expLines_receiptMissingFlag)
2699: RETURN BOOLEAN IS
2700: -------------------------------------------------------------------
2701: BEGIN
2702: UPDATE ap_expense_report_lines
2703: SET receipt_missing_flag = p_flag
2704: WHERE report_header_id = p_report_header_id;
2705:
2706: return TRUE;

Line 2723: UPDATE ap_expense_report_lines

2719: p_required_flag IN expLines_receiptReqdFlag
2720: ) RETURN BOOLEAN IS
2721: --------------------------------------------------------------------------------
2722: BEGIN
2723: UPDATE ap_expense_report_lines
2724: SET receipt_required_flag = p_required_flag
2725: WHERE nvl(receipt_missing_flag, 'N') = 'Y'
2726: AND report_header_id = p_report_header_id;
2727:

Line 2759: FROM ap_expense_report_lines erl,

2755: decode(erl.web_parameter_id,l_parameterId, 'PERSONAL', 'BUSINESS'),
2756: erl.org_id,
2757: nvl(cc.transaction_date,sysdate),
2758: erh.employee_id
2759: FROM ap_expense_report_lines erl,
2760: ap_credit_card_trxns cc,
2761: ap_expense_report_headers erh
2762: WHERE erl.report_header_id = erh.report_header_id
2763: AND nvl(erl.itemization_parent_id,0) <> -1 /* Itemization Project */

Line 2811: FROM ap_expense_report_lines erl,

2807: end if;
2808:
2809: SELECT sum(erl.amount)
2810: INTO l_prepaid_amt
2811: FROM ap_expense_report_lines erl,
2812: ap_credit_card_trxns cc
2813: WHERE erl.report_header_id = p_expReportHeaderId
2814: AND cc.trx_id = erl.credit_card_trx_id -- is a credit card transaction
2815: AND (cc.category is null OR cc.category <> 'PERSONAL') -- not a personal expense

Line 2867: from ap_expense_report_lines

2863:
2864: BEGIN
2865: select receipt_missing_flag
2866: into p_missing_receipts_flag
2867: from ap_expense_report_lines
2868: where report_header_id = p_report_header_id
2869: and receipt_missing_flag = 'Y'
2870: and rownum = 1;
2871:

Line 2927: ap_expense_report_lines XL,

2923: XL.attribute14,
2924: XL.attribute15,
2925: XL.report_line_id
2926: FROM ap_expense_report_params XP,
2927: ap_expense_report_lines XL,
2928: ap_lookup_codes LC,
2929: PA_PROJECTS_ALL PAP,
2930: PA_TASKS_EXPEND_V PAT,
2931: GMS_AWARDS GMS

Line 2976: ap_expense_report_lines XL,

2972: XL.attribute14,
2973: XL.attribute15,
2974: XL.report_line_id
2975: FROM ap_expense_report_params XP,
2976: ap_expense_report_lines XL,
2977: ap_lookup_codes LC
2978: WHERE XL.report_header_id = p_report_header_id
2979: AND XL.web_parameter_id = XP.parameter_id
2980: AND XL.line_type_lookup_code = LC.lookup_code

Line 3019: from ap_expense_report_lines_all

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

Line 3023: UPDATE ap_expense_report_lines

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
3024: SET avg_mileage_rate = p_avg_mileage_rate,
3025: amount = p_amount,
3026: distribution_line_number = p_new_dist_line_number,
3027: trip_distance = p_trip_distance,

Line 3080: from ap_expense_report_lines_all

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(

Line 3157: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

3153: BEGIN
3154:
3155: l_debug_info := 'start of AddMileageExpLine';
3156:
3157: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
3158: INTO l_report_line_id
3159: FROM DUAL;
3160:
3161:

Line 3162: INSERT INTO ap_expense_report_lines

3158: INTO l_report_line_id
3159: FROM DUAL;
3160:
3161:
3162: INSERT INTO ap_expense_report_lines
3163: (REPORT_HEADER_ID,
3164: LAST_UPDATE_DATE,
3165: LAST_UPDATED_BY,
3166: CODE_COMBINATION_ID,

Line 3455: FROM ap_expense_report_lines

3451: ADJUSTMENT_REASON_CODE,
3452: LOCATION,
3453: AP_VALIDATION_ERROR,
3454: l_report_line_id
3455: FROM ap_expense_report_lines
3456: WHERE report_header_id = p_orig_expense_report_id
3457: AND distribution_line_number = p_orig_dist_line_number;
3458:
3459: ---------------------------------------------------------------

Line 3485: FROM AP_EXPENSE_REPORT_LINES

3481: CREATED_BY,
3482: SYSDATE
3483: FROM OIE_ADDON_MILEAGE_RATES
3484: WHERE REPORT_LINE_ID = (SELECT REPORT_LINE_ID
3485: FROM AP_EXPENSE_REPORT_LINES
3486: WHERE REPORT_HEADER_ID = P_ORIG_EXPENSE_REPORT_ID
3487: AND DISTRIBUTION_LINE_NUMBER = P_ORIG_DIST_LINE_NUMBER
3488: AND ROWNUM = 1);
3489:

Line 3510: FROM AP_EXPENSE_REPORT_LINES

3506: IS
3507: l_category_code VARCHAR2(30);
3508: BEGIN
3509: SELECT CATEGORY_CODE INTO L_CATEGORY_CODE
3510: FROM AP_EXPENSE_REPORT_LINES
3511: WHERE REPORT_LINE_ID = P_FROM_REPORT_LINE_ID;
3512:
3513: IF (L_CATEGORY_CODE = 'MILEAGE') THEN
3514: -- COPY ADDITIONAL MILEAGE RATE

Line 3547: FROM AP_EXPENSE_REPORT_LINES

3543: IS
3544: l_category_code VARCHAR2(30);
3545: BEGIN
3546: SELECT CATEGORY_CODE INTO L_CATEGORY_CODE
3547: FROM AP_EXPENSE_REPORT_LINES
3548: WHERE REPORT_LINE_ID = P_FROM_REPORT_LINE_ID;
3549:
3550: IF (L_CATEGORY_CODE = 'PER_DIEM') THEN
3551: -- COPY PDM DAILY BREAKUP

Line 3611: FROM AP_EXPENSE_REPORT_LINES

3607: IS
3608: l_category_code VARCHAR2(30);
3609: BEGIN
3610: SELECT CATEGORY_CODE INTO L_CATEGORY_CODE
3611: FROM AP_EXPENSE_REPORT_LINES
3612: WHERE REPORT_LINE_ID = P_FROM_REPORT_LINE_ID;
3613:
3614: IF (L_CATEGORY_CODE = 'PER_DIEM') THEN
3615: -- COPY PDM DESTINATION

Line 3665: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;

3661: l_TempReportLineID expLines_report_line_id;
3662: l_NewReportLineID expLines_report_line_id;
3663:
3664: -- Bug 6689280 (sodash)
3665: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3666: -- Bug 7555144 - Swapping to and from Currency Codes
3667: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

Line 3667: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;

3663:
3664: -- Bug 6689280 (sodash)
3665: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3666: -- Bug 7555144 - Swapping to and from Currency Codes
3667: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;

Line 3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;

3664: -- Bug 6689280 (sodash)
3665: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3666: -- Bug 7555144 - Swapping to and from Currency Codes
3667: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
3672: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;

Line 3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

3665: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
3666: -- Bug 7555144 - Swapping to and from Currency Codes
3667: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
3672: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3673: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

Line 3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;

3666: -- Bug 7555144 - Swapping to and from Currency Codes
3667: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
3672: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3673: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3674: l_default_exchange_rates VARCHAR2(1);

Line 3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;

3667: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
3672: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3673: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3674: l_default_exchange_rates VARCHAR2(1);
3675: l_exchange_rate_allowance NUMBER;

Line 3672: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;

3668: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
3672: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3673: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3674: l_default_exchange_rates VARCHAR2(1);
3675: l_exchange_rate_allowance NUMBER;
3676: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.

Line 3673: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

3669: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
3670: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
3671: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
3672: l_lines_total AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3673: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
3674: l_default_exchange_rates VARCHAR2(1);
3675: l_exchange_rate_allowance NUMBER;
3676: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
3677: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;

Line 3682: FROM AP_EXPENSE_REPORT_LINES

3678:
3679: -- Bug 7555144 - Changing the order to match with the from and to currencies
3680: CURSOR ReportLines IS
3681: SELECT report_line_id, receipt_currency_code, currency_code, (start_expense_date+AP_WEB_DB_EXPLINE_PKG.C_NumDaysRollForward), receipt_currency_amount
3682: FROM AP_EXPENSE_REPORT_LINES
3683: WHERE REPORT_HEADER_ID = P_source_report_header_id
3684: AND CREDIT_CARD_TRX_ID is null
3685: AND ITEMIZATION_PARENT_ID = p_source_parent_report_line_id;
3686: -- Bug 7150383(sodash) get the total of child lines and update the total of the parent line

Line 3689: FROM ap_expense_report_lines ael

3685: AND ITEMIZATION_PARENT_ID = p_source_parent_report_line_id;
3686: -- Bug 7150383(sodash) get the total of child lines and update the total of the parent line
3687: CURSOR update_new_parent_line_amt_c IS
3688: SELECT ael.*
3689: FROM ap_expense_report_lines ael
3690: WHERE report_header_id = p_target_report_header_id
3691: AND report_line_id = p_target_parent_report_line_id
3692: FOR UPDATE OF report_header_id, report_line_id NOWAIT;
3693:

Line 3709: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

3705: FETCH ReportLines into l_TempReportLineID, l_from_currency_code, l_to_currency_code, l_exchange_date, l_amount;
3706: EXIT WHEN ReportLines%NOTFOUND;
3707:
3708: -- Get new ID from sequence
3709: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
3710: INTO l_NewReportLineID
3711: FROM DUAL;
3712:
3713: -- Bug# 9182883: Get the default exchange rates and the allowance rate

Line 3753: insert into AP_EXPENSE_REPORT_LINES

3749:
3750: END IF;
3751:
3752: -- For each line, duplicate its columns
3753: insert into AP_EXPENSE_REPORT_LINES
3754: (
3755: REPORT_HEADER_ID,
3756: CODE_COMBINATION_ID,
3757: ITEM_DESCRIPTION,

Line 4021: from AP_EXPENSE_REPORT_LINES

4017: p_user_id AS LAST_UPDATED_BY,
4018: l_NewReportLineID,
4019: RECEIPT_REQUIRED_FLAG,
4020: 'N'
4021: from AP_EXPENSE_REPORT_LINES
4022: where REPORT_LINE_ID = l_TempReportLineID;
4023: l_lines_total := l_lines_total+l_amount;
4024: -- Duplicate distribution lines associated with this line
4025: AP_WEB_DB_EXPDIST_PKG.DuplicateDistributions(

Line 4053: UPDATE ap_expense_report_lines

4049: -- Bug 7150383(sodash) get the total of child lines and update the total of the parent line
4050: OPEN update_new_parent_line_amt_c;
4051: FETCH update_new_parent_line_amt_c into l_parent_line_rec;
4052:
4053: UPDATE ap_expense_report_lines
4054: SET amount = l_lines_total
4055: WHERE CURRENT OF update_new_parent_line_amt_c;
4056:
4057: CLOSE update_new_parent_line_amt_c;

Line 4081: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;

4077: l_TempReportLineID expLines_report_line_id;
4078: l_NewReportLineID expLines_report_line_id;
4079:
4080: -- Bug 6689280 (sodash)
4081: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
4082: -- Bug 7555144 - Swapping to and from Currency Codes
4083: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

Line 4083: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;

4079:
4080: -- Bug 6689280 (sodash)
4081: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
4082: -- Bug 7555144 - Swapping to and from Currency Codes
4083: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
4086: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;

Line 4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;

4080: -- Bug 6689280 (sodash)
4081: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
4082: -- Bug 7555144 - Swapping to and from Currency Codes
4083: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
4086: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
4088: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

Line 4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;

4081: l_Receipt_Conversion_Rate AP_EXPENSE_REPORT_LINES.RECEIPT_CONVERSION_RATE%type;
4082: -- Bug 7555144 - Swapping to and from Currency Codes
4083: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
4086: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
4088: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
4089: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.

Line 4086: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;

4082: -- Bug 7555144 - Swapping to and from Currency Codes
4083: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
4086: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
4088: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
4089: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
4090: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;

Line 4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;

4083: l_from_currency_code AP_EXPENSE_REPORT_LINES.RECEIPT_CURRENCY_CODE%type;
4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
4086: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
4088: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
4089: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
4090: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
4091: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

Line 4088: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;

4084: l_to_currency_code AP_EXPENSE_REPORT_LINES.CURRENCY_CODE%type;
4085: l_exchange_rate_type AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE_TYPE%type;
4086: l_exchange_date AP_EXPENSE_REPORT_LINES.EXCHANGE_DATE%type;
4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
4088: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
4089: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
4090: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
4091: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
4092: l_default_exchange_rates VARCHAR2(1);

Line 4091: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;

4087: l_exchange_rate AP_EXPENSE_REPORT_LINES.EXCHANGE_RATE%type := null;
4088: l_amount AP_EXPENSE_REPORT_LINES.AMOUNT%type;
4089: -- Bug 7555144 - Commenting since Display Inverse Profile is for Display Purposes only.
4090: -- l_display_inverse_profile fnd_profile_option_values.profile_option_value%type;
4091: l_itemization_parent_id AP_EXPENSE_REPORT_LINES.itemization_parent_id%type;
4092: l_default_exchange_rates VARCHAR2(1);
4093: l_exchange_rate_allowance NUMBER;
4094:
4095: -- Bug 7555144 - Changing the Order to match with the from and to currencies

Line 4098: FROM AP_EXPENSE_REPORT_LINES

4094:
4095: -- Bug 7555144 - Changing the Order to match with the from and to currencies
4096: CURSOR ReportLines IS
4097: 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
4098: FROM AP_EXPENSE_REPORT_LINES
4099: WHERE REPORT_HEADER_ID = P_source_report_header_id
4100: AND CREDIT_CARD_TRX_ID is null
4101: AND (ITEMIZATION_PARENT_ID is null
4102: OR

Line 4118: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL

4114: FETCH ReportLines into l_TempReportLineID,l_itemization_parent_id,l_from_currency_code, l_to_currency_code, l_exchange_date, l_amount;
4115: EXIT WHEN ReportLines%NOTFOUND;
4116:
4117: -- Get new ID from sequence
4118: SELECT AP_EXPENSE_REPORT_LINES_S.NEXTVAL
4119: INTO l_NewReportLineID
4120: FROM DUAL;
4121:
4122: -- Bug# 9182883: Get the default exchange rates and the allowance rate

Line 4164: insert into AP_EXPENSE_REPORT_LINES

4160:
4161: --END IF;
4162:
4163: -- For each line, duplicate its columns
4164: insert into AP_EXPENSE_REPORT_LINES
4165: (
4166: REPORT_HEADER_ID,
4167: CODE_COMBINATION_ID,
4168: ITEM_DESCRIPTION,

Line 4432: from AP_EXPENSE_REPORT_LINES

4428: p_user_id AS LAST_UPDATED_BY,
4429: l_NewReportLineID,
4430: RECEIPT_REQUIRED_FLAG,
4431: 'N'
4432: from AP_EXPENSE_REPORT_LINES
4433: where REPORT_LINE_ID = l_TempReportLineID;
4434:
4435: if (l_itemization_parent_id = '-1') then
4436: CopyItemizationChildLines(p_user_id,

Line 4480: UPDATE ap_expense_report_lines

4476: BEGIN
4477:
4478: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'start ResetAPValidationErrors');
4479:
4480: UPDATE ap_expense_report_lines
4481: SET ap_validation_error = ''
4482: WHERE report_header_id = p_report_header_id;
4483:
4484: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'end ResetAPValidationErrors');

Line 4508: UPDATE ap_expense_report_lines

4504: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'start UpdateAPValidationError');
4505:
4506: /* Bug 3637166 : Doing a substrb before updation */
4507:
4508: UPDATE ap_expense_report_lines
4509: SET ap_validation_error = substrb(ap_validation_error||p_ap_validation_error,1,240)
4510: WHERE report_header_id = p_report_header_id
4511: AND distribution_line_number = p_dist_line_number;
4512:

Line 4533: UPDATE ap_expense_report_lines

4529: BEGIN
4530:
4531: AP_WEB_UTILITIES_PKG.LogProcedure('AP_WEB_DB_EXPLINE_PKG', 'start resetAPflags');
4532:
4533: UPDATE ap_expense_report_lines
4534: SET receipt_verified_flag = null,
4535: policy_shortpay_flag = null,
4536: adjustment_reason = null
4537: WHERE report_header_id = p_report_header_id;

Line 4564: FROM ap_expense_report_lines

4560: -------------------------------------------------------------------
4561: BEGIN
4562: SELECT count(*)
4563: INTO p_count
4564: FROM ap_expense_report_lines
4565: WHERE report_header_id = p_report_header_id
4566: AND merchant_name IS NOT NULL
4567: AND credit_card_trx_id IS NULL;
4568:

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

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';

Line 4596: INSERT INTO AP_EXPENSE_REPORT_LINES_ALL

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,

Line 4891: ap_expense_report_lines_s.nextval);

4887: expense_line_rec.CATEGORY_CODE,
4888: expense_line_rec.ADJUSTMENT_REASON_CODE,
4889: expense_line_rec.AP_VALIDATION_ERROR,
4890: expense_line_rec.SUBMITTED_AMOUNT,
4891: ap_expense_report_lines_s.nextval);
4892:
4893: EXCEPTION
4894: WHEN TOO_MANY_ROWS OR NO_DATA_FOUND THEN
4895: AP_WEB_DB_UTIL_PKG.RaiseException('InsertLine','',

Line 4952: FROM ap_expense_report_lines

4948: sum(DECODE(web_parameter_id,
4949: l_personalParameterId,0,
4950: AMOUNT))
4951: INTO l_cash_amt, l_ccard_amt, l_total_amt
4952: FROM ap_expense_report_lines
4953: WHERE report_header_id = p_report_header_id
4954: AND (itemization_parent_id is null OR itemization_parent_id <> -1);
4955:
4956: l_cash_amt := NVL(l_cash_amt,0);

Line 5061: FROM ap_expense_report_lines

5057: -----------------------------------------------------------------------------------------------------
5058: BEGIN
5059: SELECT count(*)
5060: INTO p_count
5061: FROM ap_expense_report_lines
5062: WHERE report_header_id = p_report_header_id
5063: AND (itemization_parent_id is null or itemization_parent_id = -1)
5064: AND nvl(policy_shortpay_flag, 'N') = 'Y';
5065:

Line 5082: FROM ap_expense_report_lines aerl

5078: RETURN BOOLEAN IS
5079:
5080: CURSOR result_cur IS
5081: SELECT sum(amount), sum(nvl(submitted_amount,0))
5082: FROM ap_expense_report_lines aerl
5083: WHERE aerl.report_header_id = p_report_header_id
5084: AND (itemization_parent_id is null OR itemization_parent_id = -1)
5085: AND aerl.credit_card_trx_id is null ;
5086:

Line 5089: FROM ap_expense_report_lines aerl

5085: AND aerl.credit_card_trx_id is null ;
5086:
5087: CURSOR cc_result_cur IS
5088: SELECT report_header_id
5089: FROM ap_expense_report_lines aerl
5090: WHERE aerl.report_header_id = p_report_header_id
5091: AND (itemization_parent_id is null OR itemization_parent_id = -1)
5092: AND aerl.credit_card_trx_id is not null
5093: AND NVL(submitted_amount,amount) <> amount;

Line 5136: UPDATE ap_expense_report_lines

5132: PROCEDURE ResetShortpayAdjustmentInfo(p_report_header_id IN expLines_headerID) IS
5133: BEGIN
5134:
5135:
5136: UPDATE ap_expense_report_lines
5137: SET submitted_amount = amount
5138: WHERE report_header_id = p_report_header_id;
5139:
5140: EXCEPTION

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

5243: AND XH.total = 0
5244: AND alc.lookup_type = 'PAYMENT_DUE_FROM'
5245: AND alc.lookup_code = CC.payment_due_from_code
5246: AND alc.lookup_code = 'BOTH'
5247: AND NOT EXISTS(SELECT 1 from AP_EXPENSE_REPORT_LINES XL
5248: WHERE XH.report_header_id = XL.report_header_id);
5249: return TRUE;
5250: EXCEPTION
5251: WHEN NO_DATA_FOUND THEN

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

5278: AND XH.total = 0
5279: AND alc.lookup_type = 'PAYMENT_DUE_FROM'
5280: AND alc.lookup_code = CC.payment_due_from_code
5281: AND alc.lookup_code = 'BOTH'
5282: AND NOT EXISTS(SELECT 1 from AP_EXPENSE_REPORT_LINES XL
5283: WHERE XH.report_header_id = XL.report_header_id);
5284: return true;
5285:
5286: EXCEPTION

Line 5308: UPDATE ap_expense_report_lines aerl

5304:
5305: BEGIN
5306: AP_WEB_UTILITIES_PKG.logProcedure('AP_WEB_DB_EXPRPT_PKG', 'start clearAuditReturnReasonInstr');
5307:
5308: UPDATE ap_expense_report_lines aerl
5309: SET aerl.adjustment_reason_copy = aerl.adjustment_reason_code,
5310: aerl.adjustment_reason_code = '',
5311: aerl.adjustment_reason = '',
5312: aerl.policy_shortpay_flag = '' -- Bug 3683276

Line 5362: FROM AP_EXPENSE_REPORT_LINES AERL

5358: OPEN p_line_cursor FOR
5359: SELECT AERL.report_line_id,
5360: AERL.code_combination_id,
5361: AERL.amount
5362: FROM AP_EXPENSE_REPORT_LINES AERL
5363: WHERE REPORT_HEADER_ID = p_reportId;
5364:
5365: return TRUE;
5366:

Line 5418: from ap_expense_report_lines_all

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:

Line 5448: FROM ap_expense_report_lines

5444: BEGIN
5445:
5446: SELECT count(*)
5447: INTO p_count
5448: FROM ap_expense_report_lines
5449: WHERE report_header_id = p_report_header_id
5450: AND nvl(policy_shortpay_flag, 'N') = 'N'
5451: AND nvl(image_receipt_required_flag, 'N') = 'Y'
5452: AND nvl(receipt_verified_flag, 'N') = 'N'

Line 5473: FROM ap_expense_report_lines

5469: BEGIN
5470:
5471: SELECT count(*)
5472: INTO p_count
5473: FROM ap_expense_report_lines
5474: WHERE report_header_id = p_report_header_id
5475: AND nvl(policy_shortpay_flag, 'N') = 'N'
5476: AND nvl(receipt_required_flag, 'N') = 'Y'
5477: AND nvl(receipt_verified_flag, 'N') = 'N'

Line 5499: FROM ap_expense_report_lines

5495: BEGIN
5496:
5497: SELECT count(*)
5498: INTO p_count
5499: FROM ap_expense_report_lines
5500: WHERE report_header_id = p_report_header_id
5501: AND nvl(policy_shortpay_flag, 'N') = 'N'
5502: AND nvl(receipt_required_flag,'N') = 'Y'
5503: AND nvl(image_receipt_required_flag, 'N') = 'Y'