DBA Data[Home] [Help]

APPS.AP_INVOICE_LINES_UTILITY_PKG dependencies on AP_INVOICE_DISTRIBUTIONS_ALL

Line 127: | -- MOAC. Use ap_invoice_distributions_all table instead of SO view

123: | -- accrual) for the distributions. The rest is to cover one specific
124: | -- case when some of the distributions are fully posting (Y) and some
125: | -- are unposting (N). The status should be partial (P).
126: | --
127: | -- MOAC. Use ap_invoice_distributions_all table instead of SO view
128: | -- since this procedure is called when policy context is not set to
129: | -- the corresponding OU for the invoice_id
130: |
131: | MODIFICATION HISTORY

Line 150: FROM ap_invoice_distributions_all

146:
147:
148: CURSOR posting_cursor IS
149: SELECT cash_posted_flag
150: FROM ap_invoice_distributions_all
151: WHERE invoice_id = p_invoice_id
152: AND invoice_line_number = p_line_number
153: AND l_cash_basis_flag = 'Y'
154: UNION

Line 156: FROM ap_invoice_distributions_all

152: AND invoice_line_number = p_line_number
153: AND l_cash_basis_flag = 'Y'
154: UNION
155: SELECT accrual_posted_flag
156: FROM ap_invoice_distributions_all
157: WHERE invoice_id = p_invoice_id
158: AND invoice_line_number = p_line_number
159: AND l_cash_basis_flag <> 'Y'
160: UNION

Line 162: FROM ap_invoice_distributions_all

158: AND invoice_line_number = p_line_number
159: AND l_cash_basis_flag <> 'Y'
160: UNION
161: SELECT 'P'
162: FROM ap_invoice_distributions_all
163: WHERE invoice_id = p_invoice_id
164: AND invoice_line_number = p_line_number
165: AND ( (cash_posted_flag = 'Y'
166: AND l_cash_basis_flag = 'Y')

Line 172: FROM ap_invoice_distributions_all

168: (accrual_posted_flag = 'Y'
169: AND l_cash_basis_flag <> 'Y'))
170: AND EXISTS
171: (SELECT 'An N is also in the valid flags'
172: FROM ap_invoice_distributions_all
173: WHERE invoice_id = p_invoice_id
174: AND invoice_line_number = p_line_number
175: AND ((cash_posted_flag = 'N'
176: AND l_cash_basis_flag = 'Y')

Line 287: FROM ap_invoice_distributions_all

283: -- (NULL). The status should be needs reapproval (N).
284: --
285: CURSOR approval_cursor IS
286: SELECT nvl(match_status_flag, 'N')
287: FROM ap_invoice_distributions_all
288: WHERE invoice_id = p_invoice_id
289: AND invoice_line_number = p_line_number;
290:
291: BEGIN

Line 348: FROM ap_invoice_distributions_all aid

344: -- only if the count is more than 0.
345: --
346: SELECT count(*)
347: INTO match_flag_cnt
348: FROM ap_invoice_distributions_all aid
349: WHERE aid.invoice_id = p_invoice_id
350: AND aid.invoice_line_number = p_line_number
351: AND aid.match_status_flag IS NOT NULL
352: AND rownum < 2;

Line 805: ap_invoice_distributions_all AID

801:
802: SELECT count(*)
803: INTO l_rcv_dist_count
804: FROM rcv_transactions RT,
805: ap_invoice_distributions_all AID
806: WHERE RT.transaction_id = AID.rcv_transaction_id
807: AND AID.invoice_id = p_line_rec.invoice_id
808: AND AID.invoice_line_number = p_line_rec.line_number
809: AND AID.rcv_transaction_id is not null

Line 821: FROM ap_invoice_distributions_all aid1

817: nvl( AID1.corrected_quantity,0 ) +
818: nvl( AID1.quantity_invoiced,0 )
819: )
820: )
821: FROM ap_invoice_distributions_all aid1
822: WHERE aid1.invoice_id = aid.invoice_id
823: AND aid1.invoice_line_number = aid.invoice_line_number
824: AND aid1.rcv_transaction_id=aid.rcv_transaction_id
825: )

Line 830: FROM ap_invoice_distributions_all aid2

826: OR
827: NVL(rt.amount_billed,0) < (
828: SELECT SUM(DECODE(AID2.dist_match_type, --Bug11783854
829: 'OTHER_TO_RECEIPT',0,NVL(AID2.amount,0)))
830: FROM ap_invoice_distributions_all aid2
831: WHERE aid2.invoice_id = aid.invoice_id
832: AND aid2.invoice_line_number = aid.invoice_line_number
833: AND aid2.rcv_transaction_id=aid.rcv_transaction_id
834: )

Line 1218: debug_info := 'Select from ap_invoice_distributions_all';

1214: current_calling_sequence :=
1215: 'AP_INVOICE_LINES_UTILITY_PKG.IS_LINE_DISTS_TRANS_FA<-'
1216: ||p_Calling_Sequence;
1217:
1218: debug_info := 'Select from ap_invoice_distributions_all';
1219:
1220: Select count(*)
1221: Into dummy
1222: From ap_invoice_distributions_all

Line 1222: From ap_invoice_distributions_all

1218: debug_info := 'Select from ap_invoice_distributions_all';
1219:
1220: Select count(*)
1221: Into dummy
1222: From ap_invoice_distributions_all
1223: Where invoice_id = p_Invoice_Id
1224: And invoice_line_number = p_Line_Number
1225: And assets_addition_flag = 'Y';
1226:

Line 1275: debug_info := 'Select from ap_invoice_distributions_all';

1271: current_calling_sequence :=
1272: 'AP_INVOICE_LINES_UTILITY_PKG.LINE_DISTS_ACCT_EVENT_CREATED<-'
1273: ||p_Calling_Sequence;
1274:
1275: debug_info := 'Select from ap_invoice_distributions_all';
1276:
1277: Select count(*)
1278: Into dummy
1279: From ap_invoice_distributions_all

Line 1279: From ap_invoice_distributions_all

1275: debug_info := 'Select from ap_invoice_distributions_all';
1276:
1277: Select count(*)
1278: Into dummy
1279: From ap_invoice_distributions_all
1280: Where invoice_id = p_Invoice_Id
1281: And invoice_line_number = p_Line_Number
1282: And accounting_event_id Is Not Null;
1283:

Line 1394: From ap_invoice_distributions_all AID

1390: debug_info := 'Select from ap_invoic_distributions_all';
1391:
1392: Select count(*)
1393: Into dummy
1394: From ap_invoice_distributions_all AID
1395: Where NVL(AID.cancellation_flag, 'N') <> 'Y'
1396: And NVL(AID.reversal_flag, 'N') <> 'Y'
1397: And AID.invoice_id = p_invoice_id
1398: --Bug9323585 : Commented line to check for inclusive tax also

Line 1403: From ap_invoice_distributions_all AID2

1399: --And AID.invoice_line_number <> p_line_number
1400: And AID.charge_applicable_to_dist_id IS NOT NULL
1401: And AID.charge_applicable_to_dist_id In
1402: (Select AID2.invoice_distribution_id
1403: From ap_invoice_distributions_all AID2
1404: Where AID2.invoice_id = p_Invoice_Id
1405: And AID2.invoice_line_number = p_Line_Number
1406: And NVL(AID2.cancellation_flag, 'N') <> 'Y'
1407: And NVL(AID2.reversal_flag, 'N') <> 'Y' );

Line 1522: From ap_invoice_distributions_all

1518: debug_info := 'Select from ap_invoic_distributions_all';
1519:
1520: Select count(*)
1521: Into dummy
1522: From ap_invoice_distributions_all
1523: Where invoice_id = p_Invoice_Id
1524: And invoice_line_number = p_Line_Number
1525: And pa_addition_flag In ('T', 'Y', 'Z') ;
1526:

Line 2275: l_awt_flag ap_invoice_distributions_all.awt_flag%TYPE;

2271: p_invoice_id IN NUMBER,
2272: p_line_number IN NUMBER )
2273: RETURN VARCHAR2
2274: IS
2275: l_awt_flag ap_invoice_distributions_all.awt_flag%TYPE;
2276:
2277: BEGIN
2278:
2279: SELECT awt_flag

Line 2281: FROM ap_invoice_distributions_all

2277: BEGIN
2278:
2279: SELECT awt_flag
2280: INTO l_awt_flag
2281: FROM ap_invoice_distributions_all
2282: WHERE invoice_id = p_invoice_id
2283: AND invoice_line_number = p_line_number
2284: AND rownum = 1;
2285: