Improved auto allocation IO-442
This commit is contained in:
@@ -23,7 +23,14 @@ export function JobsCloseAutoAllocate({ bodyshop, joblines, form, disabled }) {
|
||||
if (jl.part_type) {
|
||||
ret.profitcenter_part = defaults.profits[jl.part_type.toUpperCase()];
|
||||
} else {
|
||||
console.log("Jobline Didnt matchMedia.", jl);
|
||||
}
|
||||
if (jl.mod_lbr_ty) {
|
||||
ret.profitcenter_labor =
|
||||
defaults.profits[jl.mod_lbr_ty.toUpperCase()];
|
||||
} else {
|
||||
ret.profitcenter_labor = null;
|
||||
}
|
||||
if (!jl.part_type && !jl.mod_lbr_ty) {
|
||||
const lineDesc = jl.line_desc.toLowerCase();
|
||||
if (lineDesc.includes("shop materials")) {
|
||||
ret.profitcenter_part = defaults.profits["MASH"];
|
||||
@@ -35,12 +42,6 @@ export function JobsCloseAutoAllocate({ bodyshop, joblines, form, disabled }) {
|
||||
ret.profitcenter_part = null;
|
||||
}
|
||||
}
|
||||
if (jl.mod_lbr_ty) {
|
||||
ret.profitcenter_labor =
|
||||
defaults.profits[jl.mod_lbr_ty.toUpperCase()];
|
||||
} else {
|
||||
ret.profitcenter_labor = null;
|
||||
}
|
||||
return ret;
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user