Module: Stall::TotalPricesManager
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/stall/total_prices_manager.rb
Instance Method Summary collapse
-
#remainder ⇒ Object
Returns the balance between the actual total price and the zero-floored total price displayed to the users.
- #remainder? ⇒ Boolean
Instance Method Details
#remainder ⇒ Object
Returns the balance between the actual total price and the zero-floored total price displayed to the users.
This allows for calculating credit notes amount when an order is paid with a negative remainder
26 27 28 |
# File 'lib/stall/total_prices_manager.rb', line 26 def remainder total_price - original_total_price end |
#remainder? ⇒ Boolean
30 31 32 |
# File 'lib/stall/total_prices_manager.rb', line 30 def remainder? Stall.config.convert_cart_remainder_to_credit_note && remainder.to_d > 0 end |