@design.estate/dees-document 3.1.2 → 3.3.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/dist_bundle/bundle.js +528 -334
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts_shared/demoletter.js +2 -2
- package/dist_ts_shared/index.d.ts +3 -0
- package/dist_ts_shared/index.js +4 -1
- package/dist_ts_shared/paymentcode.d.ts +43 -0
- package/dist_ts_shared/paymentcode.js +85 -0
- package/dist_ts_shared/paymentreminder.d.ts +28 -0
- package/dist_ts_shared/paymentreminder.js +33 -0
- package/dist_ts_shared/translation.d.ts +49 -0
- package/dist_ts_shared/translation.js +97 -3
- package/dist_ts_shared/unitnames.d.ts +44 -0
- package/dist_ts_shared/unitnames.js +103 -0
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/contentinvoice.d.ts +89 -1
- package/dist_ts_web/elements/contentinvoice.js +580 -44
- package/dist_ts_web/elements/letterheader.d.ts +2 -0
- package/dist_ts_web/elements/letterheader.js +20 -1
- package/dist_ts_web/elements/paymentcode.d.ts +2 -0
- package/dist_ts_web/elements/paymentcode.js +23 -19
- package/package.json +5 -5
- package/readme.md +115 -4
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/contentinvoice.ts +713 -49
- package/ts_web/elements/letterheader.ts +28 -0
- package/ts_web/elements/paymentcode.ts +27 -26
|
@@ -22,6 +22,8 @@ export declare class DeLetterHeader extends DeesElement {
|
|
|
22
22
|
private get accountingDoc();
|
|
23
23
|
/** The number row, under the label of the document type. */
|
|
24
24
|
private renderDocumentNumber;
|
|
25
|
+
/** A reminder's number and, when the issuer counts its reminders, its level. */
|
|
26
|
+
private renderPaymentReminderNumber;
|
|
25
27
|
/** The period of performance row, gated like the number row. */
|
|
26
28
|
private renderPeriodOfPerformance;
|
|
27
29
|
render(): TemplateResult;
|
|
@@ -38,6 +38,7 @@ import { dedocumentSharedStyle } from "../style.js";
|
|
|
38
38
|
/** The label of the document number, per accounting document type. */
|
|
39
39
|
const documentNumberLabels = {
|
|
40
40
|
invoice: "letterhead@@invoice.number",
|
|
41
|
+
"corrected-invoice": "letterhead@@correctedInvoice.number",
|
|
41
42
|
creditnote: "letterhead@@creditnote.number",
|
|
42
43
|
debitnote: "letterhead@@debitnote.number",
|
|
43
44
|
"self-billed-invoice": "letterhead@@selfBilledInvoice.number",
|
|
@@ -167,6 +168,9 @@ let DeLetterHeader = (() => {
|
|
|
167
168
|
}
|
|
168
169
|
/** The number row, under the label of the document type. */
|
|
169
170
|
renderDocumentNumber() {
|
|
171
|
+
if (plugins.shared.isPaymentReminder(this.letterData)) {
|
|
172
|
+
return this.renderPaymentReminderNumber(this.letterData);
|
|
173
|
+
}
|
|
170
174
|
const accountingDoc = this.accountingDoc;
|
|
171
175
|
if (!accountingDoc?.id)
|
|
172
176
|
return null;
|
|
@@ -178,6 +182,21 @@ let DeLetterHeader = (() => {
|
|
|
178
182
|
</div>
|
|
179
183
|
${accountingDoc.id}`;
|
|
180
184
|
}
|
|
185
|
+
/** A reminder's number and, when the issuer counts its reminders, its level. */
|
|
186
|
+
renderPaymentReminderNumber(reminderArg) {
|
|
187
|
+
return html `${reminderArg.id
|
|
188
|
+
? html `<div class="label">
|
|
189
|
+
${plugins.shared.translation.translate(this.documentSettings.languageCode, "letterhead@@paymentReminder.number")}
|
|
190
|
+
</div>
|
|
191
|
+
${reminderArg.id}`
|
|
192
|
+
: null}
|
|
193
|
+
${reminderArg.reminderLevel !== undefined
|
|
194
|
+
? html `<div class="label">
|
|
195
|
+
${plugins.shared.translation.translate(this.documentSettings.languageCode, "letterhead@@paymentReminder.level")}
|
|
196
|
+
</div>
|
|
197
|
+
${reminderArg.reminderLevel}`
|
|
198
|
+
: null}`;
|
|
199
|
+
}
|
|
181
200
|
/** The period of performance row, gated like the number row. */
|
|
182
201
|
renderPeriodOfPerformance() {
|
|
183
202
|
const periodOfPerformance = this.accountingDoc?.periodOfPerformance;
|
|
@@ -254,4 +273,4 @@ let DeLetterHeader = (() => {
|
|
|
254
273
|
return DeLetterHeader = _classThis;
|
|
255
274
|
})();
|
|
256
275
|
export { DeLetterHeader };
|
|
257
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
276
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGV0dGVyaGVhZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfd2ViL2VsZW1lbnRzL2xldHRlcmhlYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUNMLFdBQVcsRUFDWCxRQUFRLEVBQ1IsSUFBSSxFQUNKLGFBQWEsRUFFYixHQUFHLEVBQ0gsU0FBUyxFQUNULFFBQVEsR0FDVCxNQUFNLDZCQUE2QixDQUFDO0FBRXJDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQVFwRCxzRUFBc0U7QUFDdEUsTUFBTSxvQkFBb0IsR0FHdEI7SUFDRixPQUFPLEVBQUUsNEJBQTRCO0lBQ3JDLG1CQUFtQixFQUFFLHFDQUFxQztJQUMxRCxVQUFVLEVBQUUsK0JBQStCO0lBQzNDLFNBQVMsRUFBRSw4QkFBOEI7SUFDekMscUJBQXFCLEVBQUUsc0NBQXNDO0NBQzlELENBQUM7SUFHVyxjQUFjOzRCQUQxQixhQUFhLENBQUMseUJBQXlCLENBQUM7Ozs7c0JBQ0wsV0FBVzs7Ozs7Ozs7Ozs7Ozs4QkFBbkIsU0FBUSxXQUFXOzs7O3NDQVE1QyxRQUFRLENBQUM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E9BQU8sQ0FBQyxPQUFPOzs7O1VBSXBDLElBQUksQ0FBQyxVQUFVLENBQUMsRUFBRSxDQUFDLGNBQWM7Z0JBQ2pDLENBQUMsQ0FBQyxJQUFJLENBQUE7a0JBQ0UsT0FBTyxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsU0FBUyxDQUNwQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsWUFBWSxFQUNsQyw2QkFBNkIsQ0FDOUI7O2dCQUVELElBQUksQ0FBQyxVQUFVLENBQUMsRUFBRSxDQUFDLGNBQWMsRUFBRTtnQkFDekMsQ0FBQyxDQUFDLElBQUk7VUFDTixJQUFJLENBQUMsVUFBVSxDQUFDLEVBQUUsQ0FBQyxtQkFBbUIsRUFBRSxLQUFLO2dCQUM3QyxDQUFDLENBQUMsSUFBSSxDQUFBO2tCQUNFLE9BQU8sQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFDLFNBQVMsQ0FDcEMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLFlBQVksRUFDbEMsd0JBQXdCLENBQ3pCOztnQkFFRCxJQUFJLENBQUMsVUFBVSxDQUFDLEVBQUUsQ0FBQyxtQkFBbUIsQ0FBQyxLQUFLLEVBQUU7Z0JBQ3BELENBQUMsQ0FBQyxJQUFJOzs7VUFHTixJQUFJLENBQUMsb0JBQW9CLEVBQUUsSUFBSSxJQUFJLENBQUMseUJBQXlCLEVBQUU7O0tBRXBFLENBQUM7UUFDSixDQUFDOztZQTdOVSx1REFBYzs7Ozs7U0FBZCxjQUFjIn0=
|
|
@@ -13,6 +13,8 @@ export declare class DedocumentPaymentCode extends DeesElement {
|
|
|
13
13
|
accessor currency: string;
|
|
14
14
|
accessor totalGross: number;
|
|
15
15
|
accessor reference: string;
|
|
16
|
+
/** The EPC QR code content, or null when the payment has no valid code (see buildEpcQrPayload). */
|
|
17
|
+
private get payload();
|
|
16
18
|
private updateQRCode;
|
|
17
19
|
update(changedProperties: Parameters<DeesElement["update"]>[0]): void;
|
|
18
20
|
render(): TemplateResult | null;
|
|
@@ -118,19 +118,29 @@ let DedocumentPaymentCode = (() => {
|
|
|
118
118
|
#reference_accessor_storage = (__runInitializers(this, _totalGross_extraInitializers), __runInitializers(this, _reference_initializers, void 0));
|
|
119
119
|
get reference() { return this.#reference_accessor_storage; }
|
|
120
120
|
set reference(value) { this.#reference_accessor_storage = value; }
|
|
121
|
+
/** The EPC QR code content, or null when the payment has no valid code (see buildEpcQrPayload). */
|
|
122
|
+
get payload() {
|
|
123
|
+
if (typeof this.name !== "string" ||
|
|
124
|
+
typeof this.iban !== "string" ||
|
|
125
|
+
typeof this.currency !== "string" ||
|
|
126
|
+
typeof this.totalGross !== "number" ||
|
|
127
|
+
typeof this.reference !== "string") {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
return plugins.shared.buildEpcQrPayload({
|
|
131
|
+
bic: typeof this.bic === "string" ? this.bic : undefined,
|
|
132
|
+
name: this.name,
|
|
133
|
+
iban: this.iban,
|
|
134
|
+
currency: this.currency,
|
|
135
|
+
amount: this.totalGross,
|
|
136
|
+
remittanceInformation: this.reference,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
121
139
|
updateQRCode() {
|
|
122
|
-
|
|
140
|
+
const payload = this.payload;
|
|
141
|
+
if (!this.canvasEl || payload === null)
|
|
123
142
|
return;
|
|
124
|
-
plugins.qrcode.toCanvas(this.canvasEl,
|
|
125
|
-
001
|
|
126
|
-
1
|
|
127
|
-
SCT
|
|
128
|
-
${this.bic}
|
|
129
|
-
${this.name}
|
|
130
|
-
${this.iban}
|
|
131
|
-
${this.currency}${this.totalGross?.toFixed?.(2)}
|
|
132
|
-
|
|
133
|
-
${this.reference}`, (error) => {
|
|
143
|
+
plugins.qrcode.toCanvas(this.canvasEl, payload, (error) => {
|
|
134
144
|
if (error)
|
|
135
145
|
console.error(error);
|
|
136
146
|
});
|
|
@@ -140,13 +150,7 @@ ${this.reference}`, (error) => {
|
|
|
140
150
|
this.updateQRCode();
|
|
141
151
|
}
|
|
142
152
|
render() {
|
|
143
|
-
|
|
144
|
-
typeof this.name === "string" &&
|
|
145
|
-
typeof this.iban === "string" &&
|
|
146
|
-
typeof this.currency === "string" &&
|
|
147
|
-
typeof this.totalGross === "number" &&
|
|
148
|
-
typeof this.reference === "string";
|
|
149
|
-
return allDataAvailable ? html `<canvas></canvas>` : null;
|
|
153
|
+
return this.payload === null ? null : html `<canvas></canvas>`;
|
|
150
154
|
}
|
|
151
155
|
constructor() {
|
|
152
156
|
super(...arguments);
|
|
@@ -159,4 +163,4 @@ ${this.reference}`, (error) => {
|
|
|
159
163
|
return DedocumentPaymentCode = _classThis;
|
|
160
164
|
})();
|
|
161
165
|
export { DedocumentPaymentCode };
|
|
162
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
166
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF5bWVudGNvZGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c193ZWIvZWxlbWVudHMvcGF5bWVudGNvZGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLE9BQU8sRUFDTCxHQUFHLEVBQ0gsYUFBYSxFQUNiLFdBQVcsRUFDWCxJQUFJLEVBQ0osUUFBUSxFQUNSLEtBQUssR0FFTixNQUFNLDZCQUE2QixDQUFDO0FBQ3JDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0lBUzVCLHFCQUFxQjs0QkFEakMsYUFBYSxDQUFDLHdCQUF3QixDQUFDOzs7O3NCQUNHLFdBQVc7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7cUNBQW5CLFNBQVEsV0FBVzs7OztvQ0FnQm5ELEtBQUssQ0FBQyxRQUFRLENBQUM7K0JBR2YsUUFBUSxFQUFFO2dDQUdWLFFBQ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FBQVEsRUFBRSxPQUFPLEVBQUUsQ0FBQyxLQUFLLEVBQUUsRUFBRTtnQkFDeEQsSUFBSSxLQUFLO29CQUFFLE9BQU8sQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7WUFDbEMsQ0FBQyxDQUFDLENBQUM7UUFDTCxDQUFDO1FBRWUsTUFBTSxDQUNwQixpQkFBdUQ7WUFFdkQsS0FBSyxDQUFDLE1BQU0sQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDO1lBQ2hDLElBQUksQ0FBQyxZQUFZLEVBQUUsQ0FBQztRQUN0QixDQUFDO1FBRU0sTUFBTTtZQUNYLE9BQU8sSUFBSSxDQUFDLE9BQU8sS0FBSyxJQUFJLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFBLG1CQUFtQixDQUFDO1FBQ2hFLENBQUM7Ozs7OztZQTVFVSx1REFBcUI7Ozs7O1NBQXJCLHFCQUFxQiJ9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design.estate/dees-document",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A sophisticated framework for dynamically generating and rendering business documents like invoices with modern web technologies, featuring PDF creation, templating, and automation.",
|
|
6
6
|
"main": "dist_ts_web/index.js",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@push.rocks/smartpath": "^6.0.0",
|
|
26
26
|
"@push.rocks/smartpdf": "^5.0.2",
|
|
27
27
|
"@push.rocks/smarttime": "^4.2.3",
|
|
28
|
-
"@tsclass/tsclass": "^9.
|
|
28
|
+
"@tsclass/tsclass": "^9.8.0",
|
|
29
29
|
"@types/qrcode": "^1.5.6",
|
|
30
30
|
"qrcode": "^1.5.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@git.zone/tsbuild": "^
|
|
34
|
-
"@git.zone/tsbundle": "^2.
|
|
33
|
+
"@git.zone/tsbuild": "^5.0.0",
|
|
34
|
+
"@git.zone/tsbundle": "^2.15.0",
|
|
35
35
|
"@git.zone/tsrun": "^3.0.0",
|
|
36
36
|
"@git.zone/tstest": "^6.2.0",
|
|
37
|
-
"@git.zone/tswatch": "^
|
|
37
|
+
"@git.zone/tswatch": "^4.0.1",
|
|
38
38
|
"@types/node": "^26.6.1"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
package/readme.md
CHANGED
|
@@ -99,7 +99,7 @@ const invoice: finance.TInvoice = {
|
|
|
99
99
|
name: 'Web Development Services',
|
|
100
100
|
unitQuantity: 40,
|
|
101
101
|
unitNetPrice: 95,
|
|
102
|
-
unitType: '
|
|
102
|
+
unitType: 'HUR', // UN/ECE Recommendation 20: hour
|
|
103
103
|
vatPercentage: 19,
|
|
104
104
|
position: 1,
|
|
105
105
|
},
|
|
@@ -107,7 +107,7 @@ const invoice: finance.TInvoice = {
|
|
|
107
107
|
name: 'Hosting (Annual)',
|
|
108
108
|
unitQuantity: 1,
|
|
109
109
|
unitNetPrice: 299,
|
|
110
|
-
unitType: '
|
|
110
|
+
unitType: 'ANN', // UN/ECE Recommendation 20: year
|
|
111
111
|
vatPercentage: 19,
|
|
112
112
|
position: 2,
|
|
113
113
|
},
|
|
@@ -222,7 +222,7 @@ import { PdfService } from '@design.estate/dees-document/node';
|
|
|
222
222
|
import '@design.estate/dees-document/web';
|
|
223
223
|
|
|
224
224
|
// Shared utilities and types
|
|
225
|
-
import { isAccountingDoc, translation, interfaces } from '@design.estate/dees-document/shared';
|
|
225
|
+
import { isAccountingDoc, isPaymentReminder, translation, unitName, interfaces } from '@design.estate/dees-document/shared';
|
|
226
226
|
|
|
227
227
|
// TypeScript interfaces
|
|
228
228
|
import type { IDocumentSettings } from '@design.estate/dees-document/interfaces';
|
|
@@ -251,13 +251,14 @@ The framework includes these web components:
|
|
|
251
251
|
| `accountingDocType` | Intro sentence | Payment terms and QR pay box | `relatedDocuments` |
|
|
252
252
|
|---------------------|----------------|------------------------------|--------------------|
|
|
253
253
|
| `invoice` | invoices the positions | printed | not printed |
|
|
254
|
+
| `corrected-invoice` | invoices the positions, after the correction block | printed | not printed: the corrected invoice is named in the correction block |
|
|
254
255
|
| `creditnote` | credits the positions | omitted: the recipient owes nothing | printed |
|
|
255
256
|
| `debitnote` | charges the positions additionally | printed | printed |
|
|
256
257
|
| `self-billed-invoice` | settles what the recipient supplied | omitted: the issuer is the payer | not printed |
|
|
257
258
|
|
|
258
259
|
### Handing an accounting document over
|
|
259
260
|
|
|
260
|
-
Every accounting document is a letter: from `@tsclass/tsclass` 9.6.0 on, `business.TLetter` is a simple letter or any `finance.TAccountingDoc
|
|
261
|
+
Every accounting document is a letter: from `@tsclass/tsclass` 9.6.0 on, `business.TLetter` is a simple letter or any `finance.TAccountingDoc`, and from 9.7.0 on a payment reminder as well (see [Payment Reminders](#payment-reminders)). A credit note therefore goes straight into `PdfService.createPdfFromLetterObject()`, into `<dedocument-dedocument>` and into `<dedocument-viewer>` — no cast on the way in. A credit note names the document it corrects, so fill `relatedDocuments` with the number and, when known, the issue date of that document:
|
|
261
262
|
|
|
262
263
|
```typescript
|
|
263
264
|
import { PdfService } from '@design.estate/dees-document';
|
|
@@ -305,6 +306,29 @@ if (isAccountingDoc(letter)) {
|
|
|
305
306
|
|
|
306
307
|
A letter that is no accounting document prints neither a number, nor a period of performance, nor payment terms and the QR pay box. It is still laid out as an invoice: the invoice intro sentence and an empty positions table with zero sums are printed. Rendering simple-letter content is not supported by this version.
|
|
307
308
|
|
|
309
|
+
### Corrected invoices
|
|
310
|
+
|
|
311
|
+
An invoice that lacked a mandatory detail or stated one incorrectly is corrected by a document that refers to it specifically and unambiguously (§ 31 Abs. 5 UStDV). `finance.TCorrectedInvoice` (`accountingDocType: 'corrected-invoice'`, from `@tsclass/tsclass` 9.8.0 on; UNTDID 1001 code 384) is that document, and it prints as a complete invoice: every position, the totals, the payment terms and the QR pay box. The letterhead labels its number "Rechnungsberichtigung Nr." / "Corrected invoice number", and above the positions it prints:
|
|
312
|
+
|
|
313
|
+
- the title with the reference: "Rechnungsberichtigung zur Rechnung Nr. RE-2025-0042 vom 10.01.25" / "Corrected invoice for invoice no. RE-2025-0042 of 1/10/25", from `correctedInvoice.documentId` and `correctedInvoice.issueDate`;
|
|
314
|
+
- "Berichtigte Angaben:" / "Corrected details:" and one line per entry of `corrections`: the detail of § 14 Abs. 4 Satz 1 Nr. 1 to 9 UStG (or § 14a UStG) in words, and whether it was supplied ("ergänzt", `defect: 'missing'`) or corrected ("berichtigt", `defect: 'incorrect'`).
|
|
315
|
+
|
|
316
|
+
A corrected invoice you issue states both. A received one may state neither, or the number without the date; then only the title, or the title with the number, is printed, and no reference is made up.
|
|
317
|
+
|
|
318
|
+
```typescript
|
|
319
|
+
const correctedInvoice: finance.TCorrectedInvoice = {
|
|
320
|
+
...invoice, // a complete invoice with its own number
|
|
321
|
+
accountingDocType: 'corrected-invoice',
|
|
322
|
+
accountingDocId: 'RE-2025-0043',
|
|
323
|
+
id: 'RE-2025-0043',
|
|
324
|
+
correctedInvoice: { documentId: 'RE-2025-0042', issueDate },
|
|
325
|
+
corrections: [
|
|
326
|
+
{ detail: 'supplier-tax-number', defect: 'missing' },
|
|
327
|
+
{ detail: 'tax', defect: 'incorrect' },
|
|
328
|
+
],
|
|
329
|
+
};
|
|
330
|
+
```
|
|
331
|
+
|
|
308
332
|
### Notes
|
|
309
333
|
|
|
310
334
|
Every accounting document type prints `notes` below the totals and above the payment terms: each non-empty note as its own paragraph, in array order. A note is plain text. Its line breaks are kept, markup is printed as typed, and empty or whitespace-only notes are skipped. A long note flows across pages like the positions do.
|
|
@@ -319,6 +343,93 @@ const invoice = {
|
|
|
319
343
|
};
|
|
320
344
|
```
|
|
321
345
|
|
|
346
|
+
### Units
|
|
347
|
+
|
|
348
|
+
A position's `unitType` is the unit code of EN 16931 (BT-130): a code of UN/ECE Recommendation 20, or of Recommendation 21 with the prefix `X` (business rule BR-CL-23). An invoice states the quantity and the unit in words its reader understands (§ 14 Abs. 4 Satz 1 Nr. 5 UStG), so the positions print the unit's name in the document's language instead of the code, in the singular for a quantity of one and in the plural for any other quantity:
|
|
349
|
+
|
|
350
|
+
| Code | English | German |
|
|
351
|
+
|------|---------|--------|
|
|
352
|
+
| `C62` | unit / units | Einheit / Einheiten |
|
|
353
|
+
| `H87`, `XPP` | piece / pieces | Stück |
|
|
354
|
+
| `PR` | pair / pairs | Paar |
|
|
355
|
+
| `E48` | service unit / service units | Leistungseinheit / Leistungseinheiten |
|
|
356
|
+
| `LS` | lump sum / lump sums | Pauschale / Pauschalen |
|
|
357
|
+
| `MIN` | minute / minutes | Minute / Minuten |
|
|
358
|
+
| `HUR` | hour / hours | Stunde / Stunden |
|
|
359
|
+
| `DAY` | day / days | Tag / Tage |
|
|
360
|
+
| `WEE` | week / weeks | Woche / Wochen |
|
|
361
|
+
| `MON` | month / months | Monat / Monate |
|
|
362
|
+
| `ANN` | year / years | Jahr / Jahre |
|
|
363
|
+
| `GRM` | gram / grams | Gramm |
|
|
364
|
+
| `KGM` | kilogram / kilograms | Kilogramm |
|
|
365
|
+
| `TNE` | tonne / tonnes | Tonne / Tonnen |
|
|
366
|
+
| `MTR` | metre / metres | Meter |
|
|
367
|
+
| `KMT` | kilometre / kilometres | Kilometer |
|
|
368
|
+
| `MTK` | square metre / square metres | Quadratmeter |
|
|
369
|
+
| `MTQ` | cubic metre / cubic metres | Kubikmeter |
|
|
370
|
+
| `LTR` | litre / litres | Liter |
|
|
371
|
+
| `KWH` | kilowatt hour / kilowatt hours | Kilowattstunde / Kilowattstunden |
|
|
372
|
+
|
|
373
|
+
The English names are those of the Recommendations; `C62`, whose Recommendation 20 name is "one", takes its synonym "unit". A language without names of its own prints the English ones, as it does every other word. A code the table does not name prints as the code, and a unit given as a word, as documents written before the codes carry it (`'hours'`), prints as it is. The unit column is as wide as its widest name. `unitName()` on `@design.estate/dees-document/shared` returns what a position prints:
|
|
374
|
+
|
|
375
|
+
```typescript
|
|
376
|
+
import { unitName } from '@design.estate/dees-document/shared';
|
|
377
|
+
|
|
378
|
+
unitName('DE', 'HUR', 2.5); // "Stunden"
|
|
379
|
+
unitName('EN', 'HUR', 1); // "hour"
|
|
380
|
+
unitName('DE', 'SET', 2); // "SET" — a valid code without a name here
|
|
381
|
+
unitName('DE', 'hours', 2); // "hours" — a word is printed as it is
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Tax statements
|
|
385
|
+
|
|
386
|
+
- **Reverse charge**: a document with `reverseCharge: true` prints "Steuerschuldnerschaft des Leistungsempfängers" in every language: the words § 14a Abs. 5 UStG requires for a domestic supply whose recipient owes the tax under § 13b UStG, and § 14a Abs. 1 UStG for a supply in another member state whose recipient owes the tax there, such as a business-to-business service under Art. 196 of the VAT Directive (2006/112/EC). A document in English adds the line "Reverse charge", the words of Art. 226 Nr. 11a of the VAT Directive.
|
|
387
|
+
- **Exemption reference** (§ 14 Abs. 4 Nr. 8 UStG): pass it as a note, for example `'Steuerfreie innergemeinschaftliche Lieferung nach § 4 Nr. 1 Buchst. b i. V. m. § 6a UStG.'`; it prints below the totals like every note. Do not set `reverseCharge` for a tax-exempt intra-Community supply of goods (§ 4 Nr. 1 Buchst. b, § 6a UStG): it is exempt, not reverse charge, so it takes the exemption reference as a note instead.
|
|
388
|
+
|
|
389
|
+
### QR pay box
|
|
390
|
+
|
|
391
|
+
A document that asks for payment prints a SEPA credit transfer QR code (EPC QR code, EPC069-12) for its gross total to the sender's IBAN, with the document number as the remittance information (the free-text field, not the creditor-reference field, which only takes an `RF` reference). The code carries euros only, so the box is omitted for another currency, for a total below 0.01 or above 999,999,999.99, and when the sender has no IBAN. Without a BIC the code uses version 002, which makes the BIC optional. Nothing follows the last filled line, and a line break inside the name or the remittance information becomes a space. The name is cut to the code's 70 characters and the remittance information to 140, at whole grapheme clusters. The code holds at most 331 bytes: text of multi-byte characters that would exceed them cuts the remittance information further; when no remittance information would be left, or the other lines alone exceed 331 bytes, no code is built and the box is omitted. `buildEpcQrPayload()` on `@design.estate/dees-document/shared` returns the code's content, or `null` when no valid code exists.
|
|
392
|
+
|
|
393
|
+
## Payment Reminders
|
|
394
|
+
|
|
395
|
+
A payment reminder (`finance.TPaymentReminder`, letter type `'payment-reminder'`, from `@tsclass/tsclass` 9.7.0 on) is a letter like any other, so it goes into `PdfService.createPdfFromLetterObject()`, `<dedocument-dedocument>` and `<dedocument-viewer>` as it is. It is no accounting document: it has no positions and no VAT. It prints what its data states and computes nothing beyond the sums and the deadline:
|
|
396
|
+
|
|
397
|
+
- **Letterhead**: the reminder number (`id`) and, when set, the reminder level (`reminderLevel`).
|
|
398
|
+
- **Intro**: `topText` when the reminder has one, otherwise a standard sentence.
|
|
399
|
+
- **Ground of the claim**: one row per claim with the kind (invoice, corrected invoice or debit note) and number of the reminded document, its issue date, its due date when it stated one, its gross total and the amount still open.
|
|
400
|
+
- **Charges**, when there are any: each with its `description` and amount and what it rests on. Default interest prints its computation as stated: principal, rate a year, base rate plus the surcharge points with the provision (§ 288 Abs. 1 or Abs. 2 BGB), and the first and last day. The default lump sum prints § 288 Abs. 5 BGB. Every charge that accrues on a claim names it; interest and the lump sum always do. A cost with lump sums credited against it lists them (§ 288 Abs. 5 Satz 3 BGB); its amount is already the cost less them.
|
|
401
|
+
- **Sums**: the open claims, the charges, and the total payable, their sum, added in cents. There are no VAT rows: the charges are damages, not consideration for a supply.
|
|
402
|
+
- **Notes**, then the **payment deadline**, `dueInDays` after the reminder's date.
|
|
403
|
+
- **QR pay box** for the total payable, with the reminder number as the remittance information, under the same conditions as on an invoice.
|
|
404
|
+
|
|
405
|
+
```typescript
|
|
406
|
+
import { PdfService } from '@design.estate/dees-document';
|
|
407
|
+
import type { finance } from '@tsclass/tsclass';
|
|
408
|
+
|
|
409
|
+
const reminder: finance.TPaymentReminder = {
|
|
410
|
+
...letterEnvelope, // type 'payment-reminder', id, date, from, to, subject, ...
|
|
411
|
+
type: 'payment-reminder',
|
|
412
|
+
id: 'MA-2025-0007',
|
|
413
|
+
reminderLevel: 2,
|
|
414
|
+
claims: [
|
|
415
|
+
{ documentType: 'invoice', documentId: 'RE-2025-0042', issueDate, dueDate, totalGross: 1190, outstandingAmount: 1190 },
|
|
416
|
+
],
|
|
417
|
+
charges: [
|
|
418
|
+
{ chargeType: 'default-lump-sum', description: 'Verzugspauschale', claimDocumentId: 'RE-2025-0042', amount: 40 },
|
|
419
|
+
],
|
|
420
|
+
dueInDays: 14,
|
|
421
|
+
currency: 'EUR',
|
|
422
|
+
notes: [],
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
const pdfResult = await pdfService.createPdfFromLetterObject({
|
|
426
|
+
letterData: reminder,
|
|
427
|
+
documentSettings: { languageCode: 'DE' },
|
|
428
|
+
});
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
`isPaymentReminder()` and `getPaymentReminderTotals()` on `@design.estate/dees-document/shared` answer whether a letter is a reminder and return the sums it prints. When the reminder was sent and when it reached the debtor are not printed; the issuing application records them.
|
|
432
|
+
|
|
322
433
|
## Draft vs Final Documents
|
|
323
434
|
|
|
324
435
|
Control document version display:
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-document',
|
|
6
|
-
version: '3.
|
|
6
|
+
version: '3.3.0',
|
|
7
7
|
description: 'A sophisticated framework for dynamically generating and rendering business documents like invoices with modern web technologies, featuring PDF creation, templating, and automation.'
|
|
8
8
|
}
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-document',
|
|
6
|
-
version: '3.
|
|
6
|
+
version: '3.3.0',
|
|
7
7
|
description: 'A sophisticated framework for dynamically generating and rendering business documents like invoices with modern web technologies, featuring PDF creation, templating, and automation.'
|
|
8
8
|
}
|