@casomoltd/nhs-pay 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/additional-pension.d.ts +6 -4
- package/dist/additional-pension.js +22 -18
- package/dist/additional-pension.js.map +1 -1
- package/dist/afc-band.d.ts +4 -4
- package/dist/afc-band.js +4 -4
- package/dist/afc-scales.d.ts +67 -71
- package/dist/afc-scales.js +165 -215
- package/dist/afc-scales.js.map +1 -1
- package/dist/circulars/afc-shapes.d.ts +41 -21
- package/dist/circulars/afc-shapes.js +9 -8
- package/dist/circulars/afc-shapes.js.map +1 -1
- package/dist/circulars/ni-hsc-afc-06-2025.d.ts +4 -3
- package/dist/circulars/ni-hsc-afc-06-2025.js +4 -3
- package/dist/circulars/ni-hsc-afc-06-2025.js.map +1 -1
- package/dist/dates.d.ts +9 -5
- package/dist/dates.js.map +1 -1
- package/dist/errors.d.ts +58 -45
- package/dist/errors.js +63 -52
- package/dist/errors.js.map +1 -1
- package/dist/factor-basis.d.ts +95 -106
- package/dist/factor-basis.js +97 -108
- package/dist/factor-basis.js.map +1 -1
- package/dist/gad/additional-pension-0-703-2026-07-08.d.ts +185 -0
- package/dist/gad/additional-pension-0-703-2026-07-08.js +89 -0
- package/dist/gad/{additional-pension-0-703-2023-10-03.js.map → additional-pension-0-703-2026-07-08.js.map} +1 -1
- package/dist/gad/additional-pension-0-712-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-712-2026-07-08.js +172 -0
- package/dist/gad/additional-pension-0-712-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-0-713-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-713-2026-07-08.js +175 -0
- package/dist/gad/additional-pension-0-713-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-0-714-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-714-2026-07-08.js +178 -0
- package/dist/gad/additional-pension-0-714-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-0-715-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-715-2026-07-08.js +181 -0
- package/dist/gad/additional-pension-0-715-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-0-716-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-716-2026-07-08.js +172 -0
- package/dist/gad/additional-pension-0-716-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-0-717-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-717-2026-07-08.js +175 -0
- package/dist/gad/additional-pension-0-717-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-0-718-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-718-2026-07-08.js +178 -0
- package/dist/gad/additional-pension-0-718-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-0-719-2026-07-08.d.ts +34 -0
- package/dist/gad/additional-pension-0-719-2026-07-08.js +181 -0
- package/dist/gad/additional-pension-0-719-2026-07-08.js.map +1 -0
- package/dist/gad/additional-pension-table.d.ts +4 -11
- package/dist/gad/additional-pension-table.js.map +1 -1
- package/dist/gad/erf-0-420-2026-07-08.d.ts +51 -0
- package/dist/gad/erf-0-420-2026-07-08.js +83 -0
- package/dist/gad/erf-0-420-2026-07-08.js.map +1 -0
- package/dist/gad/erf-1-401-2026-07-08.d.ts +42 -0
- package/dist/gad/erf-1-401-2026-07-08.js +67 -0
- package/dist/gad/erf-1-401-2026-07-08.js.map +1 -0
- package/dist/gad/erf-1-402-2026-07-08.d.ts +43 -0
- package/dist/gad/erf-1-402-2026-07-08.js +78 -0
- package/dist/gad/erf-1-402-2026-07-08.js.map +1 -0
- package/dist/gad/erf-1-407-2026-07-08.d.ts +42 -0
- package/dist/gad/erf-1-407-2026-07-08.js +67 -0
- package/dist/gad/erf-1-407-2026-07-08.js.map +1 -0
- package/dist/gad/factor-set.d.ts +54 -0
- package/dist/gad/factor-set.js +83 -0
- package/dist/gad/factor-set.js.map +1 -0
- package/dist/gad/factor-table.d.ts +31 -20
- package/dist/gad/factor-table.js +67 -37
- package/dist/gad/factor-table.js.map +1 -1
- package/dist/gad/lrf-0-421-2026-07-08.d.ts +46 -0
- package/dist/gad/lrf-0-421-2026-07-08.js +72 -0
- package/dist/gad/lrf-0-421-2026-07-08.js.map +1 -0
- package/dist/gad/lrf-0-422-2026-07-08.d.ts +43 -0
- package/dist/gad/lrf-0-422-2026-07-08.js +69 -0
- package/dist/gad/{lrf-0-422-2023-06-30.js.map → lrf-0-422-2026-07-08.js.map} +1 -1
- package/dist/gad/lrf-2-416-2026-07-08.d.ts +41 -0
- package/dist/gad/lrf-2-416-2026-07-08.js +66 -0
- package/dist/gad/lrf-2-416-2026-07-08.js.map +1 -0
- package/dist/hcas-pcts.js +1 -1
- package/dist/hcas-pcts.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/pension-projection.d.ts +30 -44
- package/dist/pension-projection.js +37 -61
- package/dist/pension-projection.js.map +1 -1
- package/dist/published/england-afc.d.ts +52 -9
- package/dist/published/england-afc.js +59 -115
- package/dist/published/england-afc.js.map +1 -1
- package/dist/scales.d.ts +31 -6
- package/dist/scales.js +38 -22
- package/dist/scales.js.map +1 -1
- package/dist/sections/section-1995.d.ts +6 -6
- package/dist/sections/section-1995.js +34 -27
- package/dist/sections/section-1995.js.map +1 -1
- package/dist/sections/section-2008.d.ts +4 -4
- package/dist/sections/section-2008.js +19 -23
- package/dist/sections/section-2008.js.map +1 -1
- package/dist/sections/section-2015.d.ts +7 -7
- package/dist/sections/section-2015.js +3 -7
- package/dist/sections/section-2015.js.map +1 -1
- package/package.json +1 -1
- package/dist/gad/additional-pension-0-703-2023-10-03.d.ts +0 -180
- package/dist/gad/additional-pension-0-703-2023-10-03.js +0 -87
- package/dist/gad/additional-pension-0-712-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-712-2023-10-03.js +0 -170
- package/dist/gad/additional-pension-0-712-2023-10-03.js.map +0 -1
- package/dist/gad/additional-pension-0-713-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-713-2023-10-03.js +0 -173
- package/dist/gad/additional-pension-0-713-2023-10-03.js.map +0 -1
- package/dist/gad/additional-pension-0-714-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-714-2023-10-03.js +0 -176
- package/dist/gad/additional-pension-0-714-2023-10-03.js.map +0 -1
- package/dist/gad/additional-pension-0-715-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-715-2023-10-03.js +0 -179
- package/dist/gad/additional-pension-0-715-2023-10-03.js.map +0 -1
- package/dist/gad/additional-pension-0-716-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-716-2023-10-03.js +0 -170
- package/dist/gad/additional-pension-0-716-2023-10-03.js.map +0 -1
- package/dist/gad/additional-pension-0-717-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-717-2023-10-03.js +0 -173
- package/dist/gad/additional-pension-0-717-2023-10-03.js.map +0 -1
- package/dist/gad/additional-pension-0-718-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-718-2023-10-03.js +0 -176
- package/dist/gad/additional-pension-0-718-2023-10-03.js.map +0 -1
- package/dist/gad/additional-pension-0-719-2023-10-03.d.ts +0 -35
- package/dist/gad/additional-pension-0-719-2023-10-03.js +0 -179
- package/dist/gad/additional-pension-0-719-2023-10-03.js.map +0 -1
- package/dist/gad/erf-1-401-2023-06-30.d.ts +0 -47
- package/dist/gad/erf-1-401-2023-06-30.js +0 -73
- package/dist/gad/erf-1-401-2023-06-30.js.map +0 -1
- package/dist/gad/erf-1-402-2023-06-30.d.ts +0 -48
- package/dist/gad/erf-1-402-2023-06-30.js +0 -84
- package/dist/gad/erf-1-402-2023-06-30.js.map +0 -1
- package/dist/gad/erf-1-407-2023-06-30.d.ts +0 -47
- package/dist/gad/erf-1-407-2023-06-30.js +0 -73
- package/dist/gad/erf-1-407-2023-06-30.js.map +0 -1
- package/dist/gad/erf-2023-06-30.d.ts +0 -72
- package/dist/gad/erf-2023-06-30.js +0 -105
- package/dist/gad/erf-2023-06-30.js.map +0 -1
- package/dist/gad/lrf-0-422-2023-06-30.d.ts +0 -45
- package/dist/gad/lrf-0-422-2023-06-30.js +0 -70
- package/dist/gad/lrf-2-416-2023-06-30.d.ts +0 -46
- package/dist/gad/lrf-2-416-2023-06-30.js +0 -72
- package/dist/gad/lrf-2-416-2023-06-30.js.map +0 -1
- package/dist/gad/lrf-2023-06-30.d.ts +0 -72
- package/dist/gad/lrf-2023-06-30.js +0 -99
- package/dist/gad/lrf-2023-06-30.js.map +0 -1
package/dist/scales.js
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
*
|
|
15
15
|
* England publishes no AfC circular, so its tables are transcribed from
|
|
16
16
|
* the publisher's page in `src/published/england-afc.ts` (the README's
|
|
17
|
-
* AfC pay scales rule)
|
|
17
|
+
* AfC pay scales rule) and translated by `afc-scales.ts` like the
|
|
18
|
+
* others. The HCAS zones and the Welsh living-wage floor sit beside it
|
|
18
19
|
* in `src/published/`, each citing its own
|
|
19
20
|
* source. The other three nations' sources are cited in their own
|
|
20
21
|
* circular files, beside the data they justify — including the warning
|
|
@@ -25,10 +26,11 @@
|
|
|
25
26
|
* the year of service in which a member first reaches it: increment 1
|
|
26
27
|
* is `Year 1`, and the top point takes a `+` because service continues
|
|
27
28
|
* past it. No publisher prints such a label; every one is our reading
|
|
28
|
-
* of an interval the publisher does print. For
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* `afcPoint`, which writes the label and the year
|
|
29
|
+
* of an interval the publisher does print. For all four nations the
|
|
30
|
+
* year is derived in `afc-scales.ts`, from the transcribed interval
|
|
31
|
+
* (England, Wales, Northern Ireland) or Annex C's yearly increment
|
|
32
|
+
* (Scotland), through `afcPoint`, which writes the label and the year
|
|
33
|
+
* from one number, so
|
|
32
34
|
* a label and the timing a pay path reads from it cannot disagree.
|
|
33
35
|
*
|
|
34
36
|
* Labels are lookup keys for `afcResolver.fromScalePoint`, so changing
|
|
@@ -42,9 +44,8 @@ import { ScaleUnavailable, invariant } from './errors.js';
|
|
|
42
44
|
import { AFC_ENGLAND_SCALES_2025, AFC_ENGLAND_SCALES_2026, AFC_NI_2025, AFC_SCOTLAND, AFC_W_02_2025, AFC_W_02_2026, } from './sources.js';
|
|
43
45
|
import { onlyPointLabelled } from './scale-point.js';
|
|
44
46
|
import { salaryRangeOf } from './values.js';
|
|
45
|
-
import {
|
|
47
|
+
import { ENGLAND_TABLES_2025_26, ENGLAND_TABLES_2026_27, NI_TABLES_2025_26, SCOTLAND_TABLES_2025_26, SCOTLAND_TABLES_2026_27, WALES_TABLES_2025_26, WALES_TABLES_2026_27, } from './afc-scales.js';
|
|
46
48
|
import { AFC_BAND_IDS } from './afc-band.js';
|
|
47
|
-
import { ENGLAND_AFC_2025_26, ENGLAND_AFC_2026_27 } from './published/england-afc.js';
|
|
48
49
|
import { schemeYearOfPayYear } from './pay-year.js';
|
|
49
50
|
/** What {@link afcPayYearFor} finds for a scheme year. */
|
|
50
51
|
export const AFC_PAY_YEAR_KINDS = {
|
|
@@ -70,29 +71,30 @@ export const AFC_PAY_YEAR_KINDS = {
|
|
|
70
71
|
* figures matching England's is a fact about the two publishers rather
|
|
71
72
|
* than a licence to cite one for the other.
|
|
72
73
|
*
|
|
73
|
-
*
|
|
74
|
-
* verbatim circulars
|
|
75
|
-
*
|
|
74
|
+
* Every nation's points come through `afc-scales.ts`: the three devolved
|
|
75
|
+
* nations from their verbatim circulars, England from its NHS Employers
|
|
76
|
+
* page in `published/`. Each record carries the nation-year's Band 1
|
|
77
|
+
* beside its ladder, so a new round is one entry here.
|
|
76
78
|
*/
|
|
77
79
|
const AFC_SCALE_YEARS = {
|
|
78
80
|
[NATION_KEYS.england]: {
|
|
79
|
-
[YEAR_LABELS.Y2025_26]: {
|
|
80
|
-
[YEAR_LABELS.Y2026_27]: {
|
|
81
|
+
[YEAR_LABELS.Y2025_26]: { ...ENGLAND_TABLES_2025_26, source: AFC_ENGLAND_SCALES_2025 },
|
|
82
|
+
[YEAR_LABELS.Y2026_27]: { ...ENGLAND_TABLES_2026_27, source: AFC_ENGLAND_SCALES_2026 },
|
|
81
83
|
},
|
|
82
84
|
[NATION_KEYS.northernIreland]: {
|
|
83
|
-
// One year: NI has issued no 2026-27 circular (see
|
|
84
|
-
[YEAR_LABELS.Y2025_26]: {
|
|
85
|
+
// One year: NI has issued no 2026-27 circular (see NI_TABLES_2025_26).
|
|
86
|
+
[YEAR_LABELS.Y2025_26]: { ...NI_TABLES_2025_26, source: AFC_NI_2025 },
|
|
85
87
|
},
|
|
86
88
|
[NATION_KEYS.scotland]: {
|
|
87
89
|
// One circular restates both years: PCS(AFC)2026/1 revised the
|
|
88
90
|
// 2025-26 figure when the inflation guarantee triggered and restates
|
|
89
91
|
// 2026-27, so it is current for each.
|
|
90
|
-
[YEAR_LABELS.Y2025_26]: {
|
|
91
|
-
[YEAR_LABELS.Y2026_27]: {
|
|
92
|
+
[YEAR_LABELS.Y2025_26]: { ...SCOTLAND_TABLES_2025_26, source: AFC_SCOTLAND },
|
|
93
|
+
[YEAR_LABELS.Y2026_27]: { ...SCOTLAND_TABLES_2026_27, source: AFC_SCOTLAND },
|
|
92
94
|
},
|
|
93
95
|
[NATION_KEYS.wales]: {
|
|
94
|
-
[YEAR_LABELS.Y2025_26]: {
|
|
95
|
-
[YEAR_LABELS.Y2026_27]: {
|
|
96
|
+
[YEAR_LABELS.Y2025_26]: { ...WALES_TABLES_2025_26, source: AFC_W_02_2025 },
|
|
97
|
+
[YEAR_LABELS.Y2026_27]: { ...WALES_TABLES_2026_27, source: AFC_W_02_2026 },
|
|
96
98
|
},
|
|
97
99
|
};
|
|
98
100
|
/**
|
|
@@ -131,6 +133,20 @@ export function getAfcScales(year, nation) {
|
|
|
131
133
|
source,
|
|
132
134
|
}));
|
|
133
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Band 1 for a nation and pay year. Throws {@link ScaleUnavailable} for a
|
|
138
|
+
* year that nation has not published, as {@link getAfcScales} does, so
|
|
139
|
+
* the two reads of one ladder fail the same way.
|
|
140
|
+
*
|
|
141
|
+
* Deliberately NOT part of `AFC_BANDS` or the scale list. Band 1 joining
|
|
142
|
+
* either shifts every index that reads the list by position, and this
|
|
143
|
+
* needs to shift nothing — it is a lookup beside the ladder, not a rung
|
|
144
|
+
* added to it.
|
|
145
|
+
*/
|
|
146
|
+
export function afcBand1(year, nation) {
|
|
147
|
+
const { band1, source } = getScalesForYear(year, nation);
|
|
148
|
+
return { ...band1, year, source, nation };
|
|
149
|
+
}
|
|
134
150
|
/** One band's published ladder for a pay year and nation. Every band is
|
|
135
151
|
* on every ladder (a nation-year's scales are total over the bands), so
|
|
136
152
|
* only the year and nation can be unpublished, which throws
|
|
@@ -178,7 +194,7 @@ export function afcPayYears(nation) {
|
|
|
178
194
|
* The most recent year a nation has actually published AfC scales for.
|
|
179
195
|
*
|
|
180
196
|
* Nations do not move together: Northern Ireland's latest is a round
|
|
181
|
-
* behind the others (see `
|
|
197
|
+
* behind the others (see `NI_TABLES_2025_26` in `afc-scales.ts`). A
|
|
182
198
|
* consumer that asks for a site-wide "current year" gets
|
|
183
199
|
* `ScaleUnavailable` there, which is correct but is not an answer; this
|
|
184
200
|
* is the answer.
|
|
@@ -337,10 +353,10 @@ function previousAfcYear(nation) {
|
|
|
337
353
|
* substituting another year's or nation's figures. */
|
|
338
354
|
function getScalesForYear(year, nation) {
|
|
339
355
|
const key = year;
|
|
340
|
-
const
|
|
341
|
-
if (!
|
|
356
|
+
const held = AFC_SCALE_YEARS[nation][key];
|
|
357
|
+
if (!held) {
|
|
342
358
|
throw new ScaleUnavailable(nation, year);
|
|
343
359
|
}
|
|
344
|
-
return
|
|
360
|
+
return held;
|
|
345
361
|
}
|
|
346
362
|
//# sourceMappingURL=scales.js.map
|
package/dist/scales.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scales.js","sourceRoot":"","sources":["../src/scales.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scales.js","sourceRoot":"","sources":["../src/scales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAKH,OAAO,EACL,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAExD,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAGlD,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,0DAA0D;IAC1D,IAAI,EAAE,MAAM;IACZ;kBACc;IACd,OAAO,EAAE,SAAS;IAClB;;0DAEsD;IACtD,OAAO,EAAE,SAAS;CACV,CAAC;AAyCX;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,eAAe,GAEjB;IACF,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QACrB,CAAC,WAAW,CAAC,QAAQ,CAAC,EACpB,EAAC,GAAG,sBAAsB,EAAE,MAAM,EAAE,uBAAuB,EAAC;QAC9D,CAAC,WAAW,CAAC,QAAQ,CAAC,EACpB,EAAC,GAAG,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5D,eAAe;IACf,SAAS,CACP,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,EAChD,kBAAkB,MAAM,+CAA+C;UACrE,GAAG,GAAG,8BAA8B,CACvC,CAAC;IACF,OAAO,EAAC,IAAI,EAAE,kBAAkB,CAAC,OAAO,EAAC,CAAC;AAC5C,CAAC;AAED;+DAC+D;AAC/D,SAAS,eAAe,CAAC,MAAc;IACrC,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,SAAS,CAAC,QAAQ,KAAK,SAAS,EAC9B,oBAAoB,MAAM,0BAA0B,CAAC,CAAC;IACxD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;uDAMuD;AACvD,SAAS,gBAAgB,CACvB,IAAa,EACb,MAAc;IAEd,MAAM,GAAG,GAAc,IAAI,CAAC;IAC5B,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { FinalSalaryRules } from './final-salary.js';
|
|
2
2
|
import type { Applies1995, FactorOutcome } from '../factor-basis.js';
|
|
3
|
+
/** The 1995 Section's statute (SI 1995/300): 1/80 of the best single
|
|
4
|
+
* year's pay of the last three, and three times the pension as an
|
|
5
|
+
* automatic lump sum. */
|
|
6
|
+
export declare const RULES_1995: FinalSalaryRules;
|
|
3
7
|
/**
|
|
4
8
|
* The factor for a 1995 Section benefit drawn on `drawn`, for the
|
|
5
9
|
* pension or for the automatic lump sum.
|
|
6
10
|
*
|
|
7
11
|
* **No late uplift, ever.** Drawing after 60 does not raise a 1995
|
|
8
|
-
* pension, so
|
|
9
|
-
* than a factor read from a table.
|
|
12
|
+
* pension, so its basis's late arm is 1.000 for a reason of its own
|
|
13
|
+
* rather than a factor read from a table.
|
|
10
14
|
*
|
|
11
15
|
* **An early drawing from preserved benefits is refused.** Tables 1-401
|
|
12
16
|
* and 1-407 are for members retiring from active service; a member who
|
|
@@ -14,7 +18,3 @@ import type { Applies1995, FactorOutcome } from '../factor-basis.js';
|
|
|
14
18
|
* not been read at source: https://github.com/casomoltd/nhs-pay/issues/18
|
|
15
19
|
*/
|
|
16
20
|
export declare function factor1995(dateOfBirth: Date, leaving: Date, drawn: Date, applies: Applies1995): FactorOutcome;
|
|
17
|
-
/** The 1995 Section's statute (SI 1995/300): 1/80 of the best single
|
|
18
|
-
* year's pay of the last three, and three times the pension as an
|
|
19
|
-
* automatic lump sum. */
|
|
20
|
-
export declare const RULES_1995: FinalSalaryRules;
|
|
@@ -2,20 +2,48 @@
|
|
|
2
2
|
* The 1995 Section: final salary, a pension age of 60, and an automatic
|
|
3
3
|
* lump sum. Internal: reached only through the member's benefits.
|
|
4
4
|
*/
|
|
5
|
-
import { npaDate } from '../dates.js';
|
|
6
5
|
import { bestSingleOf3, PAY_MEASURES } from './final-salary.js';
|
|
7
6
|
import { BenefitNotModelled, NOT_MODELLED } from '../errors.js';
|
|
8
|
-
import { FACTOR_APPLIES,
|
|
7
|
+
import { FACTOR_APPLIES, FACTOR_SOURCES, drawnEarly, readFactor, } from '../factor-basis.js';
|
|
9
8
|
import { LEGACY_PENSION_AGES } from '../pension/ages.js';
|
|
10
9
|
/** The pension age the 1995 Section's reductions are measured from. */
|
|
11
10
|
const PENSION_AGE = LEGACY_PENSION_AGES.section1995;
|
|
11
|
+
/** The 1995 Section's basis for each benefit: 1-401 or 1-407 before 60,
|
|
12
|
+
* and no late uplift after it, declared rather than read. */
|
|
13
|
+
const BASES_1995 = {
|
|
14
|
+
[FACTOR_APPLIES.pension]: {
|
|
15
|
+
against: PENSION_AGE,
|
|
16
|
+
early: 'early1995Pension',
|
|
17
|
+
late: FACTOR_SOURCES.noLateUplift,
|
|
18
|
+
},
|
|
19
|
+
[FACTOR_APPLIES.lumpSum]: {
|
|
20
|
+
against: PENSION_AGE,
|
|
21
|
+
early: 'early1995LumpSum',
|
|
22
|
+
late: FACTOR_SOURCES.noLateUplift,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
/** The 1995 Section's statute (SI 1995/300): 1/80 of the best single
|
|
26
|
+
* year's pay of the last three, and three times the pension as an
|
|
27
|
+
* automatic lump sum. */
|
|
28
|
+
export const RULES_1995 = {
|
|
29
|
+
denominator: 80,
|
|
30
|
+
payMeasure: PAY_MEASURES.bestSingleOf3,
|
|
31
|
+
pensionAge: PENSION_AGE,
|
|
32
|
+
lateUplift: false,
|
|
33
|
+
finalPay: bestSingleOf3,
|
|
34
|
+
pensionFactor: (dateOfBirth, leaving, drawn) => factor1995(dateOfBirth, leaving, drawn, FACTOR_APPLIES.pension),
|
|
35
|
+
automaticLumpSum: {
|
|
36
|
+
multiple: 3,
|
|
37
|
+
factor: (dateOfBirth, leaving, drawn) => factor1995(dateOfBirth, leaving, drawn, FACTOR_APPLIES.lumpSum),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
12
40
|
/**
|
|
13
41
|
* The factor for a 1995 Section benefit drawn on `drawn`, for the
|
|
14
42
|
* pension or for the automatic lump sum.
|
|
15
43
|
*
|
|
16
44
|
* **No late uplift, ever.** Drawing after 60 does not raise a 1995
|
|
17
|
-
* pension, so
|
|
18
|
-
* than a factor read from a table.
|
|
45
|
+
* pension, so its basis's late arm is 1.000 for a reason of its own
|
|
46
|
+
* rather than a factor read from a table.
|
|
19
47
|
*
|
|
20
48
|
* **An early drawing from preserved benefits is refused.** Tables 1-401
|
|
21
49
|
* and 1-407 are for members retiring from active service; a member who
|
|
@@ -23,31 +51,10 @@ const PENSION_AGE = LEGACY_PENSION_AGES.section1995;
|
|
|
23
51
|
* not been read at source: https://github.com/casomoltd/nhs-pay/issues/18
|
|
24
52
|
*/
|
|
25
53
|
export function factor1995(dateOfBirth, leaving, drawn, applies) {
|
|
26
|
-
const
|
|
27
|
-
if (drawn
|
|
28
|
-
return { source: FACTOR_SOURCES.noLateUplift, factor: 1 };
|
|
29
|
-
}
|
|
30
|
-
if (drawn < sixty && leaving < drawn) {
|
|
54
|
+
const basis = BASES_1995[applies];
|
|
55
|
+
if (drawnEarly(basis, dateOfBirth, drawn) && leaving < drawn) {
|
|
31
56
|
throw new BenefitNotModelled(NOT_MODELLED.preservedDrawnEarly, 'a 1995 Section benefit drawn before 60 from preserved benefits');
|
|
32
57
|
}
|
|
33
|
-
const basis = {
|
|
34
|
-
against: PENSION_AGE, direction: FACTOR_DIRECTIONS.early, applies,
|
|
35
|
-
};
|
|
36
58
|
return readFactor(basis, dateOfBirth, drawn);
|
|
37
59
|
}
|
|
38
|
-
/** The 1995 Section's statute (SI 1995/300): 1/80 of the best single
|
|
39
|
-
* year's pay of the last three, and three times the pension as an
|
|
40
|
-
* automatic lump sum. */
|
|
41
|
-
export const RULES_1995 = {
|
|
42
|
-
denominator: 80,
|
|
43
|
-
payMeasure: PAY_MEASURES.bestSingleOf3,
|
|
44
|
-
pensionAge: PENSION_AGE,
|
|
45
|
-
lateUplift: false,
|
|
46
|
-
finalPay: bestSingleOf3,
|
|
47
|
-
pensionFactor: (dateOfBirth, leaving, drawn) => factor1995(dateOfBirth, leaving, drawn, FACTOR_APPLIES.pension),
|
|
48
|
-
automaticLumpSum: {
|
|
49
|
-
multiple: 3,
|
|
50
|
-
factor: (dateOfBirth, leaving, drawn) => factor1995(dateOfBirth, leaving, drawn, FACTOR_APPLIES.lumpSum),
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
60
|
//# sourceMappingURL=section-1995.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-1995.js","sourceRoot":"","sources":["../../src/sections/section-1995.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"section-1995.js","sourceRoot":"","sources":["../../src/sections/section-1995.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAC,kBAAkB,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,GACvD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAKvD,uEAAuE;AACvE,MAAM,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC;AAEpD;8DAC8D;AAC9D,MAAM,UAAU,GAAG;IACjB,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,cAAc,CAAC,YAAY;KAClC;IACD,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,cAAc,CAAC,YAAY;KAClC;CACkD,CAAC;AAEtD;;0BAE0B;AAC1B,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC1C,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,YAAY,CAAC,aAAa;IACtC,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,aAAa;IACvB,aAAa,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAC7C,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC;IACjE,gBAAgB,EAAE;QAChB,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CACtC,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC;KAClE;CACF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,UAAU,CACxB,WAAiB,EACjB,OAAa,EACb,KAAW,EACX,OAAoB;IAEpB,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;QAC7D,MAAM,IAAI,kBAAkB,CAC1B,YAAY,CAAC,mBAAmB,EAChC,gEAAgE,CACjE,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { FinalSalaryRules } from './final-salary.js';
|
|
2
2
|
import type { FactorOutcome } from '../factor-basis.js';
|
|
3
|
+
/** The 2008 Section's statute (SI 2008/653): 1/60 of reckonable pay,
|
|
4
|
+
* the best average of three consecutive years in the last ten, and
|
|
5
|
+
* no automatic lump sum. */
|
|
6
|
+
export declare const RULES_2008: FinalSalaryRules;
|
|
3
7
|
/**
|
|
4
8
|
* The factor for a 2008 Section pension drawn on `drawn`: 1-402 early,
|
|
5
9
|
* 2-416 late.
|
|
@@ -10,7 +14,3 @@ import type { FactorOutcome } from '../factor-basis.js';
|
|
|
10
14
|
* https://github.com/casomoltd/nhs-pay/issues/18
|
|
11
15
|
*/
|
|
12
16
|
export declare function factor2008(dateOfBirth: Date, leaving: Date, drawn: Date): FactorOutcome;
|
|
13
|
-
/** The 2008 Section's statute (SI 2008/653): 1/60 of reckonable pay,
|
|
14
|
-
* the best average of three consecutive years in the last ten, and
|
|
15
|
-
* no automatic lump sum. */
|
|
16
|
-
export declare const RULES_2008: FinalSalaryRules;
|
|
@@ -3,13 +3,28 @@
|
|
|
3
3
|
* no automatic lump sum. Internal: reached only through the member's
|
|
4
4
|
* benefits.
|
|
5
5
|
*/
|
|
6
|
-
import { npaDate } from '../dates.js';
|
|
7
6
|
import { meanOf3ConsecutiveIn10, PAY_MEASURES } from './final-salary.js';
|
|
8
7
|
import { BenefitNotModelled, NOT_MODELLED } from '../errors.js';
|
|
9
|
-
import {
|
|
8
|
+
import { drawnEarly, readFactor } from '../factor-basis.js';
|
|
10
9
|
import { LEGACY_PENSION_AGES } from '../pension/ages.js';
|
|
11
10
|
/** The pension age the 2008 Section's factors are measured from. */
|
|
12
11
|
const PENSION_AGE = LEGACY_PENSION_AGES.section2008;
|
|
12
|
+
/** The 2008 Section's basis: 1-402 before 65, 2-416 after. */
|
|
13
|
+
const BASIS_2008 = {
|
|
14
|
+
against: PENSION_AGE, early: 'earlyAge65', late: 'late2008',
|
|
15
|
+
};
|
|
16
|
+
/** The 2008 Section's statute (SI 2008/653): 1/60 of reckonable pay,
|
|
17
|
+
* the best average of three consecutive years in the last ten, and
|
|
18
|
+
* no automatic lump sum. */
|
|
19
|
+
export const RULES_2008 = {
|
|
20
|
+
denominator: 60,
|
|
21
|
+
payMeasure: PAY_MEASURES.meanOf3ConsecutiveIn10,
|
|
22
|
+
pensionAge: PENSION_AGE,
|
|
23
|
+
lateUplift: true,
|
|
24
|
+
finalPay: meanOf3ConsecutiveIn10,
|
|
25
|
+
pensionFactor: factor2008,
|
|
26
|
+
automaticLumpSum: null,
|
|
27
|
+
};
|
|
13
28
|
/**
|
|
14
29
|
* The factor for a 2008 Section pension drawn on `drawn`: 1-402 early,
|
|
15
30
|
* 2-416 late.
|
|
@@ -20,28 +35,9 @@ const PENSION_AGE = LEGACY_PENSION_AGES.section2008;
|
|
|
20
35
|
* https://github.com/casomoltd/nhs-pay/issues/18
|
|
21
36
|
*/
|
|
22
37
|
export function factor2008(dateOfBirth, leaving, drawn) {
|
|
23
|
-
|
|
24
|
-
if (drawn < sixtyFive && leaving < drawn) {
|
|
38
|
+
if (drawnEarly(BASIS_2008, dateOfBirth, drawn) && leaving < drawn) {
|
|
25
39
|
throw new BenefitNotModelled(NOT_MODELLED.preservedDrawnEarly, 'a 2008 Section pension drawn before 65 from preserved benefits');
|
|
26
40
|
}
|
|
27
|
-
|
|
28
|
-
against: PENSION_AGE,
|
|
29
|
-
direction: drawn < sixtyFive
|
|
30
|
-
? FACTOR_DIRECTIONS.early
|
|
31
|
-
: FACTOR_DIRECTIONS.late,
|
|
32
|
-
};
|
|
33
|
-
return readFactor(basis, dateOfBirth, drawn);
|
|
41
|
+
return readFactor(BASIS_2008, dateOfBirth, drawn);
|
|
34
42
|
}
|
|
35
|
-
/** The 2008 Section's statute (SI 2008/653): 1/60 of reckonable pay,
|
|
36
|
-
* the best average of three consecutive years in the last ten, and
|
|
37
|
-
* no automatic lump sum. */
|
|
38
|
-
export const RULES_2008 = {
|
|
39
|
-
denominator: 60,
|
|
40
|
-
payMeasure: PAY_MEASURES.meanOf3ConsecutiveIn10,
|
|
41
|
-
pensionAge: PENSION_AGE,
|
|
42
|
-
lateUplift: true,
|
|
43
|
-
finalPay: meanOf3ConsecutiveIn10,
|
|
44
|
-
pensionFactor: factor2008,
|
|
45
|
-
automaticLumpSum: null,
|
|
46
|
-
};
|
|
47
43
|
//# sourceMappingURL=section-2008.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-2008.js","sourceRoot":"","sources":["../../src/sections/section-2008.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"section-2008.js","sourceRoot":"","sources":["../../src/sections/section-2008.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAC,sBAAsB,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAC,kBAAkB,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAGvD,oEAAoE;AACpE,MAAM,WAAW,GAAG,mBAAmB,CAAC,WAAW,CAAC;AAEpD,8DAA8D;AAC9D,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU;CAC7B,CAAC;AAEjC;;6BAE6B;AAC7B,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC1C,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,YAAY,CAAC,sBAAsB;IAC/C,UAAU,EAAE,WAAW;IACvB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,sBAAsB;IAChC,aAAa,EAAE,UAAU;IACzB,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CACxB,WAAiB,EACjB,OAAa,EACb,KAAW;IAEX,IAAI,UAAU,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;QAClE,MAAM,IAAI,kBAAkB,CAC1B,YAAY,CAAC,mBAAmB,EAChC,gEAAgE,CACjE,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -3,6 +3,13 @@ import type { MemberLedger, PayIn } from '../pension/ledger.js';
|
|
|
3
3
|
import type { Prices } from '../pension/prices.js';
|
|
4
4
|
import type { SchemeYearEnd } from '../pension/scheme-year.js';
|
|
5
5
|
import type { LedgerSeed } from '../pension/seed.js';
|
|
6
|
+
/** One career average walk in one ruler, and the pension it draws. */
|
|
7
|
+
interface CareerAverageRun {
|
|
8
|
+
readonly ledger: MemberLedger;
|
|
9
|
+
readonly seed: LedgerSeed;
|
|
10
|
+
/** At the drawing, before its factor; `factored` applies it. */
|
|
11
|
+
readonly revalued: number;
|
|
12
|
+
}
|
|
6
13
|
/**
|
|
7
14
|
* The factor for a benefit determined under the 2015 Section's rules,
|
|
8
15
|
* drawn on `drawn`, by the period to or after the member's own pension
|
|
@@ -12,13 +19,6 @@ import type { LedgerSeed } from '../pension/seed.js';
|
|
|
12
19
|
* although the legacy section pays them.
|
|
13
20
|
*/
|
|
14
21
|
export declare function factor2015(dateOfBirth: Date, drawn: Date, applies: Applies2015): FactorOutcome;
|
|
15
|
-
/** One career average walk in one ruler, and the pension it draws. */
|
|
16
|
-
interface CareerAverageRun {
|
|
17
|
-
readonly ledger: MemberLedger;
|
|
18
|
-
readonly seed: LedgerSeed;
|
|
19
|
-
/** At the drawing, before its factor; `factored` applies it. */
|
|
20
|
-
readonly revalued: number;
|
|
21
|
-
}
|
|
22
22
|
/**
|
|
23
23
|
* Walk a career average pot in one ruler: the 2015 Section's own, or a
|
|
24
24
|
* remedy window valued on its rules. The same engine either way, on
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* member's State Pension age with a floor of 65. Internal: reached only
|
|
4
4
|
* through the member's benefits.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { FACTOR_APPLIES, FACTOR_DIRECTIONS, FACTOR_SOURCES, MEMBERS_NPA, readFactor, } from '../factor-basis.js';
|
|
6
|
+
import { FACTOR_APPLIES, FACTOR_SOURCES, MEMBERS_NPA, readFactor, TABLES_2015, } from '../factor-basis.js';
|
|
8
7
|
import { normalPensionAge } from '../pension/ages.js';
|
|
9
8
|
import { atDrawing, buildLedger } from '../pension/ledger.js';
|
|
10
9
|
/**
|
|
@@ -16,13 +15,10 @@ import { atDrawing, buildLedger } from '../pension/ledger.js';
|
|
|
16
15
|
* although the legacy section pays them.
|
|
17
16
|
*/
|
|
18
17
|
export function factor2015(dateOfBirth, drawn, applies) {
|
|
19
|
-
const npa = normalPensionAge(dateOfBirth);
|
|
20
|
-
const drawnEarly = drawn < npaDate(dateOfBirth, npa);
|
|
21
18
|
const basis = {
|
|
22
19
|
against: MEMBERS_NPA,
|
|
23
|
-
npa,
|
|
24
|
-
|
|
25
|
-
applies,
|
|
20
|
+
npa: normalPensionAge(dateOfBirth),
|
|
21
|
+
...TABLES_2015[applies],
|
|
26
22
|
};
|
|
27
23
|
return readFactor(basis, dateOfBirth, drawn);
|
|
28
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-2015.js","sourceRoot":"","sources":["../../src/sections/section-2015.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"section-2015.js","sourceRoot":"","sources":["../../src/sections/section-2015.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,GACrE,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAc5D;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CACxB,WAAiB,EACjB,KAAW,EACX,OAAoB;IAEpB,MAAM,KAAK,GAAgB;QACzB,OAAO,EAAE,WAAW;QACpB,GAAG,EAAE,gBAAgB,CAAC,WAAW,CAAC;QAClC,GAAG,WAAW,CAAC,OAAO,CAAC;KACxB,CAAC;IACF,OAAO,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAS5D;IACC,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,EAAE,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,WAAW,CAAC;QACzB,IAAI;QACJ,KAAK;QACL,QAAQ,EAAE,OAAO;QACjB,cAAc,EAAE,OAAO;QACvB,MAAM;QACN,OAAO;QACP,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;YACjB,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,cAAc,CAAC,KAAK;gBAC3C,CAAC,CAAC,EAAC,IAAI,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAC;gBACzD,CAAC,CAAC,IAAI;SACT,CAAC;KACH,CAAC,CAAC;IACH,OAAO;QACL,MAAM,EAAE,IAAI,EAAE,MAAM;QACpB,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ;KAC7D,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casomoltd/nhs-pay",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "NHS pay scales and take-home pay, and a member's NHS pension across the 1995, 2008 and 2015 Sections",
|
|
5
5
|
"homepage": "https://casomo.co.uk",
|
|
6
6
|
"bugs": "https://github.com/casomoltd/nhs-pay/issues",
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verbatim transcription — GAD "NHSPS_EW — Consolidated Factor
|
|
3
|
-
* Spreadsheet", table 0-703 (Table S), factors issued 3 October 2023, in
|
|
4
|
-
* use from 1 April 2024. Sheet x-703.
|
|
5
|
-
*
|
|
6
|
-
* Single premium, in pounds, per £250 a year of additional pension at
|
|
7
|
-
* the date of election, by age when notice of election is given (16 to
|
|
8
|
-
* 65): personal, and personal and dependants'.
|
|
9
|
-
*
|
|
10
|
-
* To check it: open sheet x-703 of "GAD NHS_EW Consolidated Factors,
|
|
11
|
-
* version 2026-01", the only publication of these tables: GAD's download
|
|
12
|
-
* is `sourceUrl` below, and the archived copy is SA-01 in
|
|
13
|
-
* docs/source-archive.md. The workbook's Version control sheet shows
|
|
14
|
-
* x-703 to x-722 last updated in version 2023-04; the 2026-01 issue
|
|
15
|
-
* touched other tables. Delete this file whole when a later issue
|
|
16
|
-
* supersedes the table.
|
|
17
|
-
*/
|
|
18
|
-
/** 2015 Scheme additional pension, lump sum — Table 0-703. */
|
|
19
|
-
export declare const AP_0_703: {
|
|
20
|
-
readonly provenance: {
|
|
21
|
-
readonly tableRef: "0-703";
|
|
22
|
-
readonly sheet: "x-703";
|
|
23
|
-
readonly guidanceRef: "Table S";
|
|
24
|
-
readonly sourceUrl: string;
|
|
25
|
-
readonly issued: import("../iso-date.js").IsoDate;
|
|
26
|
-
readonly implemented: import("../iso-date.js").IsoDate;
|
|
27
|
-
};
|
|
28
|
-
readonly firstAge: 16;
|
|
29
|
-
readonly rows: readonly [{
|
|
30
|
-
readonly personal: 2070;
|
|
31
|
-
readonly "personal-and-dependants": 2240;
|
|
32
|
-
}, {
|
|
33
|
-
readonly personal: 2100;
|
|
34
|
-
readonly "personal-and-dependants": 2270;
|
|
35
|
-
}, {
|
|
36
|
-
readonly personal: 2140;
|
|
37
|
-
readonly "personal-and-dependants": 2310;
|
|
38
|
-
}, {
|
|
39
|
-
readonly personal: 2170;
|
|
40
|
-
readonly "personal-and-dependants": 2350;
|
|
41
|
-
}, {
|
|
42
|
-
readonly personal: 2200;
|
|
43
|
-
readonly "personal-and-dependants": 2380;
|
|
44
|
-
}, {
|
|
45
|
-
readonly personal: 2230;
|
|
46
|
-
readonly "personal-and-dependants": 2420;
|
|
47
|
-
}, {
|
|
48
|
-
readonly personal: 2260;
|
|
49
|
-
readonly "personal-and-dependants": 2450;
|
|
50
|
-
}, {
|
|
51
|
-
readonly personal: 2290;
|
|
52
|
-
readonly "personal-and-dependants": 2490;
|
|
53
|
-
}, {
|
|
54
|
-
readonly personal: 2330;
|
|
55
|
-
readonly "personal-and-dependants": 2520;
|
|
56
|
-
}, {
|
|
57
|
-
readonly personal: 2360;
|
|
58
|
-
readonly "personal-and-dependants": 2560;
|
|
59
|
-
}, {
|
|
60
|
-
readonly personal: 2390;
|
|
61
|
-
readonly "personal-and-dependants": 2590;
|
|
62
|
-
}, {
|
|
63
|
-
readonly personal: 2430;
|
|
64
|
-
readonly "personal-and-dependants": 2630;
|
|
65
|
-
}, {
|
|
66
|
-
readonly personal: 2460;
|
|
67
|
-
readonly "personal-and-dependants": 2670;
|
|
68
|
-
}, {
|
|
69
|
-
readonly personal: 2500;
|
|
70
|
-
readonly "personal-and-dependants": 2710;
|
|
71
|
-
}, {
|
|
72
|
-
readonly personal: 2530;
|
|
73
|
-
readonly "personal-and-dependants": 2740;
|
|
74
|
-
}, {
|
|
75
|
-
readonly personal: 2570;
|
|
76
|
-
readonly "personal-and-dependants": 2780;
|
|
77
|
-
}, {
|
|
78
|
-
readonly personal: 2610;
|
|
79
|
-
readonly "personal-and-dependants": 2820;
|
|
80
|
-
}, {
|
|
81
|
-
readonly personal: 2640;
|
|
82
|
-
readonly "personal-and-dependants": 2860;
|
|
83
|
-
}, {
|
|
84
|
-
readonly personal: 2680;
|
|
85
|
-
readonly "personal-and-dependants": 2900;
|
|
86
|
-
}, {
|
|
87
|
-
readonly personal: 2720;
|
|
88
|
-
readonly "personal-and-dependants": 2940;
|
|
89
|
-
}, {
|
|
90
|
-
readonly personal: 2760;
|
|
91
|
-
readonly "personal-and-dependants": 2980;
|
|
92
|
-
}, {
|
|
93
|
-
readonly personal: 2800;
|
|
94
|
-
readonly "personal-and-dependants": 3020;
|
|
95
|
-
}, {
|
|
96
|
-
readonly personal: 2830;
|
|
97
|
-
readonly "personal-and-dependants": 3070;
|
|
98
|
-
}, {
|
|
99
|
-
readonly personal: 2870;
|
|
100
|
-
readonly "personal-and-dependants": 3110;
|
|
101
|
-
}, {
|
|
102
|
-
readonly personal: 2910;
|
|
103
|
-
readonly "personal-and-dependants": 3150;
|
|
104
|
-
}, {
|
|
105
|
-
readonly personal: 2950;
|
|
106
|
-
readonly "personal-and-dependants": 3190;
|
|
107
|
-
}, {
|
|
108
|
-
readonly personal: 3000;
|
|
109
|
-
readonly "personal-and-dependants": 3240;
|
|
110
|
-
}, {
|
|
111
|
-
readonly personal: 3040;
|
|
112
|
-
readonly "personal-and-dependants": 3280;
|
|
113
|
-
}, {
|
|
114
|
-
readonly personal: 3080;
|
|
115
|
-
readonly "personal-and-dependants": 3330;
|
|
116
|
-
}, {
|
|
117
|
-
readonly personal: 3120;
|
|
118
|
-
readonly "personal-and-dependants": 3370;
|
|
119
|
-
}, {
|
|
120
|
-
readonly personal: 3200;
|
|
121
|
-
readonly "personal-and-dependants": 3450;
|
|
122
|
-
}, {
|
|
123
|
-
readonly personal: 3290;
|
|
124
|
-
readonly "personal-and-dependants": 3540;
|
|
125
|
-
}, {
|
|
126
|
-
readonly personal: 3380;
|
|
127
|
-
readonly "personal-and-dependants": 3630;
|
|
128
|
-
}, {
|
|
129
|
-
readonly personal: 3460;
|
|
130
|
-
readonly "personal-and-dependants": 3720;
|
|
131
|
-
}, {
|
|
132
|
-
readonly personal: 3510;
|
|
133
|
-
readonly "personal-and-dependants": 3770;
|
|
134
|
-
}, {
|
|
135
|
-
readonly personal: 3560;
|
|
136
|
-
readonly "personal-and-dependants": 3820;
|
|
137
|
-
}, {
|
|
138
|
-
readonly personal: 3610;
|
|
139
|
-
readonly "personal-and-dependants": 3870;
|
|
140
|
-
}, {
|
|
141
|
-
readonly personal: 3660;
|
|
142
|
-
readonly "personal-and-dependants": 3930;
|
|
143
|
-
}, {
|
|
144
|
-
readonly personal: 3720;
|
|
145
|
-
readonly "personal-and-dependants": 3980;
|
|
146
|
-
}, {
|
|
147
|
-
readonly personal: 3770;
|
|
148
|
-
readonly "personal-and-dependants": 4030;
|
|
149
|
-
}, {
|
|
150
|
-
readonly personal: 3820;
|
|
151
|
-
readonly "personal-and-dependants": 4090;
|
|
152
|
-
}, {
|
|
153
|
-
readonly personal: 3880;
|
|
154
|
-
readonly "personal-and-dependants": 4140;
|
|
155
|
-
}, {
|
|
156
|
-
readonly personal: 3940;
|
|
157
|
-
readonly "personal-and-dependants": 4200;
|
|
158
|
-
}, {
|
|
159
|
-
readonly personal: 3990;
|
|
160
|
-
readonly "personal-and-dependants": 4260;
|
|
161
|
-
}, {
|
|
162
|
-
readonly personal: 4050;
|
|
163
|
-
readonly "personal-and-dependants": 4320;
|
|
164
|
-
}, {
|
|
165
|
-
readonly personal: 4120;
|
|
166
|
-
readonly "personal-and-dependants": 4380;
|
|
167
|
-
}, {
|
|
168
|
-
readonly personal: 4180;
|
|
169
|
-
readonly "personal-and-dependants": 4450;
|
|
170
|
-
}, {
|
|
171
|
-
readonly personal: 4310;
|
|
172
|
-
readonly "personal-and-dependants": 4570;
|
|
173
|
-
}, {
|
|
174
|
-
readonly personal: 4440;
|
|
175
|
-
readonly "personal-and-dependants": 4700;
|
|
176
|
-
}, {
|
|
177
|
-
readonly personal: 4580;
|
|
178
|
-
readonly "personal-and-dependants": 4840;
|
|
179
|
-
}];
|
|
180
|
-
};
|