IO-1972 Converted to labor display.
This commit is contained in:
@@ -66,10 +66,8 @@ export function JobLineConvertToLabor({
|
||||
const newAdjustments = _.cloneDeep(
|
||||
existingAdjustments.data.jobs_by_pk.lbr_adjustments
|
||||
);
|
||||
|
||||
newAdjustments[mod_lbr_ty] =
|
||||
(newAdjustments[mod_lbr_ty] || 0) +
|
||||
calculateAdjustment({ mod_lbr_ty, job, jobline });
|
||||
const adjustment = calculateAdjustment({ mod_lbr_ty, job, jobline });
|
||||
newAdjustments[mod_lbr_ty] = (newAdjustments[mod_lbr_ty] || 0) + adjustment;
|
||||
|
||||
const jobUpdate = client.mutate({
|
||||
mutation: UPDATE_JOB,
|
||||
@@ -83,7 +81,13 @@ export function JobLineConvertToLabor({
|
||||
mutation: UPDATE_JOB_LINE,
|
||||
variables: {
|
||||
lineId: jobline.id,
|
||||
line: { convertedtolbr: true },
|
||||
line: {
|
||||
convertedtolbr: true,
|
||||
convertedtolbr_data: {
|
||||
mod_lbr_ty: mod_lbr_ty,
|
||||
mod_lb_hrs: adjustment,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user