Sha256: ab25cceb494b7e40e325882a7fa63a260e873c3df3cf2e1d7d8938b993b320fa
Contents?: true
Size: 436 Bytes
Versions: 28
Compression:
Stored size: 436 Bytes
Contents
module Comee module Core class DeliveryNote < ApplicationRecord before_validation :generate_reference_no, if: proc { |dn| dn.reference_no.nil? } belongs_to :pod has_many :shipment_instruction_items validates :reference_no, presence: true, uniqueness: true def generate_reference_no self.reference_no = Util.generate_number("DeliveryNote", "reference_no", "DN") end end end end
Version data entries
28 entries across 28 versions & 1 rubygems