Class: Activity::Adjustment
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Activity::Adjustment
- Includes:
- ActivityTypeModelHelper, ExtensibleObjectHelper
- Defined in:
- app/models/activity/adjustment.rb
Instance Method Summary collapse
Methods included from ActivityTypeModelHelper
Methods included from ExtensibleObjectHelper
Instance Method Details
#as_legacy_ledger_row ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/models/activity/adjustment.rb', line 11 def as_legacy_ledger_row if label and comments and label.length > 0 and comments.length > 0 description = '%s - %s' % [label, comments] else description = (comments and comments.length > 0) ? comments : label end [ 1, activity.cost, activity.cost, 'Adjustment', occurred_on.strftime('%m/%d/%y'), description.tr("\r\n", '') ] end |
#name ⇒ Object
7 8 9 |
# File 'app/models/activity/adjustment.rb', line 7 def name type_quick_namer '%s for %s on %s', label, client end |