From a110f3c49069497bec0484a57d0aa2eb028c7a65 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Tue, 14 Apr 2020 10:11:13 +0200 Subject: [PATCH] suite --- app/models/price_document.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/price_document.rb b/app/models/price_document.rb index ca5d4c9..c624ce3 100644 --- a/app/models/price_document.rb +++ b/app/models/price_document.rb @@ -119,8 +119,7 @@ class PriceDocument < ApplicationRecord self.d_index = last_number+1 - 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) + self.d_number = self.d_prefix+self.date.strftime("%y")+self.date.strftime("%m")+('%04d' % self.d_index) end self.save