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
|
name: useShopSpecificTemplate
|
||||||
? `/${bodyshop.imexshopid}/${templateObject.name}`
|
? `/${bodyshop.imexshopid}/${templateObject.name}`
|
||||||
: `/${templateObject.name}`,
|
: `/${templateObject.name}`,
|
||||||
// ...(renderAsHtml && !renderAsExcel ? {} : { recipe: "chrome-pdf" }),
|
...(renderAsHtml ? {} : { recipe: "chrome-pdf" }),
|
||||||
...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}),
|
...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}),
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
@@ -185,7 +185,7 @@ export const GenerateDocument = async (
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else if (sendType === "x") {
|
} else if (sendType === "x") {
|
||||||
console.log("excel")
|
console.log("excel");
|
||||||
await RenderTemplate(template, bodyshop, false, true);
|
await RenderTemplate(template, bodyshop, false, true);
|
||||||
} else {
|
} else {
|
||||||
await RenderTemplate(template, bodyshop);
|
await RenderTemplate(template, bodyshop);
|
||||||
|
|||||||
@@ -720,8 +720,14 @@ function GenerateCostingData(job) {
|
|||||||
const cost_sublet =
|
const cost_sublet =
|
||||||
billTotalsByCostCenters.subletCosts[ccVal] || Dinero({ amount: 0 });
|
billTotalsByCostCenters.subletCosts[ccVal] || Dinero({ amount: 0 });
|
||||||
|
|
||||||
const costs = cost_labor.add(cost_parts).add(cost_additional);
|
const costs = cost_labor
|
||||||
const totalSales = sale_labor.add(sale_parts).add(sale_additional);
|
.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 gpdollars = totalSales.subtract(costs);
|
||||||
const gppercent = (
|
const gppercent = (
|
||||||
(gpdollars.getAmount() / totalSales.getAmount()) *
|
(gpdollars.getAmount() / totalSales.getAmount()) *
|
||||||
|
|||||||
Reference in New Issue
Block a user