DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_TAX_DIST_PKG dependencies on JAI_RGM_TRX_RECORDS

Line 427: UPDATE jai_Rgm_trx_records

423: OPEN cur_regime_code; /* 4245365*/
424: FETCH cur_regime_code INTO lv_regime;
425: CLOSE cur_regime_code;
426: IF lv_regime IN ('SERVICE') THEN /*6835541.removed VAT*/
427: UPDATE jai_Rgm_trx_records
428: SET settlement_id = p_settlement_id
429: /*Bug 5879769 bduvarag*/
430: WHERE organization_id = p_org_id
431: AND location_id = p_location_id

Line 438: UPDATE jai_Rgm_trx_records

434: AND settlement_id IS NULL; /* added by ssawant for bug 5662296*/
435:
436: ELSIF lv_regime IN ('VAT') THEN /*6835541*/
437:
438: UPDATE jai_Rgm_trx_records
439: SET settlement_id = p_settlement_id
440: WHERE (organization_id,location_id) in
441: (SELECT organization_id,location_id
442: FROM JAI_RGM_ORG_REGNS_V

Line 484: lv_source_trx_type jai_rgm_trx_records.source_trx_type%TYPE ;--rchandan for bug#4428980

480: p_service_type_code varchar2 default null -- bduvarag for Bug 5694855
481: ) is
482: /* Added by Ramananda for bug#4407165 */
483: lv_object_name CONSTANT VARCHAR2(61) := 'jai_cmn_rgm_tax_dist_pkg.calculate_balances_for_ou';
484: lv_source_trx_type jai_rgm_trx_records.source_trx_type%TYPE ;--rchandan for bug#4428980
485: lv_reg_type jai_rgm_registrations.registration_type%TYPE ;
486:
487: CURSOR c_regime_code IS
488: SELECT regime_code

Line 503: FROM jai_rgm_trx_records

499: || This cursor is used to get the total invoice amount paid
500: || when the last settlement was made
501: */
502: SELECT sum(credit_amount)
503: FROM jai_rgm_trx_records
504: WHERE regime_primary_regno = p_regn_no
505: AND source_trx_type = 'Invoice Payment'
506: AND service_type_code = cp_service_type_code /*Added by nprashar for bug # 6359082*/
507: AND settlement_id = ( SELECT MAX(jbal.settlement_id)

Line 531: FROM jai_rgm_trx_records

527: || This cursor used when procedure is invoked from Distribution and so it does not have registration
528: || details
529: */
530: SELECT credit_amount
531: FROM jai_rgm_trx_records
532: WHERE source_trx_type = 'Invoice Payment'
533: AND service_type_code = cp_service_type_code
534: AND settlement_id = ( SELECT MAX(jbal.settlement_id)
535: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

Line 557: FROM jai_rgm_trx_records

553: || This cursor used when procedure is invoked from Distribution and so it does not have registration
554: || details
555: */
556: SELECT credit_amount
557: FROM jai_rgm_trx_records
558: WHERE /*regime_primary_regno = p_regn_no*/ -- Commented, Harshita for Bug 5694855
559: source_trx_type = 'Invoice Payment'
560: AND settlement_id = ( SELECT MAX(jbal.settlement_id)
561: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

Line 600: FROM jai_rgm_trx_records

596: || This cursor is used to get the total invoice amount paid
597: || when the last settlement was made for VAT regime
598: */
599: SELECT sum(credit_amount)
600: FROM jai_rgm_trx_records
601: WHERE regime_primary_regno = p_regn_no
602: AND source_trx_type = 'Invoice Payment'
603: AND settlement_id = ( SELECT MAX(jbal.settlement_id)
604: FROM jai_rgm_stl_balances jbal,

Line 664: jai_rgm_trx_records

660: tax_type ,
661: nvl(sum(debit_amount),0) debit_amt ,
662: nvl(sum(credit_amount),0) credit_amt
663: FROM
664: jai_rgm_trx_records
665: WHERE trunc(transaction_date) between nvl(jai_cmn_rgm_settlement_pkg.get_last_settlement_date(cp_regime_id,cp_organization_id,cp_location_id),g_start_date) and p_balance_date
666: AND settlement_id IS NULL
667: AND source_trx_type <> 'Invoice Payment'
668: AND organization_id = cp_organization_id

Line 686: -- lv_inv_amount jai_rgm_trx_records.credit_amount%type;/* commented by ssawant for bug 5662296*/

682: /*Bug 5879769 bduvarag end*/
683: lv_party_type varchar2(30) ; --:= 'OU'; File.Sql.35 BY Brathod
684: ln_settled_debit_balance number ;
685: ln_settled_credit_balance number ;
686: -- lv_inv_amount jai_rgm_trx_records.credit_amount%type;/* commented by ssawant for bug 5662296*/
687: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;
688: cr_balance jai_rgm_stl_balances.credit_balance%type; /*added by ssawant for bug 5662296*/
689: dr_balance jai_rgm_stl_balances.debit_balance%type; /*added by ssawant for bug 5662296*/
690: ln_settled_flag NUMBER(1) := 0;/*added by ssawant for bug 5662296*/

Line 687: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;

683: lv_party_type varchar2(30) ; --:= 'OU'; File.Sql.35 BY Brathod
684: ln_settled_debit_balance number ;
685: ln_settled_credit_balance number ;
686: -- lv_inv_amount jai_rgm_trx_records.credit_amount%type;/* commented by ssawant for bug 5662296*/
687: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;
688: cr_balance jai_rgm_stl_balances.credit_balance%type; /*added by ssawant for bug 5662296*/
689: dr_balance jai_rgm_stl_balances.debit_balance%type; /*added by ssawant for bug 5662296*/
690: ln_settled_flag NUMBER(1) := 0;/*added by ssawant for bug 5662296*/
691:

Line 716: FROM jai_rgm_trx_records a

712: a.service_type_code ,/*Bug 5879769 bduvarag*/
713: a.tax_type ,
714: nvl(sum(a.debit_amount),0) debit_amt ,
715: nvl(sum(a.credit_amount),0) credit_amt
716: FROM jai_rgm_trx_records a
717: WHERE trunc(transaction_date) BETWEEN nvl(jai_cmn_rgm_settlement_pkg.get_last_settlement_date(p_regime_id,a.organization_id,a.location_id),g_start_date)
718: /*rchandan for bug#5003538*//*rchandan for bug#5642053. Removed +1 from last settlement date*/
719: AND p_balance_date /*5694855.location_id is also passed to get_last_settlement_date*/
720: AND a.settlement_id IS NULL/*rchandan for bug#5642053*/

Line 817: jai_rgm_trx_records. hence the implementation is done in this procedure only*/

813: p_org_id => p_org_id /*added by ssawant for bug 5662296*/
814: );
815: ELSIF lv_regime_code = jai_constants.vat_regime THEN /* 4245365*/
816: /*Even though VAT is for IO , balances are calculated similar to an OU. i.e from
817: jai_rgm_trx_records. hence the implementation is done in this procedure only*/
818: lv_source_trx_type := 'Invoice Payment';--rchandan for bug#4428980
819: FOR delta_rec in
820: (
821: SELECT

Line 830: jai_rgm_trx_records a, JAI_RGM_ORG_REGNS_V b

826: a.organization_type , /*6835541*/
827: nvl(sum(a.debit_amount),0) debit_amt ,
828: nvl(sum(a.credit_amount),0) credit_amt
829: FROM
830: jai_rgm_trx_records a, JAI_RGM_ORG_REGNS_V b
831: WHERE trunc(transaction_date) between nvl(jai_cmn_rgm_settlement_pkg.get_last_settlement_date(b.regime_id,a.organization_id,a.location_id) ,g_start_date) and p_balance_date /*+ 1 removed by ssawant for bug 5662296*/
832: AND a.settlement_id IS NULL --added by csahoo for bug#6235971
833: AND b.regime_id = p_regime_id/*5694855 bduvarag*/
834: AND a.regime_code = lv_regime_code/*5694855 bduvarag*/

Line 1006: jai_rgm_trx_records a

1002: nvl(sum(debit_amount),0) debit_amt ,
1003: nvl(sum(credit_amount),0) credit_amt
1004: FROM
1005: /*Bug 5879769 bduvarag start*/
1006: jai_rgm_trx_records a
1007: WHERE trunc(transaction_date) between nvl(jai_cmn_rgm_settlement_pkg.get_last_settlement_date(p_regime_id,a.organization_id),g_start_date) and p_balance_date
1008: /*rchandan for bug#5003538*//*rchandan for bug#5642053. Removed +1 from last settlement date*/
1009: AND a.settlement_id IS NULL
1010: AND a.source_trx_type <> 'Invoice Payment'