lib/atol/request/post_document/item/body.rb in atol-0.1.2 vs lib/atol/request/post_document/item/body.rb in atol-0.2
- old
+ new
@@ -12,21 +12,17 @@
@body = Hash[]
@body[:name] = name
@body[:price] = price.to_f
@body[:quantity] = quantity.to_f
- @body[:sum] = @body[:price] * @body[:quantity]
+ @body[:sum] = (@body[:price] * @body[:quantity]).to_f.round(2)
@body[:tax] = @config.default_tax
end
def to_h
- body.clone
+ @body.clone
end
-
- private
-
- attr_reader :body
end
end
end
end
-end
\ No newline at end of file
+end