32: and proceed further to do either of Costing or Expensing
33:
34: - Uncommented the call to OPM_COSTING to support OPM Receipts Functionality also
35: - INCLUDE_CENVAT_IN_COSTING is modified to include some more checks to return a value to caller
36: - Modfied the Main Cursor in DELIVER_RTR_RECO_NONEXCISE procedure not to pass INDIVIDUAL accounting for taxes
37: related to 'Service Tax India' and 'SERVICE_EDUCATION_CESS' tax types
38: - Modified the procedures expense_accounting, average_costing, standard_costing, opm_costing to include parameters
39: p_process_special_Reason in the signature. this is used to pass a different value for JAI_RCV_JOURNAL_ENTRIES.acct_nature,
40: for accounting_entries identification
178: ln_total := 0;
179: ln_opm_total := 0;
180:
181: -- this is to identify the path in SQL TRACE file if any problem occured
182: SELECT 'jai_rcv_deliver_rtr_pkg-'||p_transaction_id INTO lv_temp FROM DUAL;
183:
184: FND_FILE.put_line( FND_FILE.log, '~~~~~~ Start of jai_rcv_deliver_rtr_pkg.process_transaction. Time:'||to_char(SYSDATE, 'dd/mm/yyyy hh24:mi:ss'));
185:
186: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_rcv_deliver_rtr_pkg.process_transaction', 'START'); /* 1 */
270: if lv_debug ='Y' then
271: fnd_file.put_line( fnd_file.log, '1.1 ln_apportion_factor ' || ln_apportion_factor );
272: end if;
273:
274: /*Step 1 : Call Individual Tax Entries As this should happen in any case if
275: Recoverable Taxes other than Excise Exist */
276: deliver_rtr_reco_nonexcise
277: (
278: p_transaction_id => r_trx.transaction_id,
365:
366: if ln_total = 0 then
367: p_codepath := jai_general_pkg.plot_codepath(20, p_codepath); /* 20 */
368: -- Vijay Shankar for Bug#4071458
369: -- following if condition added to return successfully so that Individual Accounting happens without Costing/Expense Accounting
370: if ln_other_modvat_amount <> 0 then
371: p_process_status := 'Y';
372: else
373:
633: | Transaction | | | |
634: | Type | Amount | Credit | Debit |
635: | ==============|====================== |===========================|===========================|
636: | DELIVER | Total | Inv.Receiving | |
637: | DELIVER | Individual Tax Amt | | Individual Tax Accounts |
638: | RTR | Total | | Inv.Receiving |
639: | RTR | Individual Tax Amt | Individual Tax Accounts | |
640: | ============= | ======================|===========================|===========================|
641: ----------------------------------------------------------------------------------------------
635: | ==============|====================== |===========================|===========================|
636: | DELIVER | Total | Inv.Receiving | |
637: | DELIVER | Individual Tax Amt | | Individual Tax Accounts |
638: | RTR | Total | | Inv.Receiving |
639: | RTR | Individual Tax Amt | Individual Tax Accounts | |
640: | ============= | ======================|===========================|===========================|
641: ----------------------------------------------------------------------------------------------
642: */
643:
644: /* Character Variable Declarations */
645: lv_reference_10_desc1 VARCHAR2(75);--File.Sql.35 Cbabu := 'India Local Receiving Entry for the Receipt Number ';
646: lv_reference_10_desc2 VARCHAR2(30);--File.Sql.35 Cbabu := ' For the Transaction Type ';
647: lv_reference_10_desc gl_interface.reference10%type;
648: lv_account_nature VARCHAR2(30);--File.Sql.35 Cbabu := 'Individual Tax';
649: lv_reference23 gl_interface.reference23%type;--File.Sql.35 Cbabu := 'jai_rcv_deliver_rtr_pkg.deliver_rtr_reco_nonexcise';
650: lv_source VARCHAR2(100);--File.Sql.35 Cbabu := 'Purchasing India';
651: lv_category VARCHAR2(100);--File.Sql.35 Cbabu := 'Receiving India';
652: lv_reference24 gl_interface.reference24%type;--File.Sql.35 Cbabu := 'rcv_transactions';
651: lv_category VARCHAR2(100);--File.Sql.35 Cbabu := 'Receiving India';
652: lv_reference24 gl_interface.reference24%type;--File.Sql.35 Cbabu := 'rcv_transactions';
653: lv_reference25 gl_interface.reference25%type;--File.Sql.35 Cbabu := 'transaction_id';
654:
655: ln_individual_tax_amount number;--File.Sql.35 Cbabu := 0;
656: ln_rec_account_tax_amount number;--File.Sql.35 Cbabu := 0;
657: ln_credit_amount number;
658: ln_debit_amount number;
659:
658: ln_debit_amount number;
659:
660: BEGIN
661: --File.Sql.35 Cbabu
662: lv_account_nature := 'Individual Tax';
663: lv_reference_10_desc1 := 'India Local Receiving Entry for the Receipt Number ';
664: lv_reference_10_desc2 := ' For the Transaction Type ';
665: lv_reference23 := 'jai_rcv_deliver_rtr_pkg.deliver_rtr_reco_nonexcise';
666: lv_source := 'Purchasing India';
666: lv_source := 'Purchasing India';
667: lv_category := 'Receiving India';
668: lv_reference24 := 'rcv_transactions';
669: lv_reference25 := 'transaction_id';
670: ln_individual_tax_amount := 0;
671: ln_rec_account_tax_amount := 0;
672:
673: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_rcv_deliver_rtr_pkg.deliver_rtr_reco_nonexcise', 'START'); /* 1 */
674:
720: p_process_message := 'The Tax Account is not found for this Tax : ';
721: goto exit_from_procedure;
722: end if;
723:
724: ln_individual_tax_amount := NVL(tax_rec.tax_amount,0) * nvl(p_apportion_factor,0);
725: ln_rec_account_tax_amount := nvl(ln_rec_account_tax_amount,0) + nvl(ln_individual_tax_amount,0);
726:
727: if ln_individual_tax_amount <> 0 then
728:
721: goto exit_from_procedure;
722: end if;
723:
724: ln_individual_tax_amount := NVL(tax_rec.tax_amount,0) * nvl(p_apportion_factor,0);
725: ln_rec_account_tax_amount := nvl(ln_rec_account_tax_amount,0) + nvl(ln_individual_tax_amount,0);
726:
727: if ln_individual_tax_amount <> 0 then
728:
729: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
723:
724: ln_individual_tax_amount := NVL(tax_rec.tax_amount,0) * nvl(p_apportion_factor,0);
725: ln_rec_account_tax_amount := nvl(ln_rec_account_tax_amount,0) + nvl(ln_individual_tax_amount,0);
726:
727: if ln_individual_tax_amount <> 0 then
728:
729: p_codepath := jai_general_pkg.plot_codepath(5, p_codepath); /* 5 */
730: if (p_transaction_type ='CORRECT' AND p_parent_transaction_type = 'DELIVER') or
731: p_transaction_type = 'DELIVER' then /* DELIVER scenario */
731: p_transaction_type = 'DELIVER' then /* DELIVER scenario */
732:
733: p_codepath := jai_general_pkg.plot_codepath(6, p_codepath); /* 6 */
734: ln_credit_amount := NULL;
735: ln_debit_amount := ln_individual_tax_amount;
736:
737: elsif (p_transaction_type ='CORRECT' AND p_parent_transaction_type = 'RETURN TO RECEIVING') or
738: p_transaction_type = 'RETURN TO RECEIVING' then /* RTR scenario */
739:
737: elsif (p_transaction_type ='CORRECT' AND p_parent_transaction_type = 'RETURN TO RECEIVING') or
738: p_transaction_type = 'RETURN TO RECEIVING' then /* RTR scenario */
739:
740: p_codepath := jai_general_pkg.plot_codepath(7, p_codepath); /* 7 */
741: ln_credit_amount := ln_individual_tax_amount;
742: ln_debit_amount := NULL;
743:
744: end if;
745:
773: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
774: goto exit_from_procedure;
775: end if;
776:
777: end if; --end if for ln_individual_tax_amount <> 0
778: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
779: end loop; --End Loop for Tax Rec.
780:
781: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */