Get rid of BigDecimal.new deprecation warning

See #1521
This commit is contained in:
Alex Sherman 2020-02-07 18:21:42 +05:00
parent 5fc8b37236
commit a89688154a
4 changed files with 8 additions and 8 deletions

View file

@ -45,7 +45,7 @@ class BankStatement < ApplicationRecord
buyer_name: row[83, 35].strip,
document_no: row[118, 8].strip,
description: row[126, 140].strip,
sum: BigDecimal.new(row[268, 12].strip) / BigDecimal.new('100.0'),
sum: BigDecimal(row[268, 12].strip) / BigDecimal('100.0'),
reference_no: row[280, 35].strip
}
end

View file

@ -89,7 +89,7 @@ module PaymentOrders
def valid_amount?
source = number_with_precision(
BigDecimal.new(response["VK_AMOUNT"]), precision: 2, separator: "."
BigDecimal(response["VK_AMOUNT"]), precision: 2, separator: "."
)
target = number_with_precision(
invoice.total, precision: 2, separator: "."

View file

@ -76,7 +76,7 @@ module PaymentOrders
end
def valid_amount?
invoice.total == BigDecimal.new(response[:amount])
invoice.total == BigDecimal(response[:amount])
end
def valid_account?