DBA Data[Home] [Help]

APPS.JAI_MTL_TRXS_PKG dependencies on JAI_MTL_TRXS

Line 1: PACKAGE BODY JAI_MTL_TRXS_PKG AS

1: PACKAGE BODY JAI_MTL_TRXS_PKG AS
2: /* $Header: jai_mtl_trxs_pkg.plb 120.29.12020000.2 2012/12/24 13:22:30 mmurtuza ship $ */
3:
4: /*----------------------------------------------------------------------------------------------------------------------
5: CHANGE HISTORY: FILENAME: jai_mtl_trxs_pkg.plb

Line 2: /* $Header: jai_mtl_trxs_pkg.plb 120.29.12020000.2 2012/12/24 13:22:30 mmurtuza ship $ */

1: PACKAGE BODY JAI_MTL_TRXS_PKG AS
2: /* $Header: jai_mtl_trxs_pkg.plb 120.29.12020000.2 2012/12/24 13:22:30 mmurtuza ship $ */
3:
4: /*----------------------------------------------------------------------------------------------------------------------
5: CHANGE HISTORY: FILENAME: jai_mtl_trxs_pkg.plb
6: S.No Date Author and Details

Line 5: CHANGE HISTORY: FILENAME: jai_mtl_trxs_pkg.plb

1: PACKAGE BODY JAI_MTL_TRXS_PKG AS
2: /* $Header: jai_mtl_trxs_pkg.plb 120.29.12020000.2 2012/12/24 13:22:30 mmurtuza ship $ */
3:
4: /*----------------------------------------------------------------------------------------------------------------------
5: CHANGE HISTORY: FILENAME: jai_mtl_trxs_pkg.plb
6: S.No Date Author and Details
7: ------------------------------------------------------------------------------------------------------------------------
8: 1 24-Jan-2007 rchandan for #2942973 for File Version 115.6 (INTER ORG Impl.)
9: The parameter p_receipt_num in claim_balance_cgvat was defined as NUMBER and

Line 105: The above mentioned issue is happening because of the deadlock on jai_mtl_trxs table.

101: Issue:
102: When trying to save the IL interorg transfer a error message pops up and also
103: not allowing close the form. Which makes to close the application and login again.
104:
105: The above mentioned issue is happening because of the deadlock on jai_mtl_trxs table.
106: 1.on the key commit trigger of mtl_trx_line in interorg form(JAINVMTX.fmb),there is an update stmt on jai_mtl_trxs table.
107: If any error occurs in this trigger and the user tries to comeout of the form there is a call to sync_with_base_trx
108: which will delete the error record in jai_mtl_trxs table.
109: since it is trying to delete the same record which has been locked by the update stmt,deadlock error occurs waiting for the resource .

Line 106: 1.on the key commit trigger of mtl_trx_line in interorg form(JAINVMTX.fmb),there is an update stmt on jai_mtl_trxs table.

102: When trying to save the IL interorg transfer a error message pops up and also
103: not allowing close the form. Which makes to close the application and login again.
104:
105: The above mentioned issue is happening because of the deadlock on jai_mtl_trxs table.
106: 1.on the key commit trigger of mtl_trx_line in interorg form(JAINVMTX.fmb),there is an update stmt on jai_mtl_trxs table.
107: If any error occurs in this trigger and the user tries to comeout of the form there is a call to sync_with_base_trx
108: which will delete the error record in jai_mtl_trxs table.
109: since it is trying to delete the same record which has been locked by the update stmt,deadlock error occurs waiting for the resource .
110:

Line 108: which will delete the error record in jai_mtl_trxs table.

104:
105: The above mentioned issue is happening because of the deadlock on jai_mtl_trxs table.
106: 1.on the key commit trigger of mtl_trx_line in interorg form(JAINVMTX.fmb),there is an update stmt on jai_mtl_trxs table.
107: If any error occurs in this trigger and the user tries to comeout of the form there is a call to sync_with_base_trx
108: which will delete the error record in jai_mtl_trxs table.
109: since it is trying to delete the same record which has been locked by the update stmt,deadlock error occurs waiting for the resource .
110:
111: Fix:
112: changes are done in cenvat_process procedure

Line 126: jai_mtl_trxs_pkg. sync_trx_with_base (delete_trx) procedure.

122: issue is happening with the delete_trx_autonomous (Pragma autonomous
123: transaction) procedure.
124:
125: The below stmt has been executed from (JAINVMTX.KEY-COMMIT)-->
126: jai_mtl_trxs_pkg. sync_trx_with_base (delete_trx) procedure.
127:
128: Delete JAI_MTL_TRXS WHERE TRANSACTION_HEADER_ID = :B2 AND TRANSACTION_TEMP_ID
129: = NVL(:B1 , TRANSACTION_TEMP_ID ) AND TRANSACTION_COMMIT_DATE IS NULL.
130:

Line 128: Delete JAI_MTL_TRXS WHERE TRANSACTION_HEADER_ID = :B2 AND TRANSACTION_TEMP_ID

124:
125: The below stmt has been executed from (JAINVMTX.KEY-COMMIT)-->
126: jai_mtl_trxs_pkg. sync_trx_with_base (delete_trx) procedure.
127:
128: Delete JAI_MTL_TRXS WHERE TRANSACTION_HEADER_ID = :B2 AND TRANSACTION_TEMP_ID
129: = NVL(:B1 , TRANSACTION_TEMP_ID ) AND TRANSACTION_COMMIT_DATE IS NULL.
130:
131: Lock is acquired by the current session and it will be removed once the
132: transaction gets commited/rollbacked.

Line 138: changes are not getting applied due to which lock exists on jai_mtl_trxs..

134: When any error comes during the forms commit processing the changes will not
135: get applied to the database..
136:
137: Here some base error "lot/serial number does not match" is coming and the
138: changes are not getting applied due to which lock exists on jai_mtl_trxs..
139:
140: Now when we try to close the form then the below stmt will be executed.
141: ( JAINVMTX.KEY-EXIT --->sync_with_base_trx (delete_trx_autonomous)).
142:

Line 143: Delete JAI_MTL_TRXS WHERE TRANSACTION_HEADER_ID = :B2 AND TRANSACTION_TEMP_ID

139:
140: Now when we try to close the form then the below stmt will be executed.
141: ( JAINVMTX.KEY-EXIT --->sync_with_base_trx (delete_trx_autonomous)).
142:
143: Delete JAI_MTL_TRXS WHERE TRANSACTION_HEADER_ID = :B2 AND TRANSACTION_TEMP_ID
144: = NVL(:B1 , TRANSACTION_TEMP_ID ) AND TRANSACTION_COMMIT_DATE IS NULL.
145:
146: This delete is waiting for the lock acquired for the previous delete stmt.
147: hence the deadlock issue is coming

Line 160: In package jai_mtl_trxs_pkg.default_taxes, the variable is defined as

156: TST1212.XB1.QA.INCLUSIVE TAX IS NOT RIGHT FOR INTER-ORG TRANSFER TRANSACTION
157: if the interorg transfer has the inclusive taxes and the assessable price list is not \
158: attached to the internal ct,then the taxes are calculated wrongly.
159: issue is with the assessable_value being rounded.
160: In package jai_mtl_trxs_pkg.default_taxes, the variable is defined as
161: following:
162:
163: ln_assessable_value number(15);
164: ln_vat_assessable_value number(15);

Line 465: FROM jai_mtl_trxs trx,

461: trx.creation_date,
462: trx.created_by,
463: trx.last_update_date,
464: trx.last_update_login
465: FROM jai_mtl_trxs trx,
466: JAI_INV_SUBINV_DTLS subinv,
467: JAI_INV_ITM_SETUPS itm
468: WHERE subinv.organization_id = trx.to_organization
469: AND itm.organization_id = trx.to_organization

Line 490: jai_mtl_trxs trx

486: SUM(decode(tax_type, 'Other Excise', round(tax_amt), 0)) other_ed,
487: SUM(decode(tax_type, jai_constants.tax_type_exc_edu_cess, round(tax_amt), 0)) other_cess,
488: sum(decode(tax_type, jai_constants.tax_type_sh_exc_edu_cess, round(tax_amt), 0)) other_sh_cess --Added higher education cess constants by vkaranam for bug#5907436
489: FROM jai_cmn_document_taxes tax,
490: jai_mtl_trxs trx
491: WHERE tax.source_doc_line_id = trx.transaction_temp_id
492: AND trx.transaction_header_id = tax.source_doc_id
493: AND trx.transaction_temp_id = trx_temp_id;
494:

Line 947: table_rcv_transactions VARCHAR2(30):= 'JAI_MTL_TRXS';

943: lv_inv_gen_process_flag VARCHAR2(10);
944: lv_inv_gen_process_message VARCHAR2(2000);
945: ln_repository_id NUMBER;
946: lv_source_trx_type VARCHAR2(30):='RECEIVING';
947: table_rcv_transactions VARCHAR2(30):= 'JAI_MTL_TRXS';
948: lv_account_name VARCHAR2(50);
949: ln_code_combination_id NUMBER;
950: ln_interim_recovery_account NUMBER;
951: ln_entered_dr NUMBER;

Line 994: jai_mtl_trxs jmt,

990: jmt.transaction_header_id,
991: --jmt.creation_date,
992: sum(jcdt.tax_amt) tax_amt
993: FROM
994: jai_mtl_trxs jmt,
995: jai_cmn_document_taxes jcdt,
996: jai_cmn_taxes_all jtc,
997: jai_rgm_registrations jrg,
998: jai_rgm_definitions jrr

Line 1119: jai_mtl_trxs_pkg.do_cenvat_Acctg(

1115: p_process_message := lv_process_message;
1116: RETURN;
1117: END IF;
1118: begin
1119: jai_mtl_trxs_pkg.do_cenvat_Acctg(
1120: p_set_of_books_id => p_set_of_books_id ,
1121: p_transaction_temp_id =>p_transaction_temp_id ,
1122: p_je_source_name =>v_source_name ,
1123: p_je_category_name =>v_category_name,

Line 1299: 'jai_mtl_trxs',

1295: null,
1296: p_params(i).organization_code, -- From mtl_parameters
1297: 'India Localization Entry for Interorg-XFER ',
1298: 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1299: 'jai_mtl_trxs',
1300: p_transaction_temp_id,
1301: 'transaction_temp_id',
1302: to_char(p_params(i).organization_id),
1303: 'India Localization Entry' -- bug 6487405

Line 1359: 'jai_mtl_trxs',

1355: null,
1356: p_params(i).organization_code, -- From mtl_parameters
1357: 'India Localization Entry for Interorg-XFER ',
1358: 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1359: 'jai_mtl_trxs',
1360: p_transaction_temp_id,
1361: 'transaction_temp_id',
1362: to_char(p_params(i).organization_id),
1363: sysdate,

Line 1418: 'jai_mtl_trxs',

1414: null,
1415: p_params(i).organization_code,
1416: 'India Localization Entry for Interorg-XFER ',
1417: 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1418: 'jai_mtl_trxs',
1419: p_transaction_temp_id,
1420: 'transaction_temp_id',
1421: to_char(p_params(i).organization_id),
1422: 'India Localization Entry' -- bug 6487405

Line 1477: 'jai_mtl_trxs',

1473: null,
1474: p_params(i).organization_code,
1475: 'India Localization Entry for Interorg-XFER ',
1476: 'jai_mtl_trx_pkg.do_cenvat_Acctg',
1477: 'jai_mtl_trxs',
1478: p_transaction_temp_id,
1479: 'transaction_temp_id',
1480: to_char(p_params(i).organization_id),
1481: sysdate,

Line 1531: jai_mtl_trxs D,

1527: d.location_id,
1528: d.inventory_item_id
1529: FROM Jai_cmn_document_Taxes A,
1530: jai_cmn_taxes_all B,
1531: jai_mtl_trxs D,
1532: jai_regime_tax_types_v aa
1533: WHERE source_doc_line_id = p_transaction_temp_id
1534: AND d.transaction_temp_id = p_transaction_temp_id
1535: AND a.source_doc_type = 'INTERORG_XFER'

Line 1588: SELECT * FROM jai_mtl_trxs

1584: WHERE from_organization_id = p_from_organization_id
1585: AND to_organization_id = p_to_organization_id ;
1586:
1587: CURSOR c_get_trx_info IS
1588: SELECT * FROM jai_mtl_trxs
1589: WHERE transaction_temp_id = p_transaction_temp_id;
1590:
1591: CURSOR c_rcv_params (p_organization_id IN NUMBER) IS
1592: select receiving_account_id

Line 2864: CURSOR c_jai_mtl_Trxs ( cp_Trx_temp_id IN NUMBER ) is

2860: SELECT *
2861: FROM mtl_parameters
2862: WHERE organization_id = cp_organization_id;
2863:
2864: CURSOR c_jai_mtl_Trxs ( cp_Trx_temp_id IN NUMBER ) is
2865: SELECT * from jai_mtl_Trxs
2866: WHERE transaction_Temp_id = cp_Trx_temp_id;
2867:
2868:

Line 2865: SELECT * from jai_mtl_Trxs

2861: FROM mtl_parameters
2862: WHERE organization_id = cp_organization_id;
2863:
2864: CURSOR c_jai_mtl_Trxs ( cp_Trx_temp_id IN NUMBER ) is
2865: SELECT * from jai_mtl_Trxs
2866: WHERE transaction_Temp_id = cp_Trx_temp_id;
2867:
2868:
2869: CURSOR c_proc_exists(cp_object_name user_procedures.object_name%type ,

Line 2909: r_mtl_Trxs c_jai_mtl_Trxs%ROWTYPE;

2905: r_Rcv_params c_rcv_params%ROWTYPE;
2906: r_mtl_params c_mtl_params%Rowtype;
2907: ln_costing_grp_id NUMBER;
2908: lv_trx_type_name VARCHAR2(30);
2909: r_mtl_Trxs c_jai_mtl_Trxs%ROWTYPE;
2910:
2911: ln_Excise_amt NUMBER;
2912: ln_non_modvat_amt NUMBER;
2913: ln_oth_modvat_amt NUMBER;

Line 2930: FROM jai_mtl_trxs jmt,

2926:
2927: cursor cur_item_class /*6501436*/
2928: IS
2929: SELECT jiis.item_class
2930: FROM jai_mtl_trxs jmt,
2931: JAI_INV_ITM_SETUPS jiis
2932: WHERE jmt.inventory_item_id = jiis.inventory_item_id
2933: AND jmt.transaction_temp_id = p_trx_temp_id;
2934:

