Add created_by to invoice and show it
This commit is contained in:
parent
76ea0cc411
commit
3d6f908102
10 changed files with 28 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ class Invoice < ActiveRecord::Base
|
|||
belongs_to :supplier
|
||||
belongs_to :delivery
|
||||
belongs_to :order
|
||||
belongs_to :created_by, :class_name => 'User', :foreign_key => 'created_by_user_id'
|
||||
|
||||
validates_presence_of :supplier_id
|
||||
validates_numericality_of :amount, :deposit, :deposit_credit
|
||||
|
|
@ -17,5 +18,3 @@ class Invoice < ActiveRecord::Base
|
|||
amount - deposit + deposit_credit
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue