DBA Data[Home] [Help]

APPS.JAI_EXCISE_SCRIPTS_PKG dependencies on JAI_CMN_RG_PLA_TRXS

Line 61: FROM JAI_CMN_RG_PLA_TRXS jpl

57: AND slno = cp_slno) ;
58:
59: CURSOR get_pla_prev_slno IS
60: SELECT max(slno)
61: FROM JAI_CMN_RG_PLA_TRXS jpl
62: WHERE organization_id = p_organization_id
63: AND location_id = p_location_id
64: AND fin_year = p_fin_year
65: AND slno < p_slno

Line 75: FROM JAI_CMN_RG_PLA_TRXS jpl

71:
72:
73: CURSOR get_pla_prev_fin_slno IS
74: SELECT max(slno)
75: FROM JAI_CMN_RG_PLA_TRXS jpl
76: WHERE organization_id = p_organization_id
77: AND location_id = p_location_id
78: AND fin_year = p_fin_year - 1
79: AND EXISTS ( SELECT 1

Line 91: FROM JAI_CMN_RG_PLA_TRXS

87: FROM JAI_CMN_RG_OTHERS
88: WHERE source_type = 2
89: AND tax_type = p_tax_type
90: AND source_register_id = ( SELECT register_id
91: FROM JAI_CMN_RG_PLA_TRXS
92: WHERE organization_id = p_organization_id
93: AND location_id = p_location_id
94: AND fin_year = p_fin_year
95: AND slno = cp_slno );

Line 188: FROM JAI_CMN_RG_PLA_TRXS

184:
185:
186: CURSOR get_pla_prev_slno IS
187: SELECT max(slno)
188: FROM JAI_CMN_RG_PLA_TRXS
189: WHERE organization_id = p_organization_id
190: AND location_id = p_location_id
191: AND fin_year = p_fin_year
192: AND slno < p_slno ;

Line 196: FROM JAI_CMN_RG_PLA_TRXS

192: AND slno < p_slno ;
193:
194: CURSOR get_pla_prev_fin_slno IS
195: SELECT max(slno)
196: FROM JAI_CMN_RG_PLA_TRXS
197: WHERE organization_id = p_organization_id
198: AND location_id = p_location_id
199: AND fin_year = p_fin_year - 1;
200:

Line 203: FROM JAI_CMN_RG_PLA_TRXS

199: AND fin_year = p_fin_year - 1;
200:
201: CURSOR get_pla_balance( cp_fin_year NUMBER,cp_slno NUMBER ) IS
202: SELECT closing_balance
203: FROM JAI_CMN_RG_PLA_TRXS
204: WHERE organization_id = p_organization_id
205: AND location_id = p_location_id
206: AND fin_year = p_fin_year
207: AND slno = cp_slno ;

Line 312: UPDATE JAI_CMN_RG_PLA_TRXS

308: END LOOP;
309:
310: ELSIF p_register_type = 'PLA' THEN
311:
312: UPDATE JAI_CMN_RG_PLA_TRXS
313: SET slno = slno + p_dup_cnt - 1
314: WHERE organization_id = p_organization_id
315: AND location_id = p_location_id
316: AND fin_year = p_fin_year

Line 329: FROM JAI_CMN_RG_PLA_TRXS

325:
326:
327: ln_cnt := 0;
328: FOR dup_rec in ( SELECT *
329: FROM JAI_CMN_RG_PLA_TRXS
330: WHERE organization_id = p_organization_id
331: AND location_id = p_location_id
332: AND fin_year = p_fin_year
333: AND slno = p_slno

Line 336: UPDATE JAI_CMN_RG_PLA_TRXS

332: AND fin_year = p_fin_year
333: AND slno = p_slno
334: ORDER BY register_id ) LOOP
335:
336: UPDATE JAI_CMN_RG_PLA_TRXS
337: SET slno = slno + ln_cnt
338: WHERE register_id = dup_rec.register_id;
339:
340: ln_cnt := ln_cnt + 1;

Line 639: JAI_CMN_RG_PLA_TRXS jpl

635: jpl.slno,
636: jpl.organization_id,
637: jpl.location_id
638: FROM JAI_CMN_RG_OTHERS jrg,
639: JAI_CMN_RG_PLA_TRXS jpl
640: WHERE source_type = 2
641: and tax_type = p_tax_type
642: and source_register_id = jpl.register_id
643: and organization_id = p_organization_id

Line 868: JAI_CMN_RG_PLA_TRXS jpl

864: jpl.slno,
865: jpl.organization_id,
866: jpl.location_id
867: FROM JAI_CMN_RG_OTHERS jrg,
868: JAI_CMN_RG_PLA_TRXS jpl
869: WHERE source_type = 2
870: and tax_type = cp_tax_type
871: and source_register_id = jpl.register_id
872: and organization_id = p_organization_id

Line 923: FROM JAI_CMN_RG_PLA_TRXS jpl

919:
920:
921: CURSOR cur_get_pla_slno(cp_fin_year NUMBER,cp_tax_type VARCHAR2,cp_date DATE) IS
922: SELECT max(slno),min(slno)
923: FROM JAI_CMN_RG_PLA_TRXS jpl
924: WHERE organization_id = p_organization_id
925: AND location_id = p_location_id
926: AND fin_year = cp_fin_year
927: AND trunc(creation_date) < cp_date

Line 936: FROM JAI_CMN_RG_PLA_TRXS jpl

932: AND tax_type = cp_tax_type );
933:
934: CURSOR cur_pla_tax_exists(cp_fin_year NUMBER,cp_tax_type VARCHAR2,cp_date DATE) IS
935: SELECT 1
936: FROM JAI_CMN_RG_PLA_TRXS jpl
937: WHERE organization_id = p_organization_id
938: AND location_id = p_location_id
939: AND fin_year = cp_fin_year
940: AND trunc(creation_date) < cp_date

Line 968: FROM JAI_CMN_RG_PLA_TRXS

964: FROM JAI_CMN_RG_OTHERS
965: WHERE source_type = 2
966: AND tax_type = cp_tax_type
967: AND source_register_id in ( SELECT register_id
968: FROM JAI_CMN_RG_PLA_TRXS
969: WHERE organization_id = p_organization_id
970: AND location_id = p_location_id
971: AND fin_year = cp_fin_year
972: AND slno = nvl(cp_slno,1) );

Line 1288: FROM JAI_CMN_RG_PLA_TRXS

1284: nvl(cr_basic_ed,0) + nvl(cr_additional_ed,0) + nvl(cr_other_ed,0) -
1285: nvl(dr_basic_ed,0) - nvl(dr_additional_ed,0) - nvl(dr_other_ed,0) transaction_amount,
1286: register_id,
1287: slno
1288: FROM JAI_CMN_RG_PLA_TRXS
1289: WHERE organization_id = p_organization_id
1290: AND location_id = p_location_id
1291: AND ((fin_year = p_fin_year
1292: AND slno >= p_slno ) OR

Line 1421: UPDATE JAI_CMN_RG_PLA_TRXS

1417:
1418: ln_opening_balance := ln_prev_balance;
1419: ln_closing_balance := ln_opening_balance + records.transaction_amount;
1420:
1421: UPDATE JAI_CMN_RG_PLA_TRXS
1422: SET opening_balance = ln_opening_balance,
1423: closing_balance = ln_closing_balance,
1424: last_updated_by = p_last_updated_by,
1425: last_update_date = sysdate

Line 1471: UPDATE JAI_CMN_RG_PLA_TRXS

1467: WHERE register_id = p_register_id;
1468:
1469: ELSIF p_register_type = 'PLA' THEN
1470:
1471: UPDATE JAI_CMN_RG_PLA_TRXS
1472: SET other_tax_credit = ( SELECT sum(credit)
1473: FROM JAI_CMN_RG_OTHERS
1474: WHERE source_type = 2
1475: AND source_register_id = p_register_id ),

Line 1490: p_organization_id IN JAI_CMN_RG_PLA_TRXS.ORGANIZATION_ID%TYPE ,

1486: ------------------------------------ UPD_OTH_TAX ------------------------------------------------
1487:
1488: ------------------------------------ PLA_VALIDATION ------------------------------------------------
1489: PROCEDURE pla_validation (
1490: p_organization_id IN JAI_CMN_RG_PLA_TRXS.ORGANIZATION_ID%TYPE ,
1491: p_location_id IN JAI_CMN_RG_PLA_TRXS.LOCATION_ID%TYPE ,
1492: p_fin_year IN JAI_CMN_RG_PLA_TRXS.FIN_YEAR%TYPE
1493: )
1494: IS

Line 1491: p_location_id IN JAI_CMN_RG_PLA_TRXS.LOCATION_ID%TYPE ,

1487:
1488: ------------------------------------ PLA_VALIDATION ------------------------------------------------
1489: PROCEDURE pla_validation (
1490: p_organization_id IN JAI_CMN_RG_PLA_TRXS.ORGANIZATION_ID%TYPE ,
1491: p_location_id IN JAI_CMN_RG_PLA_TRXS.LOCATION_ID%TYPE ,
1492: p_fin_year IN JAI_CMN_RG_PLA_TRXS.FIN_YEAR%TYPE
1493: )
1494: IS
1495:

Line 1492: p_fin_year IN JAI_CMN_RG_PLA_TRXS.FIN_YEAR%TYPE

1488: ------------------------------------ PLA_VALIDATION ------------------------------------------------
1489: PROCEDURE pla_validation (
1490: p_organization_id IN JAI_CMN_RG_PLA_TRXS.ORGANIZATION_ID%TYPE ,
1491: p_location_id IN JAI_CMN_RG_PLA_TRXS.LOCATION_ID%TYPE ,
1492: p_fin_year IN JAI_CMN_RG_PLA_TRXS.FIN_YEAR%TYPE
1493: )
1494: IS
1495:
1496: Cursor c_duplicate_slno

Line 1500: JAI_CMN_RG_PLA_TRXS

1496: Cursor c_duplicate_slno
1497: IS
1498: select slno, count(*) rowcount
1499: from
1500: JAI_CMN_RG_PLA_TRXS
1501: where
1502: organization_id = p_organization_id and
1503: location_id = p_location_id and
1504: fin_year = p_fin_year and

Line 1513: JAI_CMN_RG_PLA_TRXS

1509: Cursor c_transaction_balance
1510: is
1511: select slno
1512: from
1513: JAI_CMN_RG_PLA_TRXS
1514: where
1515: closing_balance <> nvl(opening_balance,0) +
1516: ( nvl(cr_basic_ed,0)+nvl(cr_additional_ed,0)+nvl(cr_other_ed,0) ) -
1517: ( nvl(dr_basic_ed,0)+nvl(dr_additional_ed,0)+nvl(dr_other_ed,0) ) AND

Line 1539: JAI_CMN_RG_PLA_TRXS

1535: closing_balance ,
1536: nvl(other_tax_credit,other_tax_debit) rg_other_amt ,
1537: transaction_source_num
1538: FROM
1539: JAI_CMN_RG_PLA_TRXS
1540: WHERE
1541: organization_id = p_organization_id AND
1542: location_id = p_location_id AND
1543: fin_year = p_fin_year AND

Line 1548: cursor c_get_closing_balance ( cp_organization_id JAI_CMN_RG_PLA_TRXS.organization_id%type ,

1544: trunc(creation_date) >= gd_date
1545: ORDER BY
1546: slno ;
1547:
1548: cursor c_get_closing_balance ( cp_organization_id JAI_CMN_RG_PLA_TRXS.organization_id%type ,
1549: cp_location_id JAI_CMN_RG_PLA_TRXS.location_id%type ,
1550: cp_fin_year JAI_CMN_RG_PLA_TRXS.fin_year%type ,
1551: cp_slno JAI_CMN_RG_PLA_TRXS.slno%type
1552: )

Line 1549: cp_location_id JAI_CMN_RG_PLA_TRXS.location_id%type ,

1545: ORDER BY
1546: slno ;
1547:
1548: cursor c_get_closing_balance ( cp_organization_id JAI_CMN_RG_PLA_TRXS.organization_id%type ,
1549: cp_location_id JAI_CMN_RG_PLA_TRXS.location_id%type ,
1550: cp_fin_year JAI_CMN_RG_PLA_TRXS.fin_year%type ,
1551: cp_slno JAI_CMN_RG_PLA_TRXS.slno%type
1552: )
1553: is

Line 1550: cp_fin_year JAI_CMN_RG_PLA_TRXS.fin_year%type ,

1546: slno ;
1547:
1548: cursor c_get_closing_balance ( cp_organization_id JAI_CMN_RG_PLA_TRXS.organization_id%type ,
1549: cp_location_id JAI_CMN_RG_PLA_TRXS.location_id%type ,
1550: cp_fin_year JAI_CMN_RG_PLA_TRXS.fin_year%type ,
1551: cp_slno JAI_CMN_RG_PLA_TRXS.slno%type
1552: )
1553: is
1554: select

Line 1551: cp_slno JAI_CMN_RG_PLA_TRXS.slno%type

1547:
1548: cursor c_get_closing_balance ( cp_organization_id JAI_CMN_RG_PLA_TRXS.organization_id%type ,
1549: cp_location_id JAI_CMN_RG_PLA_TRXS.location_id%type ,
1550: cp_fin_year JAI_CMN_RG_PLA_TRXS.fin_year%type ,
1551: cp_slno JAI_CMN_RG_PLA_TRXS.slno%type
1552: )
1553: is
1554: select
1555: nvl(closing_balance,0)

Line 1557: JAI_CMN_RG_PLA_TRXS

1553: is
1554: select
1555: nvl(closing_balance,0)
1556: from
1557: JAI_CMN_RG_PLA_TRXS
1558: where
1559: organization_id = cp_organization_id AND
1560: location_id = cp_location_id AND
1561: fin_year = cp_fin_year AND

Line 1565: JAI_CMN_RG_PLA_TRXS

1561: fin_year = cp_fin_year AND
1562: slno =
1563: ( select max(slno)
1564: from
1565: JAI_CMN_RG_PLA_TRXS
1566: where
1567: organization_id = cp_organization_id and
1568: location_id = cp_location_id and
1569: fin_year = cp_fin_year and

Line 1578: from JAI_CMN_RG_PLA_TRXS

1574: cp_location_id IN NUMBER,
1575: cp_fin_year IN NUMBER
1576: ) IS
1577: select nvl(closing_balance,0)
1578: from JAI_CMN_RG_PLA_TRXS
1579: where organization_id = cp_organization_id
1580: and location_id = cp_location_id
1581: and fin_year = cp_fin_year
1582: and slno in

Line 1584: from JAI_CMN_RG_PLA_TRXS

1580: and location_id = cp_location_id
1581: and fin_year = cp_fin_year
1582: and slno in
1583: ( select nvl(max(slno),0)
1584: from JAI_CMN_RG_PLA_TRXS
1585: where organization_id = cp_organization_id
1586: and location_id = cp_location_id
1587: and fin_year = cp_fin_year
1588: );

Line 2214: from JAI_CMN_RG_PLA_TRXS

2210: Cursor c_pla_balance(cp_organization_id number,
2211: cp_location_id number)
2212: is
2213: select closing_balance, slno
2214: from JAI_CMN_RG_PLA_TRXS
2215: where organization_id = cp_organization_id
2216: and location_id = cp_location_id
2217: order by fin_year desc , slno desc ;
2218:

Line 2227: FROM JAI_CMN_RG_PLA_TRXS

2223: CURSOR cur_pla_trans_amt(cp_organization_id NUMBER, cp_location_id NUMBER)
2224: IS
2225: SELECT sum(nvl(cr_basic_ed,0)+ nvl(cr_additional_ed,0) + nvl(cr_other_ed,0)
2226: - nvl(dr_basic_ed,0) - nvl(dr_additional_ed,0) - nvl(dr_other_ed,0)) total_modvat_amount
2227: FROM JAI_CMN_RG_PLA_TRXS
2228: WHERE organization_id = cp_organization_id
2229: AND location_id = cp_location_id;
2230:
2231: ln_pla_trans_amt number ;

Line 2252: from JAI_CMN_RG_PLA_TRXS

2248: is
2249: select
2250: sum(nvl(cr_basic_ed,0)+nvl(cr_additional_ed,0)+nvl(cr_other_ed,0)) pla_cons_amt ,
2251: sum(other_tax_credit) pla_oth_amt
2252: from JAI_CMN_RG_PLA_TRXS
2253: where
2254: transaction_source_num is null and
2255: organization_id = cp_organization_id and
2256: location_id = cp_location_id and

Line 2349: FROM JAI_CMN_RG_PLA_TRXS

2345: )
2346: is
2347: SELECT sum(nvl(cr_basic_ed,0)+ nvl(cr_additional_ed,0) + nvl(cr_other_ed,0)
2348: - nvl(dr_basic_ed,0) - nvl(dr_additional_ed,0) - nvl(dr_other_ed,0)) total_modvat_amount
2349: FROM JAI_CMN_RG_PLA_TRXS
2350: WHERE organization_id = cp_organization_id
2351: AND location_id = cp_location_id
2352: and trunc(creation_date) < cp_date ;
2353:

Line 2354: cursor c_get_pla_tran_amt ( cp_organization_id JAI_CMN_RG_PLA_TRXS.ORGANIZATION_ID%TYPE ,

2350: WHERE organization_id = cp_organization_id
2351: AND location_id = cp_location_id
2352: and trunc(creation_date) < cp_date ;
2353:
2354: cursor c_get_pla_tran_amt ( cp_organization_id JAI_CMN_RG_PLA_TRXS.ORGANIZATION_ID%TYPE ,
2355: cp_location_id JAI_CMN_RG_PLA_TRXS.LOCATION_ID%TYPE ,
2356: cp_date date
2357: )
2358: is

Line 2355: cp_location_id JAI_CMN_RG_PLA_TRXS.LOCATION_ID%TYPE ,

2351: AND location_id = cp_location_id
2352: and trunc(creation_date) < cp_date ;
2353:
2354: cursor c_get_pla_tran_amt ( cp_organization_id JAI_CMN_RG_PLA_TRXS.ORGANIZATION_ID%TYPE ,
2355: cp_location_id JAI_CMN_RG_PLA_TRXS.LOCATION_ID%TYPE ,
2356: cp_date date
2357: )
2358: is
2359: select

Line 2363: JAI_CMN_RG_PLA_TRXS

2359: select
2360: sum(nvl(cr_basic_ed,0)+nvl(cr_additional_ed,0)+nvl(cr_other_ed,0)) credit_amount ,
2361: sum(nvl(dr_basic_ed,0)+nvl(dr_additional_ed,0)+nvl(dr_other_ed,0)) debit_amount
2362: from
2363: JAI_CMN_RG_PLA_TRXS
2364: where
2365: organization_id = cp_organization_id AND
2366: location_id = cp_location_id AND
2367: trunc(creation_date) >= cp_date ;

Line 2419: FROM JAI_CMN_RG_PLA_TRXS

2415: SELECT sum(credit),sum(debit)
2416: FROM JAI_CMN_RG_OTHERS
2417: WHERE source_register = 'PLA'
2418: AND source_register_id in ( SELECT register_id
2419: FROM JAI_CMN_RG_PLA_TRXS
2420: WHERE organization_id = cp_organization_id
2421: AND location_id = cp_location_id
2422: AND trunc(creation_date) >= cp_date)
2423: AND tax_type = cp_tax_type;

Line 2432: FROM JAI_CMN_RG_PLA_TRXS jpl

2428: cp_fin_year NUMBER ,
2429: cp_tax_type VARCHAR2 ,
2430: cp_date DATE ) IS
2431: SELECT max(slno)
2432: FROM JAI_CMN_RG_PLA_TRXS jpl
2433: WHERE organization_id = p_organization_id
2434: AND location_id = p_location_id
2435: AND fin_year = cp_fin_year
2436: AND trunc(creation_date) < cp_date

Line 2462: FROM JAI_CMN_RG_PLA_TRXS

2458: FROM JAI_CMN_RG_OTHERS
2459: WHERE source_type = 2
2460: AND tax_type = cp_tax_type
2461: AND source_register_id in ( SELECT register_id
2462: FROM JAI_CMN_RG_PLA_TRXS
2463: WHERE organization_id = p_organization_id
2464: AND location_id = p_location_id
2465: AND fin_year = cp_fin_year
2466: AND slno = nvl(cp_slno,1) );

Line 2561: proceed with the fix : JAI_CMN_RG_23AC_II_TRXS,JAI_CMN_RG_PLA_TRXS ,JAI_CMN_RG_BALANCES ,JAI_CMN_RG_SLNOS ,JAI_CMN_RG_OTHERS ,JAI_CMN_RG_OTH_BALANCES ,JAI_CMN_RG_PERIOD_BALS' ) ;

2557: gn_exists := null ;
2558:
2559: if p_action = 3 and nvl(p_backup,'N') = 'N' then
2560: raise_application_error(-20054, ' Pls take a backup of the following tables from JA before you
2561: proceed with the fix : JAI_CMN_RG_23AC_II_TRXS,JAI_CMN_RG_PLA_TRXS ,JAI_CMN_RG_BALANCES ,JAI_CMN_RG_SLNOS ,JAI_CMN_RG_OTHERS ,JAI_CMN_RG_OTH_BALANCES ,JAI_CMN_RG_PERIOD_BALS' ) ;
2562: end if ;
2563:
2564: open c_check_addl_cvd ;
2565: fetch c_check_addl_cvd into gn_exists ;

Line 2701: from JAI_CMN_RG_PLA_TRXS

2697: then
2698: -- To verify intra table data
2699: for rec in ( select
2700: distinct organization_id, location_id, fin_year
2701: from JAI_CMN_RG_PLA_TRXS
2702: where
2703: trunc(creation_date) >= pv_date and
2704: location_id = nvl(p_location_id , location_id) and
2705: organization_id = nvl(p_organization_id, organization_id)

Line 2718: from JAI_CMN_RG_PLA_TRXS

2714:
2715: -- To verify inter table data
2716: for pla_bal_rec in ( select
2717: distinct organization_id, location_id
2718: from JAI_CMN_RG_PLA_TRXS
2719: where
2720: organization_id = nvl(p_organization_id, organization_id) and
2721: location_id = nvl(p_location_id , location_id) and
2722: trunc(creation_date) >= pv_date

Line 3260: from JAI_CMN_RG_PLA_TRXS

3256: end if ;
3257:
3258: for pla_log_rec in ( select
3259: distinct organization_id, location_id
3260: from JAI_CMN_RG_PLA_TRXS
3261: where
3262: organization_id = nvl(p_organization_id, organization_id) and
3263: location_id = nvl(p_location_id , location_id) and
3264: trunc(creation_date) >= pv_date