Compare commits

...

15 Commits

Author SHA1 Message Date
Allan Carr
1896c4db59 Merged in feature/IO-3503-Job-Costing-Fixes (pull request #2921)
IO-3503 Job Costing Corrections

Approved-by: Dave Richer
2026-01-31 01:10:20 +00:00
Allan Carr
78770ed54e IO-3503 Job Costing Corrections
Signed-off-by: Allan Carr <allan@imexsystems.ca>
2026-01-30 16:45:25 -08:00
Dave Richer
9e2ae2cc10 Merged in feature/IO-3499-React-19 (pull request #2919)
feature/IO-3499-React-19 -Checkpoint
2026-01-30 22:32:54 +00:00
Dave Richer
f0dfa2717f Merged in feature/IO-3499-React-19 (pull request #2916)
feature/IO-3499-React-19 -Checkpoint
2026-01-30 17:33:51 +00:00
Allan Carr
66924367fc Merged in feature/IO-3522-Fortellis-Bug-Fix (pull request #2913)
IO-3522 Replace Email with Phone1
2026-01-29 21:28:11 +00:00
Allan Carr
fdc06e79a6 IO-3522 Replace Email with Phone1
Signed-off-by: Allan Carr <allan@imexsystems.ca>
2026-01-29 13:29:01 -08:00
Allan Carr
ca1703e724 Merged in feature/IO-3522-Fortellis-Bug-Fix (pull request #2910)
Feature/IO-3522 Fortellis Bug Fix

Approved-by: Patrick Fic
2026-01-29 21:00:45 +00:00
Allan Carr
163819809c IO-3522 Fortellis Null Coalesce for Owner data
Signed-off-by: Allan Carr <allan@imexsystems.ca>
2026-01-29 12:57:14 -08:00
Dave Richer
42fa85e145 Merged in feature/IO-3499-React-19 (pull request #2908)
feature/IO-3499-React-19 -Checkpoint
2026-01-29 17:37:01 +00:00
Dave Richer
0c9f7df9ac Merged in feature/IO-3499-React-19 (pull request #2907)
feature/IO-3499-React-19 -Checkpoint
2026-01-29 17:33:26 +00:00
Dave Richer
78d816fa8b Merged in feature/IO-3499-React-19 (pull request #2905)
feature/IO-3499-React-19 -Checkpoint
2026-01-28 19:02:42 +00:00
Dave Richer
4a1b1fe905 Merged in feature/IO-3499-React-19 (pull request #2902)
Feature/IO-3499 React 19
2026-01-28 02:31:43 +00:00
Dave Richer
a9fb77189e Merged in feature/IO-3499-React-19 (pull request #2900)
Feature/IO-3499 React 19
2026-01-28 00:27:51 +00:00
Patrick Fic
70b6aa63ed Merged in feature/IO-3517-fortellis-hotfix (pull request #2899)
IO-3517 Resolve emit on fortellis completion.
2026-01-27 19:32:02 +00:00
Patrick Fic
844a879f1c IO-3517 Resolve emit on fortellis completion. 2026-01-27 11:31:10 -08:00
3 changed files with 21 additions and 15 deletions

View File

@@ -306,8 +306,7 @@ async function FortellisSelectedCustomer({ socket, redisHelpers, selectedCustome
CreateFortellisLogEvent(socket, "ERROR", `{7.1} Error posting vehicle service history. ${error.message}`);
}
//TODO: IF THE VEHICLE SERVICE HISTORY FAILS, WE NEED TO MARK IT AS SUCH AND NOT DELETE THE TRANSACTION.
//socket.emit("export-success", JobData.id);
socket.emit("export-success", JobData.id);
} else {
//There was something wrong. Throw an error to trigger clean up.
//throw new Error("Error posting DMS Batch Transaction");
@@ -431,10 +430,10 @@ async function QueryDmsCustomerByName({ socket, redisHelpers, JobData }) {
const ownerName =
JobData.ownr_co_nm && JobData.ownr_co_nm.trim() !== ""
//? [["firstName", JobData.ownr_co_nm.replace(replaceSpecialRegex, "").toUpperCase()]] // Commented out until we receive direction.
? [["email", JobData.ownr_ea.toUpperCase()]]
? [["phone", JobData.ownr_ph1?.replace(replaceSpecialRegex, "")]]
: [
["firstName", JobData.ownr_fn.replace(replaceSpecialRegex, "").toUpperCase()],
["lastName", JobData.ownr_ln.replace(replaceSpecialRegex, "").toUpperCase()]
["firstName", JobData.ownr_fn?.replace(replaceSpecialRegex, "").toUpperCase()],
["lastName", JobData.ownr_ln?.replace(replaceSpecialRegex, "").toUpperCase()]
];
try {
const result = await MakeFortellisCall({

View File

@@ -1725,6 +1725,7 @@ query QUERY_JOB_COSTING_DETAILS($id: uuid!) {
profitcenter_part
profitcenter_labor
act_price_before_ppc
manual_line
}
bills {
id
@@ -1842,6 +1843,7 @@ exports.QUERY_JOB_COSTING_DETAILS_MULTI = ` query QUERY_JOB_COSTING_DETAILS_MULT
op_code_desc
profitcenter_part
profitcenter_labor
manual_line
}
bills {
id

View File

@@ -343,7 +343,7 @@ function GenerateCostingData(job) {
if (!acc.labor[laborProfitCenter]) acc.labor[laborProfitCenter] = Dinero();
acc.labor[laborProfitCenter] = acc.labor[laborProfitCenter].add(laborAmount);
if (val.act_price > 0 && val.lbr_op === "OP14") {
if (val.act_price > 0 && val.lbr_op === "OP14" && !val.part_type) {
//Scenario where SGI may pay out hours using a part price.
acc.labor[laborProfitCenter] = acc.labor[laborProfitCenter].add(
Dinero({
@@ -363,6 +363,9 @@ function GenerateCostingData(job) {
if (val.mod_lbr_ty !== "LAR" && mashOpCodes.includes(val.lbr_op)) {
materialsHours.mashHrs += val.mod_lb_hrs || 0;
}
if (val.manual_line === true && !mashOpCodes.includes(val.lbr_op) && val.mod_lbr_ty !== "LAR" ) {
materialsHours.mashHrs += val.mod_lb_hrs || 0;
}
}
}
@@ -499,7 +502,7 @@ function GenerateCostingData(job) {
let disc = Dinero(),
markup = Dinero();
const convertedKey = Object.keys(defaultProfits).find((k) => defaultProfits[k] === key);
if (job.parts_tax_rates && job.parts_tax_rates[convertedKey.toUpperCase()]) {
if (convertedKey && job.parts_tax_rates && job.parts_tax_rates[convertedKey.toUpperCase()]) {
if (
job.parts_tax_rates[convertedKey.toUpperCase()].prt_discp !== undefined &&
job.parts_tax_rates[convertedKey.toUpperCase()].prt_discp >= 0
@@ -523,14 +526,16 @@ function GenerateCostingData(job) {
}
if (InstanceManager({ rome: true })) {
const correspondingCiecaStlTotalLine = job.cieca_stl?.data.find(
(c) => c.ttl_typecd === convertedKey.toUpperCase()
);
if (
correspondingCiecaStlTotalLine &&
Math.abs(jobLineTotalsByProfitCenter.parts[key].getAmount() - correspondingCiecaStlTotalLine.ttl_amt * 100) > 1
) {
jobLineTotalsByProfitCenter.parts[key] = jobLineTotalsByProfitCenter.parts[key].add(disc).add(markup);
if (convertedKey) {
const correspondingCiecaStlTotalLine = job.cieca_stl?.data.find(
(c) => c.ttl_typecd === convertedKey.toUpperCase()
);
if (
correspondingCiecaStlTotalLine &&
Math.abs(jobLineTotalsByProfitCenter.parts[key].getAmount() - correspondingCiecaStlTotalLine.ttl_amt * 100) > 1
) {
jobLineTotalsByProfitCenter.parts[key] = jobLineTotalsByProfitCenter.parts[key].add(disc).add(markup);
}
}
}
});