Sha256: 2d2b06d0c7921d42723d8c72f6462c454c97e433463c33519c22f155101fa504

Contents?: true

Size: 574 Bytes

Versions: 65

Compression:

Stored size: 574 Bytes

Contents

module Comee
  module Core
    class StockTransferRequestItem < ApplicationRecord
      belongs_to :sales_order_item
      belongs_to :stock_transfer_request

      validates :quantity, presence: true

      def product
        sales_order_item.product
      end

      def self.ransackable_attributes(_auth_object = nil)
        %w[created_at id id_value quantity sales_order_item_id stock_transfer_request_id updated_at]
      end

      def self.ransackable_associations(_auth_object = nil)
        %w[sales_order_item stock_transfer_request]
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
comee_core-0.3.62 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.61 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.60 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.59 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.58 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.57 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.56 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.55 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.54 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.53 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.51 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.50 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.49 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.48 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.47 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.46 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.45 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.44 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.43 app/models/comee/core/stock_transfer_request_item.rb
comee_core-0.3.42 app/models/comee/core/stock_transfer_request_item.rb