Uploaded image for project: 'mod-finance'
  1. mod-finance
  2. MODFIN-86

Restrict adjustment of budget's allowableEncumbrance and allowableExpenditures

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Labels:
      None
    • Template:
    • Sprint:
      ACQ Sprint 82, ACQ Sprint 83
    • Story Points:
      2
    • Development Team:
      Thunderjet

      Description

      Overview

      Before allowing a user to adjust a budget's allowableEncumbrance and allowableExpenditure values, we need to make sure the new limits aren't already exceeded. If they are we must reject the update and return an appropriate error.

      • If adjusting allowableEncumbrance, first check that the amount (encumbered + awaitingPayment) isn't already over the new value.
      • If adjusting allowableExpenditures, first check that the amount (expended + awaitingPayment) isn't already over the new value.
      if ((allocated * newAllowableEncumbrance) < (encumbrance + awaitingPayment) 
        reject
      else 
        apply update
      
      if ((allocated * newAllowableExpenditure) < (awaitingPayment + expended)) 
        reject
      else 
        apply update
      

      Acceptance Criteria

      • The checks described above are put in place
      • unit tests are updated
      • API tests are updated

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cmcnally Craig McNally
              Reporter:
              cmcnally Craig McNally
              Tester Assignee:
              Craig McNally Craig McNally
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: