View Source Taxes.Calculator (Channex Taxes v0.3.2)
Module with logic to calculate taxes based at Taxes tree
Summary
Functions
Method to calculate taxes based at payload
and type of taxes
Method to calculate tax values
Method to calculate tax amounts
Remove duplicated taxes
Method to get Net price from raw_price
by exclude inclusive taxes
Method to set total price into payload
Functions
@spec calculate_taxes(Taxes.Types.payload(), :atom) :: Taxes.Types.payload()
Method to calculate taxes based at payload
and type of taxes
@spec calculate_taxes(map(), float(), list(), Taxes.Types.payload()) :: list()
Method to calculate tax values
@spec get_tax_amounts(map(), map(), Taxes.Types.payload()) :: map()
Method to calculate tax amounts
@spec remove_duplicates(Taxes.Types.payload()) :: Taxes.Types.payload()
Remove duplicated taxes
@spec set_net_price(Taxes.Types.payload()) :: Taxes.Types.payload()
Method to get Net price from raw_price
by exclude inclusive taxes
@spec set_total_price(Taxes.Types.payload()) :: Taxes.Types.payload()
Method to set total price into payload