DBA Data[Home] [Help]

APPS.AP_AUTOSELECT_PKG dependencies on STANDARD

Line 101: AND ai.invoice_type_lookup_code in ('STANDARD','PREPAYMENT')

97: ,asi.vendor_site_id
98: ,asi.remit_to_supplier_site_id
99: FROM ap_selected_invoices_all asi,ap_invoices_all ai
100: WHERE ai.invoice_id=asi.invoice_id
101: AND ai.invoice_type_lookup_code in ('STANDARD','PREPAYMENT')
102: AND AP_UTILITIES_PKG.GET_CCR_STATUS(asi.vendor_id,'S') <> 'F'
103: AND asi.checkrun_id=p_checkrun_id;
104:
105: BEGIN

Line 1517: Grouping Credit memos against Standard Invoices.

1513:
1514: /*
1515:
1516: Bug 16340312
1517: Grouping Credit memos against Standard Invoices.
1518:
1519: In case of Bills Payable, do not increment group number until the payment
1520: amount becomes positive.
1521:

Line 1527: 3) Once the Payment Becomes Positive, check if all the Standards Invoices

1523:
1524: 2) After grouping all Credit memos, We need to keep running total
1525: of the payment amounts of the documents till the Payment Amount .
1526:
1527: 3) Once the Payment Becomes Positive, check if all the Standards Invoices
1528: applied for which Credit memos applied and new invoice for which we do
1529: not apply credit memo are of same due date. If they are of same due date,
1530: we do should not increment the grouping number till we encounter the invoice
1531: of different due date.

Line 1620: code will reach here for grouping standard invocies

1616: l_cm_set_off_flag := 'N';
1617: else
1618: /*
1619: Based on sort order of documents selection, after grouping all the credit memos
1620: code will reach here for grouping standard invocies
1621: */
1622: l_tmp_cm_total := l_tmp_cm_total + l_documents(i).payment_amount;
1623: l_tmp_pmt_count := l_tmp_pmt_count+1;
1624: if (l_tmp_pmt_count = 1 and l_cm_set_off_flag = 'N') then

Line 6526: -- standard/interest invoice pair go hand in hand or not, either both

6522: -- Bug 11824219.
6523: -- API invoked by IBY to verify whether a list of payable documents
6524: -- can be removed or not. Invoice schedules and related interest invoice
6525: -- schedules should be removed together. API checks whether the
6526: -- standard/interest invoice pair go hand in hand or not, either both
6527: -- removed or both retained. API returns success if the list of payables
6528: -- documents can be removed.
6529:
6530: PROCEDURE check_doc_payable_remove

Line 6613: -- conditions added. This select works both with standard and interest schedule.

6609: END IF;
6610:
6611: -- Following select is almost exactly same as cursor c_sel_invs. This is to check whether
6612: -- the pair is present in the list of docs to be removed. original_invoice_id invoice_id
6613: -- conditions added. This select works both with standard and interest schedule.
6614: -- rec_sel_invs.original_invoice_id IS NULL - for standard
6615: -- rec_sel_invs.original_invoice_id IS NOT NULL - for interest schedule
6616: --
6617: -- If the count returne is non zero, then pair is also present in the list

Line 6614: -- rec_sel_invs.original_invoice_id IS NULL - for standard

6610:
6611: -- Following select is almost exactly same as cursor c_sel_invs. This is to check whether
6612: -- the pair is present in the list of docs to be removed. original_invoice_id invoice_id
6613: -- conditions added. This select works both with standard and interest schedule.
6614: -- rec_sel_invs.original_invoice_id IS NULL - for standard
6615: -- rec_sel_invs.original_invoice_id IS NOT NULL - for interest schedule
6616: --
6617: -- If the count returne is non zero, then pair is also present in the list
6618: -- of docs to be removed and safe to remove.

Line 6625: AND ( ( rec_sel_invs.original_invoice_id IS NULL -- standard schedule

6621: FROM ap_selected_invoices_all ASI,
6622: iby_fd_docs_payable_v ibydocs
6623: WHERE ASI.checkrun_id = l_checkrun_id
6624: AND ASI.invoice_id <> rec_sel_invs.invoice_id
6625: AND ( ( rec_sel_invs.original_invoice_id IS NULL -- standard schedule
6626: AND ASI.original_invoice_id = rec_sel_invs.invoice_id
6627: AND ASI.original_payment_num = rec_sel_invs.payment_num
6628: ) OR
6629: ( rec_sel_invs.original_invoice_id IS NOT NULL -- interest schedule

Line 6647: -- standard/interest pair will always to grouped in one payment

6643: -- Need to check whether the pair exists in the selected
6644: -- schedules list. If yes, then the schedule can not be removed.
6645: -- exclusive_payment_flag is considered only if federal
6646: -- is installed. If federal is not installed, then
6647: -- standard/interest pair will always to grouped in one payment
6648: -- regardless of exclusive_payment_flag flag status. Federal
6649: -- check is also included in the query.
6650:
6651: -- If atleast one occurrance such case is reported iteration can be

Line 6668: AND ( ( rec_sel_invs.original_invoice_id IS NULL -- selected row is standard schedule

6664: SELECT count(*) into l_count
6665: FROM ap_selected_invoices_all ASI
6666: WHERE ASI.checkrun_id = l_checkrun_id
6667: AND ASI.invoice_id <> rec_sel_invs.invoice_id
6668: AND ( ( rec_sel_invs.original_invoice_id IS NULL -- selected row is standard schedule
6669: AND ASI.original_invoice_id = rec_sel_invs.invoice_id
6670: AND ASI.original_payment_num = rec_sel_invs.payment_num
6671: ) OR
6672: ( rec_sel_invs.original_invoice_id IS NOT NULL -- selected row is interest schedule