DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_TAX_DIST_PKG dependencies on JAI_RGM_TRX_RECORDS

Line 836: UPDATE jai_Rgm_trx_records

832: OPEN cur_regime_code; /* 4245365*/
833: FETCH cur_regime_code INTO lv_regime;
834: CLOSE cur_regime_code;
835: IF lv_regime IN ('SERVICE') THEN /*6835541.removed VAT*/
836: UPDATE jai_Rgm_trx_records
837: SET settlement_id = p_settlement_id
838: /*Bug 5879769 bduvarag*/
839: WHERE organization_id = p_org_id
840: AND location_id = p_location_id

Line 850: UPDATE jai_Rgm_trx_records

846: ) ;--Added by Qiong for reverse charge settlement
847:
848: ELSIF lv_regime IN ('VAT') THEN /*6835541*/
849:
850: UPDATE jai_Rgm_trx_records
851: SET settlement_id = p_settlement_id
852: WHERE (organization_id,location_id) in
853: (SELECT organization_id,location_id
854: FROM JAI_RGM_ORG_REGNS_V

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

894: ,p_reverse_charge_flag VARCHAR2 DEFAULT NULL --Added by Qiong for reverse charge settlement
895: ) is
896: /* Added by Ramananda for bug#4407165 */
897: lv_object_name CONSTANT VARCHAR2(61) := 'jai_cmn_rgm_tax_dist_pkg.calculate_balances_for_ou';
898: lv_source_trx_type jai_rgm_trx_records.source_trx_type%TYPE ;--rchandan for bug#4428980
899: lv_reg_type jai_rgm_registrations.registration_type%TYPE ;
900:
901: CURSOR c_regime_code IS
902: SELECT regime_code

Line 917: FROM jai_rgm_trx_records

913: || This cursor is used to get the total invoice amount paid
914: || when the last settlement was made
915: */
916: SELECT sum(credit_amount)
917: FROM jai_rgm_trx_records
918: WHERE regime_primary_regno = p_regn_no
919: AND source_trx_type = 'Invoice Payment'
920: AND settlement_id = ( SELECT MAX(jbal.settlement_id)
921: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

Line 944: FROM jai_rgm_trx_records

940: || This cursor used when procedure is invoked from Distribution and so it does not have registration
941: || details
942: */
943: SELECT credit_amount
944: FROM jai_rgm_trx_records
945: WHERE source_trx_type = 'Invoice Payment'
946: -- AND service_type_code = nvl(cp_service_type_code,service_type_code)/*added nvl for bug#13865856*/
947: and (cp_service_type_code is null or service_type_code =cp_service_type_code) /*Commented the above and added the condition for bug 14475128 */
948: AND settlement_id = ( SELECT MAX(jbal.settlement_id)

Line 972: FROM jai_rgm_trx_records

968: || This cursor used when procedure is invoked from Distribution and so it does not have registration
969: || details
970: */
971: SELECT credit_amount
972: FROM jai_rgm_trx_records
973: WHERE /*regime_primary_regno = p_regn_no*/ -- Commented, Harshita for Bug 5694855
974: source_trx_type = 'Invoice Payment'
975: AND settlement_id = ( SELECT MAX(jbal.settlement_id)
976: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

Line 1031: FROM jai_rgm_trx_records

1027: || This cursor is used to get the total invoice amount paid
1028: || when the last settlement was made for VAT regime
1029: */
1030: SELECT sum(credit_amount)
1031: FROM jai_rgm_trx_records
1032: WHERE regime_primary_regno = p_regn_no
1033: AND source_trx_type = 'Invoice Payment'
1034: AND settlement_id = ( SELECT MAX(jbal.settlement_id)
1035: FROM jai_rgm_stl_balances jbal,

Line 1126: jai_rgm_trx_records

1122: tax_type ,
1123: nvl(sum(debit_amount),0) debit_amt ,
1124: nvl(sum(credit_amount),0) credit_amt
1125: FROM
1126: jai_rgm_trx_records
1127: WHERE trunc(transaction_date) <= p_balance_date --changed the date condition for bug 9445836
1128: AND settlement_id IS NULL
1129: AND source_trx_type <> 'Invoice Payment'
1130: AND organization_id = cp_organization_id

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

1166: /*Bug 5879769 bduvarag end*/
1167: lv_party_type varchar2(30) ; --:= 'OU'; File.Sql.35 BY Brathod
1168: ln_settled_debit_balance number ;
1169: ln_settled_credit_balance number ;
1170: -- lv_inv_amount jai_rgm_trx_records.credit_amount%type;/* commented by ssawant for bug 5662296*/
1171: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;
1172: cr_balance jai_rgm_stl_balances.credit_balance%type; /*added by ssawant for bug 5662296*/
1173: dr_balance jai_rgm_stl_balances.debit_balance%type; /*added by ssawant for bug 5662296*/
1174: ln_settled_flag NUMBER(1) := 0;/*added by ssawant for bug 5662296*/

Line 1171: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;

1167: lv_party_type varchar2(30) ; --:= 'OU'; File.Sql.35 BY Brathod
1168: ln_settled_debit_balance number ;
1169: ln_settled_credit_balance number ;
1170: -- lv_inv_amount jai_rgm_trx_records.credit_amount%type;/* commented by ssawant for bug 5662296*/
1171: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;
1172: cr_balance jai_rgm_stl_balances.credit_balance%type; /*added by ssawant for bug 5662296*/
1173: dr_balance jai_rgm_stl_balances.debit_balance%type; /*added by ssawant for bug 5662296*/
1174: ln_settled_flag NUMBER(1) := 0;/*added by ssawant for bug 5662296*/
1175: v_last_settlement_id NUMBER; /* added for bug 7606212 by vumaasha */

Line 1229: FROM jai_rgm_trx_records a

1225: a.location_id ,/*Bug 5879769 bduvarag*/
1226: a.tax_type ,
1227: nvl(sum(a.debit_amount),0) debit_amt ,
1228: nvl(sum(a.credit_amount),0) credit_amt
1229: FROM jai_rgm_trx_records a
1230: WHERE trunc(transaction_date) <= p_balance_date --date condition changed for bug 9445836
1231: AND a.settlement_id IS NULL/*rchandan for bug#5642053*/
1232: AND a.regime_code = lv_regime_code/*5694855*/
1233: AND a.organization_type = p_org_type/*5694855*/

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

1408: ,p_reverse_charge_flag => p_reverse_charge_flag --Added by Qiong for reverse charge settlement
1409: );
1410: ELSIF lv_regime_code = jai_constants.vat_regime THEN /* 4245365*/
1411: /*Even though VAT is for IO , balances are calculated similar to an OU. i.e from
1412: jai_rgm_trx_records. hence the implementation is done in this procedure only*/
1413: lv_source_trx_type := 'Invoice Payment';--rchandan for bug#4428980
1414: FOR delta_rec in
1415: (
1416: SELECT

Line 1425: jai_rgm_trx_records a, JAI_RGM_ORG_REGNS_V b

1421: a.organization_type , /*6835541*/
1422: nvl(sum(a.debit_amount),0) debit_amt ,
1423: nvl(sum(a.credit_amount),0) credit_amt
1424: FROM
1425: jai_rgm_trx_records a, JAI_RGM_ORG_REGNS_V b
1426: WHERE trunc(transaction_date) <= p_balance_date --date condition changed for bug 9445836
1427: AND a.settlement_id IS NULL --added by csahoo for bug#6235971
1428: AND b.regime_id = p_regime_id/*5694855 bduvarag*/
1429: AND a.regime_code = lv_regime_code/*5694855 bduvarag*/

Line 1667: jai_rgm_trx_records a

1663: nvl(sum(debit_amount),0) debit_amt ,
1664: nvl(sum(credit_amount),0) credit_amt
1665: FROM
1666: /*Bug 5879769 bduvarag start*/
1667: jai_rgm_trx_records a
1668: WHERE trunc(transaction_date) <= p_balance_date --date condition removed for bug 9445836
1669: AND a.settlement_id IS NULL
1670: AND a.source_trx_type <> 'Invoice Payment'
1671: AND a.organization_id = p_org_id

Line 1826: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;

1822:
1823: r_last_settlement_dtls c_last_settlement_dtls%rowtype;
1824: ln_settled_flag number(1) := 0;
1825: ln_settled_credit_balance number:= 0;
1826: ln_invoice_amount jai_rgm_trx_records.credit_amount%type;
1827: cr_balance jai_rgm_stl_balances.credit_balance%type;
1828: dr_balance jai_rgm_stl_balances.debit_balance%type:= 0;
1829: ln_settled_debit_balance number:= 0;
1830: v_credit_exceeds_debit BOOLEAN :=FALSE;