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

@@ -265,20 +265,20 @@ const CreateRepairOrderTag = (job, errorCallback) => {
}${job.est_ct_fn ? job.est_ct_fn : ""}`,
},
CustomerInformation: {
FirstName: job.ownr_fn || "",
LastName: job.ownr_ln || "",
Street: job.ownr_addr1 || "",
City: job.ownr_city || "",
State: job.ownr_st || "",
FirstName: "",
LastName: "",
Street: "",
City: "",
State: "",
Zip: (job.ownr_zip && job.ownr_zip.substring(0, 3)) || "",
Phone1: job.ownr_ph1 || "",
Phone1: "",
Phone2: null,
Phone2Extension: null,
Phone3: null,
Phone3Extension: null,
FileComments: null,
Source: null,
Email: job.ownr_ea || "",
Email: "",
RetWhsl: null,
Cat: null,
InsuredorClaimantFlag: null,
@@ -762,7 +762,12 @@ const CreateCosts = (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[
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA

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[