DBA Data[Home] [Help]

APPS.AP_IAW_PKG dependencies on AP_INVOICE_LINES_ALL

Line 228: UPDATE AP_INVOICE_LINES_ALL

224: SET WFApproval_Status = 'NOT REQUIRED'
225: WHERE Invoice_Id = l_invoice_id
226: AND WFApproval_Status = 'INITIATED';
227:
228: UPDATE AP_INVOICE_LINES_ALL
229: SET WFApproval_Status = 'NOT REQUIRED'
230: WHERE Invoice_Id = l_invoice_id
231: AND WFApproval_Status = 'INITIATED';
232:

Line 295: UPDATE AP_INVOICE_LINES_ALL

291: SET WFApproval_Status = 'REJECTED'
292: WHERE Invoice_Id = l_invoice_id
293: AND WFApproval_Status = 'INITIATED';
294:
295: UPDATE AP_INVOICE_LINES_ALL
296: SET WFApproval_Status = 'REJECTED'
297: WHERE Invoice_Id = l_invoice_id
298: AND WFApproval_Status = 'INITIATED';
299:

Line 338: FROM ap_invoice_lines_all

334: resultout OUT NOCOPY VARCHAR2) IS
335:
336: CURSOR matched_lines (l_invoice_id IN VARCHAR2) IS
337: SELECT line_number, amount
338: FROM ap_invoice_lines_all
339: WHERE po_header_id is not null
340: AND invoice_id = l_invoice_id
341: AND wfapproval_status = 'INITIATED';
342:

Line 447: UPDATE AP_INVOICE_LINES_ALL

443: p_line_aprvl_hist => l_l_hist);
444: END LOOP; --matched lines
445:
446: --Set transaction statuses
447: UPDATE AP_INVOICE_LINES_ALL
448: SET WFApproval_Status = 'NOT REQUIRED'
449: WHERE Invoice_Id = l_invoice_id
450: AND PO_Header_Id IS NOT NULL
451: AND WFApproval_Status = 'INITIATED';

Line 603: UPDATE AP_INVOICE_LINES_ALL

599: SET WFApproval_Status = 'NOT REQUIRED'
600: WHERE Invoice_Id = l_invoice_id
601: AND WFApproval_Status = 'INITIATED';
602:
603: UPDATE AP_INVOICE_LINES_ALL
604: SET WFApproval_Status = 'NOT REQUIRED'
605: WHERE Invoice_Id = l_invoice_id
606: AND WFApproval_Status = 'INITIATED';
607:

Line 650: UPDATE AP_INVOICE_LINES_ALL

646: --wfapproval_status to 'Rejected'
647: --already, so the line will
648: -- not even be selected for update by the main
649: --part of the query.
650: UPDATE AP_INVOICE_LINES_ALL
651: SET WFApproval_Status = 'WFAPPROVED'
652: WHERE Invoice_Id = l_invoice_id
653: AND WFApproval_Status = 'INITIATED'
654: AND Line_Number IN (SELECT DISTINCT Line_Number

Line 671: UPDATE AP_INVOICE_LINES_ALL

667: SET WFApproval_Status = 'NOT REQUIRED'
668: WHERE Invoice_Id = l_invoice_id
669: AND WFApproval_Status = 'INITIATED';
670:
671: UPDATE AP_INVOICE_LINES_ALL
672: SET WFApproval_Status = 'NOT REQUIRED'
673: WHERE Invoice_Id = l_invoice_id
674: AND WFApproval_Status = 'INITIATED';
675:

Line 3229: UPDATE ap_invoice_lines_all

3225: --Clear all iaw processing records
3226: DELETE FROM AP_APINV_APPROVERS;
3227:
3228: --Set the lines status
3229: UPDATE ap_invoice_lines_all
3230: SET wfapproval_status = 'NOT REQUIRED'
3231: WHERE wfapproval_status in ('INITIATED','REQUIRED','REJECTED',
3232: 'NEEDS REAPPROVAL','STOPPED');
3233:

Line 3390: FROM ap_invoice_lines_all

3386:
3387: SELECT sum(decode(po_header_id, null, 0, 1)),
3388: count(line_number)
3389: INTO l_sum_matched, l_item_count
3390: FROM ap_invoice_lines_all
3391: WHERE invoice_id = p_invoice_id
3392: AND line_type_lookup_code = 'ITEM';
3393:
3394: IF l_sum_matched >0

Line 3405: FROM ap_invoice_lines_all

3401:
3402: SELECT sum(decode(tax_already_calculated_flag, 'Y',
3403: 1, 0)), count(line_number)
3404: INTO l_sum_calc, l_line_count
3405: FROM ap_invoice_lines_all
3406: WHERE invoice_id = p_invoice_id
3407: AND line_type_lookup_code not in ('TAX','AWT');
3408:
3409: IF l_sum_calc >0 and l_sum_matched = l_line_count THEN

Line 3460: FROM ap_invoice_lines_all

3456:
3457: IF p_attribute_name = 'SUPPLIER_INVOICE_LINE_MATCHED' THEN
3458: SELECT decode(po_header_id, null, 'N', 'Y')
3459: INTO l_return_val
3460: FROM ap_invoice_lines_all
3461: WHERE invoice_id = p_invoice_id
3462: AND line_number = p_sub_class_id;
3463:
3464: END IF;

Line 3563: from ap_invoice_lines_all il,

3559: fnd_global.org_id,
3560: null,
3561: null,
3562: il.line_number line_number
3563: from ap_invoice_lines_all il,
3564: po_lines_all pl,
3565: ap_hold_codes hc
3566: where il.invoice_id = p_invoice_id
3567: and il.po_line_location_id is not null

Line 3607: from ap_invoice_lines_all il,

3603: fnd_global.org_id,
3604: null,
3605: null,
3606: il.line_number line_number
3607: from ap_invoice_lines_all il,
3608: po_line_locations_all ll,
3609: ap_hold_codes hc
3610: where il.invoice_id = p_invoice_id
3611: and il.po_line_location_id = ll.line_location_id

Line 3650: from ap_invoice_lines_all il,

3646: fnd_global.org_id,
3647: null,
3648: null,
3649: il.line_number line_number
3650: from ap_invoice_lines_all il,
3651: po_line_locations_all ll,
3652: ap_hold_codes hc
3653: where il.invoice_id = p_invoice_id
3654: and il.po_line_location_id = ll.line_location_id

Line 3693: from ap_invoice_lines_all il,

3689: fnd_global.org_id,
3690: null,
3691: null,
3692: il.line_number line_number
3693: from ap_invoice_lines_all il,
3694: po_line_locations_all ll,
3695: ap_hold_codes hc
3696: where il.invoice_id = p_invoice_id
3697: and il.po_line_location_id = ll.line_location_id

Line 3736: from ap_invoice_lines_all il,

3732: fnd_global.org_id,
3733: null,
3734: null,
3735: il.line_number line_number
3736: from ap_invoice_lines_all il,
3737: po_line_locations_all ll,
3738: ap_hold_codes hc
3739: where il.invoice_id = p_invoice_id
3740: and il.po_line_location_id = ll.line_location_id

Line 3765: update ap_invoice_lines_all il

3761: l_invoice_id := WF_ENGINE.GETITEMATTRNumber(itemtype,
3762: itemkey,
3763: 'INVOICE_ID');
3764:
3765: update ap_invoice_lines_all il
3766: set disputable_flag = 'Y'
3767: where il.invoice_id = l_invoice_id
3768: and il.org_id = l_org_id
3769: and il.line_type_lookup_code = 'ITEM'

Line 3785: from ap_invoice_lines_all

3781: and h.hold_lookup_code in ('PRICE', 'QTY ORD', 'QTY REC', 'AMT ORD', 'AMT REC'))));
3782:
3783: select count(*)
3784: into l_num
3785: from ap_invoice_lines_all
3786: where invoice_id = l_invoice_id
3787: and org_id = l_org_id
3788: and disputable_flag = 'Y';
3789:

Line 3852: from ap_invoice_lines_all

3848: p_generic_role_name IN VARCHAR2) AS
3849:
3850: cursor lines_csr is
3851: select line_number
3852: from ap_invoice_lines_all
3853: where invoice_id = p_invoice_id
3854: and line_type_lookup_code = 'ITEM'
3855: and nvl(disputable_flag, 'N' ) = 'Y';
3856:

Line 3998: from ap_invoice_lines_all ail,

3994: -- po matched invoice's internal reps deriving logic:
3995: -- 1. complex work owners
3996: cursor owners_csr is
3997: select ail.line_number, pll.work_approver_id, wfr.name
3998: from ap_invoice_lines_all ail,
3999: po_line_locations_all pll,
4000: ap_invoices_all ai,
4001: wf_local_roles wfr
4002: where ai.invoice_id = l_invoice_id

Line 4014: from ap_invoice_lines_all ail,

4010:
4011: -- 2. po buyers
4012: cursor buyers_csr is
4013: select ph.agent_id, ail.line_number, wfr.name
4014: from ap_invoice_lines_all ail,
4015: po_headers_all ph,
4016: ap_invoices_all ai,
4017: wf_local_roles wfr
4018: where ai.invoice_id = l_invoice_id

Line 4035: from ap_invoice_lines_all ail,

4031: -- then we'll take that one - we cannot go to the distribution
4032: -- level to pick a random one
4033: cursor requesters_csr is
4034: select ail.requester_id, ail.line_number, wfr.name
4035: from ap_invoice_lines_all ail,
4036: ap_invoices_all ai,
4037: wf_local_roles wfr
4038: where ai.invoice_id = l_invoice_id
4039: and ai.invoice_id = ail.invoice_id

Line 4049: from ap_invoice_lines_all ail,

4045:
4046: -- 4. po project managers
4047: cursor proj_managers_csr is
4048: select pt.task_manager_person_id, ail.line_number, wfr.name
4049: from ap_invoice_lines_all ail,
4050: ap_invoices_all ai,
4051: pa_tasks pt,
4052: wf_local_roles wfr
4053: where ai.invoice_id = l_invoice_id

Line 4246: -- update ap_invoice_lines_all table for line_owner_role

4242: -- insert into ap_inv_apinv_approvers table
4243: insert_approver_rec(itemkey, l_invoice_id, l_invoice_iteration,
4244: l_line_appr_tbl, l_source, l_ext_user_name);
4245:
4246: -- update ap_invoice_lines_all table for line_owner_role
4247: -- make sure the line_owner_role is populated
4248: -- as it's used for query in Negotiation page UI
4249: i := 1;
4250: FOR i IN 1..l_line_appr_tbl.count LOOP

Line 4251: update ap_invoice_lines_all

4247: -- make sure the line_owner_role is populated
4248: -- as it's used for query in Negotiation page UI
4249: i := 1;
4250: FOR i IN 1..l_line_appr_tbl.count LOOP
4251: update ap_invoice_lines_all
4252: set line_owner_role = l_line_appr_tbl(i).role_name
4253: where invoice_id = l_invoice_id
4254: and line_number = l_line_appr_tbl(i).line_number
4255: and line_type_lookup_code = 'ITEM'

Line 4291: from ap_invoice_lines_all il,

4287: l_notif_key varchar2(320);
4288:
4289: cursor internal_reps is
4290: select distinct il.line_owner_role, i.source, u.user_name
4291: from ap_invoice_lines_all il,
4292: ap_invoices_all i,
4293: fnd_user u
4294: where il.line_owner_role is not null
4295: and il.line_type_lookup_code = 'ITEM'

Line 4356: from ap_invoice_lines_all

4352: 'INVOICE_ID');
4353:
4354: select count(*)
4355: into l_num
4356: from ap_invoice_lines_all
4357: where org_id = l_org_id
4358: and invoice_id = l_invoice_id
4359: and line_owner_role is null
4360: and line_type_lookup_code = 'ITEM';

Line 4389: update ap_invoice_lines_all

4385: 'INVOICE_ID');
4386:
4387: l_role := wf_engine.getItemAttrText(itemType, itemKey, 'FALL_BACK_INT_REP');
4388:
4389: update ap_invoice_lines_all
4390: set line_owner_role = l_role
4391: where invoice_id = l_invoice_id
4392: and org_id = l_org_id
4393: and line_type_lookup_code = 'ITEM'

Line 4453: select 'e' from ap_invoice_lines_all

4449: where exists( select 'e' from ap_invoices_all
4450: where invoice_id = l_invoice_id and
4451: org_id = l_org_id and wfapproval_status = 'REJECTED'
4452: union all
4453: select 'e' from ap_invoice_lines_all
4454: where invoice_id = l_invoice_id and
4455: org_id = l_org_id and wfapproval_status = 'REJECTED');
4456: exception
4457: when no_data_found then

Line 4751: update ap_invoice_lines_all

4747: l_org_id := WF_ENGINE.GETITEMATTRNumber(itemtype,
4748: itemkey,
4749: 'ORG_ID');
4750:
4751: update ap_invoice_lines_all
4752: set disputable_flag = 'N'
4753: where invoice_id = l_invoice_id
4754: and org_id = l_org_id
4755: and line_owner_role =(

Line 4817: from ap_invoice_lines_all

4813: 'ORG_ID');
4814:
4815: select count(*)
4816: into l_num
4817: from ap_invoice_lines_all
4818: where invoice_id = l_invoice_id
4819: and org_id = l_org_id
4820: and disputable_flag = 'Y'
4821: and line_type_lookup_code = 'ITEM';

Line 4848: from ap_invoice_lines_all

4844: 'ORG_ID');
4845:
4846: select count(*)
4847: into l_num
4848: from ap_invoice_lines_all
4849: where invoice_id = l_invoice_id
4850: and org_id = l_org_id
4851: and creation_date <> last_update_date
4852: and line_type_lookup_code = 'ITEM';