Second part of admin-namespace-reorder. Also renamed OrderGroup into Ordergroup. More view-sharing between groups is neccessary.
This commit is contained in:
parent
2d5dc03b90
commit
fadc951208
83 changed files with 410 additions and 518 deletions
|
|
@ -1,23 +1,23 @@
|
|||
# == Schema Information
|
||||
# Schema version: 20090102171850
|
||||
# Schema version: 20090114101610
|
||||
#
|
||||
# Table name: financial_transactions
|
||||
#
|
||||
# id :integer(4) not null, primary key
|
||||
# order_group_id :integer(4) default(0), not null
|
||||
# amount :decimal(8, 2) default(0.0), not null
|
||||
# note :text default(""), not null
|
||||
# user_id :integer(4) default(0), not null
|
||||
# created_on :datetime not null
|
||||
# id :integer(4) not null, primary key
|
||||
# ordergroup_id :integer(4) default(0), not null
|
||||
# amount :decimal(8, 2) default(0.0), not null
|
||||
# note :text default(""), not null
|
||||
# user_id :integer(4) default(0), not null
|
||||
# created_on :datetime not null
|
||||
#
|
||||
|
||||
# financial transactions are the foodcoop internal financial transactions
|
||||
# only order_groups have an account balance and are happy to transfer money
|
||||
# only ordergroups have an account balance and are happy to transfer money
|
||||
class FinancialTransaction < ActiveRecord::Base
|
||||
belongs_to :order_group
|
||||
belongs_to :ordergroup
|
||||
belongs_to :user
|
||||
|
||||
validates_presence_of :note, :user_id, :order_group_id
|
||||
validates_presence_of :note, :user_id, :ordergroup_id
|
||||
validates_numericality_of :amount
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue