[Home] [Help]
568: AND GP.PERIOD_NAME = JCA.PERIOD_NAME
569: --AND (P_BSV is null or jca.balancing_segment=P_BSV)--Fix bug#7334017 add --fix bug 7488223 delete
570: -- fix bug 7488223 add begin
571: AND ((P_BSV is not null and jca.balancing_segment=P_BSV)
572: or(p_bsv is null and jca.balancing_segment in (select bal_seg_value from JA_CN_LEDGER_LE_BSV_GT
573: where legal_entity_id=P_LE_ID and ledger_id=P_LEDGER_ID)
574: ))
575: ORDER BY GP.PERIOD_NUM DESC;
576:
609: RG.REPORT_ID)
610: --AND (P_BSV is null or jca.balancing_segment=P_BSV)--Fix bug#7334017 add --fix bug 7488223 delete
611: -- fix bug 7488223 add begin
612: AND ((P_BSV is not null and jca.balancing_segment=P_BSV)
613: or(p_bsv is null and jca.balancing_segment in (select bal_seg_value from JA_CN_LEDGER_LE_BSV_GT
614: where legal_entity_id=P_LE_ID and ledger_id=P_LEDGER_ID)
615: ));
616: -- -- fix bug 7488223 add end
617:
667: -- Fix bug#6751696 add end
668: --AND (P_BSV is null or jca.balancing_segment=P_BSV)--Fix bug#7334017 add --fix bug 7488223 delete
669: -- fix bug 7488223 add begin
670: AND ((P_BSV is not null and jca.balancing_segment=P_BSV)
671: or(p_bsv is null and jca.balancing_segment in (select bal_seg_value from JA_CN_LEDGER_LE_BSV_GT
672: where legal_entity_id=P_LE_ID and ledger_id=P_LEDGER_ID)
673: ))
674: -- -- fix bug 7488223 add end
675: ORDER BY JCA.SOURCE
723: END IF; --(l_proc_level >= l_dbg_level)
724:
725: --fix bug 7488223 add begin
726: DELETE
727: FROM JA_CN_LEDGER_LE_BSV_GT;
728: COMMIT ;
729: --
730: --ja_cn_utility_pkg.populate_ledger_le_bsv_gt( P_LEDGER_ID,P_LE_ID);
731: