Method: Braspag::Utils.convert_decimal_to_string
- Defined in:
- lib/rbraspag/utils.rb
.convert_decimal_to_string(value) ⇒ Object
3 4 5 6 7 |
# File 'lib/rbraspag/utils.rb', line 3 def self.convert_decimal_to_string(value) cents = "0#{((value - value.to_i) * 100).to_i}".slice(-2,2) integer = (value - (value - value.to_i)).to_i "#{integer},#{cents}" end |