Channex Taxes v0.1.2 Taxes View Source
Module to calculate Taxes
Link to this section Summary
Link to this section Functions
Link to this function
calculate(price, taxes, count_of_persons \\ 1, count_of_rooms \\ 1, count_of_nights \\ 1)
View SourceMethod 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.