[Home] [Help]
55:
56:
57: 3. Bug# 4204880 - ssumaith - 20-feb-2005 - File version 115.2
58:
59: A new column has been added into the table jai_Rgm_trx_Records called regime_primary_regno and it has been
60: included in the insert column list in the table jai_Rgm_trx_Records
61: A cursor has been added to fetch the primary registration number.
62:
63: Dependency :-
56:
57: 3. Bug# 4204880 - ssumaith - 20-feb-2005 - File version 115.2
58:
59: A new column has been added into the table jai_Rgm_trx_Records called regime_primary_regno and it has been
60: included in the insert column list in the table jai_Rgm_trx_Records
61: A cursor has been added to fetch the primary registration number.
62:
63: Dependency :-
64: High . A new column has been added into the jai_rgm_trx_records table which also needs data to be populated
60: included in the insert column list in the table jai_Rgm_trx_Records
61: A cursor has been added to fetch the primary registration number.
62:
63: Dependency :-
64: High . A new column has been added into the jai_rgm_trx_records table which also needs data to be populated
65: If this file is sent alone , it will cause a dependency issue.
66: Need to ensure that the new column needs to be part of the table.
67:
68:
155: 12 25-April-2007 ssawant for bug 5879769 ,File version 120.6
156: Forward porting of
157: ENH : SERVICE TAX BY INVENTORY ORGANIZATION AND SERVICE TYPE SOLUTION from 11.5( bug no 5694855) to R12 (bug no 5879769).
158: Fix : A new parameter p_service_type_code is added to insert_repository procedure.
159: This is used to insert into jai_rgm_trx_records.
160: A new column repository_id is added to jai_sla_entries and so the insert statement
161: is modified to insert the repository id
162: The procedure get_account is modified to return the account if the regime is SERVICE, Org Type is IO and the
163: tax is not of EXCISE or EXCISE CESS types
258: ln_trx_credit NUMBER;
259: ln_trx_debit NUMBER;
260:
261: lv_register_entry_type VARCHAR2(2);
262: lv_account_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
263: ln_charge_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
264: lv_charge_entry_type VARCHAR2(2);
265: lv_period_name GL_PERIODS.period_name%TYPE;
266:
259: ln_trx_debit NUMBER;
260:
261: lv_register_entry_type VARCHAR2(2);
262: lv_account_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
263: ln_charge_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
264: lv_charge_entry_type VARCHAR2(2);
265: lv_period_name GL_PERIODS.period_name%TYPE;
266:
267: lv_balancing_tax_type JAI_RGM_TRX_RECORDS.tax_type%TYPE;
263: ln_charge_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
264: lv_charge_entry_type VARCHAR2(2);
265: lv_period_name GL_PERIODS.period_name%TYPE;
266:
267: lv_balancing_tax_type JAI_RGM_TRX_RECORDS.tax_type%TYPE;
268: lv_balancing_orgn_type JAI_RGM_TRX_RECORDS.organization_type%TYPE;
269: ln_balancing_orgn_id JAI_RGM_TRX_RECORDS.organization_id%TYPE;
270: ln_balancing_location_id JAI_RGM_TRX_RECORDS.location_id%TYPE;
271: lv_balancing_accnt_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
264: lv_charge_entry_type VARCHAR2(2);
265: lv_period_name GL_PERIODS.period_name%TYPE;
266:
267: lv_balancing_tax_type JAI_RGM_TRX_RECORDS.tax_type%TYPE;
268: lv_balancing_orgn_type JAI_RGM_TRX_RECORDS.organization_type%TYPE;
269: ln_balancing_orgn_id JAI_RGM_TRX_RECORDS.organization_id%TYPE;
270: ln_balancing_location_id JAI_RGM_TRX_RECORDS.location_id%TYPE;
271: lv_balancing_accnt_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
272: ln_balancing_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
265: lv_period_name GL_PERIODS.period_name%TYPE;
266:
267: lv_balancing_tax_type JAI_RGM_TRX_RECORDS.tax_type%TYPE;
268: lv_balancing_orgn_type JAI_RGM_TRX_RECORDS.organization_type%TYPE;
269: ln_balancing_orgn_id JAI_RGM_TRX_RECORDS.organization_id%TYPE;
270: ln_balancing_location_id JAI_RGM_TRX_RECORDS.location_id%TYPE;
271: lv_balancing_accnt_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
272: ln_balancing_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
273: lv_balancing_entry_type VARCHAR2(2);
266:
267: lv_balancing_tax_type JAI_RGM_TRX_RECORDS.tax_type%TYPE;
268: lv_balancing_orgn_type JAI_RGM_TRX_RECORDS.organization_type%TYPE;
269: ln_balancing_orgn_id JAI_RGM_TRX_RECORDS.organization_id%TYPE;
270: ln_balancing_location_id JAI_RGM_TRX_RECORDS.location_id%TYPE;
271: lv_balancing_accnt_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
272: ln_balancing_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
273: lv_balancing_entry_type VARCHAR2(2);
274: lv_bal_entry_period_name GL_PERIODS.period_name%TYPE;
267: lv_balancing_tax_type JAI_RGM_TRX_RECORDS.tax_type%TYPE;
268: lv_balancing_orgn_type JAI_RGM_TRX_RECORDS.organization_type%TYPE;
269: ln_balancing_orgn_id JAI_RGM_TRX_RECORDS.organization_id%TYPE;
270: ln_balancing_location_id JAI_RGM_TRX_RECORDS.location_id%TYPE;
271: lv_balancing_accnt_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
272: ln_balancing_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
273: lv_balancing_entry_type VARCHAR2(2);
274: lv_bal_entry_period_name GL_PERIODS.period_name%TYPE;
275:
268: lv_balancing_orgn_type JAI_RGM_TRX_RECORDS.organization_type%TYPE;
269: ln_balancing_orgn_id JAI_RGM_TRX_RECORDS.organization_id%TYPE;
270: ln_balancing_location_id JAI_RGM_TRX_RECORDS.location_id%TYPE;
271: lv_balancing_accnt_name JAI_RGM_TRX_RECORDS.account_name%TYPE;
272: ln_balancing_account_id JAI_RGM_TRX_RECORDS.charge_account_id%TYPE;
273: lv_balancing_entry_type VARCHAR2(2);
274: lv_bal_entry_period_name GL_PERIODS.period_name%TYPE;
275:
276: ln_trx_tax_amount NUMBER;
293: ln_unearned_disc_accnt NUMBER;
294:
295: /*
296: Following cursor added by ssumaith for fetching the primary registration number of the regime
297: It will be inserted into jai_Rgm_trx_records table.
298: Bug# 4204880
299: */
300:
301: CURSOR c_primary_regno( p_att_type_code jai_rgm_registrations.attribute_Type_code%TYPE ) IS --rchandan for bug#4428980
497:
498: lv_statement := '10';
499: /*
500: Following cursor added by ssumaith to get the primary registration number - bug# 4204880
501: Added the column regime_primary_regno in the insert column list of the table jai_rgm_trx_records table.
502: */
503: OPEN c_primary_regno('PRIMARY'); --rchandan for bug#4428980
504: FETCH c_primary_regno into lv_primary_regime_regno;
505: CLOSE c_primary_regno;
504: FETCH c_primary_regno into lv_primary_regime_regno;
505: CLOSE c_primary_regno;
506:
507: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath);
508: INSERT INTO jai_rgm_trx_records(
509: repository_id, regime_code, tax_type, source,
510: source_document_id, source_table_name, transaction_date, debit_amount, credit_amount,
511: settled_amount, settled_flag, settlement_id, organization_type,
512: organization_id, location_id, account_name, charge_account_id, balancing_account_id,
515: creation_date, created_by, last_update_date, last_updated_by, last_update_login,
516: attribute_context, attribute1, attribute2, attribute3, attribute4, attribute5
517: , inv_organization_id, regime_primary_regno ,service_type_code /* added by ssawant for bug 5879769 */
518: ) VALUES (
519: jai_rgm_trx_records_s.nextval, lv_regime_code, p_tax_type, p_source,
520: p_source_document_id, p_source_table_name, ld_transaction_date, ln_debit, ln_credit,
521: null, null, p_settlement_id, p_organization_type,
522: p_organization_id, p_location_id, p_account_name, ln_charge_account_id, ln_balancing_account_id,
523: p_reference_id, p_source_trx_type, p_tax_rate, p_assessable_value, p_batch_id,
916:
917: Cursor c_get_source(cp_repository_id NUMBER)
918: IS
919: select source
920: from jai_rgm_trx_records
921: where repository_id = cp_repository_id ;
922:
923:
924: lv_source jai_rgm_trx_records.source%TYPE ;
920: from jai_rgm_trx_records
921: where repository_id = cp_repository_id ;
922:
923:
924: lv_source jai_rgm_trx_records.source%TYPE ;
925: lv_src_party_id jai_rgm_dis_src_hdrs.party_id%TYPE ;
926: lv_reference1 gl_interface.reference1%TYPE ;
927: ln_loop_cnt NUMBER;
928:
1686: AND attribute_type_code = p_att_type_code;
1687:
1688: lv_regime_code JAI_RGM_DEFINITIONS.regime_code%TYPE;
1689: ld_transaction_date DATE;
1690: lv_primary_regime_regno jai_rgm_trx_records.regime_primary_regno%TYPE;
1691:
1692: lv_statement_id VARCHAR2(3);
1693: BEGIN
1694:
1714: pn_credit_amount := round( pn_credit_amount, jai_constants.vat_rgm_rnd_factor);
1715: pn_debit_amount := round( pn_debit_amount, jai_constants.vat_rgm_rnd_factor);
1716:
1717: lv_statement_id := '5';
1718: INSERT INTO jai_rgm_trx_records(
1719: repository_id, regime_code, tax_type, source,
1720: source_document_id, source_table_name, transaction_date, debit_amount, credit_amount,
1721: settled_amount, settled_flag, settlement_id, organization_type,
1722: organization_id, location_id, account_name, charge_account_id, balancing_account_id,
1725: creation_date, created_by, last_update_date, last_updated_by, last_update_login,
1726: attribute_context, attribute1, attribute2, attribute3, attribute4, attribute5
1727: , inv_organization_id, regime_primary_regno, invoice_no, invoice_date
1728: ) VALUES (
1729: jai_rgm_trx_records_s.nextval, lv_regime_code, pv_tax_type, pv_source,
1730: pn_source_id, pv_source_table_name, ld_transaction_date, pn_debit_amount, pn_credit_amount,
1731: null, null, null, pv_organization_type,
1732: pn_organization_id, pn_location_id, pv_account_name, pn_charge_account_id, pn_balancing_account_id,
1733: pn_reference_id, pv_source_trx_type, pn_tax_rate, pn_assessable_value, pn_batch_id,
1787: ln_accounted_debit NUMBER;
1788: ld_accounting_date DATE;
1789: ld_transaction_date DATE;
1790:
1791: lv_source JAI_RGM_TRX_RECORDS.source%TYPE;
1792: lv_source_trx_type JAI_RGM_TRX_RECORDS.source_trx_type%TYPE;
1793: lv_source_table_name JAI_RGM_TRX_RECORDS.source_table_name%TYPE;
1794: ln_source_id JAI_RGM_TRX_RECORDS.source_document_id%TYPE;
1795: ln_repository_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
1788: ld_accounting_date DATE;
1789: ld_transaction_date DATE;
1790:
1791: lv_source JAI_RGM_TRX_RECORDS.source%TYPE;
1792: lv_source_trx_type JAI_RGM_TRX_RECORDS.source_trx_type%TYPE;
1793: lv_source_table_name JAI_RGM_TRX_RECORDS.source_table_name%TYPE;
1794: ln_source_id JAI_RGM_TRX_RECORDS.source_document_id%TYPE;
1795: ln_repository_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
1796: lv_repository_name VARCHAR2(30);
1789: ld_transaction_date DATE;
1790:
1791: lv_source JAI_RGM_TRX_RECORDS.source%TYPE;
1792: lv_source_trx_type JAI_RGM_TRX_RECORDS.source_trx_type%TYPE;
1793: lv_source_table_name JAI_RGM_TRX_RECORDS.source_table_name%TYPE;
1794: ln_source_id JAI_RGM_TRX_RECORDS.source_document_id%TYPE;
1795: ln_repository_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
1796: lv_repository_name VARCHAR2(30);
1797:
1790:
1791: lv_source JAI_RGM_TRX_RECORDS.source%TYPE;
1792: lv_source_trx_type JAI_RGM_TRX_RECORDS.source_trx_type%TYPE;
1793: lv_source_table_name JAI_RGM_TRX_RECORDS.source_table_name%TYPE;
1794: ln_source_id JAI_RGM_TRX_RECORDS.source_document_id%TYPE;
1795: ln_repository_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
1796: lv_repository_name VARCHAR2(30);
1797:
1798: lv_statement_id VARCHAR2(3);
1791: lv_source JAI_RGM_TRX_RECORDS.source%TYPE;
1792: lv_source_trx_type JAI_RGM_TRX_RECORDS.source_trx_type%TYPE;
1793: lv_source_table_name JAI_RGM_TRX_RECORDS.source_table_name%TYPE;
1794: ln_source_id JAI_RGM_TRX_RECORDS.source_document_id%TYPE;
1795: ln_repository_id JAI_RGM_TRX_RECORDS.repository_id%TYPE;
1796: lv_repository_name VARCHAR2(30);
1797:
1798: lv_statement_id VARCHAR2(3);
1799: