Merged in release/2023-05-12 (pull request #787)

Release/2023 05 12
This commit is contained in:
Patrick Fic
2023-05-12 18:18:28 +00:00
7 changed files with 204 additions and 147 deletions

View File

@@ -612,7 +612,12 @@ function GenerateCostingData(job) {
//If the hourly rates for job costing are set, add them in.
if (job.bodyshop.jc_hourly_rates && job.bodyshop.jc_hourly_rates.mapa) {
if (
job.bodyshop.jc_hourly_rates &&
(job.bodyshop.jc_hourly_rates.mapa ||
typeof job.bodyshop.jc_hourly_rates.mapa === "number" ||
isNaN(job.bodyshop.jc_hourly_rates.mapa) === false)
) {
if (
!billTotalsByCostCenters.additionalCosts[
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
@@ -626,7 +631,9 @@ function GenerateCostingData(job) {
billTotalsByCostCenters.additionalCosts[
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
] = Dinero({
amount: Math.round((job.mixdata[0] && job.mixdata[0].totalliquidcost || 0) * 100)
amount: Math.round(
((job.mixdata[0] && job.mixdata[0].totalliquidcost) || 0) * 100
),
});
} else {
billTotalsByCostCenters.additionalCosts[