Fix #44 with Handlebars Templates
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import dayjs from "dayjs";
|
||||
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
||||
import Handlebars from "handlebars";
|
||||
import axios from "axios";
|
||||
import { eq, inArray, and } from "drizzle-orm"; // Drizzle Operatoren
|
||||
|
||||
@@ -10,6 +9,7 @@ import { saveFile } from "../utils/files";
|
||||
import {FastifyInstance} from "fastify";
|
||||
import {useNextNumberRangeNumber} from "../utils/functions";
|
||||
import {createInvoicePDF} from "../utils/pdf"; // Achtung: Muss Node.js Buffer unterstützen!
|
||||
import { documentTemplateHandlebars } from "../utils/handlebars";
|
||||
|
||||
dayjs.extend(quarterOfYear);
|
||||
|
||||
@@ -609,8 +609,8 @@ export function getDocumentDataBackend(
|
||||
};
|
||||
};
|
||||
|
||||
const templateStartText = Handlebars.compile(itemInfo.startText || "");
|
||||
const templateEndText = Handlebars.compile(itemInfo.endText || "");
|
||||
const templateStartText = documentTemplateHandlebars.compile(itemInfo.startText || "");
|
||||
const templateEndText = documentTemplateHandlebars.compile(itemInfo.endText || "");
|
||||
|
||||
// --- 6. Title Sums Formatting ---
|
||||
let returnTitleSums: Record<string, string> = {};
|
||||
|
||||
Reference in New Issue
Block a user