200: lv_cenvat_costed_flag VARCHAR2(15);
201:
202: BEGIN
203: lv_procedure_name := 'jai_rcv_deliver_rtr_pkg.process_transaction';
204: lv_debug := jai_constants.yes;
205: ln_apportion_factor := 1; -- default value added by Vijay Shankar for Bug#4068823 for RECEIPTS DEPLUG
206: ln_modvat_amount := 0;
207: ln_non_modvat_amount := 0;
208: ln_other_modvat_amount := 0;
333:
334: /* following condition added by Vijay Shankar for Bug#4068823. RECEIPTS DEPLUG
335: vat_noclaim added by Vijay Shankar for Bug#4250236(4245089). VAT Impl.
336: */
337: if nvl(p_process_special_source, 'XX') NOT IN ( jai_constants.cenvat_noclaim, jai_constants.vat_noclaim) then
338:
339: -- following gets executed only for NORMAL DELIVER and RTR transactions and not for UNCLAIM Processing till <
340: lv_statement_id := '5';
341: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */
420: p_codepath := jai_general_pkg.plot_codepath(18, p_codepath); /* 18 */
421: ln_total := nvl(ln_non_modvat_amount,0);
422: end if;
423:
424: end if; -- end of p_process_special_source not in ( jai_constants.cenvat_noclaim ...
425:
426: /* following condition added by Vijay Shankar for Bug#4068823. RECEIPTS DEPLUG
427: vat_noclaim added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
428: IF p_process_special_source IN ( jai_constants.cenvat_noclaim, jai_constants.vat_noclaim) THEN
424: end if; -- end of p_process_special_source not in ( jai_constants.cenvat_noclaim ...
425:
426: /* following condition added by Vijay Shankar for Bug#4068823. RECEIPTS DEPLUG
427: vat_noclaim added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
428: IF p_process_special_source IN ( jai_constants.cenvat_noclaim, jai_constants.vat_noclaim) THEN
429: ln_total := p_process_special_amount;
430: p_codepath := jai_general_pkg.plot_codepath(18.1, p_codepath);
431: ELSE
432: ln_total := nvl(ln_total,0); --In case the Total is Null.
645:
646: /* following was coded to support UNCLAIM functionality during RECEIPTS DEPLUG. Vijay Shankar for Bug#4068823
647: vat_noclaim added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
648: IF lv_include_cenvat_in_costing = 'Y'
649: or p_process_special_source IN ( jai_constants.cenvat_noclaim, jai_constants.vat_noclaim)
650: THEN
651: p_codepath := jai_general_pkg.plot_codepath(33, p_codepath);
652: lv_cenvat_costed_flag := jai_constants.yes;
653: ELSE
648: IF lv_include_cenvat_in_costing = 'Y'
649: or p_process_special_source IN ( jai_constants.cenvat_noclaim, jai_constants.vat_noclaim)
650: THEN
651: p_codepath := jai_general_pkg.plot_codepath(33, p_codepath);
652: lv_cenvat_costed_flag := jai_constants.yes;
653: ELSE
654: p_codepath := jai_general_pkg.plot_codepath(34, p_codepath);
655: lv_cenvat_costed_flag := jai_constants.no;
656: END IF;
651: p_codepath := jai_general_pkg.plot_codepath(33, p_codepath);
652: lv_cenvat_costed_flag := jai_constants.yes;
653: ELSE
654: p_codepath := jai_general_pkg.plot_codepath(34, p_codepath);
655: lv_cenvat_costed_flag := jai_constants.no;
656: END IF;
657:
658: IF r_trx.cenvat_costed_flag IS NULL --Modified by Bo Li for replacing the attribute2 with cenvat_costed_flag
659: OR (/*r_trx.attribute1 = jai_rcv_deliver_rtr_pkg.cenvat_costed_flag
656: END IF;
657:
658: IF r_trx.cenvat_costed_flag IS NULL --Modified by Bo Li for replacing the attribute2 with cenvat_costed_flag
659: OR (/*r_trx.attribute1 = jai_rcv_deliver_rtr_pkg.cenvat_costed_flag
660: AND*/nvl(r_trx.cenvat_costed_flag,jai_constants.no) <> jai_constants.yes)--Modified by Bo Li for replacing the attribute2 with cenvat_costed_flg
661: THEN
662:
663: p_codepath := jai_general_pkg.plot_codepath(35, p_codepath);
664:
781: WHERE jtc.tax_id = rtl.tax_id
782: AND shipment_line_id = p_shipment_line_id
783: AND upper(rtl.tax_type) NOT IN ( 'EXCISE', 'ADDL. EXCISE',
784: 'OTHER EXCISE', 'CVD','TDS', 'MODVAT RECOVERY',
785: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
786: jai_constants.tax_type_exc_edu_cess,
787: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
788: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
782: AND shipment_line_id = p_shipment_line_id
783: AND upper(rtl.tax_type) NOT IN ( 'EXCISE', 'ADDL. EXCISE',
784: 'OTHER EXCISE', 'CVD','TDS', 'MODVAT RECOVERY',
785: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
786: jai_constants.tax_type_exc_edu_cess,
787: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
788: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
790: jai_constants.tax_type_boe_other1,
783: AND upper(rtl.tax_type) NOT IN ( 'EXCISE', 'ADDL. EXCISE',
784: 'OTHER EXCISE', 'CVD','TDS', 'MODVAT RECOVERY',
785: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
786: jai_constants.tax_type_exc_edu_cess,
787: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
788: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
790: jai_constants.tax_type_boe_other1,
791: jai_constants.tax_type_boe_other2,
784: 'OTHER EXCISE', 'CVD','TDS', 'MODVAT RECOVERY',
785: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
786: jai_constants.tax_type_exc_edu_cess,
787: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
788: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
790: jai_constants.tax_type_boe_other1,
791: jai_constants.tax_type_boe_other2,
792: jai_constants.tax_type_boe_other3,
786: jai_constants.tax_type_exc_edu_cess,
787: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
788: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
790: jai_constants.tax_type_boe_other1,
791: jai_constants.tax_type_boe_other2,
792: jai_constants.tax_type_boe_other3,
793: jai_constants.tax_type_boe_other4,
794: jai_constants.tax_type_boe_other5)
787: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
788: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
790: jai_constants.tax_type_boe_other1,
791: jai_constants.tax_type_boe_other2,
792: jai_constants.tax_type_boe_other3,
793: jai_constants.tax_type_boe_other4,
794: jai_constants.tax_type_boe_other5)
795: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
788: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
790: jai_constants.tax_type_boe_other1,
791: jai_constants.tax_type_boe_other2,
792: jai_constants.tax_type_boe_other3,
793: jai_constants.tax_type_boe_other4,
794: jai_constants.tax_type_boe_other5)
795: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
796:
789: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
790: jai_constants.tax_type_boe_other1,
791: jai_constants.tax_type_boe_other2,
792: jai_constants.tax_type_boe_other3,
793: jai_constants.tax_type_boe_other4,
794: jai_constants.tax_type_boe_other5)
795: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
796:
797: -- following condition added by Vijay Shankar for Bug#4068823. Service Tax Enhancement
790: jai_constants.tax_type_boe_other1,
791: jai_constants.tax_type_boe_other2,
792: jai_constants.tax_type_boe_other3,
793: jai_constants.tax_type_boe_other4,
794: jai_constants.tax_type_boe_other5)
795: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
796:
797: -- following condition added by Vijay Shankar for Bug#4068823. Service Tax Enhancement
798: -- this is added to Stop Recovery Service Tax Accounting, as this will be done during RECEIVE trx or
799: -- during Payables Invoice/Payment depending on transaction parameters
800: AND rtl.tax_type NOT IN (select attribute_code from JAI_RGM_REGISTRATIONS aa, JAI_RGM_DEFINITIONS bb
801: where aa.regime_id = bb.regime_id
802: /* vat_regime is included in the following clause by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
803: and bb.regime_code IN (jai_constants.service_regime, jai_constants.vat_regime)
804: and aa.registration_type = jai_constants.regn_type_tax_types )
805: AND NVL(rtl.modvat_flag, 'N') = 'Y'
806: GROUP BY jtc.tax_account_id
807: )
800: AND rtl.tax_type NOT IN (select attribute_code from JAI_RGM_REGISTRATIONS aa, JAI_RGM_DEFINITIONS bb
801: where aa.regime_id = bb.regime_id
802: /* vat_regime is included in the following clause by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
803: and bb.regime_code IN (jai_constants.service_regime, jai_constants.vat_regime)
804: and aa.registration_type = jai_constants.regn_type_tax_types )
805: AND NVL(rtl.modvat_flag, 'N') = 'Y'
806: GROUP BY jtc.tax_account_id
807: )
808: LOOP
1022:
1023: if tax_rec.modvat_flag = 'Y'
1024: and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1025: 'TDS', 'MODVAT RECOVERY',
1026: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1027: jai_constants.tax_type_exc_edu_cess,
1028: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1029: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1023: if tax_rec.modvat_flag = 'Y'
1024: and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1025: 'TDS', 'MODVAT RECOVERY',
1026: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1027: jai_constants.tax_type_exc_edu_cess,
1028: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1029: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1031: jai_constants.tax_type_boe_other1,
1024: and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1025: 'TDS', 'MODVAT RECOVERY',
1026: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1027: jai_constants.tax_type_exc_edu_cess,
1028: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1029: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1031: jai_constants.tax_type_boe_other1,
1032: jai_constants.tax_type_boe_other2,
1025: 'TDS', 'MODVAT RECOVERY',
1026: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1027: jai_constants.tax_type_exc_edu_cess,
1028: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1029: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1031: jai_constants.tax_type_boe_other1,
1032: jai_constants.tax_type_boe_other2,
1033: jai_constants.tax_type_boe_other3,
1027: jai_constants.tax_type_exc_edu_cess,
1028: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1029: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1031: jai_constants.tax_type_boe_other1,
1032: jai_constants.tax_type_boe_other2,
1033: jai_constants.tax_type_boe_other3,
1034: jai_constants.tax_type_boe_other4,
1035: jai_constants.tax_type_boe_other5)
1028: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1029: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1031: jai_constants.tax_type_boe_other1,
1032: jai_constants.tax_type_boe_other2,
1033: jai_constants.tax_type_boe_other3,
1034: jai_constants.tax_type_boe_other4,
1035: jai_constants.tax_type_boe_other5)
1036: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1029: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1031: jai_constants.tax_type_boe_other1,
1032: jai_constants.tax_type_boe_other2,
1033: jai_constants.tax_type_boe_other3,
1034: jai_constants.tax_type_boe_other4,
1035: jai_constants.tax_type_boe_other5)
1036: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1037:
1030: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1031: jai_constants.tax_type_boe_other1,
1032: jai_constants.tax_type_boe_other2,
1033: jai_constants.tax_type_boe_other3,
1034: jai_constants.tax_type_boe_other4,
1035: jai_constants.tax_type_boe_other5)
1036: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1037:
1038: then
1031: jai_constants.tax_type_boe_other1,
1032: jai_constants.tax_type_boe_other2,
1033: jai_constants.tax_type_boe_other3,
1034: jai_constants.tax_type_boe_other4,
1035: jai_constants.tax_type_boe_other5)
1036: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1037:
1038: then
1039:
1041: lv_tax_modvat_flag := 'Y';
1042:
1043: elsif upper(tax_rec.modvat_flag) = 'Y'
1044: and tax_rec.tax_type NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1045: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1046: jai_constants.tax_type_exc_edu_cess,
1047: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1048: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1042:
1043: elsif upper(tax_rec.modvat_flag) = 'Y'
1044: and tax_rec.tax_type NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1045: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1046: jai_constants.tax_type_exc_edu_cess,
1047: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1048: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1050: jai_constants.tax_type_boe_other1,
1043: elsif upper(tax_rec.modvat_flag) = 'Y'
1044: and tax_rec.tax_type NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1045: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1046: jai_constants.tax_type_exc_edu_cess,
1047: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1048: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1050: jai_constants.tax_type_boe_other1,
1051: jai_constants.tax_type_boe_other2,
1044: and tax_rec.tax_type NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1045: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1046: jai_constants.tax_type_exc_edu_cess,
1047: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1048: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1050: jai_constants.tax_type_boe_other1,
1051: jai_constants.tax_type_boe_other2,
1052: jai_constants.tax_type_boe_other3,
1046: jai_constants.tax_type_exc_edu_cess,
1047: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1048: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1050: jai_constants.tax_type_boe_other1,
1051: jai_constants.tax_type_boe_other2,
1052: jai_constants.tax_type_boe_other3,
1053: jai_constants.tax_type_boe_other4,
1054: jai_constants.tax_type_boe_other5)
1047: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1048: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1050: jai_constants.tax_type_boe_other1,
1051: jai_constants.tax_type_boe_other2,
1052: jai_constants.tax_type_boe_other3,
1053: jai_constants.tax_type_boe_other4,
1054: jai_constants.tax_type_boe_other5)
1055: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1048: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1050: jai_constants.tax_type_boe_other1,
1051: jai_constants.tax_type_boe_other2,
1052: jai_constants.tax_type_boe_other3,
1053: jai_constants.tax_type_boe_other4,
1054: jai_constants.tax_type_boe_other5)
1055: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1056: then
1049: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1050: jai_constants.tax_type_boe_other1,
1051: jai_constants.tax_type_boe_other2,
1052: jai_constants.tax_type_boe_other3,
1053: jai_constants.tax_type_boe_other4,
1054: jai_constants.tax_type_boe_other5)
1055: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1056: then
1057:
1050: jai_constants.tax_type_boe_other1,
1051: jai_constants.tax_type_boe_other2,
1052: jai_constants.tax_type_boe_other3,
1053: jai_constants.tax_type_boe_other4,
1054: jai_constants.tax_type_boe_other5)
1055: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1056: then
1057:
1058: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
1063: and r_ja_in_rcv_transactions.excise_in_trading = 'Y'
1064: and r_ja_in_rcv_transactions.item_excisable = 'Y'
1065: and r_ja_in_rcv_transactions.organization_type = 'T'
1066: and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1067: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1068: jai_constants.tax_type_exc_edu_cess,
1069: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1070: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1064: and r_ja_in_rcv_transactions.item_excisable = 'Y'
1065: and r_ja_in_rcv_transactions.organization_type = 'T'
1066: and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1067: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1068: jai_constants.tax_type_exc_edu_cess,
1069: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1070: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1072: jai_constants.tax_type_boe_other1,
1065: and r_ja_in_rcv_transactions.organization_type = 'T'
1066: and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1067: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1068: jai_constants.tax_type_exc_edu_cess,
1069: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1070: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1072: jai_constants.tax_type_boe_other1,
1073: jai_constants.tax_type_boe_other2,
1066: and upper(tax_rec.tax_type) IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1067: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1068: jai_constants.tax_type_exc_edu_cess,
1069: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1070: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1072: jai_constants.tax_type_boe_other1,
1073: jai_constants.tax_type_boe_other2,
1074: jai_constants.tax_type_boe_other3,
1068: jai_constants.tax_type_exc_edu_cess,
1069: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1070: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1072: jai_constants.tax_type_boe_other1,
1073: jai_constants.tax_type_boe_other2,
1074: jai_constants.tax_type_boe_other3,
1075: jai_constants.tax_type_boe_other4,
1076: jai_constants.tax_type_boe_other5)
1069: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1070: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1072: jai_constants.tax_type_boe_other1,
1073: jai_constants.tax_type_boe_other2,
1074: jai_constants.tax_type_boe_other3,
1075: jai_constants.tax_type_boe_other4,
1076: jai_constants.tax_type_boe_other5)
1077: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1070: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1072: jai_constants.tax_type_boe_other1,
1073: jai_constants.tax_type_boe_other2,
1074: jai_constants.tax_type_boe_other3,
1075: jai_constants.tax_type_boe_other4,
1076: jai_constants.tax_type_boe_other5)
1077: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1078: then
1071: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1072: jai_constants.tax_type_boe_other1,
1073: jai_constants.tax_type_boe_other2,
1074: jai_constants.tax_type_boe_other3,
1075: jai_constants.tax_type_boe_other4,
1076: jai_constants.tax_type_boe_other5)
1077: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1078: then
1079:
1072: jai_constants.tax_type_boe_other1,
1073: jai_constants.tax_type_boe_other2,
1074: jai_constants.tax_type_boe_other3,
1075: jai_constants.tax_type_boe_other4,
1076: jai_constants.tax_type_boe_other5)
1077: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1078: then
1079:
1080: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
1089:
1090: /* Added for bug #13494816 *//* Start*/
1091: ln_tax_amount := 0;
1092:
1093: IF tax_rec.tax_type IN (jai_constants.tax_type_excise,jai_constants.tax_type_exc_additional,jai_constants.tax_type_exc_other,jai_constants.tax_type_exc_edu_cess,jai_constants.tax_type_sh_exc_edu_cess)
1094: THEN
1095: fnd_file.put_line( fnd_file.log, 'tax breakup tax_rec.tax_amount :'|| tax_rec.tax_amount||' tax_rec.rounding_factor:'||tax_rec.rounding_factor);
1096: ln_tax_amount := Round(tax_rec.tax_amount,Nvl(tax_rec.rounding_factor,0)); -- not to be rounded
1097: fnd_file.put_line( fnd_file.log, ' tax breakup ln_tax_amount :'|| ln_tax_amount);
1105: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */
1106:
1107: if lv_tax_modvat_flag = 'Y'
1108: and upper(tax_rec.tax_type) IN ( 'EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1109: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1110: jai_constants.tax_type_exc_edu_cess,
1111: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1112: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1106:
1107: if lv_tax_modvat_flag = 'Y'
1108: and upper(tax_rec.tax_type) IN ( 'EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1109: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1110: jai_constants.tax_type_exc_edu_cess,
1111: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1112: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1114: jai_constants.tax_type_boe_other1,
1107: if lv_tax_modvat_flag = 'Y'
1108: and upper(tax_rec.tax_type) IN ( 'EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1109: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1110: jai_constants.tax_type_exc_edu_cess,
1111: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1112: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1114: jai_constants.tax_type_boe_other1,
1115: jai_constants.tax_type_boe_other2,
1108: and upper(tax_rec.tax_type) IN ( 'EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1109: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1110: jai_constants.tax_type_exc_edu_cess,
1111: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1112: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1114: jai_constants.tax_type_boe_other1,
1115: jai_constants.tax_type_boe_other2,
1116: jai_constants.tax_type_boe_other3,
1110: jai_constants.tax_type_exc_edu_cess,
1111: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1112: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1114: jai_constants.tax_type_boe_other1,
1115: jai_constants.tax_type_boe_other2,
1116: jai_constants.tax_type_boe_other3,
1117: jai_constants.tax_type_boe_other4,
1118: jai_constants.tax_type_boe_other5)
1111: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1112: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1114: jai_constants.tax_type_boe_other1,
1115: jai_constants.tax_type_boe_other2,
1116: jai_constants.tax_type_boe_other3,
1117: jai_constants.tax_type_boe_other4,
1118: jai_constants.tax_type_boe_other5)
1119: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1112: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1114: jai_constants.tax_type_boe_other1,
1115: jai_constants.tax_type_boe_other2,
1116: jai_constants.tax_type_boe_other3,
1117: jai_constants.tax_type_boe_other4,
1118: jai_constants.tax_type_boe_other5)
1119: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1120:
1113: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1114: jai_constants.tax_type_boe_other1,
1115: jai_constants.tax_type_boe_other2,
1116: jai_constants.tax_type_boe_other3,
1117: jai_constants.tax_type_boe_other4,
1118: jai_constants.tax_type_boe_other5)
1119: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1120:
1121: then
1114: jai_constants.tax_type_boe_other1,
1115: jai_constants.tax_type_boe_other2,
1116: jai_constants.tax_type_boe_other3,
1117: jai_constants.tax_type_boe_other4,
1118: jai_constants.tax_type_boe_other5)
1119: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1120:
1121: then
1122:
1140: -- Added by Jia Li for India tax inclusive 2007/11/28, End
1141:
1142: elsif lv_tax_modvat_flag = 'Y'
1143: and upper(tax_rec.tax_type) NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1144: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1145: jai_constants.tax_type_exc_edu_cess,
1146: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1147: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1141:
1142: elsif lv_tax_modvat_flag = 'Y'
1143: and upper(tax_rec.tax_type) NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1144: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1145: jai_constants.tax_type_exc_edu_cess,
1146: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1147: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1149: jai_constants.tax_type_boe_other1,
1142: elsif lv_tax_modvat_flag = 'Y'
1143: and upper(tax_rec.tax_type) NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1144: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1145: jai_constants.tax_type_exc_edu_cess,
1146: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1147: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1149: jai_constants.tax_type_boe_other1,
1150: jai_constants.tax_type_boe_other2,
1143: and upper(tax_rec.tax_type) NOT IN ('EXCISE', 'ADDL. EXCISE', 'OTHER EXCISE', 'CVD',
1144: jai_constants.tax_type_add_cvd , -- Date 01/11/2006 Bug 5228046 added by SACSETHI
1145: jai_constants.tax_type_exc_edu_cess,
1146: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1147: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1149: jai_constants.tax_type_boe_other1,
1150: jai_constants.tax_type_boe_other2,
1151: jai_constants.tax_type_boe_other3,
1145: jai_constants.tax_type_exc_edu_cess,
1146: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1147: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1149: jai_constants.tax_type_boe_other1,
1150: jai_constants.tax_type_boe_other2,
1151: jai_constants.tax_type_boe_other3,
1152: jai_constants.tax_type_boe_other4,
1153: jai_constants.tax_type_boe_other5)
1146: jai_constants.tax_type_cvd_edu_cess, -- Vijay Shankar for Bug#4068823 EDUCATION CESS
1147: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1149: jai_constants.tax_type_boe_other1,
1150: jai_constants.tax_type_boe_other2,
1151: jai_constants.tax_type_boe_other3,
1152: jai_constants.tax_type_boe_other4,
1153: jai_constants.tax_type_boe_other5)
1154: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1147: jai_constants.tax_type_sh_exc_edu_cess,jai_constants.tax_type_sh_cvd_edu_cess, -- added by csahoo for bug#5989740
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1149: jai_constants.tax_type_boe_other1,
1150: jai_constants.tax_type_boe_other2,
1151: jai_constants.tax_type_boe_other3,
1152: jai_constants.tax_type_boe_other4,
1153: jai_constants.tax_type_boe_other5)
1154: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1155:
1148: --Added by Wenqiong for the bug12645490 on 22/06/2011 Begin.
1149: jai_constants.tax_type_boe_other1,
1150: jai_constants.tax_type_boe_other2,
1151: jai_constants.tax_type_boe_other3,
1152: jai_constants.tax_type_boe_other4,
1153: jai_constants.tax_type_boe_other5)
1154: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1155:
1156: then
1149: jai_constants.tax_type_boe_other1,
1150: jai_constants.tax_type_boe_other2,
1151: jai_constants.tax_type_boe_other3,
1152: jai_constants.tax_type_boe_other4,
1153: jai_constants.tax_type_boe_other5)
1154: --Added by Wenqiong for the bug12645490 on 22/06/2011 End.
1155:
1156: then
1157:
1521: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_rcv_deliver_rtr_pkg.expense_accounting', 'START'); /* 1 */
1522:
1523: /* Vijay Shankar for Bug#4068823. RECEIPTS DEPLUG
1524: vat_noclaim added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1525: IF p_process_special_source = jai_constants.cenvat_noclaim THEN
1526: lv_account_nature := 'Cenvat Unclaim Expense';
1527: ELSIF p_process_special_source = jai_constants.vat_noclaim THEN
1528: lv_account_nature := 'VAT Unclaim Expense';
1529: END IF;
1523: /* Vijay Shankar for Bug#4068823. RECEIPTS DEPLUG
1524: vat_noclaim added by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1525: IF p_process_special_source = jai_constants.cenvat_noclaim THEN
1526: lv_account_nature := 'Cenvat Unclaim Expense';
1527: ELSIF p_process_special_source = jai_constants.vat_noclaim THEN
1528: lv_account_nature := 'VAT Unclaim Expense';
1529: END IF;
1530:
1531: if p_transaction_type='CORRECT' then
1730: lv_account_nature := 'Average Costing';
1731:
1732: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_rcv_deliver_rtr_pkg.average_costing', 'START'); /* 1 */
1733:
1734: IF p_process_special_source = jai_constants.cenvat_noclaim THEN
1735: lv_account_nature := 'Unclaim Average Costing';
1736:
1737: /* elsif added for vat_noclaim by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1738: ELSIF p_process_special_source = jai_constants.vat_noclaim THEN
1734: IF p_process_special_source = jai_constants.cenvat_noclaim THEN
1735: lv_account_nature := 'Unclaim Average Costing';
1736:
1737: /* elsif added for vat_noclaim by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1738: ELSIF p_process_special_source = jai_constants.vat_noclaim THEN
1739: lv_account_nature := 'VAT Unclaim Average Costing';
1740: END IF;
1741:
1742: /* Fetch the Material Account Id */
1940:
1941: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_rcv_deliver_rtr_pkg.standard_costing', 'START'); /* 1 */
1942:
1943: -- Vijay Shankar for Bug#4068823. RECEIPTS DEPLUG
1944: IF p_process_special_source = jai_constants.cenvat_noclaim THEN
1945: lv_account_nature := 'Unclaim Standard Costing';
1946:
1947: /* elsif added for vat_noclaim by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1948: ELSIF p_process_special_source = jai_constants.vat_noclaim THEN
1944: IF p_process_special_source = jai_constants.cenvat_noclaim THEN
1945: lv_account_nature := 'Unclaim Standard Costing';
1946:
1947: /* elsif added for vat_noclaim by Vijay Shankar for Bug#4250236(4245089). VAT Impl. */
1948: ELSIF p_process_special_source = jai_constants.vat_noclaim THEN
1949: lv_account_nature := 'VAT Unclaim Standard Costing';
1950: END IF;
1951:
1952: ln_ppv_account_id := ppv_account
2401:
2402: ln_dlry_trx_id NUMBER;
2403:
2404: CURSOR c_receipt_cenvat_dtl(cp_transaction_id IN NUMBER) IS
2405: SELECT nvl(unclaim_cenvat_flag, jai_constants.no) unclaim_cenvat_flag,
2406: nvl(non_bonded_delivery_flag, jai_constants.no) non_bonded_delivery_flag,
2407: nvl(cenvat_claimed_amt, 0) cenvat_claimed_amt
2408: FROM JAI_RCV_CENVAT_CLAIMS
2409: WHERE transaction_id = cp_transaction_id;
2402: ln_dlry_trx_id NUMBER;
2403:
2404: CURSOR c_receipt_cenvat_dtl(cp_transaction_id IN NUMBER) IS
2405: SELECT nvl(unclaim_cenvat_flag, jai_constants.no) unclaim_cenvat_flag,
2406: nvl(non_bonded_delivery_flag, jai_constants.no) non_bonded_delivery_flag,
2407: nvl(cenvat_claimed_amt, 0) cenvat_claimed_amt
2408: FROM JAI_RCV_CENVAT_CLAIMS
2409: WHERE transaction_id = cp_transaction_id;
2410: