Return number if it already ends with zero

The specification does not mention this fact
https://www.pangaliit.ee/settlements-and-standards/reference
-number-of-the-invoice
This commit is contained in:
Artur Beljajev 2019-01-17 18:15:07 +02:00
parent 640faaadb9
commit 214b7e435d
2 changed files with 2 additions and 1 deletions

View file

@ -26,8 +26,8 @@ module Billing
next_number = number
loop do
next_number = next_number.next
return next_number if next_number.to_s.end_with?('0')
next_number = next_number.next
end
end