We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A bit of strangeness, version 2.20.0
After creating an invoice via
xeroizer_invoice = @application.Invoice.find(id) xeroizer_invoice.line_items = [] xeroizer_invoice.attributes = attributes xeroizer_invoice.save!
We get some strange rounding errors:
xeroizer_invoice.sub_total => 0.9999e2 xeroizer_invoice.attributes[:sub_total] => 0.1e3 xeroizer_invoice.attributes[:sub_total] == xeroizer_invoice.sub_total => false
This has also happenend on other fields such as total.
total
Briefly, in model_definition_helper I found
model_definition_helper
define_simple_attribute(field_name, :decimal, options, 0.0)
This method looks to be setting up a getter method with on transformation.
define_method internal_field_name do @attributes[field_name].nil? ? value_if_nil : @attributes[field_name] end
Any ideas what's up?
EDIT: I looked at what calculated: true is doing but it doesn't look to be the problem...
calculated: true
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A bit of strangeness, version 2.20.0
After creating an invoice via
We get some strange rounding errors:
This has also happenend on other fields such as
total
.Briefly, in
model_definition_helper
I foundThis method looks to be setting up a getter method with on transformation.
Any ideas what's up?
EDIT: I looked at what
calculated: true
is doing but it doesn't look to be the problem...The text was updated successfully, but these errors were encountered: