From 191f3f96a2a0854c37e34f6336488586d5e875f5 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 17 Feb 2022 17:06:02 -0800 Subject: [PATCH 1/2] IO-1744 Resolve missing sublet calcuations. --- server/job/job-costing.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/job/job-costing.js b/server/job/job-costing.js index fe630fe58..5ccdeba0d 100644 --- a/server/job/job-costing.js +++ b/server/job/job-costing.js @@ -720,8 +720,14 @@ function GenerateCostingData(job) { const cost_sublet = billTotalsByCostCenters.subletCosts[ccVal] || Dinero({ amount: 0 }); - const costs = cost_labor.add(cost_parts).add(cost_additional); - const totalSales = sale_labor.add(sale_parts).add(sale_additional); + const costs = cost_labor + .add(cost_parts) + .add(cost_additional) + .add(cost_sublet); + const totalSales = sale_labor + .add(sale_parts) + .add(sale_additional) + .add(sale_sublet); const gpdollars = totalSales.subtract(costs); const gppercent = ( (gpdollars.getAmount() / totalSales.getAmount()) * From 65b505035a2dfec54c6a78bfa9cb2b042d428b54 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 17 Feb 2022 17:08:25 -0800 Subject: [PATCH 2/2] IO-1706 Resolve print center issue. --- client/src/utils/RenderTemplate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js index 969f0adf1..9511416f8 100644 --- a/client/src/utils/RenderTemplate.js +++ b/client/src/utils/RenderTemplate.js @@ -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);