Merged in release/2022-02-18 (pull request #402)
release/2022-02-18 Approved-by: Patrick Fic
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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()) *
|
||||
|
||||
Reference in New Issue
Block a user