Class: SpreeCmCommissioner::PenaltyCalculator

Inherits:
Object
  • Object
show all
Defined in:
app/services/spree_cm_commissioner/penalty_calculator.rb

Class Method Summary collapse

Class Method Details

.calculate_penalty_in_days(current_date, due_date) ⇒ Object



3
4
5
# File 'app/services/spree_cm_commissioner/penalty_calculator.rb', line 3

def self.calculate_penalty_in_days(current_date, due_date)
  ((current_date - due_date).to_i / 1.day).to_i
end