Autohouse change to respect flat rate employees

This commit is contained in:
Patrick Fic
2023-03-09 11:08:47 -08:00
parent 111f554dea
commit c695aea12e
2 changed files with 6 additions and 1 deletions

View File

@@ -814,7 +814,11 @@ const CreateCosts = (job) => {
].add( ].add(
Dinero({ Dinero({
amount: Math.round((ticket_val.rate || 0) * 100), amount: Math.round((ticket_val.rate || 0) * 100),
}).multiply(ticket_val.actualhrs || ticket_val.productivehrs || 0) }).multiply(
(ticket_val.flat_rate
? ticket_val.productivehrs
: ticket_val.actualhrs) || 0
)
); );
return ticket_acc; return ticket_acc;

View File

@@ -775,6 +775,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
cost_center cost_center
actualhrs actualhrs
productivehrs productivehrs
flat_rate
} }
area_of_damage area_of_damage
employee_prep_rel { employee_prep_rel {