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.62 app/models/comee/core/back_order_item.rb
comee_core-0.3.61 app/models/comee/core/back_order_item.rb
comee_core-0.3.60 app/models/comee/core/back_order_item.rb
comee_core-0.3.59 app/models/comee/core/back_order_item.rb
comee_core-0.3.58 app/models/comee/core/back_order_item.rb
comee_core-0.3.57 app/models/comee/core/back_order_item.rb
comee_core-0.3.56 app/models/comee/core/back_order_item.rb
comee_core-0.3.55 app/models/comee/core/back_order_item.rb
comee_core-0.3.54 app/models/comee/core/back_order_item.rb
comee_core-0.3.53 app/models/comee/core/back_order_item.rb
comee_core-0.3.51 app/models/comee/core/back_order_item.rb
comee_core-0.3.50 app/models/comee/core/back_order_item.rb
comee_core-0.3.49 app/models/comee/core/back_order_item.rb
comee_core-0.3.48 app/models/comee/core/back_order_item.rb
comee_core-0.3.47 app/models/comee/core/back_order_item.rb
comee_core-0.3.46 app/models/comee/core/back_order_item.rb
comee_core-0.3.45 app/models/comee/core/back_order_item.rb
comee_core-0.3.44 app/models/comee/core/back_order_item.rb
comee_core-0.3.43 app/models/comee/core/back_order_item.rb
comee_core-0.3.42 app/models/comee/core/back_order_item.rb