DBA Data[Home] [Help]

APPS.JAI_AP_DTC_GENERATION_PKG dependencies on JAI_AP_DTC_GENERATION_PKG

Line 1: PACKAGE BODY jai_ap_dtc_generation_pkg

1: PACKAGE BODY jai_ap_dtc_generation_pkg
2: /* $Header: jai_ap_dtc_gen.plb 120.65.12020000.8 2013/06/03 06:47:58 cholei noship $ */
3: AS
4: /* ----------------------------------------------------------------------------
5: FILENAME : jai_ap_dtc_gen.plb

Line 40: G_PKG_NAME CONSTANT VARCHAR2(30) := 'JAI_AP_DTC_GENERATION_PKG';

36: b. Added alias for table jai_ap_tds_thhold_types. Added table alias prefix to
37: threshold_hdr_id,threshold_type_id.
38: 4) When invoice is prepayment, do not get slab throuth nature accounting.
39: ---------------------------------------------------------------------------- */
40: G_PKG_NAME CONSTANT VARCHAR2(30) := 'JAI_AP_DTC_GENERATION_PKG';
41: G_MSG_UERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR;
42: G_MSG_ERROR CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_ERROR;
43: G_MSG_SUCCESS CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_SUCCESS;
44: G_MSG_HIGH CONSTANT NUMBER := FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH;

Line 55: G_MODULE_NAME CONSTANT VARCHAR2(40) := 'JAI.PLSQL.JAI_AP_DTC_GENERATION_PKG.';

51: G_LEVEL_EXCEPTION CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
52: G_LEVEL_EVENT CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
53: G_LEVEL_PROCEDURE CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
54: G_LEVEL_STATEMENT CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
55: G_MODULE_NAME CONSTANT VARCHAR2(40) := 'JAI.PLSQL.JAI_AP_DTC_GENERATION_PKG.';
56: G_CALL_FROM_ROLLBACK CONSTANT VARCHAR2(40) := 'PROCESS_THRESHOLD_ROLLBACK'; --Added by Chong for Bug#13802244 2012/09/17
57: G_VENDOR_SITE_DEF_SEC_CODE CONSTANT VARCHAR2(40) := 'Vendor Site Default Section Code'; --Added by Chong for Bug#13802244 2012/09/17
58: G_NTL_ACC_SEC_MAP CONSTANT VARCHAR2(40) := 'Natural Account - Section Code Mapping'; --Added by Chong for Bug#13802244 2012/09/17
59: G_SURCHARGE_ROLLBACK CONSTANT VARCHAR2(20) := 'SURCHARGE_ROLLBACK'; --Added by Chong for Bug#13359892 2012/09/27

Line 1793: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_dtc_generation_pkg.maintain_thhold_grps', 'START'); /* 1 */

1789:
1790: begin
1791:
1792: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_PROCEDURE, G_MODULE_NAME||l_api_name||'.BEGIN', G_PKG_NAME || ': '||l_api_name||'()+');
1793: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_dtc_generation_pkg.maintain_thhold_grps', 'START'); /* 1 */
1794:
1795:
1796: /* Validate the input */
1797: ln_threshold_grp_id := nvl(p_threshold_grp_id, 0);

Line 1963: trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date) THEN

1959: IF p_tds_event NOT IN
1960: -- Bug 7280925. Commented by Lakshmi Gopalsami ('INVOICE CANCEL',
1961: ('PREPAYMENT UNAPPLICATION') THEN
1962: IF trunc(p_creation_date) >=
1963: trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date) THEN
1964: ln_tmp_tds_amt := get_rnded_value(ln_tmp_tds_amt);
1965: END IF;
1966: END IF;
1967:

Line 2101: p_process_message := 'Error from jai_ap_dtc_generation_pkg.maintain_thhold_grps :' || sqlerrm;

2097: when others then
2098:
2099: fnd_file.put_line(FND_FILE.LOG,' Error in maintain thhold grps '|| substr(SQLERRM,1,200));
2100: p_process_flag := 'E';
2101: p_process_message := 'Error from jai_ap_dtc_generation_pkg.maintain_thhold_grps :' || sqlerrm;
2102: end maintain_thhold_grps;
2103:
2104: /* ******************************** maintain_thhold_grps ******************************************* */
2105:

Line 3234: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_dtc_generation_pkg.process_dtc_at_inv_validate', 'START'); /* 1 */

3230: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_PROCEDURE, G_MODULE_NAME||l_api_name||'.Parameters', 'p_set_of_books_id: '||p_set_of_books_id);
3231: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_PROCEDURE, G_MODULE_NAME||l_api_name||'.Parameters', 'p_org_id: '||p_org_id);
3232: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_PROCEDURE, G_MODULE_NAME||l_api_name||'.Parameters', 'p_call_from: '|| p_call_from);
3233: jai_cmn_utils_pkg.WRITE_FND_LOG(G_LEVEL_PROCEDURE, G_MODULE_NAME||l_api_name||'.Parameters', 'p_creation_date: ' || p_creation_date);
3234: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_dtc_generation_pkg.process_dtc_at_inv_validate', 'START'); /* 1 */
3235:
3236: --Added by Chong for Bug#13802244 2012/09/17 Start
3237: ---------------------------------------------------------------------------------
3238: IF p_call_from = G_CALL_FROM_ROLLBACK THEN

Line 4161: jai_ap_dtc_generation_pkg.maintain_thhold_grps

4157: else
4158:
4159: p_codepath := jai_general_pkg.plot_codepath(19.2, p_codepath); /* 19.2 */
4160:
4161: jai_ap_dtc_generation_pkg.maintain_thhold_grps
4162: (
4163: p_threshold_grp_id => ln_threshold_grp_id,
4164: p_trx_invoice_amount => cur_rec_section.invoice_amount,
4165: p_tds_event => 'INVOICE VALIDATE',

Line 4545: jai_ap_dtc_generation_pkg.generate_dtc_invoices

4541: --fnd_file.put_line(FND_FILE.LOG, '20. Call generate tds invoices' );
4542:
4543: --fnd_file.put_line(FND_FILE.LOG, ' Tax amount while calling generate tds invoices '|| cur_rec.tax_amount);
4544:
4545: jai_ap_dtc_generation_pkg.generate_dtc_invoices
4546:
4547: (
4548: pn_invoice_id => p_invoice_id ,
4549: pn_threshold_hdr_id => ln_threshold_hdr_id ,

Line 4610: jai_ap_dtc_generation_pkg.maintain_thhold_grps

4606: --fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value of tmp tds before maintain thhold grps'||ln_tax_amount);
4607:
4608: p_codepath := jai_general_pkg.plot_codepath(23, p_codepath); /* 23 */
4609:
4610: jai_ap_dtc_generation_pkg.maintain_thhold_grps
4611: (
4612: p_threshold_grp_id => ln_threshold_grp_id,
4613: p_trx_tax_paid => ln_tds_tax_amount,
4614: p_tds_event => 'INVOICE VALIDATE', --Added by Bgowrava for Bug#8254510

Line 4921: jai_ap_dtc_generation_pkg.generate_dtc_invoices

4917:
4918:
4919: --Add by Zhiwei Hou on 20120111 begin
4920: --------------------------------------------------------------
4921: jai_ap_dtc_generation_pkg.generate_dtc_invoices
4922: (
4923: pn_invoice_id => p_invoice_id ,
4924: pn_threshold_hdr_id => ln_threshold_hdr_id ,
4925: pn_taxable_amount => cur_non_tds_rec.taxable_amount ,

Line 4949: /* jai_ap_dtc_generation_pkg.generate_tds_invoices

4945: --------------------------------------------------------------------
4946: --Add by Zhiwei Hou on 20120111 end
4947:
4948: --Comment by Zhiwei Hou on 20120111 begin
4949: /* jai_ap_dtc_generation_pkg.generate_tds_invoices
4950: (
4951: pn_invoice_id => p_invoice_id ,
4952: pn_threshold_hdr_id => ln_threshold_hdr_id ,
4953: pn_taxable_amount => cur_non_tds_rec.taxable_amount ,

Line 5096: P_process_message := 'jai_ap_dtc_generation_pkg.process_dtc_at_inv_validate :' || sqlerrm;

5092: exception
5093: when others then
5094:
5095: p_process_flag := 'E';
5096: P_process_message := 'jai_ap_dtc_generation_pkg.process_dtc_at_inv_validate :' || sqlerrm;
5097: return;
5098: end process_dtc_at_inv_validate;
5099:
5100:

Line 5557: --jai_ap_dtc_generation_pkg.generate_tds_invoices

5553: ln_sum_tax_amount := round(ln_sum_tax_amount,ln_tax_rounding_factor); --Added by Chong for bug#15939571 20121210
5554: ---------------------------------------------------------------------------
5555: --Updated by Zhiwei Hou for Bug#13787158 on 20120305 end
5556:
5557: --jai_ap_dtc_generation_pkg.generate_tds_invoices
5558: jai_ap_dtc_generation_pkg.generate_dtc_invoices
5559: (
5560: pn_invoice_id => TRAN_TAB(i).invoice_id ,
5561: pn_threshold_hdr_id => ln_threshold_hdr_id ,

Line 5558: jai_ap_dtc_generation_pkg.generate_dtc_invoices

5554: ---------------------------------------------------------------------------
5555: --Updated by Zhiwei Hou for Bug#13787158 on 20120305 end
5556:
5557: --jai_ap_dtc_generation_pkg.generate_tds_invoices
5558: jai_ap_dtc_generation_pkg.generate_dtc_invoices
5559: (
5560: pn_invoice_id => TRAN_TAB(i).invoice_id ,
5561: pn_threshold_hdr_id => ln_threshold_hdr_id ,
5562: pn_taxable_amount => TRAN_TAB(i).AMOUNT ,

Line 5706: jai_ap_dtc_generation_pkg.generate_tds_invoices

5702:
5703: ln_surcharge_amount := ROUND(ln_surcharge_amount, get_tax_rounding(p_invoice_id)); --Added by Chong for bug#15939571 2012/12/19
5704:
5705:
5706: jai_ap_dtc_generation_pkg.generate_tds_invoices
5707: (
5708: pn_invoice_id => p_invoice_id,
5709: pn_threshold_hdr_id => ln_threshold_hdr_id ,
5710: pn_taxable_amount => ln_sum_tax_amount,

Line 7292: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

7288: ('PREPAYMENT UNAPPLICATION')
7289: THEN
7290: ln_invoice_to_tds_amount := ROUND(ln_invoice_to_tds_amount,g_inr_currency_rounding);
7291: fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value before round '||ln_invoice_to_tds_amount);
7292: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
7293: /* Bug 7280925. Added by Lakshmi Gopalsami
7294: * we should not round for WCT and ESSI. For those threshold_grp_id
7295: * will be null
7296: */

Line 7324: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date) THEN

7320:
7321: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
7322: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
7323: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
7324: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date) THEN
7325: ln_invoice_to_vendor_amount := get_rnded_value(ln_invoice_to_vendor_amount);
7326: END IF;
7327: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
7328: END IF; --3

Line 7336: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

7332: if r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code then
7333: /*START, Bgowrava for Bug#8995604 , Adding below IF statement to round the INR TDS CM invoice to
7334: the TDS rounding factor before converting it to a foreign currency CM*/
7335: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
7336: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
7337: and pn_threshold_grp_id is not null THEN
7338:
7339: ln_invoice_to_vendor_amount := get_rnded_value(ln_invoice_to_vendor_amount);
7340: END IF;

Line 7346: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

7342: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
7343: ELSE
7344: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
7345: /*START, Bgowrava for Bug#8995604 , Adding below IF statement to round the INR TDS CM invoice to the TDS rounding factor*/
7346: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
7347: and pn_threshold_grp_id is not null THEN
7348:
7349: ln_invoice_to_vendor_amount := get_rnded_value(ln_invoice_to_vendor_amount);
7350: END IF;

Line 7820: IF (trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)) THEN --4

7816: /* Added the below if condition for bug 12965614 */
7817: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
7818: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
7819: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount , g_inr_currency_rounding);
7820: IF (trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)) THEN --4
7821: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;
7822: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);
7823: END IF; --4
7824: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);

Line 7821: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;

7817: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
7818: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
7819: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount , g_inr_currency_rounding);
7820: IF (trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)) THEN --4
7821: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;
7822: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);
7823: END IF; --4
7824: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
7825: END IF; --3

Line 7836: trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

7832: --moved this if-endif block from below to here for bug#8995604
7833: ELSE
7834: ln_tds_rnded_amt := ROUND(pn_tax_amount , g_inr_currency_rounding);
7835: IF (trunc(pd_creation_date) >=
7836: trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
7837: /* Bug 7280925. Added by Lakshmi Gopalsami
7838: * we should not round for WCT and ESSI. For those threshold_grp_id
7839: * will be null
7840: */

Line 7843: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;

7839: * will be null
7840: */
7841: and pn_threshold_grp_id is not null )
7842: THEN
7843: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;
7844: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);
7845: --fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value after round before insert into trxs'||ln_tds_rnded_amt);
7846: END IF;
7847: ln_tds_rnded_amt := ROUND(pn_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);

Line 7944: p_process_message := 'Error from jai_ap_dtc_generation_pkg.generate_dtc_invoices :' || sqlerrm;

7940:
7941: exception
7942: when others then
7943: p_process_flag := 'E';
7944: p_process_message := 'Error from jai_ap_dtc_generation_pkg.generate_dtc_invoices :' || sqlerrm;
7945:
7946: end generate_dtc_invoices;
7947:
7948: /* *********************************** procedure generate_dtc_invoices ********************************** */

Line 9559: jai_ap_dtc_generation_pkg.generate_rollback_dtc_invoices

9555: FETCH c_get_tax_amount_without_event INTO ln_taxable_amount, ln_tax_amount;
9556: CLOSE c_get_tax_amount_without_event;
9557:
9558: --Call jai_ap_tds_generation_pkg.generate_tds_invoices with LN_TAXABLE_AMOUNT, LN_TAX_AMOUNT
9559: jai_ap_dtc_generation_pkg.generate_rollback_dtc_invoices
9560: ( pn_invoice_id => p_invoice_id ,
9561: -- pn_invoice_distribution_id => p_invoice_distribution_id ,
9562: -- pv_invoice_num_prepay_apply=> lv_prepay_invoice_num ,
9563: pn_taxable_amount => ln_taxable_amount ,

Line 9687: jai_ap_dtc_generation_pkg.generate_dtc_invoices

9683: Call jai_ap_tds_generation_pkg.generate_tds_invoices with LN_TAXABLE_AMOUNT, LN_TAX_AMOUNT
9684: Note: Create Surcharge Rollback TDS Invoice with TDS Event as SURCHARGE_ROLLBACK???
9685: */
9686: /* --Commented by Chong for surcharge rollback issue 2012/10/10
9687: jai_ap_dtc_generation_pkg.generate_dtc_invoices
9688: (
9689: pn_invoice_id => p_invoice_id ,
9690: pn_invoice_distribution_id => p_invoice_distribution_id ,
9691: pv_invoice_num_prepay_apply=> lv_prepay_invoice_num ,

Line 9717: jai_ap_dtc_generation_pkg.generate_tds_invoices(

9713: OPEN c_get_surcharge_tax_id(p_threshold_grp_id);
9714: FETCH c_get_surcharge_tax_id into ln_tax_id;
9715: CLOSE c_get_surcharge_tax_id;
9716:
9717: jai_ap_dtc_generation_pkg.generate_tds_invoices(
9718: pn_invoice_id => p_invoice_id
9719: ,pn_threshold_hdr_id => ln_threshold_hdr_id
9720: ,pn_taxable_amount => ln_taxable_amount
9721: ,pn_tax_amount => ln_tax_amount

Line 10047: jai_ap_dtc_generation_pkg.generate_dtc_invoices(pn_invoice_id => cur_rec.invoice_id,

10043: ln_threshold_trx_id := 0;
10044: lv_invoice_to_tds_num := null;
10045: lv_invoice_to_vendor_num := null;
10046:
10047: jai_ap_dtc_generation_pkg.generate_dtc_invoices(pn_invoice_id => cur_rec.invoice_id,
10048: pv_invoice_num_to_vendor_can => r_ap_invoices_all_cm.invoice_num,
10049: pn_taxable_amount => cur_rec.taxable_amount,
10050: pn_tax_amount => cur_rec.tax_amount,
10051: pn_tax_category_id => cur_rec.tax_category_id,

Line 10175: jai_ap_dtc_generation_pkg.generate_tds_invoices

10171: FETCH c_get_surcharge_tax_id into ln_tax_id;
10172: CLOSE c_get_surcharge_tax_id;
10173:
10174:
10175: jai_ap_dtc_generation_pkg.generate_tds_invoices
10176: (
10177: pn_invoice_id => p_invoice_id
10178: ,pn_threshold_hdr_id => ln_threshold_hdr_id
10179: ,pn_taxable_amount => ln_taxable_amount

Line 10608: ln_invoice_to_tds_amount := ROUND(ln_invoice_to_tds_amount,jai_ap_dtc_generation_pkg.g_inr_currency_rounding);

10604: IF pv_tds_event NOT IN
10605: -- Bug 7280925. Commented by Lakshmi Gopalsami ('INVOICE CANCEL',
10606: ('PREPAYMENT UNAPPLICATION')
10607: THEN
10608: ln_invoice_to_tds_amount := ROUND(ln_invoice_to_tds_amount,jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
10609: fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value before round '||ln_invoice_to_tds_amount);
10610: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
10611: /* Bug 7280925. Added by Lakshmi Gopalsami
10612: * we should not round for WCT and ESSI. For those threshold_grp_id

Line 10610: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

10606: ('PREPAYMENT UNAPPLICATION')
10607: THEN
10608: ln_invoice_to_tds_amount := ROUND(ln_invoice_to_tds_amount,jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
10609: fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value before round '||ln_invoice_to_tds_amount);
10610: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
10611: /* Bug 7280925. Added by Lakshmi Gopalsami
10612: * we should not round for WCT and ESSI. For those threshold_grp_id
10613: * will be null
10614: */

Line 10635: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date) THEN

10631:
10632: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
10633: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
10634: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
10635: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date) THEN
10636: ln_invoice_to_vendor_amount := get_rnded_value(ln_invoice_to_vendor_amount);
10637: END IF;
10638: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
10639: END IF; --3

Line 10647: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

10643: if r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code then
10644: /*START, Bgowrava for Bug#8995604 , Adding below IF statement to round the INR TDS CM invoice to
10645: the TDS rounding factor before converting it to a foreign currency CM*/
10646: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
10647: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
10648: and pn_threshold_grp_id is not null THEN
10649:
10650: ln_invoice_to_vendor_amount := get_rnded_value(ln_invoice_to_vendor_amount);
10651: END IF;

Line 10657: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

10653: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
10654: ELSE
10655: ln_invoice_to_vendor_amount := round( ln_invoice_to_vendor_amount, g_inr_currency_rounding);
10656: /*START, Bgowrava for Bug#8995604 , Adding below IF statement to round the INR TDS CM invoice to the TDS rounding factor*/
10657: IF trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
10658: and pn_threshold_grp_id is not null THEN
10659:
10660: ln_invoice_to_vendor_amount := get_rnded_value(ln_invoice_to_vendor_amount);
10661: END IF;

Line 10999: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);

10995: ln_tds_rnded_amt := pn_tax_amount;
10996: /* Added the below if condition for bug 12965614 */
10997: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
10998: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
10999: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11000: IF (trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)) THEN --4
11001: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;
11002: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);
11003: END IF; --4

Line 11000: IF (trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)) THEN --4

10996: /* Added the below if condition for bug 12965614 */
10997: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
10998: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
10999: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11000: IF (trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)) THEN --4
11001: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;
11002: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);
11003: END IF; --4
11004: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);

Line 11001: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;

10997: IF pv_tds_event = 'PREPAYMENT UNAPPLICATION' THEN --2
10998: IF r_ap_invoices_all.invoice_currency_code <> r_gl_sets_of_books.currency_code THEN --3
10999: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11000: IF (trunc(pd_creation_date) >= trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)) THEN --4
11001: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;
11002: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);
11003: END IF; --4
11004: ln_tds_rnded_amt := ROUND(pn_calc_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);
11005:

Line 11012: ln_tds_rnded_amt := ROUND(pn_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);

11008: /*IF pv_tds_event NOT IN
11009: -- Bug 7280925. commented by Lakshmi Gopalsami ('INVOICE CANCEL',
11010: ('PREPAYMENT UNAPPLICATION') THEN */
11011: IF r_ap_invoices_all.invoice_currency_code = r_gl_sets_of_books.currency_code THEN
11012: ln_tds_rnded_amt := ROUND(pn_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11013: --moved this if-endif block from below to here for bug#8995604
11014: ELSE
11015: ln_tds_rnded_amt := ROUND(pn_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11016: IF (trunc(pd_creation_date) >=

Line 11015: ln_tds_rnded_amt := ROUND(pn_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);

11011: IF r_ap_invoices_all.invoice_currency_code = r_gl_sets_of_books.currency_code THEN
11012: ln_tds_rnded_amt := ROUND(pn_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11013: --moved this if-endif block from below to here for bug#8995604
11014: ELSE
11015: ln_tds_rnded_amt := ROUND(pn_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11016: IF (trunc(pd_creation_date) >=
11017: trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
11018: /* Bug 7280925. Added by Lakshmi Gopalsami
11019: * we should not round for WCT and ESSI. For those threshold_grp_id

Line 11017: trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)

11013: --moved this if-endif block from below to here for bug#8995604
11014: ELSE
11015: ln_tds_rnded_amt := ROUND(pn_tax_amount , jai_ap_dtc_generation_pkg.g_inr_currency_rounding);
11016: IF (trunc(pd_creation_date) >=
11017: trunc(jai_ap_dtc_generation_pkg.gd_tds_rounding_effective_date)
11018: /* Bug 7280925. Added by Lakshmi Gopalsami
11019: * we should not round for WCT and ESSI. For those threshold_grp_id
11020: * will be null
11021: */

Line 11024: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;

11020: * will be null
11021: */
11022: and pn_threshold_grp_id is not null )
11023: THEN
11024: ln_tds_rnding_factor := jai_ap_dtc_generation_pkg.gn_tds_rounding_factor;
11025: ln_tds_rnded_amt := get_rnded_value(ln_tds_rnded_amt);
11026: --fnd_file.put_line(FND_FILE.LOG, ' Bug 7280925 - value after round before insert into trxs'||ln_tds_rnded_amt);
11027: END IF;
11028: ln_tds_rnded_amt := ROUND(pn_tax_amount / r_ap_invoices_all.exchange_rate, g_fcy_currency_rounding);

Line 11115: p_process_message := 'Error from jai_ap_dtc_generation_pkg.generate_rollback_dtc_invoices :' || sqlerrm;

11111:
11112: exception
11113: when others then
11114: p_process_flag := 'E';
11115: p_process_message := 'Error from jai_ap_dtc_generation_pkg.generate_rollback_dtc_invoices :' || sqlerrm;
11116:
11117: end generate_rollback_dtc_invoices;
11118:
11119:

Line 11130: IF jai_ap_dtc_generation_pkg.gn_tds_rounding_factor = -1 then

11126: BEGIN
11127: ln_tds_sign := sign(p_tax_amount);
11128: ln_tmp_tax_amt := abs(p_tax_amount);
11129:
11130: IF jai_ap_dtc_generation_pkg.gn_tds_rounding_factor = -1 then
11131: ln_tds_mod_value := 0;
11132: ln_tds_mod_value := MOD(ROUND(ln_tmp_tax_amt,
11133: g_inr_currency_rounding),10);
11134: IF ln_tds_mod_value >= 5 THEN

Line 11145: END jai_ap_dtc_generation_pkg;

11141: END get_rnded_value;
11142: -- End for bug 5722028.
11143:
11144:
11145: END jai_ap_dtc_generation_pkg;