Line 2940: OPEN c_jai_mtl_Trxs(p_trx_temp_id);

2936: BEGIN
2937:
2938: lv_trx_type_name := 'Average cost update' ;--'Direct Org Transfer';
2939:
2940: OPEN c_jai_mtl_Trxs(p_trx_temp_id);
2941: FETCH c_jai_mtl_Trxs INTO r_mtl_Trxs;
2942: CLOSE c_jai_mtl_Trxs;
2943:
2944: Open c_mtl_types(lv_trx_type_name);

Line 2941: FETCH c_jai_mtl_Trxs INTO r_mtl_Trxs;

2937:
2938: lv_trx_type_name := 'Average cost update' ;--'Direct Org Transfer';
2939:
2940: OPEN c_jai_mtl_Trxs(p_trx_temp_id);
2941: FETCH c_jai_mtl_Trxs INTO r_mtl_Trxs;
2942: CLOSE c_jai_mtl_Trxs;
2943:
2944: Open c_mtl_types(lv_trx_type_name);
2945: FETCH c_mtl_types INTO r_mtl_types;

Line 2942: CLOSE c_jai_mtl_Trxs;

2938: lv_trx_type_name := 'Average cost update' ;--'Direct Org Transfer';
2939:
2940: OPEN c_jai_mtl_Trxs(p_trx_temp_id);
2941: FETCH c_jai_mtl_Trxs INTO r_mtl_Trxs;
2942: CLOSE c_jai_mtl_Trxs;
2943:
2944: Open c_mtl_types(lv_trx_type_name);
2945: FETCH c_mtl_types INTO r_mtl_types;
2946: CLOSE c_mtl_types;

Line 3462: lv_reference_23:='jai_mtl_trxs_pkg.std_cost_entry';

3458: lv_source_name := 'Purchasing India';
3459: lv_category_name:='MMT';/*6504150*/
3460: lv_reference_10 :='India Local Standard Cost Entry For INTERORG_XFER and Organization_code= '|| lv_organization_code ;
3461: lv_reference_entry := 'India Localization Entry';
3462: lv_reference_23:='jai_mtl_trxs_pkg.std_cost_entry';
3463: lv_reference_24:='jai_mtl_trxs';
3464: lv_reference_26:='transaction_id';
3465: lv_currency_code :='INR';
3466:

Line 3463: lv_reference_24:='jai_mtl_trxs';

3459: lv_category_name:='MMT';/*6504150*/
3460: lv_reference_10 :='India Local Standard Cost Entry For INTERORG_XFER and Organization_code= '|| lv_organization_code ;
3461: lv_reference_entry := 'India Localization Entry';
3462: lv_reference_23:='jai_mtl_trxs_pkg.std_cost_entry';
3463: lv_reference_24:='jai_mtl_trxs';
3464: lv_reference_26:='transaction_id';
3465: lv_currency_code :='INR';
3466:
3467: OPEN cur_rcv_accnt(p_organization_id);

Line 4027: 'jai_mtl_trxs_pkg.auto_claim',

4023: NULL,
4024: r_mtl_params.organization_code,
4025: lv_reference_10,
4026: 'India Localization Entry',
4027: 'jai_mtl_trxs_pkg.auto_claim',
4028: 'rcv_transactions',
4029: 'rcv_Transaction_id',
4030: r_Trx.transaction_id,
4031: r_trx.organization_id

Line 4141: 'jai_mtl_trxs_pkg.auto_claim',

4137: NULL,
4138: r_mtl_params.organization_code,
4139: lv_reference_10,
4140: 'India Localization Entry',
4141: 'jai_mtl_trxs_pkg.auto_claim',
4142: 'rcv_transactions',
4143: 'rcv_Transaction_id',
4144: r_Trx.transaction_id,
4145: r_trx.organization_id

Line 4319: 'jai_mtl_trxs_pkg.auto_claim',

4315: NULL,
4316: r_mtl_params.organization_code,
4317: lv_reference_10,
4318: 'India Localization Entry',
4319: 'jai_mtl_trxs_pkg.auto_claim',
4320: 'rcv_transactions',
4321: 'rcv_Transaction_id',
4322: r_Trx.transaction_id,
4323: r_trx.organization_id

Line 4434: 'jai_mtl_trxs_pkg.auto_claim',

4430: NULL,
4431: r_mtl_params.organization_code,
4432: lv_reference_10,
4433: 'India Localization Entry',
4434: 'jai_mtl_trxs_pkg.auto_claim',
4435: 'rcv_transactions',
4436: 'rcv_Transaction_id',
4437: r_Trx.transaction_id,
4438: r_trx.organization_id

Line 4550: 'jai_mtl_trxs_pkg.auto_claim',

4546: NULL,
4547: r_mtl_params.organization_code,
4548: lv_reference_10,
4549: 'India Localization Entry',
4550: 'jai_mtl_trxs_pkg.auto_claim',
4551: 'rcv_transactions',
4552: 'rcv_Transaction_id',
4553: r_Trx.transaction_id,
4554: r_trx.organization_id

Line 4665: 'jai_mtl_trxs_pkg.auto_claim',

4661: NULL,
4662: r_mtl_params.organization_code,
4663: lv_reference_10,
4664: 'India Localization Entry',
4665: 'jai_mtl_trxs_pkg.auto_claim',
4666: 'rcv_transactions',
4667: 'rcv_Transaction_id',
4668: r_Trx.transaction_id,
4669: r_trx.organization_id

Line 4693: table_rcv_transactions VARCHAR2(30):= 'JAI_MTL_TRXS';

4689: lv_inv_gen_process_flag VARCHAR2(10);
4690: lv_inv_gen_process_message VARCHAR2(2000);
4691: ln_repository_id NUMBER;
4692: lv_source_trx_type VARCHAR2(30):='RECEIVING';
4693: table_rcv_transactions VARCHAR2(30):= 'JAI_MTL_TRXS';
4694: lv_account_name VARCHAR2(50);
4695: ln_code_combination_id NUMBER;
4696: ln_interim_recovery_account NUMBER;
4697: ln_entered_dr NUMBER;

Line 5175: lv_reference_23 := 'jai_mtl_trxs_pkg.process_vat_claim_acctg';

5171: lv_account_nature := 'VAT CLAIM';
5172: lv_source_name := 'Purchasing';
5173: lv_category_name := 'Receiving India';
5174: lv_reference_10 := 'VAT claim accounting';
5175: lv_reference_23 := 'jai_mtl_trxs_pkg.process_vat_claim_acctg';
5176: lv_reference_24 := 'jai_rgm_trx_records';
5177: lv_reference_26 := 'repository_id';
5178: lv_currency_code := jai_constants.func_curr;
5179: ld_accounting_date := TRUNC(SYSDATE);

Line 5299: FROM jai_mtl_trxs

5295: DELETE jai_mtl_match_receipts
5296: WHERE transaction_temp_id in
5297: (
5298: SELECT transaction_temp_id
5299: FROM jai_mtl_trxs
5300: WHERE transaction_header_id = p_transaction_header_id
5301: AND transaction_temp_id = nvl(p_transaction_temp_id, transaction_temp_id )
5302: AND transaction_commit_date is null
5303: );

Line 5311: FROM jai_mtl_trxs

5307: and source_table_name = 'MTL_MATERIAL_TRANSACTIONS_TEMP'
5308: AND source_doc_line_id IN
5309: (
5310: SELECT transaction_temp_id
5311: FROM jai_mtl_trxs
5312: WHERE transaction_header_id = p_transaction_header_id
5313: AND transaction_temp_id = nvl(p_transaction_temp_id, transaction_temp_id )
5314: AND transaction_commit_date is null
5315: );

Line 5321: FROM jai_mtl_trxs

5317: DELETE JAI_CMN_MATCH_TAXES
5318: WHERE ref_line_id IN
5319: (
5320: SELECT transaction_temp_id
5321: FROM jai_mtl_trxs
5322: WHERE transaction_header_id = p_transaction_header_id
5323: AND transaction_temp_id = nvl(p_transaction_temp_id, transaction_temp_id )
5324: AND transaction_commit_date is null
5325: )

Line 5332: FROM jai_mtl_trxs

5328: DELETE JAI_CMN_MATCH_RECEIPTS
5329: WHERE ref_line_id IN
5330: (
5331: SELECT transaction_temp_id
5332: FROM jai_mtl_trxs
5333: WHERE transaction_header_id = p_transaction_header_id
5334: AND transaction_temp_id = nvl(p_transaction_temp_id, transaction_temp_id )
5335: AND transaction_commit_date is null
5336: )

Line 5339: DELETE jai_mtl_trxs

5335: AND transaction_commit_date is null
5336: )
5337: AND order_invoice='X';
5338:
5339: DELETE jai_mtl_trxs
5340: WHERE transaction_header_id = p_transaction_header_id
5341: AND transaction_temp_id = nvl(p_transaction_temp_id, transaction_temp_id )
5342: AND transaction_commit_date is null;
5343:

Line 5387: cursor c_jai_mtl_trxs is

5383: AND su.site_use_code = 'SHIP_TO'
5384: AND RTRIM(Ltrim(hrl.location_code)) = LTRIM(Rtrim(p_to_location_code))
5385: AND hrl.inventory_organization_id = p_to_organization_id ; -- bug 6444945
5386:
5387: cursor c_jai_mtl_trxs is
5388: SELECT to_subinventory ,
5389: inventory_item_id ,
5390: quantity ,
5391: transaction_uom

Line 5392: FROM jai_mtl_trxs

5388: SELECT to_subinventory ,
5389: inventory_item_id ,
5390: quantity ,
5391: transaction_uom
5392: FROM jai_mtl_trxs
5393: WHERE transaction_header_id = p_header_id
5394: AND transaction_temp_id = p_line_id;
5395:
5396: r_jai_mtl_trxs c_jai_mtl_trxs%ROWTYPE;

Line 5396: r_jai_mtl_trxs c_jai_mtl_trxs%ROWTYPE;

5392: FROM jai_mtl_trxs
5393: WHERE transaction_header_id = p_header_id
5394: AND transaction_temp_id = p_line_id;
5395:
5396: r_jai_mtl_trxs c_jai_mtl_trxs%ROWTYPE;
5397: ln_site_use_id number(15);
5398: ln_cust_account_id number(15);
5399: ln_tax_category_id number(15);
5400: ln_user_id number(15);

Line 5425: open c_jai_mtl_trxs;

5421: BEGIN
5422:
5423: ln_user_id := fnd_global.user_id;
5424:
5425: open c_jai_mtl_trxs;
5426: fetch c_jai_mtl_trxs into r_jai_mtl_trxs;
5427: close c_jai_mtl_trxs;
5428:
5429: /*

Line 5426: fetch c_jai_mtl_trxs into r_jai_mtl_trxs;

5422:
5423: ln_user_id := fnd_global.user_id;
5424:
5425: open c_jai_mtl_trxs;
5426: fetch c_jai_mtl_trxs into r_jai_mtl_trxs;
5427: close c_jai_mtl_trxs;
5428:
5429: /*
5430: ||The following condition is to see if only quantity is changed

Line 5427: close c_jai_mtl_trxs;

5423: ln_user_id := fnd_global.user_id;
5424:
5425: open c_jai_mtl_trxs;
5426: fetch c_jai_mtl_trxs into r_jai_mtl_trxs;
5427: close c_jai_mtl_trxs;
5428:
5429: /*
5430: ||The following condition is to see if only quantity is changed
5431: ||In this scenario the taxes need to be recalculated and not redefaulted.

Line 5434: IF r_jai_mtl_trxs.quantity <> p_line_quantity THEN

5430: ||The following condition is to see if only quantity is changed
5431: ||In this scenario the taxes need to be recalculated and not redefaulted.
5432: ||If any match information is present this would also be deleted
5433: */
5434: IF r_jai_mtl_trxs.quantity <> p_line_quantity THEN
5435:
5436: IF r_jai_mtl_trxs.inventory_item_id = p_inventory_item_id AND
5437: r_jai_mtl_trxs.transaction_uom = p_uom_code AND
5438: r_jai_mtl_trxs.to_subinventory = p_transfer_subinventory THEN

Line 5436: IF r_jai_mtl_trxs.inventory_item_id = p_inventory_item_id AND

5432: ||If any match information is present this would also be deleted
5433: */
5434: IF r_jai_mtl_trxs.quantity <> p_line_quantity THEN
5435:
5436: IF r_jai_mtl_trxs.inventory_item_id = p_inventory_item_id AND
5437: r_jai_mtl_trxs.transaction_uom = p_uom_code AND
5438: r_jai_mtl_trxs.to_subinventory = p_transfer_subinventory THEN
5439:
5440: UPDATE jai_cmn_document_taxes

