Sha256: 2b108e31d2da23c9e7d12ce87f27b8ec28d68f0b31feca6c92c94d23b4f2e13a

Contents?: true

Size: 509 Bytes

Versions: 5

Compression:

Stored size: 509 Bytes

Contents

module Comee
  module Core
    class SalesOrderItem < ApplicationRecord
      belongs_to :sales_order
      belongs_to :customer_order_item
      belongs_to :product
      belongs_to :unit
      has_many :warehouse_shipment_items
      has_many :item_statuses

      validates :customer_item_no, :delivery_date, presence: true
      validates :quantity, :price, presence: true, numericality: {greater_than: 0}
      validates :quantity_delivered, numericality: {greater_than_or_equal_to: 0}
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
comee_core-0.1.53 app/models/comee/core/sales_order_item.rb
comee_core-0.1.52 app/models/comee/core/sales_order_item.rb
comee_core-0.1.51 app/models/comee/core/sales_order_item.rb
comee_core-0.1.50 app/models/comee/core/sales_order_item.rb
comee_core-0.1.49 app/models/comee/core/sales_order_item.rb