DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_SETTLEMENT_PKG dependencies on JAI_RGM_SETTLEMENTS

Line 612: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%TYPE DEFAULT NULL)--Added by Qiong for reverse charge settlement

608:
609: PROCEDURE transfer_balance( pn_settlement_id IN jai_rgm_stl_balances.settlement_id%TYPE,
610: pv_process_flag OUT NOCOPY VARCHAR2,
611: pv_process_message OUT NOCOPY VARCHAR2,
612: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%TYPE DEFAULT NULL)--Added by Qiong for reverse charge settlement
613:
614: IS
615: CURSOR c_debit_balance(lv_tax_type jai_rgm_stl_balances.tax_type%TYPE) IS
616: SELECT NVL(debit_balance,0) - NVL(credit_balance,0) debit_balance,

Line 685: FROM jai_rgm_settlements

681:
682:
683: CURSOR cur_regime_id IS
684: SELECT regime_id
685: FROM jai_rgm_settlements
686: WHERE settlement_id = pn_settlement_id;
687:
688: lv_regime_id jai_rgm_settlements.regime_id%type;
689:

Line 688: lv_regime_id jai_rgm_settlements.regime_id%type;

684: SELECT regime_id
685: FROM jai_rgm_settlements
686: WHERE settlement_id = pn_settlement_id;
687:
688: lv_regime_id jai_rgm_settlements.regime_id%type;
689:
690: cursor cur_regime_code is /*Ravi */
691: select regime_code
692: from JAI_RGM_DEFINITIONS

Line 710: FROM jai_rgm_settlements

706: AND settlement_id = pn_settlement_id;
707:
708: /*CURSOR cur_regno IS
709: SELECT primary_registration_no
710: FROM jai_rgm_settlements
711: WHERE settlement_id = pn_settlement_id;*/
712: /*rchandan for bug#5642053..commented the above cursor and defined the following cursor*/
713:
714: CURSOR cur_stl_details IS

Line 719: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

715: SELECT jstl.primary_registration_no,
716: jbal.party_type ,
717: jbal.party_id ,
718: jbal.location_id
719: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl
720: WHERE jbal.settlement_id = jstl.settlement_id
721: AND jbal.settlement_id = pn_settlement_id;
722:
723:

Line 735: from jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

731: AND source_trx_type = 'Invoice Payment'
732: AND transaction_date = ( select max(settlement_date) + 1
733: from jai_rgm_stl_balances a
734: where 2 = (select count(distinct jbal.settlement_date)
735: from jai_rgm_stl_balances jbal,jai_rgm_settlements jstl
736: where jbal.settlement_id = jstl.settlement_id
737: and jstl.primary_registration_no = lp_regn_no and jbal.settlement_date >= a.settlement_date));
738:
739:

Line 745: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

741: IS
742: --|| This cursor is used to retrieve the sum of credit and debit balances as on
743: --|| last settlement date for the given registration number
744: SELECT sum(jbal.credit_balance) credit_balance,sum(jbal.debit_balance) debit_balance
745: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl
746: WHERE jbal.settlement_id = jstl.settlement_id
747: AND jstl.primary_registration_no = lp_regn_no
748: AND jbal.tax_type = lp_tax_type
749: AND jbal.party_id = lp_org_id

Line 753: from jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

749: AND jbal.party_id = lp_org_id
750: AND jstl.settlement_date = ( select max(settlement_date)
751: from jai_rgm_stl_balances a
752: where 2 = (select count(distinct jbal.settlement_date)
753: from jai_rgm_stl_balances jbal,jai_rgm_settlements jstl
754: where jbal.settlement_id = jstl.settlement_id
755: and jstl.primary_registration_no = lp_regn_no and jbal.settlement_date >= a.settlement_date ));
756:
757: */

Line 774: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

770: SELECT sum(credit_amount)
771: FROM jai_rgm_trx_records
772: WHERE source_trx_type = 'Invoice Payment'
773: AND settlement_id = ( SELECT MAX(jbal.settlement_id)
774: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl
775: WHERE jbal.settlement_id = jstl.settlement_id
776: AND jstl.primary_registration_no = cp_regn_no
777: AND jbal.party_type = cp_org_type
778: AND jbal.party_id = cp_org_id

Line 796: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl

792: */
793: SELECT sum(credit_balance) credit_balance,sum(debit_balance) debit_balance
794: FROM jai_rgm_stl_balances
795: WHERE settlement_id = ( SELECT MAX(jbal.settlement_id)
796: FROM jai_rgm_stl_balances jbal,jai_rgm_settlements jstl
797: WHERE jbal.settlement_id = jstl.settlement_id
798: AND jstl.primary_registration_no = cp_regn_no
799: AND jbal.party_type = cp_org_type
800: AND jbal.party_id = cp_org_id

Line 819: jai_rgm_settlements jstl,

815: --AND source_document_type = 'Invoice Payment'
816: AND settlement_id =
817: (SELECT MAX(jbal.settlement_id)
818: FROM jai_rgm_stl_balances jbal,
819: jai_rgm_settlements jstl,
820: jai_rgm_definitions jrg
821: WHERE jbal.settlement_id = jstl.settlement_id
822: AND jrg.regime_id = jstl.regime_id
823: AND jrg.regime_code = 'TCS'

Line 872: lv_regn_no jai_rgm_settlements.primary_registration_no%type;

868: ln_charge_accounting_id jai_rgm_trx_records.charge_account_id%type; /* added by ssawant for bug 6020629 */
869: lv_organization_type VARCHAR2(10); /* added by ssawant for bug 6020629 */
870: ln_invoice_amount jai_rgm_trx_records.credit_amount%type ; /* added by ssawant for bug 6020629 */
871: rec_balances cur_balances%ROWTYPE;/* added by ssawant for bug 6020629 */
872: lv_regn_no jai_rgm_settlements.primary_registration_no%type;
873: /*rchandan for bug#5642053 start*/
874: ln_organization_id jai_rgm_stl_balances.party_id%TYPE;
875: ln_location_id jai_rgm_stl_balances.location_id%TYPE;
876: lv_org_type jai_rgm_stl_balances.party_type%TYPE;

Line 1018: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

1014: p_organization_type => lv_organization_type,
1015: p_organization_id => r_acct_balances.party_id,
1016: p_source => jai_constants.source_settle_in,
1017: p_source_trx_type => 'Invoice Payment',
1018: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
1019: p_source_document_id => pn_settlement_id,
1020: p_code_combination_id => ln_charge_accounting_id,
1021: p_entered_cr => NULL,
1022: p_entered_dr => ln_acct_amount,

Line 1042: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

1038: p_organization_type => lv_organization_type,
1039: p_organization_id => r_acct_balances.party_id,
1040: p_source => jai_constants.source_settle_in,
1041: p_source_trx_type => 'Invoice Payment',
1042: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
1043: p_source_document_id => pn_settlement_id,
1044: p_code_combination_id => ln_charge_accounting_id,
1045: p_entered_cr => NULL,
1046: p_entered_dr => ln_acct_amount,

Line 1089: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

1085: p_organization_type => lv_organization_type,
1086: p_organization_id => r_acct_balances.party_id,
1087: p_source => jai_constants.source_settle_in,
1088: p_source_trx_type => 'Invoice Payment',
1089: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
1090: p_source_document_id => pn_settlement_id,
1091: p_code_combination_id => ln_charge_accounting_id,
1092: p_entered_cr => ln_acct_amount,
1093: p_entered_dr => NULL,

Line 1114: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

1110: p_organization_type => lv_organization_type,
1111: p_organization_id => r_acct_balances.party_id,
1112: p_source => jai_constants.source_settle_in,
1113: p_source_trx_type => 'Invoice Payment',
1114: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
1115: p_source_document_id => pn_settlement_id,
1116: p_code_combination_id => ln_charge_accounting_id,
1117: p_entered_cr => ln_acct_amount,
1118: p_entered_dr => NULL,

Line 1148: jai_rgm_settlements b

1144: /**Observation :11821537 ,settle in ,settle out repository update is not required as the service tax is by IO and for settlement
1145: organization and location are mandatory ,need to comment the code**/
1146: FOR I in (select distinct b.regime_id, b.settlement_date, a.tax_type
1147: from jai_rgm_stl_balances a,
1148: jai_rgm_settlements b
1149: where a.settlement_id = b.settlement_id
1150: AND a.settlement_id = pn_settlement_id)
1151: LOOP
1152: SELECT count(*)

Line 1238: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

1234: p_trx_date => i.settlement_date,
1235: p_acct_req => jai_constants.yes,
1236: p_source => 'SETTLEMENT',
1237: p_source_trx_type => 'SETTLEMENT',
1238: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
1239: p_source_doc_id => pn_settlement_id,
1240: p_settlement_id => pn_settlement_id,
1241: p_reference_id => NULL,
1242: p_process_flag => pv_process_flag,

Line 1276: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

1272: p_trx_date => i.settlement_date,
1273: p_acct_req => jai_constants.yes,
1274: p_source => 'SETTLEMENT',
1275: p_source_trx_type => 'SETTLEMENT',
1276: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
1277: p_source_doc_id => ln_dist_dtl_id,
1278: p_settlement_id => pn_settlement_id,
1279: p_reference_id => NULL,
1280: p_process_flag => pv_process_flag,

Line 1492: PROCEDURE create_invoice( pn_regime_id IN jai_rgm_settlements.regime_id%TYPE,

1488: pv_process_message := SUBSTR(SQLERRM,1,200);
1489: END transfer_balance;
1490:
1491:
1492: PROCEDURE create_invoice( pn_regime_id IN jai_rgm_settlements.regime_id%TYPE,
1493: pn_settlement_id IN jai_rgm_settlements.settlement_id%TYPE,
1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,
1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,
1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,

Line 1493: pn_settlement_id IN jai_rgm_settlements.settlement_id%TYPE,

1489: END transfer_balance;
1490:
1491:
1492: PROCEDURE create_invoice( pn_regime_id IN jai_rgm_settlements.regime_id%TYPE,
1493: pn_settlement_id IN jai_rgm_settlements.settlement_id%TYPE,
1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,
1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,
1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,
1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,

Line 1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,

1490:
1491:
1492: PROCEDURE create_invoice( pn_regime_id IN jai_rgm_settlements.regime_id%TYPE,
1493: pn_settlement_id IN jai_rgm_settlements.settlement_id%TYPE,
1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,
1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,
1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,
1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,
1498: pn_invoice_amount IN jai_rgm_settlements.payment_amount%TYPE,

Line 1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,

1491:
1492: PROCEDURE create_invoice( pn_regime_id IN jai_rgm_settlements.regime_id%TYPE,
1493: pn_settlement_id IN jai_rgm_settlements.settlement_id%TYPE,
1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,
1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,
1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,
1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,
1498: pn_invoice_amount IN jai_rgm_settlements.payment_amount%TYPE,
1499: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,

Line 1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,

1492: PROCEDURE create_invoice( pn_regime_id IN jai_rgm_settlements.regime_id%TYPE,
1493: pn_settlement_id IN jai_rgm_settlements.settlement_id%TYPE,
1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,
1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,
1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,
1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,
1498: pn_invoice_amount IN jai_rgm_settlements.payment_amount%TYPE,
1499: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
1500: pv_regsitration_no IN jai_rgm_settlements.primary_registration_no%TYPE,

Line 1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,

1493: pn_settlement_id IN jai_rgm_settlements.settlement_id%TYPE,
1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,
1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,
1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,
1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,
1498: pn_invoice_amount IN jai_rgm_settlements.payment_amount%TYPE,
1499: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
1500: pv_regsitration_no IN jai_rgm_settlements.primary_registration_no%TYPE,
1501: pn_created_by IN ap_invoices_interface.created_by%TYPE,

Line 1498: pn_invoice_amount IN jai_rgm_settlements.payment_amount%TYPE,

1494: pd_settlement_date IN jai_rgm_settlements.settlement_date%TYPE,
1495: pn_vendor_id IN jai_rgm_settlements.tax_authority_id%TYPE,
1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,
1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,
1498: pn_invoice_amount IN jai_rgm_settlements.payment_amount%TYPE,
1499: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
1500: pv_regsitration_no IN jai_rgm_settlements.primary_registration_no%TYPE,
1501: pn_created_by IN ap_invoices_interface.created_by%TYPE,
1502: pd_creation_date IN ap_invoices_interface.creation_date%TYPE,

Line 1500: pv_regsitration_no IN jai_rgm_settlements.primary_registration_no%TYPE,

1496: pn_vendor_site_id IN jai_rgm_settlements.tax_authority_site_id%TYPE,
1497: pn_calculated_amount IN jai_rgm_settlements.calculated_amount%TYPE,
1498: pn_invoice_amount IN jai_rgm_settlements.payment_amount%TYPE,
1499: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
1500: pv_regsitration_no IN jai_rgm_settlements.primary_registration_no%TYPE,
1501: pn_created_by IN ap_invoices_interface.created_by%TYPE,
1502: pd_creation_date IN ap_invoices_interface.creation_date%TYPE,
1503: pn_last_updated_by IN ap_invoices_interface.last_updated_by%TYPE,
1504: pd_last_update_date IN ap_invoices_interface.last_update_date%TYPE,

Line 1506: pv_system_invoice_no OUT NOCOPY jai_rgm_settlements.system_invoice_no%TYPE,

1502: pd_creation_date IN ap_invoices_interface.creation_date%TYPE,
1503: pn_last_updated_by IN ap_invoices_interface.last_updated_by%TYPE,
1504: pd_last_update_date IN ap_invoices_interface.last_update_date%TYPE,
1505: pn_last_update_login IN ap_invoices_interface.last_update_login%TYPE,
1506: pv_system_invoice_no OUT NOCOPY jai_rgm_settlements.system_invoice_no%TYPE,
1507: pv_process_flag OUT NOCOPY VARCHAR2,
1508: pv_process_message OUT NOCOPY VARCHAR2)
1509: IS
1510:

Line 1540: SELECT jai_rgm_settlements_s1.NEXTVAL --rchandan for bug#4487676. JAI_RGM_SETTLEMENT_INVOICE_S is replaced with JAI_RGM_SETTLEMENTS_S1

1536: -- bug 4929081. Added by Lakshmi Gopalsami
1537: WHERE invoice_id = pn_invoice_id;
1538:
1539: CURSOR cur_invoice_no IS
1540: SELECT jai_rgm_settlements_s1.NEXTVAL --rchandan for bug#4487676. JAI_RGM_SETTLEMENT_INVOICE_S is replaced with JAI_RGM_SETTLEMENTS_S1
1541: FROM dual;
1542:
1543: /* commented the below cursor by ssawant for bug 5879769
1544: CURSOR cur_distributions IS

Line 1587: and source_table_name='JAI_RGM_SETTLEMENTS'

1583: SELECT sum(nvl(trx_credit_amount,0))
1584: FROM JAI_RGM_trX_records
1585: WHERE settlement_id = pn_settlement_id
1586: and source_trx_type='SETTLEMENT'
1587: and source_table_name='JAI_RGM_SETTLEMENTS'
1588: and nvl(trx_credit_amount,0)>0
1589: and organization_id=cp_org_id
1590: and location_id=cp_loc_id
1591: and tax_type=cp_tax_type

Line 1606: -- and source_table_name='JAI_RGM_SETTLEMENTS' --mmurtuza need to discuss

1602: SELECT SUM(total_tax_amt * decode(sign(total_tax_amt), -1, -1, 0))
1603: FROM jai_rgm_refs_all
1604: WHERE settlement_id = pn_settlement_id
1605: -- and source_document_type='SETTLEMENT'
1606: -- and source_table_name='JAI_RGM_SETTLEMENTS' --mmurtuza need to discuss
1607: --and nvl(trx_credit_amount,0)>0
1608: and organization_id=cp_org_id
1609: and location_id=cp_loc_id;
1610: --and tax_type=cp_tax_type;

Line 2165: pn_regime_id IN jai_rgm_settlements.regime_id%TYPE DEFAULT NULL,

2161:
2162: FUNCTION get_last_settlement_date
2163: (pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
2164: /* Bug 5096787. Added by Lakshmi Gopalsami */
2165: pn_regime_id IN jai_rgm_settlements.regime_id%TYPE DEFAULT NULL,
2166: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%TYPE DEFAULT NULL--Added by Qiong for reverse charge settlement
2167: )
2168: RETURN DATE
2169: IS

Line 2166: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%TYPE DEFAULT NULL--Added by Qiong for reverse charge settlement

2162: FUNCTION get_last_settlement_date
2163: (pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
2164: /* Bug 5096787. Added by Lakshmi Gopalsami */
2165: pn_regime_id IN jai_rgm_settlements.regime_id%TYPE DEFAULT NULL,
2166: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%TYPE DEFAULT NULL--Added by Qiong for reverse charge settlement
2167: )
2168: RETURN DATE
2169: IS
2170: CURSOR c_last_settlement_date

Line 2173: FROM JAI_RGM_STL_BALANCES jbal,jai_rgm_settlements jstl --bug 8974544

2169: IS
2170: CURSOR c_last_settlement_date
2171: IS
2172: SELECT MAX(jbal.settlement_date)
2173: FROM JAI_RGM_STL_BALANCES jbal,jai_rgm_settlements jstl --bug 8974544
2174: WHERE jbal.settlement_id = jstl.settlement_id --bug 8974544
2175: AND NVL(jstl.reverse_charge_flag,'N') = NVL(pv_reverse_charge_flag,'N')--Added by Qiong for reverse charge settlment
2176: AND jstl.regime_id = pn_regime_id
2177: and party_id = pn_org_id;

Line 2190: FUNCTION get_last_settlement_date(pn_regime_id IN jai_rgm_settlements.regime_id%type,

2186: RETURN ld_last_settlement_date;
2187:
2188: END get_last_settlement_date;
2189:
2190: FUNCTION get_last_settlement_date(pn_regime_id IN jai_rgm_settlements.regime_id%type,
2191: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
2192: pn_location_id IN jai_rgm_stl_balances.location_id%TYPE,
2193: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%type DEFAULT NULL--Added by Qiong for reverse charge settle
2194: )

Line 2193: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%type DEFAULT NULL--Added by Qiong for reverse charge settle

2189:
2190: FUNCTION get_last_settlement_date(pn_regime_id IN jai_rgm_settlements.regime_id%type,
2191: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
2192: pn_location_id IN jai_rgm_stl_balances.location_id%TYPE,
2193: pv_reverse_charge_flag IN jai_rgm_settlements.reverse_charge_flag%type DEFAULT NULL--Added by Qiong for reverse charge settle
2194: )
2195: RETURN DATE
2196: IS
2197: CURSOR c_last_settlement_date

Line 2200: FROM JAI_RGM_STL_BALANCES jbal,jai_rgm_settlements jstl

2196: IS
2197: CURSOR c_last_settlement_date
2198: IS
2199: SELECT MAX(jbal.settlement_date)
2200: FROM JAI_RGM_STL_BALANCES jbal,jai_rgm_settlements jstl
2201: WHERE jbal.settlement_id = jstl.settlement_id
2202: AND jstl.regime_id = pn_regime_id
2203: AND party_id = pn_org_id
2204: AND location_id = pn_location_id

Line 2273: PROCEDURE get_last_balance_amount(pn_regime_id IN jai_rgm_settlements.regime_id%type,

2269: app_exception.raise_exception;
2270:
2271: END get_last_balance_amount;
2272:
2273: PROCEDURE get_last_balance_amount(pn_regime_id IN jai_rgm_settlements.regime_id%type,
2274: pn_org_id IN jai_rgm_stl_balances.party_id%TYPE,
2275: pn_location_id IN jai_rgm_stl_balances.location_id%TYPE,
2276: pv_tax_type IN jai_rgm_stl_balances.tax_type%TYPE,
2277: pn_debit_amount OUT NOCOPY jai_rgm_stl_balances.debit_balance%TYPE,

Line 2293: jai_rgm_settlements jstl

2289: -- AND nvl(service_type_code,'-999') = nvl(pv_service_type_code, '-999' ) /* added by ssawant for bug 5879769 */
2290: AND nvl(service_type_code,'-999') = nvl(pv_service_type_code,nvl(service_type_code,'-999') ) /* added nvl for bug#13865856*/
2291: AND settlement_id = (SELECT MAX(jbal.settlement_id)
2292: FROM JAI_RGM_STL_BALANCES jbal,
2293: jai_rgm_settlements jstl
2294: WHERE jbal.settlement_id = jstl.settlement_id
2295: AND jstl.regime_id = pn_regime_id
2296: AND party_id = pn_org_id
2297: AND location_id = pn_location_id

Line 2349: FROM jai_rgm_settlements

2345: HAVING NVL(SUM(debit_balance),0) - NVL(SUM(credit_balance),0) > 0;
2346:
2347: CURSOR cur_settlement IS
2348: SELECT *
2349: FROM jai_rgm_settlements
2350: WHERE settlement_id = pn_settlement_id;
2351:
2352: CURSOR cur_tax_types(p_reg_type jai_rgm_registrations.registration_type%TYPE ) IS --rchandan for bug#4428980
2353: SELECT attribute_sequence, attribute_code tax_type, RATE

Line 2429: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

2425: p_organization_id => i.party_id,
2426: p_location_id => i.location_id , /* added by ssawant for bug 5879769 */
2427: p_source => jai_constants.source_settle_in,
2428: p_source_trx_type => 'Invoice Payment',
2429: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
2430: p_source_document_id => pn_settlement_id,
2431: p_transaction_date => pd_transaction_date,/* +1 is removed by ssawant for bug 5662296 */
2432: p_account_name => NULL,
2433: p_charge_account_id => NULL,

Line 2482: pv_source_table_name => 'JAI_RGM_SETTLEMENTS',

2478: pn_organization_id => i.party_id,
2479: pn_location_id => i.location_id,
2480: pv_source => jai_constants.source_settle_in,
2481: pv_source_trx_type => 'Invoice Payment',
2482: pv_source_table_name => 'JAI_RGM_SETTLEMENTS',
2483: pn_source_id => pn_settlement_id,
2484: pd_transaction_date => pd_transaction_date,/* +1 is removed by ssawant for bug 5662296 */
2485: pv_account_name => jai_constants.recovery,
2486: pn_charge_account_id => ln_charge_accounting_id,

Line 2550: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

2546: p_organization_id => ln_org_id,
2547: p_location_id => NULL,
2548: p_source => jai_constants.source_settle_in,
2549: p_source_trx_type => 'Invoice Payment',
2550: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
2551: p_source_document_id => pn_settlement_id,
2552: p_transaction_date => pd_transaction_date,/* +1 is removed by ssawant for bug 5662296 */
2553: p_account_name => NULL,
2554: p_charge_account_id => NULL,

Line 2584: p_source_table_name => 'JAI_RGM_SETTLEMENTS',

2580: p_organization_id => ln_org_id,
2581: p_location_id => NULL,
2582: p_source => jai_constants.source_settle_in,
2583: p_source_trx_type => 'Invoice Payment',
2584: p_source_table_name => 'JAI_RGM_SETTLEMENTS',
2585: p_source_document_id => pn_settlement_id,
2586: p_transaction_date => pd_transaction_date, /* +1 is removed by ssawant for bug 5662296 */
2587: p_account_name => NULL,
2588: p_charge_account_id => NULL,

Line 2638: pv_source_table_name => 'JAI_RGM_SETTLEMENTS',

2634: pn_organization_id => org_io_rec.party_id,
2635: pn_location_id => org_io_rec.location_id,
2636: pv_source => jai_constants.source_settle_in,
2637: pv_source_trx_type => 'Invoice Payment',
2638: pv_source_table_name => 'JAI_RGM_SETTLEMENTS',
2639: pn_source_id => pn_settlement_id,
2640: pd_transaction_date => pd_transaction_date, /* +1 is removed by ssawant for bug 5662296 */
2641: pv_account_name => NULL,
2642: pn_charge_account_id => NULL,

Line 2693: FROM JAI_RGM_STL_BALANCES jbal,jai_rgm_settlements jstl

2689: IS
2690: CURSOR c_last_settlement_date
2691: IS
2692: SELECT MAX(jbal.settlement_date)
2693: FROM JAI_RGM_STL_BALANCES jbal,jai_rgm_settlements jstl
2694: WHERE jbal.settlement_id = jstl.settlement_id
2695: AND jstl.regime_id = pn_regime_id
2696: AND jstl.primary_registration_no = pn_regn_no
2697: AND jbal.party_id = nvl(pn_organization_id,jbal.party_id)

Line 2706: jai_rgm_Settlements jrs,

2702: select settlement_id from
2703: (
2704: select jstl.party_id,jstl.location_id,jstl.settlement_id from
2705: jai_rgm_stl_balances jstl,
2706: jai_rgm_Settlements jrs,
2707: JAI_RGM_DEFINITIONS jr
2708: WHERE jstl.settlement_id = jrs.settlement_id
2709: AND jrs.regime_id = jr.regime_id
2710: AND jr.regime_code = 'VAT'