Skip to content

Instantly share code, notes, and snippets.

@Alphare
Last active February 28, 2019 08:54
Show Gist options
  • Save Alphare/6030bdb4631a58f55f4ba484f73cd976 to your computer and use it in GitHub Desktop.
Save Alphare/6030bdb4631a58f55f4ba484f73cd976 to your computer and use it in GitHub Desktop.
Price of importing a guitar from outside the US into France
const DOLLARS_TO_EURO = 0.88;
const CUSTOMS_TAX_PERCENTAGE = 3.2;
const VAT_PERCENTAGE = 20;
const getTtc = price => {
// price in USD
price = DOLLARS_TO_EURO * price;
const customs = (CUSTOMS_TAX_PERCENTAGE * price / 100);
const vat = (VAT_PERCENTAGE * price / 100);
return {
euro: price,
customs: customs,
vat: vat,
total: price + customs + vat
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment