792:
793: Q4_REC Q4%ROWTYPE;
794:
795: ----------------------------------------------------------------------------------------------
796: -- NOTE: Q5 will process revaluations from XTR_REVALUATION_DETAILS.
797: -- There is no amount_type column in the XTR_REVALUATION_DETAILS table.
798: -- In the JEA setup, the amount type of 'UNREAL' and 'REAL' is intended
799: -- to allow the user to post unrealized/realized gains/losses to different
800: -- GL accounts. In addition, any unrealized gains/losses will be flagged
793: Q4_REC Q4%ROWTYPE;
794:
795: ----------------------------------------------------------------------------------------------
796: -- NOTE: Q5 will process revaluations from XTR_REVALUATION_DETAILS.
797: -- There is no amount_type column in the XTR_REVALUATION_DETAILS table.
798: -- In the JEA setup, the amount type of 'UNREAL' and 'REAL' is intended
799: -- to allow the user to post unrealized/realized gains/losses to different
800: -- GL accounts. In addition, any unrealized gains/losses will be flagged
801: -- as requiring a reversal entry in the subsequent period when transferring
800: -- GL accounts. In addition, any unrealized gains/losses will be flagged
801: -- as requiring a reversal entry in the subsequent period when transferring
802: -- XTR journals to the GL interface table.
803: -- Instead, there are separate columns for REALIZED_PL and UNREALIZED_PL
804: -- amounts in the XTR_REVALUATION_DETAILS table. If the row is for a realized
805: -- profit/loss, then there will be an amount in the REALIZED_PL column, etc.
806: ----------------------------------------------------------------------------------------------
807: Cursor Q5 is
808: Select
955: ,jea.action_code action_code
956: ,jea.date_type date_type
957: from xtr_gain_loss_dnm dnm,
958: xtr_journal_entry_actions jea,
959: xtr_revaluation_details rd,
960: xtr_bank_accounts ba,
961: xtr_bank_balances bb
962: where dnm.batch_id = in_batch_id
963: and jea.company_code = in_company -- JEA
1104: -- Find any upgrade reval details
1105: -----------------------------------
1106: cursor UPGRADE_REVAL is
1107: select b.upgrade_batch
1108: from XTR_REVALUATION_DETAILS a,
1109: XTR_BATCHES b
1110: where a.company_code = in_company
1111: and a.batch_id = b.batch_id
1112: and nvl(b.upgrade_batch,'N') = 'Y';