Sha256: 28f12b1677e5d1bb5680caf812d342463e15d8b100f3f19f217907760cff81f1

Contents?: true

Size: 434 Bytes

Versions: 3

Compression:

Stored size: 434 Bytes

Contents

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

      validates :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

3 entries across 3 versions & 1 rubygems

Version Path
comee_core-0.1.42 app/models/comee/core/sales_order_item.rb
comee_core-0.1.41 app/models/comee/core/sales_order_item.rb
comee_core-0.1.40 app/models/comee/core/sales_order_item.rb