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

[#161995] [Shared dev] Duration based pricing - (5) Duration discounts applied to user reservation #3872

Merged
merged 47 commits into from
Dec 8, 2023

Conversation

LeticiaErrandonea
Copy link
Contributor

@LeticiaErrandonea LeticiaErrandonea commented Dec 1, 2023

Release Notes

  • Update stepped billing calculation so it uses the step rate for internal price groups.
  • Require that either none or all steps are filled.
  • Show calculation for each step in the Price policy index (only internal groups).

Screenshot

image image

@LeticiaErrandonea LeticiaErrandonea force-pushed the 161995-duration-based-for-internal-groups branch from 279806c to 4a72f83 Compare December 4, 2023 18:32
Copy link
Contributor

@giladshanan giladshanan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really close - just a few small asjustments

app/models/duration_rate.rb Outdated Show resolved Hide resolved
app/assets/javascripts/price_policy.js Outdated Show resolved Hide resolved
app/models/duration_rate.rb Outdated Show resolved Hide resolved
app/models/price_policy.rb Show resolved Hide resolved
@LeticiaErrandonea LeticiaErrandonea force-pushed the 161995-duration-based-for-internal-groups branch from 6c9afa1 to 351dd9a Compare December 6, 2023 19:00
@LeticiaErrandonea LeticiaErrandonea marked this pull request as ready for review December 6, 2023 19:49
@LeticiaErrandonea LeticiaErrandonea requested a review from a team as a code owner December 6, 2023 19:49
app/models/order_detail.rb Outdated Show resolved Hide resolved
class DurationRate < ApplicationRecord; end

def change
DurationRate.delete_all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make a note to do some manual testing around this before releasing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean like checking that price policies aren't broken? Any other cases you can think of?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have any duration rate records on production, we should check if any orders have been placed against them. I don't think anyone is using this yet but I just want to be safe

@LeticiaErrandonea LeticiaErrandonea force-pushed the 161995-duration-based-for-internal-groups branch from 0e6ba7c to 6cffee5 Compare December 7, 2023 15:20
* Bump teaspoon from 1.2.2 to 1.4.0

Bumps [teaspoon](https://github.com/jejacks0n/teaspoon) from 1.2.2 to 1.4.0.
- [Release notes](https://github.com/jejacks0n/teaspoon/releases)
- [Changelog](https://github.com/jejacks0n/teaspoon/blob/master/CHANGELOG.md)
- [Commits](jejacks0n/teaspoon@v1.2.2...v1.4.0)

---
updated-dependencies:
- dependency-name: teaspoon
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump teaspoon from 1.2.2 to 1.4.0

Bumps [teaspoon](https://github.com/jejacks0n/teaspoon) from 1.2.2 to 1.4.0.
- [Release notes](https://github.com/jejacks0n/teaspoon/releases)
- [Changelog](https://github.com/jejacks0n/teaspoon/blob/master/CHANGELOG.md)
- [Commits](jejacks0n/teaspoon@v1.2.2...v1.4.0)

---
updated-dependencies:
- dependency-name: teaspoon
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use an older image tag for selenium

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gilad Shanan <giladshanan@gmail.com>
Copy link
Contributor

@giladshanan giladshanan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending CI 🤞🏼

@LeticiaErrandonea LeticiaErrandonea merged commit 84988c0 into master Dec 8, 2023
3 checks passed
@LeticiaErrandonea LeticiaErrandonea deleted the 161995-duration-based-for-internal-groups branch December 8, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants