IO-1706 Resolve print center issue.

This commit is contained in:
Patrick Fic
2022-02-17 17:08:25 -08:00
parent 191f3f96a2
commit 65b505035a

View File

@@ -30,7 +30,7 @@ export default async function RenderTemplate(
name: useShopSpecificTemplate
? `/${bodyshop.imexshopid}/${templateObject.name}`
: `/${templateObject.name}`,
// ...(renderAsHtml && !renderAsExcel ? {} : { recipe: "chrome-pdf" }),
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}),
},
data: {
@@ -185,7 +185,7 @@ export const GenerateDocument = async (
})
);
} else if (sendType === "x") {
console.log("excel")
console.log("excel");
await RenderTemplate(template, bodyshop, false, true);
} else {
await RenderTemplate(template, bodyshop);