IO-2089 Incorporate Lbr Adjustments into scoreboard.

This commit is contained in:
Patrick Fic
2023-01-02 14:48:10 -08:00
parent f6bf1ce793
commit f8e74d9bad
2 changed files with 12 additions and 0 deletions

View File

@@ -166,6 +166,16 @@ export default function ScoreboardAddButton({
painthrs: 0,
}
);
//Add Labor Adjustments
v.painthrs = v.painthrs + (job.lbr_adjustments.LAR || 0);
v.bodyhrs =
v.bodyhrs +
Object.keys(job.lbr_adjustments)
.filter((key) => key !== "LAR")
.reduce((acc, val) => {
return acc + job.lbr_adjustments[val];
}, 0);
form.setFieldsValue({
date: new moment(),
bodyhrs: Math.round(v.bodyhrs * 10) / 10,