Channex.io Taxes

Module to calculate taxes based at Raw Price (Net price plus all inclusive taxes and fees)

Usage

taxes = [
%{
title: "Service Fee",
rate: 10.00,
is_inclusive: false,
logic: :per_person
}
]
Taxes.calculate(100.00, taxes, 1)
# output > {:ok, 100.00, 110.00, [{"Service Fee", 10.0}]}

Method calculate/5 accept next arguments:

Output is tuple with:

Installation

If available in Hex, the package can be installed by adding taxes to your list of dependencies in mix.exs:

def deps do
[
{:taxes, "~> 0.1.0"}
]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/taxes.