Add UI elements to Job to new cieca profile fields.
This commit is contained in:
@@ -262,8 +262,8 @@ async function CalculateRatesTotals({ job, client }) {
|
||||
let hasMashLine = false;
|
||||
let hasMahwLine = false;
|
||||
let hasCustomMahwLine;
|
||||
let mapaOpCodes = ParseCalopCode(job.materials["mapa"]?.cal_opcode);
|
||||
let mashOpCodes = ParseCalopCode(job.materials["mash"]?.cal_opcode);
|
||||
let mapaOpCodes = ParseCalopCode(job.materials["MAPA"]?.cal_opcode);
|
||||
let mashOpCodes = ParseCalopCode(job.materials["MASH"]?.cal_opcode);
|
||||
|
||||
jobLines.forEach((item) => {
|
||||
//IO-1317 Use the lines on the estimate if they exist instead.
|
||||
@@ -352,16 +352,18 @@ async function CalculateRatesTotals({ job, client }) {
|
||||
}
|
||||
let threshold;
|
||||
//Check if there is a max for this type.
|
||||
if (job.materials && job.materials[property]) {
|
||||
if (job.materials && job.materials[property.toUpperCase()]) {
|
||||
//
|
||||
|
||||
if (
|
||||
job.materials[property].cal_maxdlr !== undefined &&
|
||||
job.materials[property].cal_maxdlr >= 0
|
||||
job.materials[property.toUpperCase()].cal_maxdlr !== undefined &&
|
||||
job.materials[property.toUpperCase()].cal_maxdlr >= 0
|
||||
) {
|
||||
//It has an upper threshhold.
|
||||
threshold = Dinero({
|
||||
amount: Math.round(job.materials[property].cal_maxdlr * 100),
|
||||
amount: Math.round(
|
||||
job.materials[property.toUpperCase()].cal_maxdlr * 100
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user