Sha256: 77ae14c6140b0b791afc2d84dffd717e4ab88bcaaf67f3dd4f96cf6577dd44e1
Contents?: true
Size: 690 Bytes
Versions: 25
Compression:
Stored size: 690 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[quotation_request_id product_id unit_id quantity price margin margin_type expected_delivery_date] end end end end
Version data entries
25 entries across 25 versions & 1 rubygems