calculatepricevat

Calculate the price of a product with VAT

Usage no npm install needed!

<script type="module">
  import calculatepricevat from 'https://cdn.skypack.dev/calculatepricevat';
</script>

README

Calculate VAT

This package contains a function to calculate the price of a product with VAT

Usage

var calculate_VAT=require("./calculatevat").calculate_VAT;
let calc=calculate_VAT(1524,11);
//first parameter: Price
//second parameter: The VAT percentage according to the country 
console.log("The VAT to pay is: "+calc.vat);
console.log("The total to pay already with the VAT included is: "+calc.total);