DBA Data[Home] [Help]

APPS.AP_WITHHOLDING_PKG dependencies on AP_UTILITIES_PKG

Line 628: ap_utilities_pkg.ap_round_currency(

624: rec_temp_lines.accounting_date,
625: l_period_name,
626: 'N',
627: rec_invoice.set_of_books_id,
628: ap_utilities_pkg.ap_round_currency(
629: l_withhold_amount, -- bug 8726501
630: p_currency_code), -- bug 8590059
631: ap_utilities_pkg.ap_round_currency(
632: -rec_temp_lines.base_amount,

Line 631: ap_utilities_pkg.ap_round_currency(

627: rec_invoice.set_of_books_id,
628: ap_utilities_pkg.ap_round_currency(
629: l_withhold_amount, -- bug 8726501
630: p_currency_code), -- bug 8590059
631: ap_utilities_pkg.ap_round_currency(
632: -rec_temp_lines.base_amount,
633: l_basecur),
634: 0,
635: 'NOT REQUIRED', /*bug 4994642, was 'NOT_REQUIRED' */

Line 657: l_line_amt := ap_utilities_pkg.ap_round_currency

653: rec_invoice.org_id, --7230158
654: decode (rec_temp_lines.invoice_payment_id,NULL,NULL,rec_temp_lines.group_id)); --7230158
655:
656: -- bug8879522
657: l_line_amt := ap_utilities_pkg.ap_round_currency
658: (l_withhold_amount,
659: p_currency_code);
660: l_line_base_amt := ap_utilities_pkg.ap_round_currency
661: (-rec_temp_lines.base_amount,

Line 660: l_line_base_amt := ap_utilities_pkg.ap_round_currency

656: -- bug8879522
657: l_line_amt := ap_utilities_pkg.ap_round_currency
658: (l_withhold_amount,
659: p_currency_code);
660: l_line_base_amt := ap_utilities_pkg.ap_round_currency
661: (-rec_temp_lines.base_amount,
662: l_basecur);
663: l_sum_dists := 0;
664: l_sum_dists_base := 0;

Line 801: ,ap_utilities_pkg.ap_round_currency(

797: ,SYSDATE
798: ,'AWT'
799: ,rec_temp_dists.period_name
800: ,rec_invoice.set_of_books_id
801: ,ap_utilities_pkg.ap_round_currency(
802: l_withhold_amount, -- bug 8726501
803: p_currency_code) -- bug 8590059
804: ,ap_utilities_pkg.ap_round_currency(-rec_temp_dists.base_withholding_amount,
805: l_basecur)

Line 804: ,ap_utilities_pkg.ap_round_currency(-rec_temp_dists.base_withholding_amount,

800: ,rec_invoice.set_of_books_id
801: ,ap_utilities_pkg.ap_round_currency(
802: l_withhold_amount, -- bug 8726501
803: p_currency_code) -- bug 8590059
804: ,ap_utilities_pkg.ap_round_currency(-rec_temp_dists.base_withholding_amount,
805: l_basecur)
806: ,rec_invoice.batch_id
807: ,P_Last_Updated_By
808: ,SYSDATE

Line 829: ,ap_utilities_pkg.ap_round_currency(

825: -- ,rec_invoice.ussgl_trx_code_context - Bug 4277744
826: ,decode (P_Calling_Module, 'AWT REPORT', 'P',
827: 'A')
828: ,rec_temp_dists.tax_rate_id
829: ,ap_utilities_pkg.ap_round_currency(
830: rec_temp_dists.gross_amount/nvl(l_exchange_rate,1), --bug 8590059
831: P_currency_code)
832: ,rec_temp_dists.group_id
833: ,rec_temp_dists.invoice_payment_id

Line 871: ap_utilities_pkg.ap_round_currency

867: FND_LOG.STRING(G_LEVEL_STATEMENT,G_MODULE_NAME||DBG_Loc,debug_info);
868: END IF;
869:
870: l_sum_dists := l_sum_dists +
871: ap_utilities_pkg.ap_round_currency
872: (l_withhold_amount,
873: p_currency_code);
874: l_sum_dists_base := l_sum_dists_base +
875: ap_utilities_pkg.ap_round_currency

Line 875: ap_utilities_pkg.ap_round_currency

871: ap_utilities_pkg.ap_round_currency
872: (l_withhold_amount,
873: p_currency_code);
874: l_sum_dists_base := l_sum_dists_base +
875: ap_utilities_pkg.ap_round_currency
876: (-rec_temp_dists.base_withholding_amount,
877: l_basecur);
878:
879: debug_info := ' After processing awt_related_id '||rec_temp_dists.awt_related_id||

Line 898: ap_utilities_pkg.ap_round_currency(

894: p_calling_sequence => current_calling_sequence);
895:
896:
897: withholding_total := withholding_total +
898: ap_utilities_pkg.ap_round_currency(
899: rec_temp_dists.withholding_amount/
900: nvl(l_exchange_rate,1), --bug 8899204
901: p_currency_code); --bug 8590059
902: base_withholding_total := base_withholding_total +

Line 1124: amount_to_subtract := Ap_Utilities_Pkg.Ap_Round_Currency

1120: amount_to_subtract := withholding_total *
1121: (rec_payment_sched.inv_curr_gross_amount /
1122: inv_amount_before_withholding
1123: );
1124: amount_to_subtract := Ap_Utilities_Pkg.Ap_Round_Currency
1125: (amount_to_subtract ,P_Currency_Code);
1126:
1127: debug_info := 'amount_to_subtract ' || amount_to_subtract;
1128: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 1174: pay_curr_amount_to_subtract := ap_utilities_pkg.ap_round_currency(

1170: -- (this is due to rounding reasons):
1171: amount_to_subtract := withholding_total - subtracting_cumulator;
1172: END IF;
1173:
1174: pay_curr_amount_to_subtract := ap_utilities_pkg.ap_round_currency(
1175: amount_to_subtract * rec_invoice.payment_cross_rate,
1176: rec_invoice.payment_currency_code);
1177:
1178: debug_info := 'pay_curr_amount_to_subtract ' || pay_curr_amount_to_subtract;

Line 1194: ap_utilities_pkg.ap_round_currency(

1190: SET amount_remaining = amount_remaining -
1191: pay_curr_amount_to_subtract,
1192: -- iyas: Following code IS in DLD but was not found originally in file:
1193: discount_amount_available = discount_amount_available -
1194: ap_utilities_pkg.ap_round_currency(
1195: discount_amount_available * l_disc_amt_factor,
1196: rec_invoice.payment_currency_code),
1197: second_disc_amt_available = second_disc_amt_available -
1198: ap_utilities_pkg.ap_round_currency(

Line 1198: ap_utilities_pkg.ap_round_currency(

1194: ap_utilities_pkg.ap_round_currency(
1195: discount_amount_available * l_disc_amt_factor,
1196: rec_invoice.payment_currency_code),
1197: second_disc_amt_available = second_disc_amt_available -
1198: ap_utilities_pkg.ap_round_currency(
1199: second_disc_amt_available * l_disc_amt_factor,
1200: rec_invoice.payment_currency_code) ,
1201: third_disc_amt_available = third_disc_amt_available -
1202: ap_utilities_pkg.ap_round_currency(

Line 1202: ap_utilities_pkg.ap_round_currency(

1198: ap_utilities_pkg.ap_round_currency(
1199: second_disc_amt_available * l_disc_amt_factor,
1200: rec_invoice.payment_currency_code) ,
1201: third_disc_amt_available = third_disc_amt_available -
1202: ap_utilities_pkg.ap_round_currency(
1203: third_disc_amt_available * l_disc_amt_factor,
1204: rec_invoice.payment_currency_code)
1205: WHERE CURRENT of c_payment_sched;
1206:

Line 1228: ap_utilities_pkg.ap_round_currency(

1224: -- currency before substracting it FROM the amount remaining.
1225:
1226: UPDATE ap_payment_schedules_all
1227: SET amount_remaining = (amount_remaining -
1228: ap_utilities_pkg.ap_round_currency(
1229: withholding_total * rec_invoice.payment_cross_rate,
1230: rec_invoice.payment_currency_code))
1231: WHERE current of c_payment_sched;
1232:

Line 1543: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION' , 'AWT'),1,25)||

1539:
1540: --bug 8266021 added last 3 more values --
1541: CURSOR c_base_invoice_description (InvId IN NUMBER) IS
1542: SELECT substrb(
1543: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION' , 'AWT'),1,25)||
1544: ' - '||
1545: v.vendor_name||
1546: ' - '||
1547: i.invoice_num||

Line 1915: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)

1911: ,SYSDATE
1912: ,5
1913: ,tax_authority_id
1914: ,DECODE( p_calling_sequence, 'AP_WITHHOLDING_PKG.AP_Undo_Withholding',
1915: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)
1916: ||' - '||to_char(P_invoice_id)||' - ' || to_char(rec_awt_invs.invoice_line_number)
1917: || ' - ' || Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION','CANCELLED'),
1918: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)||
1919: ' - '||to_char(P_invoice_id)||' - ' || to_char(rec_awt_invs.invoice_line_number)

Line 1917: || ' - ' || Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION','CANCELLED'),

1913: ,tax_authority_id
1914: ,DECODE( p_calling_sequence, 'AP_WITHHOLDING_PKG.AP_Undo_Withholding',
1915: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)
1916: ||' - '||to_char(P_invoice_id)||' - ' || to_char(rec_awt_invs.invoice_line_number)
1917: || ' - ' || Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION','CANCELLED'),
1918: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)||
1919: ' - '||to_char(P_invoice_id)||' - ' || to_char(rec_awt_invs.invoice_line_number)
1920: )
1921: ,l_set_of_books_id

Line 1918: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)||

1914: ,DECODE( p_calling_sequence, 'AP_WITHHOLDING_PKG.AP_Undo_Withholding',
1915: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)
1916: ||' - '||to_char(P_invoice_id)||' - ' || to_char(rec_awt_invs.invoice_line_number)
1917: || ' - ' || Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION','CANCELLED'),
1918: substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)||
1919: ' - '||to_char(P_invoice_id)||' - ' || to_char(rec_awt_invs.invoice_line_number)
1920: )
1921: ,l_set_of_books_id
1922: ,base_currency

Line 1938: ,substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)

1934: ,tax_authority_site_id
1935: ,0
1936: ,0
1937: ,NVL(P_Payment_Date,rec_awt_invs.accounting_date)
1938: ,substrb(Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('NLS TRANSLATION', 'AWT'),1,25)
1939: ,'AWT'
1940: ,new_invoice_base_descr
1941: ,l_batch_id
1942: ,decode(sign(rec_awt_invs.invoice_amount),

Line 2051: NVL(ap_utilities_pkg.get_current_gl_date(P_Payment_Date, l_org_id),

2047: 'D',
2048: 'NOT MATCHED',
2049: 'N',
2050: NVL(P_Payment_Date,rec_awt_invs.accounting_date),
2051: NVL(ap_utilities_pkg.get_current_gl_date(P_Payment_Date, l_org_id),
2052: l_period_name),
2053: 'N',
2054: l_set_of_books_id,
2055: rec_awt_invs.invoice_amount,

Line 2158: AP_UTILITIES_PKG.g_org_id := rec_awt_lines.org_id; /*Bug11720134 : Setting the org id global parameter*/

2154: INTO l_dist_code_ccid
2155: FROM ap_invoice_distributions_all
2156: WHERE invoice_distribution_id = rec_awt_lines.awt_related_id;
2157:
2158: AP_UTILITIES_PKG.g_org_id := rec_awt_lines.org_id; /*Bug11720134 : Setting the org id global parameter*/
2159:
2160: ap_utilities_pkg.build_offset_account(rec_awt_lines.dist_code_combination_id,
2161: l_dist_code_ccid,
2162: NVL(P_Payment_Date,rec_awt_lines.accounting_date),

Line 2160: ap_utilities_pkg.build_offset_account(rec_awt_lines.dist_code_combination_id,

2156: WHERE invoice_distribution_id = rec_awt_lines.awt_related_id;
2157:
2158: AP_UTILITIES_PKG.g_org_id := rec_awt_lines.org_id; /*Bug11720134 : Setting the org id global parameter*/
2159:
2160: ap_utilities_pkg.build_offset_account(rec_awt_lines.dist_code_combination_id,
2161: l_dist_code_ccid,
2162: NVL(P_Payment_Date,rec_awt_lines.accounting_date),
2163: l_overlayed_awt_ccid,
2164: l_reason,

Line 2273: , NVL(ap_utilities_pkg.get_current_gl_date(P_Payment_Date, rec_awt_lines.org_id),

2269: ,1 -- invoice_line_number
2270: ,P_Last_Updated_By
2271: ,SYSDATE
2272: ,'ITEM'
2273: , NVL(ap_utilities_pkg.get_current_gl_date(P_Payment_Date, rec_awt_lines.org_id),
2274: rec_awt_lines.period_name)
2275: ,rec_awt_lines.set_of_books_id
2276: ,-NVL(rec_awt_lines.base_amount, rec_awt_lines.amount)
2277: ,NULL -- base amount bug 5190989

Line 3251: /* l_subject_amount := ap_utilities_pkg.ap_round_currency(

3247:
3248: END IF;
3249: end bug 12598502 */
3250: /* Bug 4990575 removed the round currency function from below statement */
3251: /* l_subject_amount := ap_utilities_pkg.ap_round_currency(
3252: l_subject_amount /
3253: rec_ok_sel_invs.payment_cross_rate *
3254: rec_ok_sel_invs.invoice_exchange_rate,
3255: rec_ok_sel_invs.base_currency_code);*/

Line 3263: l_subject_amount := ap_utilities_pkg.ap_round_currency((l_subject_amount * l_invoice_amount/l_amount_payable)

3259: --bug14176696, commented rounding for subject amount
3260: /*
3261: --Bug12376604: Added if else block for l_amount_payable = 0
3262: if (l_amount_payable <> 0) then
3263: l_subject_amount := ap_utilities_pkg.ap_round_currency((l_subject_amount * l_invoice_amount/l_amount_payable)
3264: ,rec_ok_sel_invs.payment_currency_code); --6660355
3265: else
3266: l_subject_amount := ap_utilities_pkg.ap_round_currency(l_subject_amount ,rec_ok_sel_invs.payment_currency_code);
3267: end if;

Line 3266: l_subject_amount := ap_utilities_pkg.ap_round_currency(l_subject_amount ,rec_ok_sel_invs.payment_currency_code);

3262: if (l_amount_payable <> 0) then
3263: l_subject_amount := ap_utilities_pkg.ap_round_currency((l_subject_amount * l_invoice_amount/l_amount_payable)
3264: ,rec_ok_sel_invs.payment_currency_code); --6660355
3265: else
3266: l_subject_amount := ap_utilities_pkg.ap_round_currency(l_subject_amount ,rec_ok_sel_invs.payment_currency_code);
3267: end if;
3268: --End of Bug12376604
3269: */
3270:

Line 3313: l_withholding_amount := ap_utilities_pkg.ap_round_currency(

3309: AND AATD.invoice_id = rec_ok_sel_invs.invoice_id
3310: AND AATD.payment_num = rec_ok_sel_invs.payment_num
3311: and aatd.checkrun_id = p_checkrun_id;
3312:
3313: l_withholding_amount := ap_utilities_pkg.ap_round_currency(
3314: l_withholding_amount /
3315: rec_ok_sel_invs.payment_exchange_rate,
3316: -- * rec_ok_sel_invs.payment_cross_rate, -- bug 8590059
3317: rec_ok_sel_invs.payment_currency_code);

Line 3326: ap_utilities_pkg.ap_round_currency(

3322: END IF;
3323:
3324: UPDATE ap_selected_invoices_all ASI
3325: SET /*ASI.proposed_payment_amount =
3326: ap_utilities_pkg.ap_round_currency(
3327: ASI.proposed_payment_amount,rec_ok_sel_invs.payment_currency_code) -
3328: l_withholding_amount
3329: -- We round proposed_payment_amount here because we couldn't round it earlier.
3330: ,ASI.payment_amount =

Line 3336: ASI.proposed_payment_amount = ap_utilities_pkg.ap_round_currency(ASI.proposed_payment_amount,rec_ok_sel_invs.payment_currency_code)

3332: ,ASI.amount_remaining =
3333: ASI.amount_remaining - l_withholding_amount
3334: ,ASI.withholding_amount = l_withholding_amount */
3335: --Bug#8281225 Wrong Amount Remaining in Case of Inv Payment Through PPR
3336: ASI.proposed_payment_amount = ap_utilities_pkg.ap_round_currency(ASI.proposed_payment_amount,rec_ok_sel_invs.payment_currency_code)
3337: - nvl(l_withholding_amount, 0)
3338: ,ASI.payment_amount = ap_utilities_pkg.ap_round_currency(ASI.proposed_payment_amount,rec_ok_sel_invs.payment_currency_code)
3339: - nvl(l_withholding_amount, 0)
3340: ,ASI.withholding_amount = l_withholding_amount

Line 3338: ,ASI.payment_amount = ap_utilities_pkg.ap_round_currency(ASI.proposed_payment_amount,rec_ok_sel_invs.payment_currency_code)

3334: ,ASI.withholding_amount = l_withholding_amount */
3335: --Bug#8281225 Wrong Amount Remaining in Case of Inv Payment Through PPR
3336: ASI.proposed_payment_amount = ap_utilities_pkg.ap_round_currency(ASI.proposed_payment_amount,rec_ok_sel_invs.payment_currency_code)
3337: - nvl(l_withholding_amount, 0)
3338: ,ASI.payment_amount = ap_utilities_pkg.ap_round_currency(ASI.proposed_payment_amount,rec_ok_sel_invs.payment_currency_code)
3339: - nvl(l_withholding_amount, 0)
3340: ,ASI.withholding_amount = l_withholding_amount
3341: WHERE current of c_ok_sel_invs;
3342: ELSE

Line 4675: ap_utilities_pkg.get_open_gl_date(P_Awt_Date, gl_period_name, gl_awt_date);

4671: AND ASP.org_id = l_org_id; /* Bug 4759178, added org_id condition*/
4672:
4673: EXCEPTION
4674: WHEN NO_DATA_FOUND THEN
4675: ap_utilities_pkg.get_open_gl_date(P_Awt_Date, gl_period_name, gl_awt_date);
4676: IF gl_awt_date IS NULL THEN
4677: RAISE NOT_AN_OPEN_GL_PERIOD;
4678: END IF;
4679: END;

Line 4856: ap_utilities_pkg.ap_round_currency(

4852: END IF;
4853:
4854: UPDATE ap_awt_buckets
4855: SET gross_amount_to_date = (gross_amt_to_date -
4856: ap_utilities_pkg.ap_round_currency(
4857: rec_awt_gross_dists.awt_gross_amount*
4858: NVL(l_invoice_exchange_rate,1),
4859: l_func_currency_code ))
4860: WHERE CURRENT OF c_awt_bucket;

Line 5334: ap_utilities_pkg.ap_round_currency(

5330: END IF;
5331:
5332: UPDATE ap_payment_schedules
5333: SET amount_remaining = (amount_remaining +
5334: ap_utilities_pkg.ap_round_currency(
5335: reversed_withholding *
5336: payment_cross_rate,
5337: rec_payment_sched.payment_currency_code))
5338: , payment_status_flag = decode(amount_remaining + -- Bug 8300099/4959558

Line 5339: ap_utilities_pkg.ap_round_currency(reversed_withholding * payment_cross_rate,

5335: reversed_withholding *
5336: payment_cross_rate,
5337: rec_payment_sched.payment_currency_code))
5338: , payment_status_flag = decode(amount_remaining + -- Bug 8300099/4959558
5339: ap_utilities_pkg.ap_round_currency(reversed_withholding * payment_cross_rate,
5340: rec_payment_sched.payment_currency_code),gross_amount,'N','P')
5341: WHERE CURRENT of c_payment_sched;
5342:
5343: -- Bug 8300099/7518063 : Added below update statement

Line 5435: ap_utilities_pkg.ap_round_currency(

5431: --Bug12594549
5432: UPDATE ap_awt_buckets
5433: SET
5434: /* gross_amount_to_date = (gross_amt_to_date -
5435: ap_utilities_pkg.ap_round_currency(
5436: rec_awt_dists.awt_gross_amount*
5437: NVL(l_invoice_exchange_rate,1),
5438: l_func_currency_code )), */
5439: withheld_amount_to_date = (withheld_amt_to_date+

Line 5440: ap_utilities_pkg.ap_round_currency(

5436: rec_awt_dists.awt_gross_amount*
5437: NVL(l_invoice_exchange_rate,1),
5438: l_func_currency_code )), */
5439: withheld_amount_to_date = (withheld_amt_to_date+
5440: ap_utilities_pkg.ap_round_currency(
5441: rec_awt_dists.amount*NVL(l_invoice_exchange_rate,1),
5442: l_func_currency_code ))
5443: WHERE CURRENT OF c_awt_bucket;
5444: ELSE

Line 5665: error_text := Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('AWT ERROR',

5661: WHEN NOT_AN_OPEN_GL_PERIOD THEN
5662: DECLARE
5663: error_text VARCHAR2(2000);
5664: BEGIN
5665: error_text := Ap_Utilities_Pkg.Ap_Get_DISplayed_Field('AWT ERROR',
5666: 'GL PERIOD NOT OPEN');
5667: P_AWT_Success := error_text;
5668: END;
5669: --