Skip to content

@billforward-alex billforward-alex released this Oct 2, 2017 · 18 commits to master since this release

Release 1.2017.271

Fixes

ChartMogul

Changed the following formulae:

  • amount = ∑debitsIncTax
  • discountAmount = ∑creditsIncTax
  • taxAmount = ∑debitsTaxOnly

After:

  • amount = ∑debitsIncTax − ∑creditsIncTax
  • discountAmount = ∑creditsIncTax
  • taxAmount = Math.max(0, ∑debitsTaxOnly − ∑creditsTaxOnly)

In all, the following fixes are included:

  • We now report the correct amount (i.e. we report the net, not the gross)
  • We now report the correct taxAmount (i.e. we report the net, not the gross)
  • We now prefer to report $0 instead of negative tax (closest supported representation)
  • We now round up "x minutes" plans to "1 day" (closest supported representation)

We switched over to this new algorithm in Production at 2017-10-01 01:23:18Z.

Assets 2
You can’t perform that action at this time.