Partial fixes to jobline upsert & totals calculation. IO-730

This commit is contained in:
Patrick Fic
2021-03-04 15:43:11 -08:00
parent 0d317578b2
commit f7d1ea0a49
5 changed files with 47 additions and 37 deletions

View File

@@ -325,7 +325,7 @@ function CalculateTaxesTotals(job, otherTotals) {
job.joblines
.filter((jl) => !jl.removed)
.forEach((val) => {
if (!val.tax_part || !val.part_type || IsAdditionalCost(val)) {
if (!val.tax_part || (!val.part_type && IsAdditionalCost(val))) {
additionalItemsTax = additionalItemsTax.add(
Dinero({ amount: Math.round((val.act_price || 0) * 100) })
.multiply(val.part_qty || 1)