makeapps-transformer 1.0.1 → 1.0.2
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.
|
@@ -7,17 +7,19 @@ exports.generateDodatkoweInformacje = generateDodatkoweInformacje;
|
|
|
7
7
|
const PDF_functions_1 = require("../../../shared/PDF-functions");
|
|
8
8
|
const common_enum_1 = __importDefault(require("../../../shared/enums/common.enum"));
|
|
9
9
|
function generateDodatkoweInformacje(faVat) {
|
|
10
|
-
const
|
|
11
|
-
const tpLabel2 = [];
|
|
10
|
+
const tpLabel = [];
|
|
12
11
|
if ((0, PDF_functions_1.getValue)(faVat.TP) === '1') {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
tpLabel.push((0, PDF_functions_1.formatText)('- Istniejące powiązania między nabywcą a dokonującym dostawy towarów lub usługodawcą'));
|
|
13
|
+
}
|
|
14
|
+
const fpLabel = [];
|
|
15
|
+
if ((0, PDF_functions_1.getValue)(faVat.FP) === '1') {
|
|
16
|
+
fpLabel.push((0, PDF_functions_1.formatText)('- Faktura, o której mowa w art. 109 ust. 3d ustawy'));
|
|
15
17
|
}
|
|
16
18
|
const zwrotAkcyzyLabel = [];
|
|
17
19
|
if ((0, PDF_functions_1.getValue)(faVat.ZwrotAkcyzy) === '1') {
|
|
18
20
|
zwrotAkcyzyLabel.push((0, PDF_functions_1.formatText)('- Informacja dodatkowa związana ze zwrotem podatku akcyzowego zawartego w cenie oleju napędowego'));
|
|
19
21
|
}
|
|
20
|
-
const labels = [
|
|
22
|
+
const labels = [tpLabel, fpLabel, zwrotAkcyzyLabel].filter((el) => el.length > 0);
|
|
21
23
|
const table = [
|
|
22
24
|
...(0, PDF_functions_1.createHeader)('Dodatkowe informacje'),
|
|
23
25
|
...labels,
|
package/package.json
CHANGED
|
@@ -13,15 +13,20 @@ import { DodatkowyOpi, Fa } from '../../types/fa3.types';
|
|
|
13
13
|
import FormatTyp from '../../../shared/enums/common.enum';
|
|
14
14
|
|
|
15
15
|
export function generateDodatkoweInformacje(faVat: Fa): Content[] {
|
|
16
|
-
const
|
|
17
|
-
const tpLabel2: Content[] = [];
|
|
16
|
+
const tpLabel: Content[] = [];
|
|
18
17
|
|
|
19
18
|
if (getValue(faVat.TP) === '1') {
|
|
20
|
-
|
|
19
|
+
tpLabel.push(
|
|
21
20
|
formatText('- Istniejące powiązania między nabywcą a dokonującym dostawy towarów lub usługodawcą')
|
|
22
21
|
);
|
|
23
|
-
tpLabel2.push(formatText('- Faktura, o której mowa w art. 109 ust. 3d ustawy'));
|
|
24
22
|
}
|
|
23
|
+
|
|
24
|
+
const fpLabel: Content[] = [];
|
|
25
|
+
|
|
26
|
+
if (getValue(faVat.FP) === '1') {
|
|
27
|
+
fpLabel.push(formatText('- Faktura, o której mowa w art. 109 ust. 3d ustawy'));
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
const zwrotAkcyzyLabel: Content[] = [];
|
|
26
31
|
|
|
27
32
|
if (getValue(faVat.ZwrotAkcyzy) === '1') {
|
|
@@ -32,7 +37,7 @@ export function generateDodatkoweInformacje(faVat: Fa): Content[] {
|
|
|
32
37
|
);
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
const labels = [
|
|
40
|
+
const labels = [tpLabel, fpLabel, zwrotAkcyzyLabel].filter((el) => el.length > 0);
|
|
36
41
|
const table: Content[] = [
|
|
37
42
|
...createHeader('Dodatkowe informacje'),
|
|
38
43
|
...labels,
|
|
@@ -89,4 +94,4 @@ function generateDodatkowyOpis(fakturaZaliczkowaData: DodatkowyOpi[] | undefined
|
|
|
89
94
|
table.push(tableFakturaZaliczkowa.content);
|
|
90
95
|
}
|
|
91
96
|
return table;
|
|
92
|
-
}
|
|
97
|
+
}
|