@kevludwig/eve-lexware-office 0.1.2 → 0.1.3
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.
|
@@ -10,7 +10,7 @@ import { MISSING_EUR_AMOUNT_INSTRUCTION, approvedPurchaseTarget, bookedGroupsOf,
|
|
|
10
10
|
import { describeWarning, isCorrectable, notesOf, rememberRejection, saveWarnings, wasRejected, wasShownOnCard } from "../lib/findings.mjs";
|
|
11
11
|
import { readJournal, writeJournal } from "../lib/journal.mjs";
|
|
12
12
|
import { z } from "zod";
|
|
13
|
-
import { REVERSE_CHARGE_TAX_RATE, createVoucher, describeError, findPurchaseInvoiceByNumber, isReverseChargeCategory, round2, taxFromGross, uploadVoucherFile } from "@kevludwig/lexware-office";
|
|
13
|
+
import { REVERSE_CHARGE_TAX_RATE, createVoucher, describeError, findPurchaseInvoiceByNumber, isReverseChargeCategory, round2, taxFromGross, uploadVoucherFile, voucherFileIds } from "@kevludwig/lexware-office";
|
|
14
14
|
import { defineTool } from "eve/tools";
|
|
15
15
|
const VOUCHER_STATUS = "unchecked";
|
|
16
16
|
const TAX_TYPE = "gross";
|
|
@@ -214,7 +214,14 @@ var create_purchase_invoice_default = defineTool({
|
|
|
214
214
|
attachmentResult = `${attachment.filename} angehängt`;
|
|
215
215
|
if (input.attachment_path) await fallback?.release?.(input.attachment_path).catch(() => {});
|
|
216
216
|
} catch (error) {
|
|
217
|
-
|
|
217
|
+
if (await voucherFileIds(client(), voucher.id, ctx.abortSignal).then((ids) => ids.length > 0, () => false)) {
|
|
218
|
+
await writeJournal("purchase", ctx.callId, {
|
|
219
|
+
status: "attached",
|
|
220
|
+
resourceId: voucher.id
|
|
221
|
+
});
|
|
222
|
+
attachmentResult = `${attachment.filename} angehängt`;
|
|
223
|
+
if (input.attachment_path) await fallback?.release?.(input.attachment_path).catch(() => {});
|
|
224
|
+
} else attachmentResult = `${attachment.filename} konnte nicht angehängt werden: ${describeError(error)}`;
|
|
218
225
|
}
|
|
219
226
|
return {
|
|
220
227
|
voucherId: voucher.id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevludwig/eve-lexware-office",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"eve": {
|
|
6
6
|
"extension": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@vercel/blob": "^2.8.0",
|
|
26
26
|
"zod": "4.5.4",
|
|
27
|
-
"@kevludwig/lexware-office": "0.1.
|
|
27
|
+
"@kevludwig/lexware-office": "0.1.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "24.x",
|