DBA Data[Home] [Help]

APPS.JAI_AP_RPT_APCR_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 85: ap_invoice_distributions_all was missing. Corrected the same.

81: Removed the TRUNC function from all SELECT statments.
82:
83: ii)In query4 Gain or Loss source AP_INVOICE_DISTRIBUTIONS,
84: the join condition between ap_invoices_all and
85: ap_invoice_distributions_all was missing. Corrected the same.
86:
87: 6. 22/01/2004 Aparajita for Bug#3392495. Version#618.1
88: Added code to reduce the invoice amount by discount amount already given.
89: Changes in cursor C_invoices Query 1.

Line 110: a) In the inline view Z, added a condition - ap_invoice_distributions_all.Line_type_lookup_code <> 'PREPAY'

106: c) In the where clause, added the join "z.invoice_id = api.invoice_id"
107:
108: 10. 05/11/2004 Sanjikum for bug # 4030311, Version 115.4
109: Following changes are made in query 1 of cursor C_invoices
110: a) In the inline view Z, added a condition - ap_invoice_distributions_all.Line_type_lookup_code <> 'PREPAY'
111:
112: 11. 12/01/2005 For bug4035943. Added by LGOPALSA
113: Modified the calculation for balances as per the query
114: change.

Line 178: ap_invoice_distributions_all apd,

174: api.exchange_rate_type exchange_rate_type,
175: api.invoice_currency_code invoice_currency_code,
176: api.exchange_date exchange_date
177: FROM ap_invoices_all api,
178: ap_invoice_distributions_all apd,
179: (SELECT NVL(SUM(apd.amount),0) amt_val,
180: api.invoice_id
181: FROM ap_invoices_all api,
182: ap_invoice_distributions_all apd

Line 182: ap_invoice_distributions_all apd

178: ap_invoice_distributions_all apd,
179: (SELECT NVL(SUM(apd.amount),0) amt_val,
180: api.invoice_id
181: FROM ap_invoices_all api,
182: ap_invoice_distributions_all apd
183: WHERE api.invoice_id = apd.invoice_id
184: AND api.invoice_type_lookup_code <> lv_prepayment --rchandan for bug#4428980
185: AND apd.match_status_flag = 'A'
186: AND api.vendor_id = p_vendor_id

Line 195: from ap_invoice_distributions_all

191: GROUP BY api.invoice_id) z
192: WHERE z.invoice_id = api.invoice_id
193: AND api.invoice_id = apd.invoice_id
194: AND apd.rowid = (select rowid
195: from ap_invoice_distributions_all
196: where rownum=1
197: and invoice_id=apd.invoice_id
198: AND match_status_flag = 'A'
199: AND accounting_date < p_bal_date)

Line 238: --ap_invoice_distributions_all apd,Commented by nprashar for bug 8307469

234: apc.exchange_rate_type exchange_rate_type,
235: api.payment_currency_code invoice_currency_code,
236: apc.exchange_date exchange_date
237: FROM ap_invoices_all api,
238: --ap_invoice_distributions_all apd,Commented by nprashar for bug 8307469
239: ap_invoice_payments_all app,
240: ap_checks_all apc
241: WHERE /*api.invoice_id = apd.invoice_id
242: AND apd.distribution_line_number = (select distribution_line_number from ap_invoice_distributions_all

Line 242: AND apd.distribution_line_number = (select distribution_line_number from ap_invoice_distributions_all

238: --ap_invoice_distributions_all apd,Commented by nprashar for bug 8307469
239: ap_invoice_payments_all app,
240: ap_checks_all apc
241: WHERE /*api.invoice_id = apd.invoice_id
242: AND apd.distribution_line_number = (select distribution_line_number from ap_invoice_distributions_all
243: where rownum=1
244: and invoice_id=apd.invoice_id
245: AND apd.match_status_flag='A') Commented by nprashar for bug 8307469
246:

Line 255: AND Exists ( Select '1' from ap_invoice_distributions_all apd , ap_invoice_lines_all apil where apd.invoice_id = api.invoice_id

251: AND api.vendor_id = p_vendor_id
252: AND api.vendor_site_id = v_vendor_site_id
253: AND app.accounting_date < trunc(p_bal_date)
254: AND ( api.org_id = p_org_id or api.org_id is null )
255: AND Exists ( Select '1' from ap_invoice_distributions_all apd , ap_invoice_lines_all apil where apd.invoice_id = api.invoice_id
256: and apil.invoice_id = apd.invoice_id
257: and apd.match_status_flag ='A'
258: and apil.line_number = apd.invoice_line_number) /*Added by nprashar for bug 12651044 */
259: AND api.invoice_currency_code =nvl( p_currency_code,api.invoice_currency_code) /* Added by vumaasha for bug 8310720 */

Line 318: ap_invoice_distributions_all apd --Commented by nprashar for bug 8307469

314: from xla_ae_lines xal,
315: xla_ae_headers xah,
316: xla_transaction_entities xte,
317: ap_invoices_all api,
318: ap_invoice_distributions_all apd --Commented by nprashar for bug 8307469
319: where xal.application_id = 200 AND
320: xal.ae_header_id = xah.ae_header_id AND
321: xal.accounting_class_code in ( p_gain,p_loss) AND --rchandan for bug#4428980
322: xah.application_id = 200 AND

Line 333: Exists( select '1' from ap_invoice_distributions_all apd

329: api.vendor_id = p_vendor_id AND
330: api.vendor_site_id = v_vendor_site_id AND
331: xah.ACCOUNTING_DATE < p_bal_date AND
332: ( api.org_id = p_org_id or api.org_id is null ) AND
333: Exists( select '1' from ap_invoice_distributions_all apd
334: where api.invoice_id = apd.invoice_id
335: AND apd.accounting_event_id = xah.event_id) --Added by nprashar for bug 8307469
336: union all Commenting ends */
337: -- Query 5

Line 556: between ap_invoices_all and ap_invoice_distributions_all was missing.

552: i)The TRUNC function around the date fields suppress the use of index.
553: Removed the TRUNC function from all SELECT statments.
554:
555: ii)In query4 Gain or Loss source AP_INVOICE_DISTRIBUTIONS, the join condition
556: between ap_invoices_all and ap_invoice_distributions_all was missing.
557: Corrected the same.
558:
559: 6. 22/01/2004 Aparajita for Bug#3392495. Version#115.1
560: Added code to reduce the invoice amount by discount amount already given.

Line 581: a) In the inline view Z, added a condition - ap_invoice_distributions_all.Line_type_lookup_code <> 'PREPAY'

577: c) In the where clause, added the join "z.invoice_id = api.invoice_id"
578:
579: 10. 05/11/2004 Sanjikum for bug # 4030311, Version 115.4
580: Following changes are made in query 1 of cursor C_invoices
581: a) In the inline view Z, added a condition - ap_invoice_distributions_all.Line_type_lookup_code <> 'PREPAY'
582:
583: 11. 12/01/2005 For bug4035943. Added by LGOPALSA
584: Modified the calculation for balances as per the
585: query change.

Line 646: ap_invoice_distributions_all apd,

642: api.exchange_rate_type exchange_rate_type,
643: api.invoice_currency_code invoice_currency_code,
644: api.exchange_date exchange_date
645: FROM ap_invoices_all api,
646: ap_invoice_distributions_all apd,
647: (SELECT NVL(SUM(apd.amount),0) amt_val, /* Bug#3390665*/
648: api.invoice_id
649: FROM ap_invoices_all api,
650: ap_invoice_distributions_all apd

Line 650: ap_invoice_distributions_all apd

646: ap_invoice_distributions_all apd,
647: (SELECT NVL(SUM(apd.amount),0) amt_val, /* Bug#3390665*/
648: api.invoice_id
649: FROM ap_invoices_all api,
650: ap_invoice_distributions_all apd
651: WHERE api.invoice_id = apd.invoice_id
652: AND api.invoice_type_lookup_code <> lv_prepayment --rchandan for bug#4428980
653: AND apd.match_status_flag = 'A'
654: AND api.vendor_id = p_vendor_id

Line 663: from ap_invoice_distributions_all

659: GROUP BY api.invoice_id) z -- Added the Inline view for Bug # 3896940, as sum of amount was required in place of invoice amount
660: WHERE z.invoice_id = api.invoice_id --Added the condition for Bug # 3896940
661: AND api.invoice_id = apd.invoice_id
662: AND apd.rowid = (select rowid
663: from ap_invoice_distributions_all
664: where rownum=1
665: and invoice_id=apd.invoice_id
666: AND match_status_flag = 'A'
667: AND accounting_date < p_bal_date)

Line 709: --ap_invoice_distributions_all apd, Commented by nprashar for bug # 8307469

705: apc.exchange_rate_type exchange_rate_type,
706: api.payment_currency_code invoice_currency_code,
707: apc.exchange_date exchange_date
708: FROM ap_invoices_all api,
709: --ap_invoice_distributions_all apd, Commented by nprashar for bug # 8307469
710: ap_invoice_payments_all app,
711: ap_checks_all apc
712: WHERE /*api.invoice_id = apd.invoice_id
713: AND apd.distribution_line_number = (select distribution_line_number from ap_invoice_distributions_all

Line 713: AND apd.distribution_line_number = (select distribution_line_number from ap_invoice_distributions_all

709: --ap_invoice_distributions_all apd, Commented by nprashar for bug # 8307469
710: ap_invoice_payments_all app,
711: ap_checks_all apc
712: WHERE /*api.invoice_id = apd.invoice_id
713: AND apd.distribution_line_number = (select distribution_line_number from ap_invoice_distributions_all
714: where rownum=1
715: and invoice_id=apd.invoice_id
716: AND apd.match_status_flag='A')
717: added by vchallur for bug#3663549 Commented by nprashar for bug # 8307469

Line 726: AND Exists ( Select '1' from ap_invoice_distributions_all apd , ap_invoice_lines_all apil where apd.invoice_id = api.invoice_id

722: AND api.vendor_id = p_vendor_id
723: AND api.vendor_site_id = v_vendor_site_id
724: AND app.accounting_date < p_bal_date
725: AND ( api.org_id = p_org_id or api.org_id is null ) -- added by Aparajita on 26-sep-2002 for bug # 2574262
726: AND Exists ( Select '1' from ap_invoice_distributions_all apd , ap_invoice_lines_all apil where apd.invoice_id = api.invoice_id
727: and apil.invoice_id = apd.invoice_id
728: and apd.match_status_flag ='A'
729: and apil.line_number = apd.invoice_line_number) --Added by nprashar for bug # 12651044
730: AND api.invoice_currency_code =nvl( p_currency_code,api.invoice_currency_code) /* Added by vumaasha for bug 8310720 */

Line 789: ap_invoice_distributions_all apd --Commented by nprashar for bug # 8307469

785: from xla_ae_lines xal,
786: xla_ae_headers xah,
787: xla_transaction_entities xte,
788: ap_invoices_all api/*,
789: ap_invoice_distributions_all apd --Commented by nprashar for bug # 8307469
790: WHERE xal.application_id = 200 AND
791: xal.ae_header_id = xah.ae_header_id AND
792: xal.accounting_class_code in ( p_gain,p_loss) AND --rchandan for bug#4428980
793: xah.application_id = 200 AND

Line 804: AND Exists (Select '1' from ap_invoice_distributions_all apd

800: api.vendor_id = p_vendor_id AND
801: api.vendor_site_id = v_vendor_site_id AND
802: xah.ACCOUNTING_DATE < p_bal_date AND
803: ( api.org_id = p_org_id or api.org_id is null )
804: AND Exists (Select '1' from ap_invoice_distributions_all apd
805: Where apd.accounting_event_id = xah.event_id
806: AND api.invoice_id = apd.invoice_id ) -- Added by nprashar for bug # 8307469
807: union all Commenting Ends*/
808: -- Query 5

Line 970: cursor c_inv_select_cursor( c_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE ) IS --rchandan for bug#4428980

966: cursor c_get_run_no IS
967: select JAI_PO_REP_PRRG_T_RUNNO_S.nextval
968: from dual;
969:
970: cursor c_inv_select_cursor( c_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE ) IS --rchandan for bug#4428980
971: select invoice_id, invoice_num, org_id, vendor_id, vendor_site_id, invoice_date,
972: invoice_currency_code, nvl(exchange_rate,1) exchange_rate, voucher_num
973: from ap_invoices_all aia
974: where cancelled_date is null

Line 980: from ap_invoice_distributions_all

976: and (p_vendor_site_id is null or vendor_site_id = p_vendor_site_id)
977: and (p_org_id is null or org_id = p_org_id)
978: and exists
979: (select '1'
980: from ap_invoice_distributions_all
981: where invoice_id = aia.invoice_id
982: and line_type_lookup_code = c_line_type_lookup_code
983: and po_distribution_id is not null
984: and nvl(reversal_flag, 'N') <> 'Y'

Line 989: cursor c_inv_item_lines(p_invoice_id number,c_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE) is

985: and accounting_date >= p_invoice_date_from /* Modified by Ramananda for bug:4071409 */
986: and accounting_date <= p_invoice_date_to /* Modified by Ramananda for bug:4071409 */
987: );
988:
989: cursor c_inv_item_lines(p_invoice_id number,c_line_type_lookup_code ap_invoice_distributions_all.line_type_lookup_code%TYPE) is
990: select
991: distribution_line_number,
992: po_distribution_id,
993: rcv_transaction_id,

Line 997: from ap_invoice_distributions_all

993: rcv_transaction_id,
994: amount,
995: invoice_distribution_id,
996: invoice_line_number
997: from ap_invoice_distributions_all
998: where invoice_id = p_invoice_id
999: and line_type_lookup_code = c_line_type_lookup_code
1000: and po_distribution_id is not null
1001: and nvl(reversal_flag, 'N') <> 'Y'

Line 1075: from ap_invoice_distributions_all

1071: where tax_id = p_tax_id;
1072:
1073: cursor c_get_misc_tax_line_amt (p_invoice_id number, p_distribution_line_number number) is
1074: select amount
1075: from ap_invoice_distributions_all
1076: where invoice_id = p_invoice_id
1077: and distribution_line_number = p_distribution_line_number
1078: and accounting_date >= p_invoice_date_from /* Modified by Ramananda for bug:4071409 */
1079: and accounting_date <= p_invoice_date_to; /* Modified by Ramananda for bug:4071409 */