Solution for India receiving transaction Processor generate the
Delivery Duplicate entry for Non recoverable taxes.
India receiving transaction Processor concurrent generates the duplicate accounting entries for India localization Receiving Transaction - Deliver for Non recoverable taxes
Solution for restrict the duplication transactions
What are the Recommended Incompatibility Setups for Oracle Financials for
India? (Doc ID 1669363.1)
Applies To:
Oracle
Financials for India - Version 12.1.3 and later
Information in this document applies to any platform.
Information in this document applies to any platform.
Goal
In how many
India Localization (OFI) Concurrent Programs, incompatibility settings require
to be set up to avoid duplication data.
Please clarify
Please clarify
Solution
Following is the clarification for the reported
issue in regards to the incompatibility setups for India Localization programs:1. On the Receiving side:
1.1. India Receiving Transaction Processor(IRTP) program should be set incompatible to:
=> It self
=> India - VAT Claim Processor
=> India - To Insert taxes for pay on receipt.
1.2. India - VAT Claim Processor should be set incompatible to self
1.3. India - To Insert taxes for pay on receipt should be set incompatible to self.
2. Payables Side:
2.1. India - To Insert tax distributions should be set incompatible to it self.
2.2. Payables Open Interface Import should be set incompatible to:
=> It self
=> India - TDS Approval Process
2.3. JAITDSA India - TDS Approval should be set incompatible to self.
3. OM and Receivables:
3.1. 'India - Local Concurrent for processing order lines to AR' should be set incompatible to self.
3.2. 'India - Excise Invoice Generation' program should be set incompatible to self.
3.3. 'India - AR Tax and Freight defaultation' should be set incompatible to self.
Script to find the duplicate data.
select jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_dr)/2 entered_dr, count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Receiving'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_dr is not null and jre.entered_cr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_dr)/2 entered_dr, count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Expense Accounting'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_dr is not null and jre.entered_cr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_dr)/2 entered_dr, count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Individual Tax'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_dr is not null and jre.entered_cr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date
having count(1) > 1;
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_dr)/2 entered_dr, count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Receiving'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_dr is not null and jre.entered_cr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_dr)/2 entered_dr, count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Expense Accounting'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_dr is not null and jre.entered_cr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_dr)/2 entered_dr, count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Individual Tax'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_dr is not null and jre.entered_cr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date
having count(1) > 1;
-----------------------------------------------------------------
Cursor credit_entry_rec
is
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_cr)/2 entered_cr, count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Receiving'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_cr is not null and jre.entered_dr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.code_combination_id, jre.transaction_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_cr)/2 entered_cr, count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Expense Accounting'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_cr is not null and jre.entered_dr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.code_combination_id, jre.transaction_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_cr)/2 entered_cr, count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Individual Tax'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_cr is not null and jre.entered_dr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.code_combination_id, jre.transaction_id, jre.receipt_num, jre.transaction_date
having count(1) > 1;
is
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_cr)/2 entered_cr, count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Receiving'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_cr is not null and jre.entered_dr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.code_combination_id, jre.transaction_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_cr)/2 entered_cr, count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Expense Accounting'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_cr is not null and jre.entered_dr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.code_combination_id, jre.transaction_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id, jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_cr)/2 entered_cr, count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Individual Tax'
and jre.source_name = 'Purchasing India'
and jre.category_name = 'Receiving India'
and jre.entered_cr is not null and jre.entered_dr is NULL
group by jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.code_combination_id, jre.transaction_id, jre.receipt_num, jre.transaction_date
having count(1) > 1;
---------------------------------------------
Data Fix
Parameters : From date : 01-apr-2016
To Date : 31-aug-2016
Opened Period date to
generate the reversal journal with Purchase India source
REM
+======================================================================+
REM | Copyright (c)
2013, 2014 Oracle Corporation Redwood Shores, California, USA|
REM | All rights
reserved. |
REM
+======================================================================+
REM NAME b19070344.sql
REM
REM Bug 19070344
REM
REM DESCRIPTION - DUPLICATE ACCOUNTING CREATED IN
JAI_RCV_JOURNAL_ENTRIES
REM
REM Action plan :
REM 1. Take the back up of
JAI_RCV_JOURNAL_ENTRIES, gl_interface, gl_je_lines
REM 2. Execute the script by providing the input
parameter as the date falling
REM in the period in which the entries should
get accounted
REM 3. Submit Journal Import program to post the
reversal transactions into GL
REM 4. Re-test the issue
REM
REM NOTES
REM
REM
+======================================================================+
REM dbdrv: sql ~PROD
~PATH ~FILE none none none sqlplus &phase=plb checkfile:~PROD:~PATH:~FILE
SET VERIFY OFF;
SET SERVEROUTPUT ON;
WHENEVER OSERROR EXIT
FAILURE ROLLBACK;
WHENEVER SQLERROR EXIT
FAILURE ROLLBACK;
Declare
Cursor debit_entry_rec
is
select jre.organization_code,
jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name,
jre.transaction_type,
jre.shipment_line_id,
jre.transaction_id, jre.code_combination_id, jre.receipt_num,
jre.transaction_date,
sum(entered_dr)/2 entered_dr, count(entered_dr)
cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Receiving'
and jre.source_name = 'Purchasing
India'
and jre.category_name = 'Receiving
India'
and jre.entered_dr is not null and
jre.entered_cr is NULL
and jre.creation_date between
'&P_FROM_DATE' and '&P_TO_DATE'
group by jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id,
jre.code_combination_id, jre.receipt_num, jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.transaction_id, jre.code_combination_id, jre.receipt_num,
jre.transaction_date,
sum(entered_dr)/2 entered_dr,
count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Expense
Accounting'
and jre.source_name = 'Purchasing
India'
and jre.category_name = 'Receiving
India'
and jre.entered_dr is not null and
jre.entered_cr is NULL
and jre.creation_date between
'&P_FROM_DATE' and '&P_TO_DATE'
group by jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.transaction_id, jre.code_combination_id, jre.receipt_num,
jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.transaction_id, jre.code_combination_id, jre.receipt_num,
jre.transaction_date,
sum(entered_dr)/2 entered_dr,
count(entered_dr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Individual Tax'
and jre.source_name = 'Purchasing
India'
and jre.category_name = 'Receiving
India'
and jre.entered_dr is not null and
jre.entered_cr is NULL
and jre.creation_date between
'&P_FROM_DATE' and '&P_TO_DATE'
group by jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.transaction_id, jre.code_combination_id, jre.receipt_num,
jre.transaction_date
having count(1) > 1;
Cursor credit_entry_rec
is
select
jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name,
jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.transaction_id, jre.code_combination_id, jre.receipt_num,
jre.transaction_date,
sum(entered_cr)/2 entered_cr,
count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Receiving'
and jre.source_name = 'Purchasing
India'
and jre.category_name = 'Receiving
India'
and jre.entered_cr is not null and
jre.entered_dr is NULL
and jre.creation_date between
'&P_FROM_DATE' and '&P_TO_DATE'
group by jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.code_combination_id, jre.transaction_id, jre.receipt_num,
jre.transaction_date
having count(1) > 1
union
select
jre.organization_code, jre.acct_type, jre.acct_nature, jre.source_name, jre.category_name,
jre.transaction_type,
jre.shipment_line_id,
jre.transaction_id, jre.code_combination_id, jre.receipt_num,
jre.transaction_date,
sum(entered_cr)/2 entered_cr,
count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Expense
Accounting'
and jre.source_name = 'Purchasing
India'
and jre.category_name = 'Receiving
India'
and jre.entered_cr is not null and
jre.entered_dr is NULL
and jre.creation_date between
'&P_FROM_DATE' and '&P_TO_DATE'
group by jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.code_combination_id, jre.transaction_id, jre.receipt_num,
jre.transaction_date
having count(1) > 1
union
select jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id, jre.transaction_id,
jre.code_combination_id, jre.receipt_num, jre.transaction_date,
sum(entered_cr)/2 entered_cr,
count(entered_cr) cnt
from jai_rcv_journal_entries jre
where jre.acct_type ='REGULAR'
and jre.acct_nature ='Individual Tax'
and jre.source_name = 'Purchasing
India'
and jre.category_name = 'Receiving
India'
and jre.entered_cr is not null and
jre.entered_dr is NULL
and jre.creation_date between
'&P_FROM_DATE' and '&P_TO_DATE'
group by jre.organization_code, jre.acct_type,
jre.acct_nature, jre.source_name, jre.category_name, jre.transaction_type,
jre.shipment_line_id,
jre.code_combination_id, jre.transaction_id, jre.receipt_num,
jre.transaction_date
having count(1) > 1;
CURSOR get_org_details
(org_code VARCHAR2)
IS
SELECT organization_id, set_of_books_id
FROM org_organization_definitions
WHERE organization_code = org_code;
CURSOR
c_period_name(cp_set_of_books_id IN NUMBER, cp_transaction_date IN DATE)
IS
SELECT gd.period_name,
gd.start_date
FROM gl_ledgers gle,
gl_periods gd
WHERE gle.ledger_id = cp_set_of_books_id
AND
gd.period_set_name = gle.period_set_name
AND
cp_transaction_date BETWEEN gd.start_date and gd.end_date
AND
gd.adjustment_period_flag = 'N';
CURSOR
c_get_shipment_hdr(cp_shipment_line_id IN NUMBER)
IS
SELECT distinct
shipment_header_id
FROM jai_rcv_transactions
WHERE shipment_line_id = cp_shipment_line_id;
ln_org_id NUMBER;
ln_sob_id NUMBER;
lv_accounting_date date;
lv_reference10 VARCHAR2(240);
lv_reference22 VARCHAR2(240);
lv_reference23 VARCHAR2(240);
lv_reference24 VARCHAR2(240);
lv_reference25 VARCHAR2(240);
lv_reference26 VARCHAR2(240);
lv_reference27 VARCHAR2(240);
lv_period_name VARCHAR2(10);
ln_count_rec_cr NUMBER := 0;
ln_count_rec_dr NUMBER := 0;
ln_shipment_header_id NUMBER := 0;
ld_transaction_date DATE := &date_of_open_period ; --Modified
BEGIN
jai_cmn_utils_pkg.print_log('b18999792.log','1.
Inside data fix script begin ');
For upd_rec_debit in
debit_entry_rec
Loop
OPEN
get_org_details(upd_rec_debit.organization_code);
FETCH get_org_details INTO ln_org_id,
ln_sob_id;
CLOSE get_org_details;
OPEN c_period_name(ln_sob_id,
ld_transaction_date);
FETCH c_period_name INTO lv_period_name,
lv_accounting_date;
CLOSE c_period_name;
jai_cmn_utils_pkg.print_log('b18999792.log','1.1 lv_period_name - '||lv_period_name||'
lv_accounting_date - '||lv_accounting_date);
/* IF lv_period_name IN ('MAY-14',
'JUN-14') --Modified
THEN
lv_accounting_date := SYSDATE;
END IF; */
jai_cmn_utils_pkg.print_log('b18999792.log','1.2 lv_accounting_date -
'||lv_accounting_date);
--Passing the reversal entry into journals
table
INSERT INTO
JAI_RCV_JOURNAL_ENTRIES(JOURNAL_ENTRY_ID,
ORGANIZATION_CODE,
RECEIPT_NUM,
TRANSACTION_ID,
CREATION_DATE,
TRANSACTION_DATE,
SHIPMENT_LINE_ID,
ACCT_TYPE,
ACCT_NATURE,
SOURCE_NAME,
CATEGORY_NAME,
CODE_COMBINATION_ID,
ENTERED_DR,
ENTERED_CR,
TRANSACTION_TYPE,
PERIOD_NAME,
CREATED_BY,
CURRENCY_CODE,
LAST_UPDATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATE_LOGIN
)
VALUES
(JAI_RCV_JOURNAL_ENTRIES_S.nextval,
upd_rec_debit.organization_code,
upd_rec_debit.RECEIPT_NUM,
upd_rec_debit.TRANSACTION_ID,
SYSDATE,
upd_rec_debit.TRANSACTION_DATE,
upd_rec_debit.SHIPMENT_LINE_ID,
upd_rec_debit.ACCT_TYPE,
upd_rec_debit.ACCT_NATURE,
upd_rec_debit.SOURCE_NAME,
upd_rec_debit.CATEGORY_NAME,
upd_rec_debit.CODE_COMBINATION_ID,
NULL,
upd_rec_debit.entered_dr,
upd_rec_debit.TRANSACTION_TYPE,
lv_period_name,
-18999792,
'INR',
-18999792,
SYSDATE ,
-18999792
);
ln_shipment_header_id := null;
OPEN
c_get_shipment_hdr(upd_rec_debit.SHIPMENT_LINE_ID);
FETCH c_get_shipment_hdr INTO ln_shipment_header_id;
CLOSE c_get_shipment_hdr;
lv_reference10 := 'Reversal of Expense/IL
taxes entries - '||upd_rec_debit.RECEIPT_NUM||'-'||ln_shipment_header_id||'
wrongly created twice' ;
lv_reference22 := 'India Localization
Entry';
lv_reference23 :=
'jai_rcv_rcv_rtv_pkg.post_entries';
lv_reference24 := 'rcv_transactions';
lv_reference25 := 'transaction_id';
lv_reference26 :=
To_Char(upd_rec_debit.transaction_id);
jai_cmn_utils_pkg.print_log('b18999792.log','2. Inserting into gl
interface for - ');
jai_cmn_utils_pkg.print_log('b18999792.log','
upd_rec_debit.transaction_id - '||upd_rec_debit.transaction_id||'
upd_rec_debit.entered_dr - '||upd_rec_debit.entered_dr);
--passing the entry which is duplicated in
journals to be reversed, dr entry is inserted as cr to balance the amount
already passed
insert into gl_interface
(
status,
set_of_books_id,
user_je_source_name,
user_je_category_name,
accounting_date,
currency_code,
date_created,
created_by,
actual_flag,
entered_cr,
entered_dr,
transaction_date,
code_combination_id,
currency_conversion_date,
user_currency_conversion_type,
currency_conversion_rate,
reference1,
reference10,
reference22,
reference23,
reference24,
reference25,
reference26,
reference27
)
VALUES
(
'NEW',
ln_sob_id,
upd_rec_debit.source_name,
upd_rec_debit.category_name,
lv_accounting_date,
'INR',
lv_accounting_date,
-18999792,
'A',
round(upd_rec_debit.entered_dr,2),
null,
lv_accounting_date,
upd_rec_debit.code_combination_id,
NULL,
NULL,
1,
upd_rec_debit.organization_code,
lv_reference10,
lv_reference22,
lv_reference23,
lv_reference24,
lv_reference26,
lv_reference25,
to_char(ln_org_id)
);
ln_count_rec_dr := ln_count_rec_dr + 1;
End Loop;
Commit;
jai_cmn_utils_pkg.print_log('b18999792.log','3.
No of credit entries inserted,
ln_count_rec_dr - '||ln_count_rec_dr);
For upd_rec_credit in
credit_entry_rec
Loop
OPEN
get_org_details(upd_rec_credit.organization_code);
FETCH get_org_details INTO ln_org_id,
ln_sob_id;
CLOSE get_org_details;
OPEN c_period_name(ln_sob_id,
ld_transaction_date);
FETCH c_period_name INTO
lv_period_name,lv_accounting_date;
CLOSE c_period_name;
jai_cmn_utils_pkg.print_log('b18999792.log','3.1
lv_period_name - '||lv_period_name||' lv_accounting_date -
'||lv_accounting_date);
/*IF lv_period_name IN ('MAY-14',
'JUN-14') --Modified
THEN
lv_accounting_date := SYSDATE;
END IF; */
jai_cmn_utils_pkg.print_log('b18999792.log','3.2
lv_accounting_date - '||lv_accounting_date);
--Passing the reversal entry into journals
table
INSERT INTO
JAI_RCV_JOURNAL_ENTRIES(JOURNAL_ENTRY_ID,
ORGANIZATION_CODE,
RECEIPT_NUM,
TRANSACTION_ID,
CREATION_DATE,
TRANSACTION_DATE,
SHIPMENT_LINE_ID,
ACCT_TYPE,
ACCT_NATURE,
SOURCE_NAME,
CATEGORY_NAME,
CODE_COMBINATION_ID,
ENTERED_DR,
ENTERED_CR,
TRANSACTION_TYPE,
PERIOD_NAME,
CREATED_BY,
CURRENCY_CODE,
LAST_UPDATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATE_LOGIN
)
VALUES
(JAI_RCV_JOURNAL_ENTRIES_S.nextval,
upd_rec_credit.organization_code,
upd_rec_credit.RECEIPT_NUM,
upd_rec_credit.TRANSACTION_ID,
SYSDATE,
upd_rec_credit.TRANSACTION_DATE,
upd_rec_credit.SHIPMENT_LINE_ID,
upd_rec_credit.ACCT_TYPE,
upd_rec_credit.ACCT_NATURE,
upd_rec_credit.SOURCE_NAME,
upd_rec_credit.CATEGORY_NAME,
upd_rec_credit.CODE_COMBINATION_ID,
upd_rec_credit.entered_Cr,
NULL,
upd_rec_credit.TRANSACTION_TYPE,
lv_period_name,
-18999792,
'INR',
-18999792,
SYSDATE ,
-18999792
);
ln_shipment_header_id := null;
OPEN
c_get_shipment_hdr(upd_rec_credit.SHIPMENT_LINE_ID);
FETCH c_get_shipment_hdr INTO
ln_shipment_header_id;
CLOSE c_get_shipment_hdr;
lv_reference10 := 'Reversal of Expense/IL
taxes entries - '||upd_rec_credit.RECEIPT_NUM||'-'||ln_shipment_header_id||'
wrongly created twice' ;
lv_reference22 := 'India Localization
Entry';
lv_reference23 :=
'jai_rcv_rcv_rtv_pkg.post_entries';
lv_reference24 := 'rcv_transactions';
lv_reference25 := 'transaction_id';
lv_reference26 :=
To_Char(upd_rec_credit.transaction_id);
jai_cmn_utils_pkg.print_log('b18999792.log','4.
Inserting into gl interface for - ');
jai_cmn_utils_pkg.print_log('b18999792.log','
upd_rec_debit.transaction_id - '||upd_rec_credit.transaction_id||'
upd_rec_credit.entered_cr - '||upd_rec_credit.entered_cr);
--First insert to reverse the effect of
incorrect accounting
insert into
gl_interface
(
status,
set_of_books_id,
user_je_source_name,
user_je_category_name,
accounting_date,
currency_code,
date_created,
created_by,
actual_flag,
entered_cr,
entered_dr,
transaction_date,
code_combination_id,
currency_conversion_date,
user_currency_conversion_type,
currency_conversion_rate,
reference1,
reference10,
reference22,
reference23,
reference24,
reference25,
reference26,
reference27
)
VALUES
(
'NEW',
ln_sob_id,
upd_rec_credit.source_name,
upd_rec_credit.category_name,
lv_accounting_date,
'INR',
lv_accounting_date,
-18999792,
'A',
null,
round(upd_rec_credit.entered_cr,2),
lv_accounting_date,
upd_rec_credit.code_combination_id,
NULL,
NULL,
1,
upd_rec_credit.organization_code,
lv_reference10,
lv_reference22,
lv_reference23,
lv_reference24,
lv_reference26,
lv_reference25,
to_char(ln_org_id)
);
ln_count_rec_cr := ln_count_rec_cr + 1;
End Loop;
Commit;
jai_cmn_utils_pkg.print_log('b18999792.log','5. No of debit
entries inserted, ln_count_rec_cr -
'||ln_count_rec_cr);
End;
/
COMMIT;
EXIT;
/
After complete the data fix. Data available in GL interface.