IO-2173 Job Line Discount
Correct for when new line is added with no part
This commit is contained in:
@@ -44,7 +44,7 @@ function JobLinesUpsertModalContainer({
|
|||||||
...UndefinedToNull({
|
...UndefinedToNull({
|
||||||
...values,
|
...values,
|
||||||
prt_dsmk_m: Dinero({
|
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))
|
.percentage(Math.abs(values.prt_dsmk_p || 0))
|
||||||
.multiply(values.prt_dsmk_p >= 0 ? 1 : -1)
|
.multiply(values.prt_dsmk_p >= 0 ? 1 : -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user