Class: MnoEnterprise::Invoice
- Inherits:
-
BaseResource
- Object
- BaseResource
- MnoEnterprise::Invoice
- Defined in:
- app/models/mno_enterprise/invoice.rb
Instance Method Summary collapse
-
#paid? ⇒ Boolean
Return true if the invoice has been paid false otherwise.
-
#period_label ⇒ Object
Return a label describing the time period this invoice covers.
Methods inherited from BaseResource
#==, base_class, #cache_key, #clear_association_cache, #clear_attribute_changes!, exists?, find_by, first, last, #max_updated_column_timestamp, #read_attribute, #reload, #save, #save!, #update, #write_attribute
Methods included from HerExtension::Validations::RemoteUniquenessValidation
Instance Method Details
#paid? ⇒ Boolean
Return true if the invoice has been paid false otherwise
49 50 51 |
# File 'app/models/mno_enterprise/invoice.rb', line 49 def paid? !self.paid_at.blank? end |
#period_label ⇒ Object
Return a label describing the time period this invoice covers
42 43 44 45 |
# File 'app/models/mno_enterprise/invoice.rb', line 42 def period_label return '' unless self.started_at && self.ended_at "#{self.started_at.strftime("%b %d,%Y")} to #{self.ended_at.strftime("%b %d,%Y")}" end |