Line 5437: r_jai_mtl_trxs.transaction_uom = p_uom_code AND

5433: */
5434: IF r_jai_mtl_trxs.quantity <> p_line_quantity THEN
5435:
5436: IF r_jai_mtl_trxs.inventory_item_id = p_inventory_item_id AND
5437: r_jai_mtl_trxs.transaction_uom = p_uom_code AND
5438: r_jai_mtl_trxs.to_subinventory = p_transfer_subinventory THEN
5439:
5440: UPDATE jai_cmn_document_taxes
5441: SET tax_amt = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * tax_amt,

Line 5438: r_jai_mtl_trxs.to_subinventory = p_transfer_subinventory THEN

5434: IF r_jai_mtl_trxs.quantity <> p_line_quantity THEN
5435:
5436: IF r_jai_mtl_trxs.inventory_item_id = p_inventory_item_id AND
5437: r_jai_mtl_trxs.transaction_uom = p_uom_code AND
5438: r_jai_mtl_trxs.to_subinventory = p_transfer_subinventory THEN
5439:
5440: UPDATE jai_cmn_document_taxes
5441: SET tax_amt = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * tax_amt,
5442: FUNC_TAX_AMT = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * func_tax_amt,

Line 5441: SET tax_amt = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * tax_amt,

5437: r_jai_mtl_trxs.transaction_uom = p_uom_code AND
5438: r_jai_mtl_trxs.to_subinventory = p_transfer_subinventory THEN
5439:
5440: UPDATE jai_cmn_document_taxes
5441: SET tax_amt = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * tax_amt,
5442: FUNC_TAX_AMT = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * func_tax_amt,
5443: last_update_date = sysdate,
5444: last_updated_by = ln_user_id
5445: WHERE source_doc_id = p_header_id

Line 5442: FUNC_TAX_AMT = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * func_tax_amt,

5438: r_jai_mtl_trxs.to_subinventory = p_transfer_subinventory THEN
5439:
5440: UPDATE jai_cmn_document_taxes
5441: SET tax_amt = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * tax_amt,
5442: FUNC_TAX_AMT = ( p_line_quantity / r_jai_mtl_trxs.quantity ) * func_tax_amt,
5443: last_update_date = sysdate,
5444: last_updated_by = ln_user_id
5445: WHERE source_doc_id = p_header_id
5446: AND source_doc_line_id = p_line_id;

Line 5448: UPDATE jai_mtl_trxs

5444: last_updated_by = ln_user_id
5445: WHERE source_doc_id = p_header_id
5446: AND source_doc_line_id = p_line_id;
5447:
5448: UPDATE jai_mtl_trxs
5449: SET quantity = p_line_quantity,
5450: last_update_date = sysdate,
5451: last_updated_by = ln_user_id
5452: WHERE transaction_header_id = p_header_id

Line 5578: INSERT INTO jai_mtl_trxs(

5574: /*End Commenting by mmurtuza for removing GST Changes*/
5575: -------------------------------------------------------------------------------
5576: -- Added by Jia for GST Bug#10043656 on 2010/09/10, Begin
5577:
5578: INSERT INTO jai_mtl_trxs(
5579: transaction_id,
5580: transaction_header_id ,
5581: transaction_temp_id ,
5582: transaction_type_id ,

Line 5603: jai_mtl_trxs_s.nextval,

5599: last_update_date,
5600: last_updated_by,
5601: last_update_login
5602: ) VALUES (
5603: jai_mtl_trxs_s.nextval,
5604: p_header_id, -- :mtl_trx_line.transaction_header_id,
5605: p_line_id, -- :mtl_trx_line.transaction_temp_id,
5606: p_transaction_type_id, -- :mtl_trx_line.transaction_type_id,
5607: p_organization_id, -- :mtl_trx_line.organization_id,