Sha256: f66fdb677b7fe4a12efb79a6d471179365ce5ff366bf530b0655b4284b597880

Contents?: true

Size: 584 Bytes

Versions: 194

Compression:

Stored size: 584 Bytes

Contents

module Comee
  module Core
    class BackOrderItem < ApplicationRecord
      enum :item_status, {available: 0, out_of_stock: 1}

      belongs_to :back_order
      belongs_to :product

      validates :item_status, :from, :to, :delivery_date, presence: true
      validates :requested_quantity, :requested_unit_price, :supplier_quantity, :supplier_unit_price,
                presence: true, numericality: {greater_than: 0}

      delegate(:code, :name, :description, to: :product, prefix: true)
      # delegate(:unit_code, :unit_name, to: :product, prefix: false)
    end
  end
end

Version data entries

194 entries across 194 versions & 1 rubygems

Version Path
comee_core-0.3.21 app/models/comee/core/back_order_item.rb
comee_core-0.3.20 app/models/comee/core/back_order_item.rb
comee_core-0.3.19 app/models/comee/core/back_order_item.rb
comee_core-0.3.18 app/models/comee/core/back_order_item.rb
comee_core-0.3.17 app/models/comee/core/back_order_item.rb
comee_core-0.3.16 app/models/comee/core/back_order_item.rb
comee_core-0.3.15 app/models/comee/core/back_order_item.rb
comee_core-0.3.14 app/models/comee/core/back_order_item.rb
comee_core-0.3.13 app/models/comee/core/back_order_item.rb
comee_core-0.3.12 app/models/comee/core/back_order_item.rb
comee_core-0.3.11 app/models/comee/core/back_order_item.rb
comee_core-0.3.10 app/models/comee/core/back_order_item.rb
comee_core-0.3.9 app/models/comee/core/back_order_item.rb
comee_core-0.3.8 app/models/comee/core/back_order_item.rb
comee_core-0.3.7 app/models/comee/core/back_order_item.rb
comee_core-0.3.6 app/models/comee/core/back_order_item.rb
comee_core-0.3.5 app/models/comee/core/back_order_item.rb
comee_core-0.3.4 app/models/comee/core/back_order_item.rb
comee_core-0.3.3 app/models/comee/core/back_order_item.rb
comee_core-0.3.2 app/models/comee/core/back_order_item.rb