Skip to content

Instantly share code, notes, and snippets.

@benilovj
Created June 27, 2017 10:53
Show Gist options
  • Save benilovj/00093b5f265977a42a94dd4f086f72ce to your computer and use it in GitHub Desktop.
Save benilovj/00093b5f265977a42a94dd4f086f72ce to your computer and use it in GitHub Desktop.
Feature: levy balance view
Feature: levy balance view
In order to understand trends in levy funds coming in and payments going out
As a senior stakeholder
I can see levy funds and payments rolled up by month and funding source/type of credit
Scenario: levy balances
Given the following employer accounts:
| AccountId | DasAccountId | AccountName |
| 123 | ABC123 | CompanyABC |
And the following PAYE schemes:
| DasAccountId | Ref |
| ABC123 | ABC/12345 |
And the following levy declarations:
| DasAccountID | PayeSchemeReference | LevyDueYearToDate | LevyAllowanceForYear | SubmissionDate | PayrollYear | PayrollMonth | EnglishFraction | TopupPercentage | TopupAmount | LevyDeclaredInMonth | LevyAvailableInMonth |
| ABC123 | ABC/12345 | 10000.00 | 15000.00 | 2017-05-20 16:30:35.017 | 2017 | 1 | 1.00000 | 0.10000 | 100.0000 | 10000.00000 | 11000.00000 |
| ABC123 | ABC/12345 | 20000.00 | 15000.00 | 2017-06-18 16:30:35.017 | 2017 | 2 | 1.00000 | 0.10000 | 100.0000 | 10000.00000 | 11000.00000 |
And the following payments:
| EmployerAccountId | DeliveryMonth | DeliveryYear | UkPrn | ApprenticeshipId | Amount | FundingSource |
| 123 | 10 | 16/17 | 12345 | 456 | 100 | Levy |
| 123 | 11 | 16/17 | 12345 | 456 | 100 | Levy |
| 123 | 11 | 16/17 | 12345 | 456 | 10 | FullyFundedSfa |
| 123 | 11 | 16/17 | 12345 | 456 | 15 | CoInvestedEmployer |
| 123 | 11 | 16/17 | 12345 | 456 | 20 | CoInvestedSfa |
Then the levy balance view contains:
| CalendarMonthShortNameYear | CalendarMonthNumber | CalendarYear | ValueType | Value | ValueTypeSort |
| April - 2017 | 4 | 2017 | Levy funds | 10000 | 1 |
| May - 2017 | 5 | 2017 | Levy funds | 10000 | 1 |
| April - 2017 | 4 | 2017 | Levy top-up funds | 1000 | 2 |
| May - 2017 | 5 | 2017 | Levy top-up funds | 1000 | 2 |
| May - 2017 | 5 | 2017 | Levy payment | 100 | 3 |
| June - 2017 | 6 | 2017 | Levy payment | 100 | 3 |
| June - 2017 | 6 | 2017 | Fully funded SFA | 10 | 4 |
| June - 2017 | 6 | 2017 | Co-invested Employer | 15 | 5 |
| June - 2017 | 6 | 2017 | Co-invested SFA | 20 | 6 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment