Created namespace 'finance' and moved invoices into it.
This commit is contained in:
parent
30f3d199d3
commit
1d85b880f2
17 changed files with 163 additions and 133 deletions
|
|
@ -21,6 +21,8 @@ class Invoice < ActiveRecord::Base
|
|||
validates_presence_of :supplier_id
|
||||
validates_uniqueness_of :date, :scope => [:supplier_id]
|
||||
|
||||
named_scope :unpaid, :conditions => { :paid_on => nil }
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def amount=(amount)
|
||||
self[:amount] = String.delocalized_decimal(amount)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue