IO-2293 Autohouse & Job Costing Dinero Type Casting

All type cast to Dinero round to integer to prevent cast errors
This commit is contained in:
Allan Carr
2023-05-19 09:39:37 -07:00
parent 4c6a2d6d63
commit 57d8ca5829
2 changed files with 18 additions and 12 deletions

View File

@@ -642,10 +642,11 @@ function GenerateCostingData(job) {
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
].add(
Dinero({
amount:
amount: Math.round(
(job.bodyshop.jc_hourly_rates &&
job.bodyshop.jc_hourly_rates.mapa * 100) ||
0,
0
),
}).multiply(materialsHours.mapaHrs)
);
}
@@ -656,10 +657,11 @@ function GenerateCostingData(job) {
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
].add(
Dinero({
amount:
amount: Math.round(
(job.bodyshop.jc_hourly_rates &&
job.bodyshop.jc_hourly_rates.mapa * 100) ||
0,
0
),
}).multiply(materialsHours.mapaHrs)
);
}
@@ -680,10 +682,11 @@ function GenerateCostingData(job) {
job.bodyshop.md_responsibility_centers.defaults.costs.MASH
].add(
Dinero({
amount:
amount: Math.round(
(job.bodyshop.jc_hourly_rates &&
job.bodyshop.jc_hourly_rates.mash * 100) ||
0,
0
),
}).multiply(materialsHours.mashHrs)
);
}