[Home] [Help]
683:
684: -- Checking whether the row exists in the DDA table
685: CURSOR C_BAL_SETTLED IS
686: SELECT 'Y'
687: FROM xtr_deal_date_amounts
688: WHERE DEAL_TYPE = 'CA'
689: AND AMOUNT_TYPE = 'INTSET'
690: AND ACCOUNT_NO = p_balance_rec.account_number
691: AND CURRENCY = l_ccy
700: AND account_number = p_balance_rec.account_number
701: AND ce_bank_account_balance_id = p_balance_rec.ce_bank_account_balance_id
702: FOR UPDATE NOWAIT;
703:
704: -- Checking the lock on the xtr_deal_date_amounts table
705: CURSOR c_chk_dda_lock IS
706: SELECT ce_bank_account_balance_id
707: FROM xtr_bank_balances
708: WHERE company_code = p_balance_rec.company_code
750: CLOSE c_chk_dda_lock;
751:
752: IF c_bal_settled%FOUND THEN
753:
754: DELETE FROM XTR_DEAL_DATE_AMOUNTS_V
755: WHERE DEAL_TYPE = 'CA'
756: AND AMOUNT_TYPE = 'INTSET'
757: AND ACCOUNT_NO = p_balance_rec.account_number
758: AND CURRENCY = l_ccy
1155: CURSOR c_accrl_deal IS
1156: SELECT max(period_to)
1157: FROM
1158: xtr_bank_balances bb, xtr_bank_accounts ba,
1159: xtr_deal_date_amounts dd, xtr_accrls_amort aa
1160: WHERE bb.company_code = p_company_code
1161: AND bb.account_number = p_account_number
1162: AND bb.company_code = ba.party_code
1163: AND bb.account_number = ba.account_number
1412:
1413: -- To check whether the 'BAL' row exists in DDA table
1414: CURSOR C_BAL_EXISTS IS
1415: SELECT 'Y'
1416: FROM XTR_DEAL_DATE_AMOUNTS_V
1417: WHERE ACCOUNT_NO = p_account_number
1418: AND COMPANY_CODE = nvl(l_cross_ref,p_company_code)
1419: AND CURRENCY = l_ccy
1420: AND AMOUNT_DATE = p_balance_date
1601: WHERE ce_bank_account_id = p_ce_bank_account_id;
1602:
1603: cursor INT_SETTLED is
1604: select 'Y'
1605: from XTR_DEAL_DATE_AMOUNTS_V
1606: where DEAL_TYPE = 'CA'
1607: and AMOUNT_TYPE = 'INTSET'
1608: and ACCOUNT_NO = l_account_number
1609: and CURRENCY = l_currency
1718: CURSOR c_accrl_deal IS
1719: SELECT max(period_to)
1720: FROM
1721: xtr_bank_balances bb, xtr_bank_accounts ba,
1722: xtr_deal_date_amounts dd, xtr_accrls_amort aa
1723: WHERE bb.company_code = p_company_code
1724: AND bb.account_number = p_account_number
1725: AND bb.company_code = ba.party_code
1726: AND bb.account_number = ba.account_number