IO-791 Bill Edit with Labor Adjustments confirmation

This commit is contained in:
Patrick Fic
2021-03-22 17:29:39 -07:00
parent af30651d7b
commit 43a266c463
9 changed files with 108 additions and 23 deletions

View File

@@ -59,20 +59,20 @@ function BillEnterModalContainer({
remainingValues.billlines &&
remainingValues.billlines.map((i) => {
const {
deductfromlabor,
deductedfromlbr,
lbr_adjustment,
location: lineLocation,
...restI
} = i;
if (deductfromlabor) {
if (deductedfromlbr) {
adjustmentsToInsert[lbr_adjustment.mod_lbr_ty] =
(adjustmentsToInsert[lbr_adjustment.mod_lbr_ty] || 0) -
restI.actual_price / lbr_adjustment.rate;
}
return {
...restI,
deductedfromlbr: deductfromlabor,
deductedfromlbr: deductedfromlbr,
joblineid: i.joblineid === "noline" ? null : i.joblineid,
};
}),