Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - billing #145

Merged
merged 9 commits into from
Jan 20, 2020
Merged

Feature - billing #145

merged 9 commits into from
Jan 20, 2020

Conversation

joefitter
Copy link
Contributor

  • Added asru routes for updating billing and loading billing history

@joefitter joefitter changed the title Feature - billing WIP Feature - billing Dec 30, 2019
@joefitter
Copy link
Contributor Author

joefitter commented Jan 3, 2020

Billing notes:

External

External admin users have a licence-fees page accessed from the dashboard where they can see fees for current year. PILs include revoked and transfers that happened in that year, figures reflect this but we should add a lot of test coverage around this.

Fees and dates are defined here: https://github.com/UKHomeOffice/asl-pages/pull/653/files#diff-d249ae431a0871ff9768ad3dac381134R1-R28 - this should be checked to make sure the figures are correct, also it will need a new entry adding for 2020 financial year.

Previous years can be accessed (if defined in config file above), if year is not found it will default to 2019.

Internal

As above, but non-transferred licences have a billing property which can be changed by asru users by expanding the column and adding a comment.

History of billable changes are shown if present - these are taken from workflow using model-tasks with new filters (action and status) - this method works fine for current financial year, but we perhaps need to look at how to filter billable licences for previous years. Currently billable is a default true boolean on the model, we may need to make a join table similar to pil transfers?

internal all licences

All licence fees accessed through footer link, includes similar overview to above but for all establishments, also includes transferred licences twice (if still billable) as I remember this being a requirement (to and from establishment both billed in transfer year)

All personal licences tab - only includes active licences, transferred licences are not doubled up, they probably should show twice for the from and to establishment but I couldn't work out the join magic required.

To do

  • Investigate historical billing status
  • Don't default to 2019 in internal ui routing - should be most recent entry or current financial year
  • Include transferred licences in internal all licences list

To merge

  • asl-permissions g2g
  • asl-schema g2g
  • asl-components g2g
  • asl-workflow g2g
  • asl-resolver needs asl-schema
  • asl-internal-api needs asl-schema and asl-service
  • asl-public-api needs asl-schema and asl-service
  • asl-pages needs asl-components and asl-service
  • asl-internal-ui needs asl-pages, asl-service and asl-components
  • asl needs asl-pages, asl-service and asl-components

@lennym
Copy link
Contributor

lennym commented Jan 20, 2020

@lennym lennym force-pushed the feature/billing branch 2 times, most recently from 8e74fc3 to 444d45e Compare January 20, 2020 16:02
@lennym lennym changed the title WIP Feature - billing Feature - billing Jan 20, 2020
joefitter and others added 7 commits January 20, 2020 16:11
* Added asru routes for updating billing and loading billing history
* Added overview for all licences
* Added establishment overview
* Added personal overview
… - this should probably be added with signposting
package.json Outdated
@@ -13,8 +13,7 @@
"build": "npm run build:js && npm run build:css",
"build:js": "node --max_old_space_size=4096 node_modules/.bin/webpack",
"prebuild:css": "mkdir -p ./public/css",
"build:css": "npm-sass ./assets/sass/app.scss > ./public/css/app.css",
"postinstall": "npm run build"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this redundant / deprecated?

endDate,
year: req.year
};
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.then({ json: { meta, data }} => {
  res.locals.static.fees = {
    ...pick(meta, ['startDate', 'endDate']),
    ...pick(data, ['fees', 'personal', 'establishment', 'total']),
    numPils: data.numberOfPils,
    numPels: data.numberOfPels,
    year: req.year
  };
})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WHO ARE YOU AND WHAT HAVE YOU DONE WITH PHIL?!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha trying to fill in for @joefitter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too far. Too. Far.

@wheelsandcogs wheelsandcogs merged commit 1d20020 into master Jan 20, 2020
@wheelsandcogs wheelsandcogs deleted the feature/billing branch January 20, 2020 16:47
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants