show supplier user-interface update

This commit is contained in:
wvengen 2014-02-24 14:33:05 +01:00
parent 0014435663
commit 0fa9bebac9
11 changed files with 94 additions and 60 deletions

View file

@ -31,6 +31,8 @@ class Order < ActiveRecord::Base
scope :closed, -> { where(state: 'closed').order('ends DESC') }
scope :stockit, -> { where(supplier_id: 0).order('ends DESC') }
scope :recent, -> { order('starts DESC').limit(10) }
def stockit?
supplier_id == 0
end