Always generate reference_no of length 7

This commit is contained in:
Karl Erik Õunapuu 2020-09-09 12:14:01 +03:00
parent a408881897
commit 05ca909741
No known key found for this signature in database
GPG key ID: C9DD647298A34764

View file

@ -2,7 +2,7 @@ module Billing
class ReferenceNo
class Base
def self.generate
new(SecureRandom.random_number(1..1_000_000))
new((SecureRandom.random_number(9e5) + 1e5).to_i)
end
def initialize(base)