IO-2173 Job Line Discount

Correct for when new line is added with no part
This commit is contained in:
Allan Carr
2023-02-16 17:23:09 -08:00
parent c2bf6841e1
commit 3650cacb51

View File

@@ -44,7 +44,7 @@ function JobLinesUpsertModalContainer({
...UndefinedToNull({
...values,
prt_dsmk_m: Dinero({
amount: Math.round(values.act_price * 100),
amount: Math.round((values.act_price || 0) * 100),
})
.percentage(Math.abs(values.prt_dsmk_p || 0))
.multiply(values.prt_dsmk_p >= 0 ? 1 : -1)