Skip to content
New issue

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

Use currencies from money gem in Chargeback #18486

Merged
merged 7 commits into from
Feb 26, 2019

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Feb 26, 2019

This PR adds new 146 currencies. (before 18, after 164)

  • currencies are taken from json file from Money gem (already included in the project).
  • existing currencies (assigned to rates) are untouched
  • seed processes are using attribute code as reference to find if currency already exists instead of using attribute name

Next

  • remove chargeback_currencies.yml
  • add other cost formaters for left alignment (e.g. 333 CZK)- (now we are using just with right alignment $1111 )

Links

https://bugzilla.redhat.com/show_bug.cgi?id=1447170
https://bugzilla.redhat.com/show_bug.cgi?id=1517026 (closed as duplicate of 1447170)
https://bugzilla.redhat.com/show_bug.cgi?id=1668561 (closed as duplicate of 1447170)

… and ChargebackRateDetailCurrency

New source of currencies are using different name for currencies which were
user as unique reference for finding/checking existence of currecncies
in seed methods of ChargebackRate, ChargebackRateDetail and
ChargebackRateDetailCurrency.

To avoid updating currencies which are already seeded and used in
existing chargeback rate - we need to use code of currency as attribute
to check if currency already exist or not.

This will allow keep existing(don't break them ) currencies untouched
and it will just add new currencies.
@lpichler lpichler changed the title [WIP] Use currencies from money gem [WIP] Use currencies from money gem in Chargeback Feb 26, 2019
@miq-bot miq-bot added the wip label Feb 26, 2019
@miq-bot
Copy link
Member

miq-bot commented Feb 26, 2019

Checked commits lpichler/manageiq@b165ad5~...fe9ecbd with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. 👍

@lpichler lpichler changed the title [WIP] Use currencies from money gem in Chargeback Use currencies from money gem in Chargeback Feb 26, 2019
@lpichler
Copy link
Contributor Author

@miq-bot add_label enhancement, chargeback
@miq-bot assign @gtanzillo

@gtanzillo gtanzillo added this to the Sprint 106 Ending Mar 4, 2019 milestone Feb 26, 2019
@gtanzillo gtanzillo merged commit 4a76123 into ManageIQ:master Feb 26, 2019
@lpichler lpichler deleted the use_currencies_from_money_gem branch February 27, 2019 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants