diff --git a/app/models/price_document.rb b/app/models/price_document.rb index d3ee6f0..ca5d4c9 100644 --- a/app/models/price_document.rb +++ b/app/models/price_document.rb @@ -121,8 +121,7 @@ class PriceDocument < ApplicationRecord if self.price_document_type_id == 1 self.d_number = self.d_prefix+self.date.strftime("%y")+self.date.strftime("%m")+('%04d' % self.d_index) - else - self.d_number = self.d_prefix+self.d_year.to_s+('%04d' % self.d_index) + end self.save