Moved balancing logic into new namespace 'finance'.

This commit is contained in:
Benjamin Meichsner 2009-01-10 22:22:16 +01:00
parent c282cae79c
commit 47398c6a70
27 changed files with 277 additions and 268 deletions

View file

@ -45,7 +45,10 @@ class Order < ActiveRecord::Base
# easyier find of next or previous model
acts_as_ordered :order => "ends"
named_scope :finished, :conditions => { :finished => true },
:order => 'ends DESC', :include => :supplier
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
def invoice_amount=(amount)
self[:invoice_amount] = String.delocalized_decimal(amount)