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

fix: Trial period set to zero should not be considered as present #640

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

vincent-pochet
Copy link
Collaborator

Context

When setting a trial period at 0 the first subscription of a paid in advance calendar plan is wrongly billed at 0 when created on the last day of the period

Description

The issue is related to a wrong assumption of the behavior of the rails present? method:

0.0.present?
# => true

@vincent-pochet vincent-pochet added Plan Related to Plans Invoice Related to Invoices 🐞 Bug Something isn't working labels Dec 1, 2022
@vincent-pochet vincent-pochet self-assigned this Dec 1, 2022
spec/models/plan_spec.rb Outdated Show resolved Hide resolved
spec/models/plan_spec.rb Outdated Show resolved Hide resolved
@vincent-pochet vincent-pochet merged commit 172a37f into main Dec 1, 2022
@vincent-pochet vincent-pochet deleted the fix-zero-trial-period branch December 1, 2022 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working Invoice Related to Invoices Plan Related to Plans
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants