Uploaded image for project: 'mod-finance-storage'
  1. mod-finance-storage
  2. MODFISTO-167

Add ledger fiscal year rollover logic

    XMLWordPrintable

Details

    Description

      Purpose/Overview:
      In order to support UIF-171 - Execute fiscal year rollover

      Requirements/Scope:

      1. Budgets and encumbrances need to be rollovered if API triggered.

      Approach:
      Prerequisites :

      • SQL procedure "budget_encumbrances_rollover.sql" created
      • API which invoke rollover defined

      Steps:

      1. All budget for the selected ledger and rollover options must be closed (BudgetStatus.CLOSED) in scope of one transaction.
      2. If budged closed logic successfully finished 
          then invoke procedure "budget_encumbrances_rollover.sql"
          else finish rollover with error : 
                 *ledger_fiscal_year_rollover_status.budgets_rollover_status = ERROR_CLOSE_PREV_BUDGETS* 
                 *ledger_fiscal_year_rollover_status.overall_rollover_status = ERROR*
      3. Rollover orders will be run from code by invoking API from orders 
      

      Notes:
      You can use PostgresClient.execute method to execute an anonymous PgPL/SQL block like this

      DO
      $$
      begin
           execute my_stored_function(param1, paramn);
      end;
      $$ LANGUAGE plpgsql;
      

      Acceptance criteria:

      • Logic added
      • API tests created (smoke tests)
      • Unit tests created

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Andrei_Makaranka Andrei Makaranka
                Andrei_Makaranka Andrei Makaranka
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases