DBA Data[Home] [Help]

APPS.JAI_RCV_TRX_PROCESSING_PKG dependencies on JAI_RCV_TRX_PROCESSING_PKG

Line 1: PACKAGE BODY jai_rcv_trx_processing_pkg AS

1: PACKAGE BODY jai_rcv_trx_processing_pkg AS
2: /* $Header: jai_rcv_trx_prc.plb 120.25.12010000.2 2009/01/05 09:45:18 srjayara ship $ */
3: /*----------------------------------------------------------------------------------------------------------------------------
4: CHANGE HISTORY for FILENAME: jai_rcv_trx_processing_pkg.sql
5: S.No dd/mm/yyyy Author and Details

Line 4: CHANGE HISTORY for FILENAME: jai_rcv_trx_processing_pkg.sql

1: PACKAGE BODY jai_rcv_trx_processing_pkg AS
2: /* $Header: jai_rcv_trx_prc.plb 120.25.12010000.2 2009/01/05 09:45:18 srjayara ship $ */
3: /*----------------------------------------------------------------------------------------------------------------------------
4: CHANGE HISTORY for FILENAME: jai_rcv_trx_processing_pkg.sql
5: S.No dd/mm/yyyy Author and Details
6: ------------------------------------------------------------------------------------------------------------------------------
7: 1 26/07/2004 Vijay Shankar for Bug# 3496408, Version:115.0
8: This Package is coded for Corrections Enhancement to invoke CENVAT and RG related insert APIs for PO Functionality.

Line 424: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.transaction_preprocessor';

420: -- Vijay Shankar for Bug#4346453. RCV DFF Elim. Enh.
421: r_excise_invoice_no c_excise_invoice_no%ROWTYPE;
422:
423: /* Added by Ramananda for bug#4407165 */
424: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.transaction_preprocessor';
425:
426: -- added, Ramananda for bug # 4519719
427: CURSOR c_vat_exists(cp_shipment_line_id NUMBER )
428: IS

Line 632: p_called_from => 'jai_rcv_trx_processing_pkg.transaction_preprocessor',

628: p_rtv_qty => null,
629: p_rtv_corr_qty => null,
630: p_excise_vendor_id => null,
631: p_excise_vendor_site_id => null,
632: p_called_from => 'jai_rcv_trx_processing_pkg.transaction_preprocessor',
633: p_simulate_flag => p_simulate_flag,
634: p_process_status => p_process_status,
635: p_process_message => p_process_status
636: );

Line 666: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.transaction_postprocessor';

662: ln_cenvat_amount NUMBER;
663: ln_cenvat_claimed_ptg NUMBER;
664:
665: /* Added by Ramananda for bug#4407165 */
666: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.transaction_postprocessor';
667:
668: BEGIN
669:
670:

Line 746: p_called_from => 'jai_rcv_trx_processing_pkg.transaction_preprocessor',

742: p_parent_transaction_type => r_trx.parent_transaction_type,
743: p_subinventory_type => r_trx.loc_subinventory_type,
744: p_transaction_quantity => r_trx.quantity,
745: p_transaction_uom_code => r_trx.uom_code,
746: p_called_from => 'jai_rcv_trx_processing_pkg.transaction_preprocessor',
747: p_simulate_flag => p_simulate_flag,
748: p_process_status => p_process_status,
749: p_process_message => p_process_message
750: );

Line 3215: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.populate_details';

3211: r_trx c_trx%ROWTYPE;
3212: r_parent_trx c_trx%ROWTYPE; -- JAI_RCV_TRANSACTIONS record
3213:
3214: /* Added by Ramananda for bug#4407165 */
3215: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.populate_details';
3216: ln_tax_apportion_factor jai_rcv_transactions.tax_apportion_factor%TYPE; --Added by Sanjikum for Bug#4495135
3217:
3218: BEGIN
3219:

Line 3836: p_process_message := jai_rcv_trx_processing_pkg.get_message('NO-ORG');

3832: lv_statement_id := '6';
3833: if r_trx.organization_id is null then
3834: lv_codepath := jai_general_pkg.plot_codepath(3, lv_codepath);
3835: p_process_flag := 'O';
3836: p_process_message := jai_rcv_trx_processing_pkg.get_message('NO-ORG');
3837: goto end_of_process_flag_validation;
3838: end if;
3839:
3840: lv_statement_id := '7';

Line 3859: p_process_message := jai_rcv_trx_processing_pkg.get_message('NO-TAXES');

3855: lv_statement_id := '10';
3856: if r_taxes.total_cnt = 0 then
3857: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);
3858: p_process_flag := 'X';
3859: p_process_message := jai_rcv_trx_processing_pkg.get_message('NO-TAXES');
3860: goto end_of_process_flag_validation;
3861: end if;
3862:
3863: lv_statement_id := '11';

Line 3918: p_process_message := jai_rcv_trx_processing_pkg.get_message('NO-BASE-ACCT');

3914:
3915: if ln_account_count = 0 then
3916: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath);
3917: p_process_flag := 'P';
3918: p_process_message := jai_rcv_trx_processing_pkg.get_message('NO-BASE-ACCT');
3919: goto end_of_process_flag_validation;
3920: end if;
3921: end if;
3922: /* 3PROCESS_FLAG. END of TRANSACTION VALIDATIONS To SEE WHETHER IT IS PENDING FOR SOMETHING INSPITE OF BEING QUALIFIED for PROCESSING*/

Line 3948: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-ORG');

3944: /* 1CENVAT_RG_FLAG. START of CENVAT_RG_FLAG BASIC VALIDATIONS */
3945: if r_trx.organization_id is null then
3946: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath);
3947: p_cenvat_rg_flag := 'O';
3948: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-ORG');
3949:
3950: goto end_of_cenvat_flag_validation;
3951: end if;
3952:

Line 3957: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-LOC-ORG-SETUP');

3953: lv_statement_id := '16';
3954: if r_trx.location_id = 0 then
3955: lv_codepath := jai_general_pkg.plot_codepath(14, lv_codepath);
3956: p_cenvat_rg_flag := 'O';
3957: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-LOC-ORG-SETUP');
3958: goto end_of_cenvat_flag_validation;
3959: end if;
3960: /* 1CENVAT_RG_FLAG. END of CENVAT_RG_FLAG BASIC VALIDATIONS */
3961:

Line 3977: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-TAXES');

3973: lv_statement_id := '18';
3974: if r_taxes.total_cnt = 0 then
3975: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);
3976: p_cenvat_rg_flag := 'X';
3977: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-TAXES');
3978: goto end_of_cenvat_flag_validation;
3979: end if;
3980:
3981: lv_statement_id := '19';

Line 4007: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-EXCISE-TAXES');

4003: lv_statement_id := '21';
4004: if r_trx.organization_type = 'M' AND ln_excise_tax_count = 0 then
4005: lv_codepath := jai_general_pkg.plot_codepath(19, lv_codepath);
4006: p_cenvat_rg_flag := 'X';
4007: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-EXCISE-TAXES');
4008: goto end_of_cenvat_flag_validation;
4009: end if;
4010:
4011: if r_trx.organization_type = 'T' AND lv_transaction_type IN ('DELIVER', 'RETURN TO RECEIVING') then

Line 4094: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-TRADING-NO');

4090: if r_trx.organization_type = 'T' then
4091: if r_trx.item_trading_flag <> 'Y' then
4092: lv_codepath := jai_general_pkg.plot_codepath(24, lv_codepath);
4093: p_cenvat_rg_flag := 'O';
4094: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-TRADING-NO');
4095: goto end_of_cenvat_flag_validation;
4096: elsif r_trx.item_excisable <> 'Y' then
4097: lv_codepath := jai_general_pkg.plot_codepath(25, lv_codepath);
4098: p_cenvat_rg_flag := 'O';

Line 4108: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-CLASS-OTIN');

4104: lv_statement_id := '26';
4105: if r_trx.item_class in ('OTIN','OTEX') then
4106: lv_codepath := jai_general_pkg.plot_codepath(26, lv_codepath);
4107: p_cenvat_rg_flag := 'O';
4108: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-CLASS-OTIN');
4109: goto end_of_cenvat_flag_validation;
4110: elsif r_trx.item_class NOT IN ('RMIN', 'RMEX', 'CGIN', 'CGEX', 'CCIN', 'CCEX', 'FGIN', 'FGEX') then
4111: lv_codepath := jai_general_pkg.plot_codepath(27, lv_codepath);
4112: p_cenvat_rg_flag := 'O';

Line 4113: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-CLASS-NULL');

4109: goto end_of_cenvat_flag_validation;
4110: elsif r_trx.item_class NOT IN ('RMIN', 'RMEX', 'CGIN', 'CGEX', 'CCIN', 'CCEX', 'FGIN', 'FGEX') then
4111: lv_codepath := jai_general_pkg.plot_codepath(27, lv_codepath);
4112: p_cenvat_rg_flag := 'O';
4113: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-CLASS-NULL');
4114: goto end_of_cenvat_flag_validation;
4115: end if;
4116:
4117: lv_statement_id := '27';

Line 4135: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-CENVATABLE-NO');

4131: lv_statement_id := '28';
4132: if r_trx.organization_type ='M' and r_trx.item_cenvatable = 'N' then
4133: lv_codepath := jai_general_pkg.plot_codepath(29, lv_codepath);
4134: p_cenvat_rg_flag := 'O';
4135: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('ITEM-CENVATABLE-NO');
4136: goto end_of_cenvat_flag_validation;
4137: end if;
4138:
4139: lv_statement_id := '29';

Line 4179: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('BASE-MONTH-DIFFERENT');

4175:
4176: if to_char(ld_parent_rg_entry_date, 'YYYYMM') <> to_char(SYSDATE, 'YYYYMM') THEN
4177: lv_codepath := jai_general_pkg.plot_codepath(33, lv_codepath);
4178: p_cenvat_rg_flag := 'XT';
4179: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('BASE-MONTH-DIFFERENT');
4180: goto end_of_cenvat_flag_validation;
4181: end if;
4182:
4183: else

Line 4194: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('BASE-MONTH-DIFFERENT');

4190:
4191: if to_char(r_trx.transaction_date, 'YYYYMM') <> to_char(r_parent_trx.transaction_date, 'YYYYMM') THEN
4192: lv_codepath := jai_general_pkg.plot_codepath(35, lv_codepath);
4193: p_cenvat_rg_flag := 'XT';
4194: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('BASE-MONTH-DIFFERENT');
4195: goto end_of_cenvat_flag_validation;
4196: end if;
4197: end if;
4198: end if;

Line 4241: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-BASE-RG');

4237: if r_trx.transaction_type = 'CORRECT' AND r_trx.parent_transaction_type in ('RECEIVE', 'RETURN TO VENDOR') then
4238: if ld_parent_rg_entry_date IS NULL then
4239: lv_codepath := jai_general_pkg.plot_codepath(39, lv_codepath);
4240: p_cenvat_rg_flag := 'P';
4241: p_cenvat_rg_message := jai_rcv_trx_processing_pkg.get_message('NO-BASE-RG');
4242: goto end_of_cenvat_flag_validation;
4243: end if;
4244: end if;
4245:

Line 4313: p_process_vat_message := jai_rcv_trx_processing_pkg.get_message('NO-LOC-ORG-SETUP');

4309:
4310: if r_trx.location_id = 0 then
4311: lv_codepath := jai_general_pkg.plot_codepath(42.1, lv_codepath);
4312: p_process_vat_flag := 'O';
4313: p_process_vat_message := jai_rcv_trx_processing_pkg.get_message('NO-LOC-ORG-SETUP');
4314: goto end_of_vat_validation;
4315: end if;
4316:
4317: IF lv_transaction_type NOT IN ( 'RECEIVE', 'RETURN TO VENDOR') THEN

Line 4480: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.process_iso_transaction';

4476:
4477: lb_process_iso_transaction BOOLEAN; --File.Sql.35 Cbabu := true;
4478:
4479: /* Added by Ramananda for bug#4407165 */
4480: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.process_iso_transaction';
4481:
4482: ln_excise_tax_cnt NUMBER;
4483: r_shp_line c_shp_line%ROWTYPE;
4484: r_shp_hdr c_shp_hdr%ROWTYPE;

Line 4606: eg in ILDEV -> select jai_rcv_trx_processing_pkg.get_trxn_tax_amount(14108, 10626, 50, 'N') amount from dual;

4602: /*
4603: Transaction can have two Currencies 1. Functional(INR) 2. Transactional (Non INR Currency in case of foreign Trxn)
4604: If p_return_in_inr_curr = 'Y' then Functional tax amount is returned otherwise in transactional currency in returned
4605: Tax amount returned is to the tune of TRANSACTION Quantity.
4606: eg in ILDEV -> select jai_rcv_trx_processing_pkg.get_trxn_tax_amount(14108, 10626, 50, 'N') amount from dual;
4607: */
4608:
4609: -- This cursor gives tax_amount in FOREIGN Currency
4610: CURSOR c_tax_amount(cp_shipment_line_id IN NUMBER, cp_curr_conv_rate IN NUMBER) IS

Line 4653: eg in ILDEV -> select jai_rcv_trx_processing_pkg.get_trxn_cenvat_amount(14108, 10626, 50) amount from dual;

4649: ) RETURN NUMBER IS
4650:
4651: /*
4652: This Always Returns Total Cenvat amount in INR Currency to the tune of transaction quantity, uom
4653: eg in ILDEV -> select jai_rcv_trx_processing_pkg.get_trxn_cenvat_amount(14108, 10626, 50) amount from dual;
4654: */
4655:
4656: -- This cursor gives tax_amount in FOREIGN Currency
4657: CURSOR c_tax_amount(cp_shipment_line_id IN NUMBER, cp_curr_conv_rate IN NUMBER, cp_organization_type IN VARCHAR2) IS

Line 4717: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.get_apportion_factor';

4713: then this function returns (18*1/5*12)=0.3
4714: */
4715:
4716: /* Added by Ramananda for bug#4407165 */
4717: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.get_apportion_factor';
4718:
4719: CURSOR c_ja_in_receipt_lines_qty(cp_shipment_line_id IN NUMBER) IS
4720: SELECT qty_received, transaction_id
4721: FROM JAI_RCV_LINES

Line 4737: -- if this is called from jai_rcv_trx_processing_pkg.populate_details then most of the fields are NULL.

4733: ln_apportion_factor NUMBER;
4734:
4735: BEGIN
4736:
4737: -- if this is called from jai_rcv_trx_processing_pkg.populate_details then most of the fields are NULL.
4738: -- So, Check whether the required values are populated or not before proceding further
4739: OPEN c_trx(p_transaction_id);
4740: FETCH c_trx INTO r_trx;
4741: CLOSE c_trx;

Line 4811: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.get_equivalent_qty_of_receive';

4807: ln_uom_conv_rate NUMBER;
4808: ln_apportion_factor NUMBER;
4809:
4810: /* Added by Ramananda for bug#4407165 */
4811: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.get_equivalent_qty_of_receive';
4812:
4813: BEGIN
4814:
4815: -- if this is called from jai_rcv_trx_processing_pkg.populate_details then most of the fields are NULL.

Line 4815: -- if this is called from jai_rcv_trx_processing_pkg.populate_details then most of the fields are NULL.

4811: lv_object_name CONSTANT VARCHAR2(61) := 'jai_rcv_trx_processing_pkg.get_equivalent_qty_of_receive';
4812:
4813: BEGIN
4814:
4815: -- if this is called from jai_rcv_trx_processing_pkg.populate_details then most of the fields are NULL.
4816: -- So, Check whether the required values are populated or not before proceding further
4817: OPEN c_trx(p_transaction_id);
4818: FETCH c_trx INTO r_trx;
4819: CLOSE c_trx;

Line 4954: END jai_rcv_trx_processing_pkg;

4950: RETURN nvl(lv_accrue_on_receipt_flag, 'N');
4951:
4952: END get_accrue_on_receipt;
4953:
4954: END jai_rcv_trx_processing_pkg;