This commit is contained in:
Nicolas Bally 2020-04-12 17:08:14 +02:00
parent 22b336f738
commit 549dcf13e6

View File

@ -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