IO-2190 Paint Costs for JC if Cost/Hr is 0
This commit is contained in:
@@ -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[
|
||||
|
||||
Reference in New Issue
Block a user