1.0.5 • Published 6 years ago

product-tax v1.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
6 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

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago