ffc-pay-schemes 1.0.1
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/.github/workflows/secret-scanner.yml +16 -0
- package/.gitleaks-shared/.gitleaks.toml +139 -0
- package/.gitleaks.toml +15 -0
- package/.gitleaksignore +0 -0
- package/.husky/pre-commit +30 -0
- package/LICENCE +8 -0
- package/README.md +34 -0
- package/app/constants/account-codes/ap.js +48 -0
- package/app/constants/account-codes/ar-admin.js +48 -0
- package/app/constants/account-codes/ar-irregular.js +47 -0
- package/app/constants/delivery-bodies.js +6 -0
- package/app/constants/description-codes.js +34 -0
- package/app/constants/fund-codes.js +8 -0
- package/app/constants/pillars.js +18 -0
- package/app/constants/scheme-batch-properties.js +106 -0
- package/app/constants/scheme-ids.js +19 -0
- package/app/constants/scheme-names.js +19 -0
- package/app/constants/schemes-not-requiring-ppas.js +3 -0
- package/app/constants/schemes-providing-account-values.js +3 -0
- package/app/constants/schemes.js +127 -0
- package/app/constants/source-systems.js +19 -0
- package/app/create-invoice-number/create-default-invoice-number.js +11 -0
- package/app/create-invoice-number/create-es-invoice-number.js +7 -0
- package/app/create-invoice-number/create-imps-invoice-number.js +14 -0
- package/app/create-invoice-number/create-siti-agri-invoice-number.js +12 -0
- package/app/create-invoice-number/create-standard-scheme-invoice-number.js +12 -0
- package/app/create-invoice-number/index.js +38 -0
- package/app/create-invoice-number/use-invoice-number-as-is.js +7 -0
- package/app/create-split-invoice-number/create-default-invoice-number.js +12 -0
- package/app/create-split-invoice-number/create-siti-agri-invoice-number.js +12 -0
- package/app/create-split-invoice-number/index.js +21 -0
- package/app/get-account-code-map/bps-map.js +141 -0
- package/app/get-account-code-map/cohtc-map.js +21 -0
- package/app/get-account-code-map/cs-map.js +174 -0
- package/app/get-account-code-map/default-map.js +46 -0
- package/app/get-account-code-map/delinked-map.js +31 -0
- package/app/get-account-code-map/index.js +57 -0
- package/app/get-account-code-map/lump-sums-map.js +11 -0
- package/app/get-account-code-map/sfi-frps-map.js +15 -0
- package/app/get-account-code-map/vet-visits-map.js +11 -0
- package/app/get-scheme-batch-properties.js +9 -0
- package/app/get-scheme-properties.js +31 -0
- package/app/get-schemes.js +12 -0
- package/app/scheme-does-not-require-ppas.js +9 -0
- package/app/scheme-provides-accounting-values.js +9 -0
- package/azure-pipelines.yml +45 -0
- package/eslint.config.js +3 -0
- package/index.js +21 -0
- package/jest.config.js +40 -0
- package/jest.setup.js +2 -0
- package/package.json +34 -0
- package/sonar-project.properties +3 -0
- package/test/unit/create-invoice-number/create-default-invoice-number.test.js +15 -0
- package/test/unit/create-invoice-number/create-es-invoice-number.test.js +10 -0
- package/test/unit/create-invoice-number/create-imps-invoice-number.test.js +27 -0
- package/test/unit/create-invoice-number/create-siti-agri-invoice-number.test.js +26 -0
- package/test/unit/create-invoice-number/create-standard-scheme-invoice-number.test.js +31 -0
- package/test/unit/create-invoice-number/index.test.js +113 -0
- package/test/unit/create-invoice-number/use-invoice-number-as-is.test.js +9 -0
- package/test/unit/create-split-invoice-number/create-default-invoice-number.test.js +15 -0
- package/test/unit/create-split-invoice-number/create-siti-agri-invoice-number.test.js +15 -0
- package/test/unit/create-split-invoice-number/index.test.js +34 -0
- package/test/unit/get-account-code-map/bps-map.test.js +58 -0
- package/test/unit/get-account-code-map/cohtc-map.test.js +32 -0
- package/test/unit/get-account-code-map/cs-map.test.js +62 -0
- package/test/unit/get-account-code-map/default-map.test.js +60 -0
- package/test/unit/get-account-code-map/delinked-map.test.js +42 -0
- package/test/unit/get-account-code-map/index.test.js +53 -0
- package/test/unit/get-account-code-map/lump-sums-map.test.js +16 -0
- package/test/unit/get-account-code-map/sfi-frps-map.test.js +31 -0
- package/test/unit/get-account-code-map/vet-visits-map.test.js +16 -0
- package/test/unit/get-scheme-batch-properties.test.js +16 -0
- package/test/unit/get-scheme-properties.test.js +54 -0
- package/test/unit/get-schemes.test.js +24 -0
- package/test/unit/scheme-does-not-require-ppas.test.js +17 -0
- package/test/unit/scheme-provides-accounting-values.test.js +17 -0
- package/test-output/cobertura-coverage.xml +577 -0
- package/test-output/junit.xml +589 -0
- package/test-output/lcov-report/base.css +224 -0
- package/test-output/lcov-report/block-navigation.js +87 -0
- package/test-output/lcov-report/favicon.png +0 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/account-codes/ap.js.html +229 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/account-codes/ar-admin.js.html +229 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/account-codes/ar-irregular.js.html +226 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/account-codes/index.html +146 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/delivery-bodies.js.html +103 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/description-codes.js.html +187 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/fund-codes.js.html +109 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/index.html +266 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/pillars.js.html +139 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/scheme-batch-properties.js.html +403 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/scheme-ids.js.html +142 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/scheme-names.js.html +142 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/schemes-not-requiring-ppas.js.html +94 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/schemes-providing-account-values.js.html +94 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/schemes.js.html +466 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/constants/source-systems.js.html +142 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/create-default-invoice-number.js.html +118 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/create-es-invoice-number.js.html +106 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/create-imps-invoice-number.js.html +127 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/create-siti-agri-invoice-number.js.html +121 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/create-standard-scheme-invoice-number.js.html +121 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/index.html +206 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/index.js.html +199 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-invoice-number/use-invoice-number-as-is.js.html +106 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-split-invoice-number/create-default-invoice-number.js.html +121 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-split-invoice-number/create-siti-agri-invoice-number.js.html +121 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-split-invoice-number/index.html +146 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/create-split-invoice-number/index.js.html +148 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/bps-map.js.html +508 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/cohtc-map.js.html +148 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/cs-map.js.html +607 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/default-map.js.html +223 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/delinked-map.js.html +178 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/index.html +236 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/index.js.html +256 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/lump-sums-map.js.html +118 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/sfi-frps-map.js.html +130 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-account-code-map/vet-visits-map.js.html +118 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-scheme-batch-properties.js.html +112 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-scheme-properties.js.html +178 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/get-schemes.js.html +121 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/index.html +176 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/scheme-does-not-require-ppas.js.html +112 -0
- package/test-output/lcov-report/ffc-pay-schemes/app/scheme-provides-accounting-values.js.html +112 -0
- package/test-output/lcov-report/ffc-pay-schemes/index.html +116 -0
- package/test-output/lcov-report/ffc-pay-schemes/index.js.html +148 -0
- package/test-output/lcov-report/index.html +206 -0
- package/test-output/lcov-report/prettify.css +1 -0
- package/test-output/lcov-report/prettify.js +2 -0
- package/test-output/lcov-report/sort-arrow-sprite.png +0 -0
- package/test-output/lcov-report/sorter.js +210 -0
- package/test-output/lcov.info +644 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for ffc-pay-schemes/app/create-split-invoice-number/create-siti-agri-invoice-number.js</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">ffc-pay-schemes/app/create-split-invoice-number</a> create-siti-agri-invoice-number.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>6/6</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/0</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>6/6</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
79
|
+
<span class="cline-any cline-neutral"> </span>
|
|
80
|
+
<span class="cline-any cline-neutral"> </span>
|
|
81
|
+
<span class="cline-any cline-yes">15x</span>
|
|
82
|
+
<span class="cline-any cline-yes">15x</span>
|
|
83
|
+
<span class="cline-any cline-yes">15x</span>
|
|
84
|
+
<span class="cline-any cline-yes">15x</span>
|
|
85
|
+
<span class="cline-any cline-neutral"> </span>
|
|
86
|
+
<span class="cline-any cline-neutral"> </span>
|
|
87
|
+
<span class="cline-any cline-yes">2x</span>
|
|
88
|
+
<span class="cline-any cline-neutral"> </span>
|
|
89
|
+
<span class="cline-any cline-neutral"> </span>
|
|
90
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const createSitiAgriInvoiceNumber = (invoiceNumber, splitId) => {
|
|
91
|
+
// an invoice number is a string made up of three elements, to inject a split id character into the string we need to identify the position of those elements
|
|
92
|
+
// we also need to trim the first character of the final element
|
|
93
|
+
const firstElementLength = 8
|
|
94
|
+
const originalFinalElementLength = 3
|
|
95
|
+
const newFinalElementLength = 2
|
|
96
|
+
return `${invoiceNumber.slice(0, firstElementLength)}${splitId}${invoiceNumber.slice(firstElementLength, invoiceNumber.length - originalFinalElementLength)}${invoiceNumber.slice(invoiceNumber.length - newFinalElementLength)}`
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
module.exports = {
|
|
100
|
+
createSitiAgriInvoiceNumber
|
|
101
|
+
}
|
|
102
|
+
</pre></td></tr></table></pre>
|
|
103
|
+
|
|
104
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
105
|
+
</div><!-- /wrapper -->
|
|
106
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
107
|
+
Code coverage generated by
|
|
108
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
109
|
+
at 2026-08-26T13:17:49.616Z
|
|
110
|
+
</div>
|
|
111
|
+
<script src="../../../prettify.js"></script>
|
|
112
|
+
<script>
|
|
113
|
+
window.onload = function () {
|
|
114
|
+
prettyPrint();
|
|
115
|
+
};
|
|
116
|
+
</script>
|
|
117
|
+
<script src="../../../sorter.js"></script>
|
|
118
|
+
<script src="../../../block-navigation.js"></script>
|
|
119
|
+
</body>
|
|
120
|
+
</html>
|
|
121
|
+
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for ffc-pay-schemes/app/create-split-invoice-number</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> ffc-pay-schemes/app/create-split-invoice-number</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>20/20</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>7/7</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>3/3</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>20/20</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<div class="pad1">
|
|
66
|
+
<table class="coverage-summary">
|
|
67
|
+
<thead>
|
|
68
|
+
<tr>
|
|
69
|
+
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
+
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
+
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
+
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
+
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
+
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
+
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
+
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
+
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
+
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
+
</tr>
|
|
80
|
+
</thead>
|
|
81
|
+
<tbody><tr>
|
|
82
|
+
<td class="file high" data-value="create-default-invoice-number.js"><a href="create-default-invoice-number.js.html">create-default-invoice-number.js</a></td>
|
|
83
|
+
<td data-value="100" class="pic high">
|
|
84
|
+
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
85
|
+
</td>
|
|
86
|
+
<td data-value="100" class="pct high">100%</td>
|
|
87
|
+
<td data-value="6" class="abs high">6/6</td>
|
|
88
|
+
<td data-value="100" class="pct high">100%</td>
|
|
89
|
+
<td data-value="0" class="abs high">0/0</td>
|
|
90
|
+
<td data-value="100" class="pct high">100%</td>
|
|
91
|
+
<td data-value="1" class="abs high">1/1</td>
|
|
92
|
+
<td data-value="100" class="pct high">100%</td>
|
|
93
|
+
<td data-value="6" class="abs high">6/6</td>
|
|
94
|
+
</tr>
|
|
95
|
+
|
|
96
|
+
<tr>
|
|
97
|
+
<td class="file high" data-value="create-siti-agri-invoice-number.js"><a href="create-siti-agri-invoice-number.js.html">create-siti-agri-invoice-number.js</a></td>
|
|
98
|
+
<td data-value="100" class="pic high">
|
|
99
|
+
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
100
|
+
</td>
|
|
101
|
+
<td data-value="100" class="pct high">100%</td>
|
|
102
|
+
<td data-value="6" class="abs high">6/6</td>
|
|
103
|
+
<td data-value="100" class="pct high">100%</td>
|
|
104
|
+
<td data-value="0" class="abs high">0/0</td>
|
|
105
|
+
<td data-value="100" class="pct high">100%</td>
|
|
106
|
+
<td data-value="1" class="abs high">1/1</td>
|
|
107
|
+
<td data-value="100" class="pct high">100%</td>
|
|
108
|
+
<td data-value="6" class="abs high">6/6</td>
|
|
109
|
+
</tr>
|
|
110
|
+
|
|
111
|
+
<tr>
|
|
112
|
+
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
|
|
113
|
+
<td data-value="100" class="pic high">
|
|
114
|
+
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
115
|
+
</td>
|
|
116
|
+
<td data-value="100" class="pct high">100%</td>
|
|
117
|
+
<td data-value="8" class="abs high">8/8</td>
|
|
118
|
+
<td data-value="100" class="pct high">100%</td>
|
|
119
|
+
<td data-value="7" class="abs high">7/7</td>
|
|
120
|
+
<td data-value="100" class="pct high">100%</td>
|
|
121
|
+
<td data-value="1" class="abs high">1/1</td>
|
|
122
|
+
<td data-value="100" class="pct high">100%</td>
|
|
123
|
+
<td data-value="8" class="abs high">8/8</td>
|
|
124
|
+
</tr>
|
|
125
|
+
|
|
126
|
+
</tbody>
|
|
127
|
+
</table>
|
|
128
|
+
</div>
|
|
129
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
130
|
+
</div><!-- /wrapper -->
|
|
131
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
|
+
Code coverage generated by
|
|
133
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
+
at 2026-08-26T13:17:49.616Z
|
|
135
|
+
</div>
|
|
136
|
+
<script src="../../../prettify.js"></script>
|
|
137
|
+
<script>
|
|
138
|
+
window.onload = function () {
|
|
139
|
+
prettyPrint();
|
|
140
|
+
};
|
|
141
|
+
</script>
|
|
142
|
+
<script src="../../../sorter.js"></script>
|
|
143
|
+
<script src="../../../block-navigation.js"></script>
|
|
144
|
+
</body>
|
|
145
|
+
</html>
|
|
146
|
+
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for ffc-pay-schemes/app/create-split-invoice-number/index.js</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">ffc-pay-schemes/app/create-split-invoice-number</a> index.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>8/8</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>7/7</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>8/8</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
88
|
+
<span class="cline-any cline-yes">1x</span>
|
|
89
|
+
<span class="cline-any cline-yes">1x</span>
|
|
90
|
+
<span class="cline-any cline-neutral"> </span>
|
|
91
|
+
<span class="cline-any cline-yes">1x</span>
|
|
92
|
+
<span class="cline-any cline-yes">18x</span>
|
|
93
|
+
<span class="cline-any cline-neutral"> </span>
|
|
94
|
+
<span class="cline-any cline-neutral"> </span>
|
|
95
|
+
<span class="cline-any cline-neutral"> </span>
|
|
96
|
+
<span class="cline-any cline-neutral"> </span>
|
|
97
|
+
<span class="cline-any cline-neutral"> </span>
|
|
98
|
+
<span class="cline-any cline-neutral"> </span>
|
|
99
|
+
<span class="cline-any cline-yes">6x</span>
|
|
100
|
+
<span class="cline-any cline-neutral"> </span>
|
|
101
|
+
<span class="cline-any cline-yes">12x</span>
|
|
102
|
+
<span class="cline-any cline-neutral"> </span>
|
|
103
|
+
<span class="cline-any cline-neutral"> </span>
|
|
104
|
+
<span class="cline-any cline-neutral"> </span>
|
|
105
|
+
<span class="cline-any cline-yes">1x</span>
|
|
106
|
+
<span class="cline-any cline-neutral"> </span>
|
|
107
|
+
<span class="cline-any cline-neutral"> </span>
|
|
108
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const { SFI, LUMP_SUMS, SFI_PILOT, SFI23, DELINKED, SFI_EXPANDED } = require('../constants/scheme-ids')
|
|
109
|
+
const { createDefaultInvoiceNumber } = require('./create-default-invoice-number')
|
|
110
|
+
const { createSitiAgriInvoiceNumber } = require('./create-siti-agri-invoice-number')
|
|
111
|
+
|
|
112
|
+
const createSplitInvoiceNumber = (invoiceNumber, splitId, schemeId) => {
|
|
113
|
+
switch (schemeId) {
|
|
114
|
+
case SFI:
|
|
115
|
+
case SFI_PILOT:
|
|
116
|
+
case LUMP_SUMS:
|
|
117
|
+
case SFI23:
|
|
118
|
+
case DELINKED:
|
|
119
|
+
case SFI_EXPANDED:
|
|
120
|
+
return createSitiAgriInvoiceNumber(invoiceNumber, splitId)
|
|
121
|
+
default:
|
|
122
|
+
return createDefaultInvoiceNumber(invoiceNumber, splitId)
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
module.exports = {
|
|
127
|
+
createSplitInvoiceNumber
|
|
128
|
+
}
|
|
129
|
+
</pre></td></tr></table></pre>
|
|
130
|
+
|
|
131
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
132
|
+
</div><!-- /wrapper -->
|
|
133
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
134
|
+
Code coverage generated by
|
|
135
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
136
|
+
at 2026-08-26T13:17:49.616Z
|
|
137
|
+
</div>
|
|
138
|
+
<script src="../../../prettify.js"></script>
|
|
139
|
+
<script>
|
|
140
|
+
window.onload = function () {
|
|
141
|
+
prettyPrint();
|
|
142
|
+
};
|
|
143
|
+
</script>
|
|
144
|
+
<script src="../../../sorter.js"></script>
|
|
145
|
+
<script src="../../../block-navigation.js"></script>
|
|
146
|
+
</body>
|
|
147
|
+
</html>
|
|
148
|
+
|