Skip to content

Commit

Permalink
Fixed defined?(:refunded_at) etc. issues.
Browse files Browse the repository at this point in the history
Closes #39.
  • Loading branch information
nalanj committed May 17, 2016
1 parent fbed825 commit 07afc44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/payday/invoiceable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ def total
end

def overdue?
defined?(:due_at) && ((due_at.is_a?(Date) && due_at < Date.today) || (due_at.is_a?(Time) && due_at < Time.now)) && !paid_at
defined?(due_at) && ((due_at.is_a?(Date) && due_at < Date.today) || (due_at.is_a?(Time) && due_at < Time.now)) && !paid_at
end

def refunded?
defined?(:refunded_at) && !!refunded_at
defined?(refunded_at) && !!refunded_at
end

def paid?
defined?(:paid_at) && !!paid_at
defined?(paid_at) && !!paid_at
end

# Renders this invoice to pdf as a string
Expand Down

0 comments on commit 07afc44

Please sign in to comment.