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

feat(edit-draft-invoice): Apply adjusted fee on subscription fee #1574

Merged
merged 10 commits into from
Jan 22, 2024

Conversation

lovrocolic
Copy link
Collaborator

Context

Currently it is not possible to manually edit the draft invoice through the UI. With this feature it will be possible to adjust fee, remove adjusted values and recalculate draft invoice based on those values.

Description

Refresh draft invoice action can be called anytime, and this action destroys all attached fees and rebuilds them again. In a similar way also works finalise draft invoice action. This PR ensures that with each rebuilding of fees we check if there is any adjusted fee and we apply it on related fee.

@lovrocolic lovrocolic requested a review from jdenquin December 28, 2023 12:34
@lovrocolic lovrocolic force-pushed the apply-adjusted-fee-on-subscription-fee branch from b38e688 to b153d12 Compare January 4, 2024 14:14
Copy link
Collaborator

@vincent-pochet vincent-pochet left a comment

Choose a reason for hiding this comment

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

Small comments, but looks good! 🚀

app/services/fees/subscription_service.rb Outdated Show resolved Hide resolved
app/services/fees/subscription_service.rb Outdated Show resolved Hide resolved
@lovrocolic lovrocolic force-pushed the apply-adjusted-fee-on-subscription-fee branch from 58d9731 to 8824079 Compare January 9, 2024 16:56
@lovrocolic lovrocolic force-pushed the apply-adjusted-fee-on-subscription-fee branch from fa25461 to bd82dd4 Compare January 16, 2024 14:14
@lovrocolic lovrocolic force-pushed the apply-adjusted-fee-on-subscription-fee branch from bd82dd4 to 8225c7a Compare January 19, 2024 09:25
@lovrocolic lovrocolic merged commit 130ac6a into main Jan 22, 2024
6 checks passed
@lovrocolic lovrocolic deleted the apply-adjusted-fee-on-subscription-fee branch January 22, 2024 10:13
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