Merged in release/2022-02-11 (pull request #381)

IO-1723 Add Additional GP to summary for multi costing.
This commit is contained in:
Patrick Fic
2022-02-11 01:01:59 +00:00

View File

@@ -73,6 +73,7 @@ async function JobCostingMulti(req, res) {
gppercentFormatted: null,
totalLaborGp: Dinero({ amount: 0 }),
totalPartsGp: Dinero({ amount: 0 }),
totalAdditionalGp: Dinero({ amount: 0 }),
totalLaborGppercent: null,
totalLaborGppercentFormatted: null,
totalPartsGppercent: null,
@@ -204,7 +205,7 @@ async function JobCostingMulti(req, res) {
multiSummary.summaryData.totalPartsSales.getAmount()) *
100
).toFixed(2);
multiSummary.summaryData.totalPartsGppercentFormatted = formatGpPercent(
multiSummary.summaryData.totalPartsGppercent
);
@@ -215,9 +216,8 @@ async function JobCostingMulti(req, res) {
100
).toFixed(2);
multiSummary.summaryData.totalAdditionalGppercentFormatted = formatGpPercent(
multiSummary.summaryData.totalAdditionalGppercent
);
multiSummary.summaryData.totalAdditionalGppercentFormatted =
formatGpPercent(multiSummary.summaryData.totalAdditionalGppercent);
multiSummary.summaryData.gppercent = (
(multiSummary.summaryData.gpdollars.getAmount() /
@@ -590,8 +590,8 @@ function GenerateCostingData(job) {
totalCost: Dinero({ amount: 0 }),
totalLaborGp: Dinero({ amount: 0 }),
totalPartsGp: Dinero({ amount: 0 }),
totalAdditionalGp: Dinero({ amount: 0 }),
gpdollars: Dinero({ amount: 0 }),
totalLaborGppercent: null,
totalLaborGppercentFormatted: null,
totalPartsGppercent: null,