Autohouse change to respect flat rate employees
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user