Channex Taxes v0.2.9 Taxes.Organizer View Source
Module with methods to group taxes by markers
Link to this section Summary
Functions
Method to recursive build tax tree
Method to recursive build tax tree based at level option
Method to convert taxes rate into float
Method to fetch marker from Tax.
Method to wrap taxes from list into tree structure with :inclusive
and :exclusive
keys at top level.
This method modify incoming payload
structure and add two new keys.
Method to group taxes by provided marker
Method to wrap into tree nested taxes
Link to this section Functions
build_taxes_tree(taxes)
View Sourcebuild_taxes_tree([Taxes.Types.tax()]) :: [Taxes.tax()]
Method to recursive build tax tree
Method to recursive build tax tree based at level option
Method to convert taxes rate into float
get_mark_value(tax, field)
View Sourceget_mark_value(Taxes.Types.tax(), :atom | String.t()) :: any()
Method to fetch marker from Tax.
group_taxes(payload)
View Sourcegroup_taxes(Taxes.Types.payload()) :: Taxes.Types.payload()
Method to wrap taxes from list into tree structure with :inclusive
and :exclusive
keys at top level.
This method modify incoming payload
structure and add two new keys.
group_taxes_by(taxes, mark)
View Sourcegroup_taxes_by([Taxes.Types.tax()] | map(), :atom | String.t()) :: map()
Method to group taxes by provided marker
wrap_child_taxes_into_tree(tax)
View Sourcewrap_child_taxes_into_tree(Taxes.Types.tax()) :: Taxes.Types.tax()
Method to wrap into tree nested taxes