From 549dcf13e6980fab7924f5dc8e9b37a3503778d4 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Sun, 12 Apr 2020 17:08:14 +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 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