Sha256: ca472ff0770af64b35ada5da396dd2a2c7d7b5d0ef909f1c7affa911e3c995ee
Contents?: true
Size: 693 Bytes
Versions: 166
Compression:
Stored size: 693 Bytes
Contents
module Comee module Core class QuotationRequestItem < ApplicationRecord enum :margin_type, {increase: 0, discount: 1} belongs_to :product belongs_to :quotation_request belongs_to :unit validates :margin_type, :expected_delivery_date, presence: true validates :quantity, :price, presence: true, numericality: {greater_than_or_equal_to: 0} validates :margin, presence: true, numericality: {greater_than_or_equal_to: 0, less_than_or_equal_to: 100} def self.ransackable_attributes(_auth_object = nil) %w[id quotation_request_id product_id unit_id quantity price margin margin_type expected_delivery_date] end end end end
Version data entries
166 entries across 166 versions & 1 rubygems