iobroker.e-invoices 1.2.1 → 1.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/README.md +34 -14
- package/admin/i18n/de.json +6 -2
- package/admin/i18n/en.json +6 -2
- package/admin/i18n/es.json +6 -2
- package/admin/i18n/fr.json +6 -2
- package/admin/i18n/it.json +6 -2
- package/admin/i18n/nl.json +6 -2
- package/admin/i18n/pl.json +6 -2
- package/admin/i18n/pt.json +6 -2
- package/admin/i18n/ru.json +6 -2
- package/admin/i18n/uk.json +6 -2
- package/admin/i18n/zh-cn.json +6 -2
- package/admin/jsonConfig.json +5 -5
- package/build/lib/api-server.js +42 -19
- package/build/lib/api-server.js.map +3 -3
- package/build/lib/csv.js +76 -59
- package/build/lib/csv.js.map +2 -2
- package/build/lib/db.js +16 -1
- package/build/lib/db.js.map +2 -2
- package/build/lib/dunning-pdf.js +8 -8
- package/build/lib/dunning-pdf.js.map +2 -2
- package/build/lib/dunning-texts.js +184 -0
- package/build/lib/dunning-texts.js.map +7 -0
- package/build/lib/dunning.js +38 -47
- package/build/lib/dunning.js.map +2 -2
- package/build/lib/excel.js +58 -34
- package/build/lib/excel.js.map +2 -2
- package/build/lib/invoice-model.js +8 -7
- package/build/lib/invoice-model.js.map +2 -2
- package/build/lib/open-items.js +5 -5
- package/build/lib/open-items.js.map +1 -1
- package/build/lib/output-i18n.js +835 -0
- package/build/lib/output-i18n.js.map +7 -0
- package/build/lib/revenue-report.js +1 -1
- package/build/lib/revenue-report.js.map +1 -1
- package/build/main.js +25 -1
- package/build/main.js.map +2 -2
- package/io-package.json +27 -27
- package/package.json +1 -1
- package/src-www/src/i18n/en.ts +4 -0
- package/src-www/src/i18n/es.ts +4 -0
- package/src-www/src/i18n/fr.ts +4 -0
- package/src-www/src/i18n/it.ts +4 -0
- package/src-www/src/i18n/nl.ts +4 -0
- package/src-www/src/i18n/pl.ts +4 -0
- package/src-www/src/i18n/pt.ts +4 -0
- package/src-www/src/i18n/ru.ts +4 -0
- package/src-www/src/i18n/uk.ts +4 -0
- package/src-www/src/i18n/zh-cn.ts +4 -0
- package/www/assets/{es-B9Vodkpe.js → es-Dz1NxwNA.js} +1 -1
- package/www/assets/{fr-YoSgTcC4.js → fr-D2NVgb0H.js} +1 -1
- package/www/assets/{index-CN7Gh4_a.css → index-J61NH1z8.css} +1 -1
- package/www/assets/{index-BcMpgBjW.js → index-t7DvNVCA.js} +154 -152
- package/www/assets/{it-DUfVrM6V.js → it-B7FlRLNV.js} +1 -1
- package/www/assets/{nl-DWcIpNsv.js → nl-D39uQOm-.js} +1 -1
- package/www/assets/{pl-D9rhVZJp.js → pl-D27n2kfH.js} +1 -1
- package/www/assets/{pt-5lNhzlB5.js → pt-Bp4ZjjIc.js} +1 -1
- package/www/assets/{ru-BUK8gid6.js → ru-CUdoB4UL.js} +1 -1
- package/www/assets/{uk-C7Cv8UpE.js → uk-BpFSNgWb.js} +1 -1
- package/www/assets/{zh-cn-Ds_I1Tl2.js → zh-cn-CyLYo0o6.js} +1 -1
- package/www/index.html +2 -2
- package/www/sw.js +1 -1
package/README.md
CHANGED
|
@@ -121,7 +121,19 @@ content** stays German whatever the screen language is (German tax law, German
|
|
|
121
121
|
invoice recipients): the invoice and offer
|
|
122
122
|
PDFs, the XML, the document titles (`Rechnung`, `Angebot`, …), the payment-term
|
|
123
123
|
presets and the text of the customer mail. Only their labels in the dropdowns
|
|
124
|
-
follow the language of the page.
|
|
124
|
+
follow the language of the page (in the web app and in the instance settings).
|
|
125
|
+
|
|
126
|
+
The **exports** (CSV and Excel: invoice list, open items, revenue, dunning suggestions) are written in the
|
|
127
|
+
language of the web app: it sends its language with every request (header `x-e-invoices-language`; `?lang=xx`
|
|
128
|
+
works for a direct call). Without one, the instance setting *Web app language* counts, then the language of
|
|
129
|
+
the ioBroker system, then English. The figures keep their format (semicolon list, decimal comma), only titles,
|
|
130
|
+
notice and column headers change. Two things stay German on purpose: the Excel copy of a single invoice (a copy of
|
|
131
|
+
a German tax document) and the DATEV file (its headers are prescribed by DATEV).
|
|
132
|
+
|
|
133
|
+
The **dunning letters** take the language of the ioBroker system (*System settings → Language*), English when it is
|
|
134
|
+
none of the eleven: the built-in texts of the three levels, the date and amount format, the cash discount sentence
|
|
135
|
+
and the PDF of the letters. A text you changed on the page "Mahnwesen" is kept as you typed it. The dunning
|
|
136
|
+
letters go to customers, so they do not follow the language of the screen.
|
|
125
137
|
|
|
126
138
|
### HTTPS and installing the web app on a phone
|
|
127
139
|
|
|
@@ -144,6 +156,12 @@ the certificate: install the certificate on the phone (iOS: also enable it under
|
|
|
144
156
|
Certificate Trust Settings) or use a certificate of a real authority. The certificate must name the address you
|
|
145
157
|
type (host name or IP). The adapter sends no HSTS header, so switching HTTPS off again keeps working.
|
|
146
158
|
|
|
159
|
+
When the browser forgets its exception for a self-signed certificate, or the certificate is renewed, the web app
|
|
160
|
+
(served from its cache) can no longer reach the API: the browser blocks the requests silently. The web app then
|
|
161
|
+
shows *The server cannot be reached* with a *Reload* button; reloading the page lets the browser show its warning
|
|
162
|
+
again, and accepting it restores the connection. The adapter loads the certificate when it starts, so restart the
|
|
163
|
+
instance after a renewal.
|
|
164
|
+
|
|
147
165
|
### Light and dark appearance
|
|
148
166
|
|
|
149
167
|
The web app has a light and a dark appearance. On the **status page**, *Darstellung* offers three choices:
|
|
@@ -250,7 +268,7 @@ so the numbers that tie the file to the advisor's books come from the instance s
|
|
|
250
268
|
is booked the other way round (*Haben*). A cancelled invoice and its Storno are both in the file and
|
|
251
269
|
cancel each other out. Offers and drafts are never booked.
|
|
252
270
|
- One file holds **one fiscal year**: narrow the period when the invoices span more than one.
|
|
253
|
-
- The file is `
|
|
271
|
+
- The file is `EXTF_outgoing-invoices….csv`, Windows-1252, with the invoice number in *Belegfeld 1*
|
|
254
272
|
(characters DATEV does not take become `-`).
|
|
255
273
|
- The revenue accounts are standard accounts. Reverse charge, intra-community supplies or exports need other
|
|
256
274
|
accounts — ask your advisor and set the 0 % account accordingly. One instance has one DATEV client; for
|
|
@@ -266,7 +284,7 @@ quarter, this year, last year) or two free days *Von* / *Bis*. It filters by the
|
|
|
266
284
|
may stay empty (open end).
|
|
267
285
|
|
|
268
286
|
- Excel, CSV and DATEV take exactly the filter of the list, so what you see is what is exported. The
|
|
269
|
-
file name names the range: `
|
|
287
|
+
file name names the range: `invoices_2026-08-01_2026-08-31.csv` (`…_from-…` or `…_to-…` for an open
|
|
270
288
|
end), and the Excel title shows it as well.
|
|
271
289
|
- Exports contain **all** matching invoices (no page limit) in date order and **never a draft** — a draft
|
|
272
290
|
has no number to book. A draft only comes into an export when the status "draft" is asked for.
|
|
@@ -576,7 +594,7 @@ so it cannot share the compact process.
|
|
|
576
594
|
- compliance with the rules that apply to you (e.g. VAT law, GoBD, retention periods, GDPR),
|
|
577
595
|
- regular backups – also outside the adapter – and testing that they can be restored.
|
|
578
596
|
|
|
579
|
-
This disclaimer is also in [docs/en/disclaimer.md](docs/en/disclaimer.md); the German original is in [docs/de/
|
|
597
|
+
This disclaimer is also in [docs/en/disclaimer.md](docs/en/disclaimer.md); the German original is in [docs/de/disclaimer.md](docs/de/disclaimer.md).
|
|
580
598
|
|
|
581
599
|
## Standards and references
|
|
582
600
|
|
|
@@ -610,6 +628,18 @@ validation and hybrid embedding, `pdfkit`, `exceljs`, `jszip`,
|
|
|
610
628
|
Placeholder for the next version (at the beginning of the line):
|
|
611
629
|
### **WORK IN PROGRESS**
|
|
612
630
|
-->
|
|
631
|
+
### 1.3.0 (2026-11-06)
|
|
632
|
+
|
|
633
|
+
* (alex) Review of the ioBroker repository (PR #6894): the download file names are English (`invoices….csv`, `EXTF_outgoing-invoices….csv`, `revenue-by-company…`, `open-items…`, `dunning-suggestions.csv`, `dunning-letters.pdf`, `…_from-…`/`…_to-…` for an open range).
|
|
634
|
+
* (alex) The exports (CSV and Excel lists of invoices, open items, revenue and dunning suggestions) are written in the eleven ioBroker languages: titles, notice and column headers follow the language of the web app, else the instance setting, else the system language, else English. The invoice copy and the DATEV file stay German.
|
|
635
|
+
* (alex) The built-in dunning texts (three levels), the dunning letter PDF and `info.reminderSuggestions` come in the eleven ioBroker languages, chosen by the language of the ioBroker system (English for any other). Texts you changed stay as they are.
|
|
636
|
+
* (alex) Instance settings: the payment terms presets show translated labels in all eleven languages; the stored text stays the German sentence printed on the German invoice.
|
|
637
|
+
* (alex) The validation evidence moved from `docs/validierung/` to `docs/validation/` with English names (`sample-cases/`, `sample-cases.mjs`, `credit-note`, …), the German documentation files to `docs/de/validation.md` and `docs/de/disclaimer.md`. The script prints English messages.
|
|
638
|
+
|
|
639
|
+
### 1.2.2 (2026-10-19)
|
|
640
|
+
|
|
641
|
+
* (alex) When the server gives no answer, the web app shows a banner instead of the browser's "NetworkError": the server cannot be reached; with HTTPS and a self-signed certificate reload the page (or open the address) and accept the security warning again, otherwise check the instance. A *Reload* button is in the banner, which goes away with the next answer of the server. All eleven languages.
|
|
642
|
+
|
|
613
643
|
### 1.2.1 (2026-10-12)
|
|
614
644
|
|
|
615
645
|
* (alex) A half uploaded file (`….zip.part`) of a failed copy is removed on the server: at once when the connection still works, otherwise by the next good copy. Only half files of this adapter are touched.
|
|
@@ -631,16 +661,6 @@ validation and hybrid embedding, `pdfkit`, `exceljs`, `jszip`,
|
|
|
631
661
|
* (alex) The invoice view of an issued invoice shows the earliest deletion date ("Keep until") with a note: the adapter cautiously counts ten years, the law needs at least eight for invoices and ten for some records; in doubt ask the tax advisor. The note is available in all eleven languages.
|
|
632
662
|
* (alex) The backup keeps the attachments as own ZIP entries (`attachments/<id>`, each with its SHA-256 in the manifest) instead of base64 inside `dump.json`: about a third smaller, less memory while it is made, and the restore checks every attachment on its own. Backup format 2; backups of older versions (format 1) can still be restored.
|
|
633
663
|
|
|
634
|
-
### 1.1.4 (2026-10-11)
|
|
635
|
-
|
|
636
|
-
* (alex) fix: the backup no longer logs the error "Backup skips unreadable file ... .xml: Not exists" for every quotation. A quotation is no e-invoice and has no XML file, so the backup does not look for one any more (a missing file of a real invoice is still reported).
|
|
637
|
-
|
|
638
|
-
### 1.1.3 (2026-10-11)
|
|
639
|
-
|
|
640
|
-
* (alex) **The web app speaks all eleven ioBroker languages:** besides German and English now Russian, Portuguese, Dutch, French, Italian, Spanish, Polish, Ukrainian and Chinese. The instance setting "Web app language" offers all of them; the dictionary of the language in use is loaded on demand. The legal terms (GoBD, UStG, Leitweg-ID, XRechnung, ZUGFeRD, DATEV) stay as they are, the documents themselves (PDF, XML) stay German. Have the wording checked by a native speaker where it matters.
|
|
641
|
-
* (alex) The objects of the adapter (info and control states, the file storage) carry their names in all eleven ioBroker languages; an existing installation gets the new names on the next start.
|
|
642
|
-
* (alex) fix: the control buttons (`control.createDraft`, `issue`, `refresh`, `backup`, `restore`) act on the value `true` only. Writing `false` or another value no longer starts an issue, a backup or a restore.
|
|
643
|
-
|
|
644
664
|
Older changes: see [CHANGELOG_OLD.md](CHANGELOG_OLD.md).
|
|
645
665
|
|
|
646
666
|
## License
|
package/admin/i18n/de.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Format der Rechnungsnummer",
|
|
46
46
|
"Invoicing defaults": "Rechnungs-Voreinstellungen",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Eigener Nummernkreis, nur für Angebote. Platzhalter: {YYYY} Jahr, {EMPLOYEE} Mitarbeiter-Kürzel, {SEQ} Sequenz. {SEQ} ist Pflicht.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "wird für neue Rechnungen vorausgefüllt; der Wizard bietet die Auswahl zusätzlich als Liste mit Freitextfeld an",
|
|
49
48
|
"Quotation number format": "Format der Angebotsnummer",
|
|
50
49
|
"Server": "Server",
|
|
51
50
|
"Storage mount name": "Name des Ablage-Mounts",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… so, wie ihn der Server anzeigt. Leer: der Server wird nicht geprüft, das Log zeigt seinen Fingerabdruck.",
|
|
75
74
|
"Copies to keep on the server": "Kopien auf dem Server behalten",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Es werden nur automatische Kopien gelöscht, die ältesten zuerst; 0 = alle behalten. Von Hand erstellte Backups und andere Dateien werden nie gelöscht.",
|
|
77
|
-
"Test connection": "Verbindung testen"
|
|
76
|
+
"Test connection": "Verbindung testen",
|
|
77
|
+
"No default": "Keine Vorgabe",
|
|
78
|
+
"Payable immediately without deduction": "Sofort ohne Abzug fällig",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Überweisung innerhalb von 14 Tagen",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Zahlbar innerhalb von 30 Tagen nach Rechnungsdatum ohne Abzug",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Wird für neue Rechnungen vorausgefüllt; der Wizard bietet die Auswahl zusätzlich als Liste mit Freitextfeld an. Der Text wird auf Deutsch auf die Rechnung gedruckt, weil die Rechnung deutsch ist."
|
|
78
82
|
}
|
package/admin/i18n/en.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Invoice number format",
|
|
46
46
|
"Invoicing defaults": "Invoicing defaults",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "prefilled for new invoices; the wizard offers these as a list plus free text",
|
|
49
48
|
"Quotation number format": "Quotation number format",
|
|
50
49
|
"Server": "Server",
|
|
51
50
|
"Storage mount name": "Storage mount name",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.",
|
|
75
74
|
"Copies to keep on the server": "Copies to keep on the server",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.",
|
|
77
|
-
"Test connection": "Test connection"
|
|
76
|
+
"Test connection": "Test connection",
|
|
77
|
+
"No default": "No default",
|
|
78
|
+
"Payable immediately without deduction": "Payable immediately without deduction",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Payable within 14 days by bank transfer",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Payable within 30 days of the invoice date without deduction",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German."
|
|
78
82
|
}
|
package/admin/i18n/es.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Formato del número de factura",
|
|
46
46
|
"Invoicing defaults": "Valores por defecto de facturación",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Serie de numeración propia, solo para ofertas. Marcadores: {YYYY} año, {EMPLOYEE} código de empleado, {SEQ} secuencia. {SEQ} es obligatorio.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "se rellena para facturas nuevas; el asistente ofrece además una lista con campo de texto libre",
|
|
49
48
|
"Quotation number format": "Formato del número de oferta",
|
|
50
49
|
"Server": "Servidor",
|
|
51
50
|
"Storage mount name": "Nombre del punto de almacenamiento",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… tal como la muestra el servidor. Vacío: el servidor no se verifica, el registro muestra su huella.",
|
|
75
74
|
"Copies to keep on the server": "Copias que conservar en el servidor",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Solo se eliminan copias automáticas, las más antiguas primero; 0 = conservar todas. Las copias hechas a mano y otros archivos nunca se eliminan.",
|
|
77
|
-
"Test connection": "Probar la conexión"
|
|
76
|
+
"Test connection": "Probar la conexión",
|
|
77
|
+
"No default": "Sin valor predeterminado",
|
|
78
|
+
"Payable immediately without deduction": "Pagadero de inmediato sin deducción",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Pagadero por transferencia en 14 días",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Pagadero en 30 días desde la fecha de factura sin deducción",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Se rellena en las facturas nuevas; el asistente las ofrece también como lista con texto libre. El texto se imprime en alemán en la factura, porque la factura es alemana."
|
|
78
82
|
}
|
package/admin/i18n/fr.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Format du numéro de facture",
|
|
46
46
|
"Invoicing defaults": "Valeurs par défaut de facturation",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Série de numéros propre, réservée aux devis. Jetons : {YYYY} année, {EMPLOYEE} code employé, {SEQ} séquence. {SEQ} est obligatoire.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "prérempli pour les nouvelles factures ; l’assistant propose en plus une liste avec champ libre",
|
|
49
48
|
"Quotation number format": "Format du numéro de devis",
|
|
50
49
|
"Server": "Serveur",
|
|
51
50
|
"Storage mount name": "Nom du point de stockage",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… telle que le serveur l'affiche. Vide : le serveur n'est pas vérifié, le journal montre son empreinte.",
|
|
75
74
|
"Copies to keep on the server": "Copies à conserver sur le serveur",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Seules les copies automatiques sont supprimées, les plus anciennes d'abord ; 0 = tout conserver. Les sauvegardes faites à la main et les autres fichiers ne sont jamais supprimés.",
|
|
77
|
-
"Test connection": "Tester la connexion"
|
|
76
|
+
"Test connection": "Tester la connexion",
|
|
77
|
+
"No default": "Aucune valeur par défaut",
|
|
78
|
+
"Payable immediately without deduction": "Payable immédiatement sans déduction",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Payable par virement sous 14 jours",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Payable sous 30 jours à compter de la date de facture, sans déduction",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Prérempli pour les nouvelles factures ; l'assistant les propose aussi en liste avec texte libre. Le texte est imprimé en allemand sur la facture, car la facture est allemande."
|
|
78
82
|
}
|
package/admin/i18n/it.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Formato del numero di fattura",
|
|
46
46
|
"Invoicing defaults": "Valori predefiniti di fatturazione",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Serie di numeri propria, solo per i preventivi. Segnaposto: {YYYY} anno, {EMPLOYEE} codice dipendente, {SEQ} sequenza. {SEQ} è obbligatorio.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "precompilato per le nuove fatture; la procedura offre anche un elenco con campo di testo libero",
|
|
49
48
|
"Quotation number format": "Formato del numero di preventivo",
|
|
50
49
|
"Server": "Server",
|
|
51
50
|
"Storage mount name": "Nome del mount di archiviazione",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… come la mostra il server. Vuoto: il server non viene verificato, il registro mostra la sua impronta.",
|
|
75
74
|
"Copies to keep on the server": "Copie da conservare sul server",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Vengono eliminate solo le copie automatiche, le più vecchie per prime; 0 = conserva tutte. I backup fatti a mano e gli altri file non vengono mai eliminati.",
|
|
77
|
-
"Test connection": "Verifica la connessione"
|
|
76
|
+
"Test connection": "Verifica la connessione",
|
|
77
|
+
"No default": "Nessuna predefinita",
|
|
78
|
+
"Payable immediately without deduction": "Pagabile subito senza detrazioni",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Pagabile con bonifico entro 14 giorni",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Pagabile entro 30 giorni dalla data della fattura senza detrazioni",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Precompilato per le nuove fatture; la procedura guidata li offre anche come elenco con testo libero. Il testo viene stampato in tedesco sulla fattura, perché la fattura è tedesca."
|
|
78
82
|
}
|
package/admin/i18n/nl.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Factuurnummerformaat",
|
|
46
46
|
"Invoicing defaults": "Standaardwaarden facturatie",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Eigen nummerreeks, alleen voor offertes. Tokens: {YYYY} jaar, {EMPLOYEE} medewerkerscode, {SEQ} volgnummer. {SEQ} is verplicht.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "ingevuld bij nieuwe facturen; de wizard biedt deze ook als lijst met vrij tekstveld",
|
|
49
48
|
"Quotation number format": "Formaat van het offertenummer",
|
|
50
49
|
"Server": "Server",
|
|
51
50
|
"Storage mount name": "Naam van opslagmount",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… zoals de server die toont. Leeg: de server wordt niet gecontroleerd, het logboek toont de vingerafdruk.",
|
|
75
74
|
"Copies to keep on the server": "Kopieën bewaren op de server",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Alleen automatische kopieën worden verwijderd, de oudste eerst; 0 = alles bewaren. Met de hand gemaakte back-ups en andere bestanden worden nooit verwijderd.",
|
|
77
|
-
"Test connection": "Verbinding testen"
|
|
76
|
+
"Test connection": "Verbinding testen",
|
|
77
|
+
"No default": "Geen standaard",
|
|
78
|
+
"Payable immediately without deduction": "Direct betaalbaar zonder aftrek",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Betaalbaar per overschrijving binnen 14 dagen",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Betaalbaar binnen 30 dagen na factuurdatum zonder aftrek",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Vooraf ingevuld voor nieuwe facturen; de wizard biedt ze ook als lijst met vrije tekst aan. De tekst wordt in het Duits op de factuur gedrukt, omdat de factuur Duits is."
|
|
78
82
|
}
|
package/admin/i18n/pl.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Format numeru faktury",
|
|
46
46
|
"Invoicing defaults": "Domyślne ustawienia fakturowania",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Własna seria numerów, tylko dla ofert. Znaczniki: {YYYY} rok, {EMPLOYEE} kod pracownika, {SEQ} sekwencja. {SEQ} jest wymagane.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "wypełniane dla nowych faktur; kreator oferuje dodatkowo listę oraz pole własnego tekstu",
|
|
49
48
|
"Quotation number format": "Format numeru oferty",
|
|
50
49
|
"Server": "Serwer",
|
|
51
50
|
"Storage mount name": "Nazwa montowania pamięci",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… tak, jak pokazuje go serwer. Puste: serwer nie jest weryfikowany, dziennik pokazuje jego odcisk.",
|
|
75
74
|
"Copies to keep on the server": "Kopie do zachowania na serwerze",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Usuwane są tylko kopie automatyczne, najpierw najstarsze; 0 = zachowaj wszystkie. Kopie wykonane ręcznie i inne pliki nigdy nie są usuwane.",
|
|
77
|
-
"Test connection": "Testuj połączenie"
|
|
76
|
+
"Test connection": "Testuj połączenie",
|
|
77
|
+
"No default": "Brak wartości domyślnej",
|
|
78
|
+
"Payable immediately without deduction": "Płatne natychmiast bez potrąceń",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Płatne przelewem w ciągu 14 dni",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Płatne w ciągu 30 dni od daty faktury bez potrąceń",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Wstępnie wypełniane w nowych fakturach; kreator oferuje je też jako listę z polem na własny tekst. Tekst jest drukowany na fakturze po niemiecku, bo faktura jest niemiecka."
|
|
78
82
|
}
|
package/admin/i18n/pt.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Formato do número da fatura",
|
|
46
46
|
"Invoicing defaults": "Padrões de faturação",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Série de numeração própria, apenas para propostas. Marcadores: {YYYY} ano, {EMPLOYEE} código de funcionário, {SEQ} sequência. {SEQ} é obrigatório.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "preenchido para novas faturas; o assistente oferece também uma lista com campo de texto livre",
|
|
49
48
|
"Quotation number format": "Formato do número da proposta",
|
|
50
49
|
"Server": "Servidor",
|
|
51
50
|
"Storage mount name": "Nome do ponto de armazenamento",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… como o servidor a mostra. Vazio: o servidor não é verificado, o registo mostra a sua impressão digital.",
|
|
75
74
|
"Copies to keep on the server": "Cópias a manter no servidor",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Só são apagadas cópias automáticas, as mais antigas primeiro; 0 = manter todas. As cópias feitas à mão e outros ficheiros nunca são apagados.",
|
|
77
|
-
"Test connection": "Testar ligação"
|
|
76
|
+
"Test connection": "Testar ligação",
|
|
77
|
+
"No default": "Sem predefinição",
|
|
78
|
+
"Payable immediately without deduction": "Pagável de imediato sem dedução",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Pagável por transferência no prazo de 14 dias",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Pagável no prazo de 30 dias a contar da data da fatura, sem dedução",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Pré-preenchido em novas faturas; o assistente oferece-os também como lista com texto livre. O texto é impresso na fatura em alemão, porque a fatura é alemã."
|
|
78
82
|
}
|
package/admin/i18n/ru.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Формат номера счёта",
|
|
46
46
|
"Invoicing defaults": "Значения по умолчанию для выставления счетов",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Собственный ряд номеров, только для предложений. Токены: {YYYY} год, {EMPLOYEE} код сотрудника, {SEQ} последовательность. {SEQ} обязателен.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "подставляется для новых счетов; мастер дополнительно предлагает список и поле своего текста",
|
|
49
48
|
"Quotation number format": "Формат номера предложения",
|
|
50
49
|
"Server": "Сервер",
|
|
51
50
|
"Storage mount name": "Имя точки хранения",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… так, как его показывает сервер. Пусто: сервер не проверяется, отпечаток виден в журнале.",
|
|
75
74
|
"Copies to keep on the server": "Копий хранить на сервере",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Удаляются только автоматические копии, сначала самые старые; 0 = хранить все. Копии, сделанные вручную, и другие файлы не удаляются никогда.",
|
|
77
|
-
"Test connection": "Проверить соединение"
|
|
76
|
+
"Test connection": "Проверить соединение",
|
|
77
|
+
"No default": "Без значения по умолчанию",
|
|
78
|
+
"Payable immediately without deduction": "Оплата немедленно без вычетов",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Оплата банковским переводом в течение 14 дней",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Оплата в течение 30 дней с даты счёта без вычетов",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Подставляется в новые счета; мастер предлагает варианты также списком с полем для своего текста. Текст печатается в счёте на немецком, потому что счёт немецкий."
|
|
78
82
|
}
|
package/admin/i18n/uk.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "Формат номера рахунку",
|
|
46
46
|
"Invoicing defaults": "Типові значення для виставлення рахунків",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "Власний ряд номерів, лише для пропозицій. Токени: {YYYY} рік, {EMPLOYEE} код співробітника, {SEQ} послідовність. {SEQ} обов’язковий.",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "підставляється для нових рахунків; майстер додатково пропонує список і поле власного тексту",
|
|
49
48
|
"Quotation number format": "Формат номера пропозиції",
|
|
50
49
|
"Server": "Сервер",
|
|
51
50
|
"Storage mount name": "Назва точки зберігання",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… так, як його показує сервер. Порожньо: сервер не перевіряється, відбиток видно в журналі.",
|
|
75
74
|
"Copies to keep on the server": "Копій зберігати на сервері",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "Видаляються лише автоматичні копії, спершу найстаріші; 0 = зберігати всі. Копії, зроблені вручну, та інші файли не видаляються ніколи.",
|
|
77
|
-
"Test connection": "Перевірити з'єднання"
|
|
76
|
+
"Test connection": "Перевірити з'єднання",
|
|
77
|
+
"No default": "Без типового значення",
|
|
78
|
+
"Payable immediately without deduction": "Оплата негайно без утримань",
|
|
79
|
+
"Payable within 14 days by bank transfer": "Оплата переказом протягом 14 днів",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "Оплата протягом 30 днів від дати рахунку без утримань",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "Підставляється в нові рахунки; майстер пропонує варіанти також списком із полем для власного тексту. Текст друкується в рахунку німецькою, бо рахунок німецький."
|
|
78
82
|
}
|
package/admin/i18n/zh-cn.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Invoice number format": "发票编号格式",
|
|
46
46
|
"Invoicing defaults": "开票默认值",
|
|
47
47
|
"Own number circle, used only for quotations. Tokens: {YYYY} year, {EMPLOYEE} employee code, {SEQ} sequence. {SEQ} is required.": "报价单专用独立编号序列。占位符:{YYYY} 年、{EMPLOYEE} 员工代码、{SEQ} 序号。{SEQ} 为必填。",
|
|
48
|
-
"prefilled for new invoices; the wizard offers these as a list plus free text": "为新发票预填;向导另提供下拉列表和自由文本输入框",
|
|
49
48
|
"Quotation number format": "报价单编号格式",
|
|
50
49
|
"Server": "服务器",
|
|
51
50
|
"Storage mount name": "存储挂载名称",
|
|
@@ -74,5 +73,10 @@
|
|
|
74
73
|
"SHA256:… as the server shows it. Empty: the server is not verified, the log shows its fingerprint.": "SHA256:… 与服务器显示的一致。留空:不验证服务器,日志会显示其指纹。",
|
|
75
74
|
"Copies to keep on the server": "在服务器上保留的副本数",
|
|
76
75
|
"Only automatic copies are deleted, the oldest first; 0 = keep all. Backups made by hand and other files are never deleted.": "只删除自动副本,最旧的优先;0 = 全部保留。手动创建的备份和其他文件永远不会被删除。",
|
|
77
|
-
"Test connection": "测试连接"
|
|
76
|
+
"Test connection": "测试连接",
|
|
77
|
+
"No default": "无默认值",
|
|
78
|
+
"Payable immediately without deduction": "立即付款,不得扣减",
|
|
79
|
+
"Payable within 14 days by bank transfer": "14 天内银行转账付款",
|
|
80
|
+
"Payable within 30 days of the invoice date without deduction": "自发票日期起 30 天内付款,不得扣减",
|
|
81
|
+
"Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.": "新发票会预先填入;向导还以列表加自由文本的形式提供这些选项。该文本以德语印在发票上,因为发票是德语的。"
|
|
78
82
|
}
|
package/admin/jsonConfig.json
CHANGED
|
@@ -355,12 +355,12 @@
|
|
|
355
355
|
"defaultPaymentTerms": {
|
|
356
356
|
"type": "select",
|
|
357
357
|
"label": "Default payment terms",
|
|
358
|
-
"help": "
|
|
358
|
+
"help": "Prefilled for new invoices; the wizard offers these as a list plus free text. The text is printed on the invoice in German, because the invoice is German.",
|
|
359
359
|
"options": [
|
|
360
|
-
{ "label": "
|
|
361
|
-
{ "label": "
|
|
362
|
-
{ "label": "
|
|
363
|
-
{ "label": "
|
|
360
|
+
{ "label": "No default", "value": "" },
|
|
361
|
+
{ "label": "Payable immediately without deduction", "value": "Der Rechnungsbetrag ist sofort ohne Abzug fällig." },
|
|
362
|
+
{ "label": "Payable within 14 days by bank transfer", "value": "Bitte überweisen Sie den o.g. Betrag innerhalb von 14 Tagen auf unser Konto." },
|
|
363
|
+
{ "label": "Payable within 30 days of the invoice date without deduction", "value": "Zahlbar innerhalb von 30 Tagen nach Rechnungsdatum ohne Abzug." }
|
|
364
364
|
],
|
|
365
365
|
"default": "",
|
|
366
366
|
"newLine": true,
|
package/build/lib/api-server.js
CHANGED
|
@@ -54,6 +54,7 @@ var import_revenue_report = require("./revenue-report");
|
|
|
54
54
|
var import_preview_samples = require("./preview-samples");
|
|
55
55
|
var import_dunning = require("./dunning");
|
|
56
56
|
var import_dunning_pdf = require("./dunning-pdf");
|
|
57
|
+
var import_output_i18n = require("./output-i18n");
|
|
57
58
|
var import_invoice_model2 = require("./invoice-model");
|
|
58
59
|
var import_pdf = require("./pdf");
|
|
59
60
|
var import_templates = require("./templates");
|
|
@@ -291,6 +292,15 @@ function createApiServer(deps) {
|
|
|
291
292
|
backupIntervalMinutes: Math.max(0, Math.round(Number((_p = deps.settings) == null ? void 0 : _p.backupIntervalMinutes) || 0)),
|
|
292
293
|
backupKeep: Math.max(0, Math.round(Number((_q = deps.settings) == null ? void 0 : _q.backupKeep) || 0))
|
|
293
294
|
};
|
|
295
|
+
const exportLanguage = (req) => {
|
|
296
|
+
var _a2;
|
|
297
|
+
return (0, import_output_i18n.outputLanguage)(
|
|
298
|
+
req.get("x-e-invoices-language"),
|
|
299
|
+
req.query.lang,
|
|
300
|
+
settings.pwaLanguage === "auto" ? void 0 : settings.pwaLanguage,
|
|
301
|
+
(_a2 = deps.settings) == null ? void 0 : _a2.systemLanguage
|
|
302
|
+
);
|
|
303
|
+
};
|
|
294
304
|
const limits = {
|
|
295
305
|
api: Math.max(1, Math.round((_s = (_r = deps.limits) == null ? void 0 : _r.api) != null ? _s : 600)),
|
|
296
306
|
restore: Math.max(1, Math.round((_u = (_t = deps.limits) == null ? void 0 : _t.restore) != null ? _u : 10)),
|
|
@@ -511,8 +521,8 @@ function createApiServer(deps) {
|
|
|
511
521
|
return;
|
|
512
522
|
}
|
|
513
523
|
res.type("text/csv; charset=utf-8");
|
|
514
|
-
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)(`
|
|
515
|
-
res.send((0, import_csv.renderInvoiceListCsv)(filteredInvoices(db, req.query, "invoice", range, true)));
|
|
524
|
+
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)(`invoices${(0, import_invoice_model.dateRangeFileSuffix)(range)}.csv`));
|
|
525
|
+
res.send((0, import_csv.renderInvoiceListCsv)(filteredInvoices(db, req.query, "invoice", range, true), exportLanguage(req)));
|
|
516
526
|
});
|
|
517
527
|
app.get("/api/invoices/export.datev", (req, res) => {
|
|
518
528
|
var _a2, _b2;
|
|
@@ -537,7 +547,10 @@ function createApiServer(deps) {
|
|
|
537
547
|
return;
|
|
538
548
|
}
|
|
539
549
|
res.type("text/csv; charset=windows-1252");
|
|
540
|
-
res.set(
|
|
550
|
+
res.set(
|
|
551
|
+
"Content-Disposition",
|
|
552
|
+
(0, import_attachments.attachmentDisposition)(`EXTF_outgoing-invoices${(0, import_invoice_model.dateRangeFileSuffix)(range)}.csv`)
|
|
553
|
+
);
|
|
541
554
|
res.send((0, import_datev.toWindows1252)(content));
|
|
542
555
|
});
|
|
543
556
|
app.get("/api/invoices/export.xlsx", (req, res) => {
|
|
@@ -548,8 +561,10 @@ function createApiServer(deps) {
|
|
|
548
561
|
}
|
|
549
562
|
const invoices = filteredInvoices(db, req.query, "invoice", range, true);
|
|
550
563
|
const stamp = (0, import_invoice_model.todayIso)();
|
|
551
|
-
const
|
|
552
|
-
|
|
564
|
+
const language = exportLanguage(req);
|
|
565
|
+
const period = (0, import_invoice_model.formatDateRange)(range, language);
|
|
566
|
+
const title = (0, import_output_i18n.tr)(language, "Invoice overview {date}", { date: (0, import_output_i18n.formatOutputDate)(stamp, language) });
|
|
567
|
+
void (0, import_excel.renderInvoiceListWorkbook)(invoices, `${title}${period ? ` (${period})` : ""}`, language).then(
|
|
553
568
|
(buffer) => {
|
|
554
569
|
res.type("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
|
555
570
|
res.set(
|
|
@@ -609,8 +624,8 @@ function createApiServer(deps) {
|
|
|
609
624
|
return;
|
|
610
625
|
}
|
|
611
626
|
res.type("text/csv; charset=utf-8");
|
|
612
|
-
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("
|
|
613
|
-
res.send((0, import_csv.renderRevenueCsv)(report));
|
|
627
|
+
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("revenue-by-company.csv"));
|
|
628
|
+
res.send((0, import_csv.renderRevenueCsv)(report, exportLanguage(req)));
|
|
614
629
|
})
|
|
615
630
|
);
|
|
616
631
|
app.get(
|
|
@@ -621,9 +636,9 @@ function createApiServer(deps) {
|
|
|
621
636
|
res.status(400).json({ error: report });
|
|
622
637
|
return;
|
|
623
638
|
}
|
|
624
|
-
const buffer = await (0, import_excel.renderRevenueWorkbook)(report);
|
|
639
|
+
const buffer = await (0, import_excel.renderRevenueWorkbook)(report, exportLanguage(req));
|
|
625
640
|
res.type("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
|
626
|
-
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("
|
|
641
|
+
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("revenue-by-company.xlsx"));
|
|
627
642
|
res.send(buffer);
|
|
628
643
|
})
|
|
629
644
|
);
|
|
@@ -647,8 +662,8 @@ function createApiServer(deps) {
|
|
|
647
662
|
return;
|
|
648
663
|
}
|
|
649
664
|
res.type("text/csv; charset=utf-8");
|
|
650
|
-
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("
|
|
651
|
-
res.send((0, import_csv.renderOpenItemsCsv)((0, import_open_items.evaluateOpenItems)(db.allInvoices(), options)));
|
|
665
|
+
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("open-items.csv"));
|
|
666
|
+
res.send((0, import_csv.renderOpenItemsCsv)((0, import_open_items.evaluateOpenItems)(db.allInvoices(), options), exportLanguage(req)));
|
|
652
667
|
})
|
|
653
668
|
);
|
|
654
669
|
app.get(
|
|
@@ -659,9 +674,12 @@ function createApiServer(deps) {
|
|
|
659
674
|
res.status(400).json({ error: options });
|
|
660
675
|
return;
|
|
661
676
|
}
|
|
662
|
-
const buffer = await (0, import_excel.renderOpenItemsWorkbook)(
|
|
677
|
+
const buffer = await (0, import_excel.renderOpenItemsWorkbook)(
|
|
678
|
+
(0, import_open_items.evaluateOpenItems)(db.allInvoices(), options),
|
|
679
|
+
exportLanguage(req)
|
|
680
|
+
);
|
|
663
681
|
res.type("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
|
664
|
-
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("
|
|
682
|
+
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("open-items.xlsx"));
|
|
665
683
|
res.send(buffer);
|
|
666
684
|
})
|
|
667
685
|
);
|
|
@@ -1090,7 +1108,12 @@ function createApiServer(deps) {
|
|
|
1090
1108
|
})
|
|
1091
1109
|
);
|
|
1092
1110
|
const dunningSuggestions = () => {
|
|
1093
|
-
return (0, import_dunning.buildDunningSuggestions)(
|
|
1111
|
+
return (0, import_dunning.buildDunningSuggestions)(
|
|
1112
|
+
(0, import_issue_service.collectReminderCandidates)(db),
|
|
1113
|
+
db.listDunningTexts(),
|
|
1114
|
+
(0, import_invoice_model.todayIso)(),
|
|
1115
|
+
db.getTextLanguage()
|
|
1116
|
+
);
|
|
1094
1117
|
};
|
|
1095
1118
|
app.get(
|
|
1096
1119
|
"/api/dunning/suggestions",
|
|
@@ -1100,18 +1123,18 @@ function createApiServer(deps) {
|
|
|
1100
1123
|
);
|
|
1101
1124
|
app.get(
|
|
1102
1125
|
"/api/dunning/suggestions.csv",
|
|
1103
|
-
route((
|
|
1126
|
+
route((req, res) => {
|
|
1104
1127
|
res.type("text/csv; charset=utf-8");
|
|
1105
|
-
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("
|
|
1106
|
-
res.send((0, import_csv.renderDunningCsv)(dunningSuggestions(), (0, import_invoice_model.todayIso)()));
|
|
1128
|
+
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("dunning-suggestions.csv"));
|
|
1129
|
+
res.send((0, import_csv.renderDunningCsv)(dunningSuggestions(), (0, import_invoice_model.todayIso)(), exportLanguage(req)));
|
|
1107
1130
|
})
|
|
1108
1131
|
);
|
|
1109
1132
|
app.get(
|
|
1110
1133
|
"/api/dunning/suggestions.pdf",
|
|
1111
1134
|
route(async (_req, res) => {
|
|
1112
|
-
const buffer = await (0, import_dunning_pdf.renderDunningPdf)(dunningSuggestions(), (0, import_invoice_model.todayIso)());
|
|
1135
|
+
const buffer = await (0, import_dunning_pdf.renderDunningPdf)(dunningSuggestions(), (0, import_invoice_model.todayIso)(), db.getTextLanguage());
|
|
1113
1136
|
res.type("application/pdf");
|
|
1114
|
-
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("
|
|
1137
|
+
res.set("Content-Disposition", (0, import_attachments.attachmentDisposition)("dunning-letters.pdf"));
|
|
1115
1138
|
res.send(buffer);
|
|
1116
1139
|
})
|
|
1117
1140
|
);
|