updated migration code

This commit is contained in:
Yan
2017-06-05 15:06:34 +06:30
parent b332d6a525
commit f004db9b19
16 changed files with 33 additions and 33 deletions

View File

@@ -14,9 +14,9 @@ class SeedGenerator < ApplicationRecord
seed.current = current_no
seed.save
end
padding_len = 12 - prefix.length
padding_len = 15 - prefix.length
return prefix +"-"+ seed.current.to_s.to_s.rjust((12-prefix.length)+1,'0')
return prefix +"-"+ seed.current.to_s.to_s.rjust((14-prefix.length)+1,'0')
end
def self.new_receipt_no