1.0.5 • Published 7 years ago

product-tax v1.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

Getting Started

<script src="https://unpkg.com/product-tax"></script>

Usage

var taxPercent = 20
var discount = 30
var finalPrice = 29.4

var basePrice = tax.final.discount.percent(taxPercent, discount, finalPrice)
// => 35

This will calculate the base price from the final price with tax and discount percent applied

Examples

git clone https://github.com/sambarrowclough/fws-product-tax.git
cd fws-product-tax
npm i
npm start

Test

npm test

Formulas

From base with tax, discount applied

@params net (base), rate (tax), percent (discountPercent)

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago