Merged in feature/IO-2190-Autohouse (pull request #780)
IO-2190 Paint Costs for JC if Cost/Hr is 0 Approved-by: Patrick Fic
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 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 (
|
if (
|
||||||
!billTotalsByCostCenters.additionalCosts[
|
!billTotalsByCostCenters.additionalCosts[
|
||||||
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
||||||
@@ -626,7 +631,9 @@ function GenerateCostingData(job) {
|
|||||||
billTotalsByCostCenters.additionalCosts[
|
billTotalsByCostCenters.additionalCosts[
|
||||||
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
||||||
] = Dinero({
|
] = 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 {
|
} else {
|
||||||
billTotalsByCostCenters.additionalCosts[
|
billTotalsByCostCenters.additionalCosts[
|
||||||
|
|||||||
Reference in New Issue
Block a user