Channex Taxes v0.2.9 Taxes View Source

Module to calculate Taxes

Link to this section Summary

Link to this section Functions

Link to this function

calculate(price, taxes, exponent \\ 2, count_of_persons \\ 1, count_of_rooms \\ 1, count_of_nights \\ 1)

View Source

Method to calculate Taxes

We take as a basis that the price passed to the method is include all inclusive taxes. Based at this basis, to get Net Price, we should exclude all inclusive taxes from Price. To do that, at first step, we should group taxes by type.