Class: Xsys::Model::StockControl

Inherits:
Object
  • Object
show all
Defined in:
lib/xsys/model/stock_control.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ StockControl

Returns a new instance of StockControl.



8
9
10
11
12
13
14
15
16
# File 'lib/xsys/model/stock_control.rb', line 8

def initialize(attributes={})
  attributes.each do |k,v|
    if k.to_s == 'transaction_date'
      self.transaction_date = Date.parse(v) unless v.nil?
    else
      self.send("#{k}=", v) if self.respond_to?(k)
    end
  end
end

Instance Attribute Details

#errors_countObject

Returns the value of attribute errors_count.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def errors_count
  @errors_count
end

#product_category_idObject

Returns the value of attribute product_category_id.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def product_category_id
  @product_category_id
end

#product_category_nameObject

Returns the value of attribute product_category_name.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def product_category_name
  @product_category_name
end

#receipt_numberObject

Returns the value of attribute receipt_number.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def receipt_number
  @receipt_number
end

#shop_codeObject

Returns the value of attribute shop_code.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def shop_code
  @shop_code
end

#transaction_dateObject

Returns the value of attribute transaction_date.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def transaction_date
  @transaction_date
end

#transaction_idObject

Returns the value of attribute transaction_id.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def transaction_id
  @transaction_id
end

#user_idObject

Returns the value of attribute user_id.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def user_id
  @user_id
end

#user_nameObject

Returns the value of attribute user_name.



4
5
6
# File 'lib/xsys/model/stock_control.rb', line 4

def user_name
  @user_name
end