[Home] [Help]
647: ,a.action_code action_code
648: ,decode(a.deal_type,'CA','-1',c.dual_authorisation_by) validated_by -- Added for 1336492.
649: ,c.account_no co_account_no -- Added for 1336492.
650: from XTR_JOURNAL_ENTRY_ACTIONS a,
651: XTR_DEAL_DATE_AMOUNTS c,
652: XTR_DEAL_DATE_AMOUNTS e, -- To generate Journal for Bank Acct
653: XTR_JOURNAL_ENTRY_ACTIONS f, -- " " " " " "
654: XTR_BANK_ACCOUNTS g
655: where e.company_code = in_company
648: ,decode(a.deal_type,'CA','-1',c.dual_authorisation_by) validated_by -- Added for 1336492.
649: ,c.account_no co_account_no -- Added for 1336492.
650: from XTR_JOURNAL_ENTRY_ACTIONS a,
651: XTR_DEAL_DATE_AMOUNTS c,
652: XTR_DEAL_DATE_AMOUNTS e, -- To generate Journal for Bank Acct
653: XTR_JOURNAL_ENTRY_ACTIONS f, -- " " " " " "
654: XTR_BANK_ACCOUNTS g
655: where e.company_code = in_company
656: and e.batch_id is null
726: ,dda.settlement_number settlement_number
727: ,dda.date_type date_type
728: ,dda.action_code action_code
729: ,dda.dual_authorisation_by validated_by -- Added for 1336492.
730: from XTR_DEAL_DATE_AMOUNTS_V dda,
731: XTR_EXPOSURE_TRANSACTIONS exp,
732: XTR_EXPOSURE_TYPES typ,
733: XTR_BANK_ACCOUNTS bnk
734: where dda.company_code = in_company
1625: END IF;
1626:
1627: -- Update DDA to put BATCH_ID value once journal is generated
1628:
1629: Update XTR_DEAL_DATE_AMOUNTS
1630: set BATCH_ID = l_batch_id
1631: where deal_type = l_prev_deal_type
1632: and deal_number = l_prev_deal_nbr
1633: and transaction_number = l_prev_transaction_nbr
1694: IF xtr_debug_pkg.pg_sqlplus_enable_flag = 1 THEN
1695: xtr_debug_pkg.debug ('GEN_JOURNALS: ' || 'Update last batch of Q2 data.');
1696: END IF;
1697:
1698: Update XTR_DEAL_DATE_AMOUNTS
1699: set batch_id = l_batch_id
1700: where deal_type = l_prev_deal_type
1701: and date_type = l_prev_date_type
1702: and deal_number = l_prev_deal_nbr
2004:
2005: -- 1336492. Added update condition.
2006:
2007: If (nvl(l_updt_flag,'Y') = 'Y') then
2008: Update XTR_DEAL_DATE_AMOUNTS
2009: set BATCH_ID = l_batch_id
2010: where company_code = in_company
2011: and deal_type = 'EXP'
2012: and deal_number = Q3_REC.deal_number