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/admin percentage cannot be less than 0 and more than 90 #664

Merged

Conversation

mcmpp
Copy link
Member

@mcmpp mcmpp commented Oct 3, 2023

No description provided.

@mcmpp mcmpp requested a review from AlwinEgger October 3, 2023 10:58
<input type="number" ng-if="getModel() === 'abotypen'" placeholder="{{'Preis'|translate}}" ng-pattern="/^[0-9]+([\.,][0-9]{1,3})?$/" step="0.01" class="form-control" name="zielpreis" ng-model="abotyp.zielpreis"></input>
<input type="number" ng-if="getModel() === 'zusatzAbotypen'" placeholder="{{'Preis'|translate}}" ng-pattern="/^[0-9]+([\.,][0-9]{1,3})?$/" step="0.01" class="form-control" name="zielpreis" ng-model="zusatzAbotyp.zielpreis"></input>
<input type="number" ng-if="getModel() === 'abotypen'" placeholder="{{'Preis'|translate}}" ng-pattern="/^[0-9]+([\.,][0-9]{1,3})?$/" step="0.01" min="0" max="99999.99" class="form-control" name="zielpreis" ng-model="abotyp.zielpreis"></input>
<input type="number" ng-if="getModel() === 'zusatzAbotypen'" placeholder="{{'Preis'|translate}}" ng-pattern="/^[0-9]+([\.,][0-9]{1,3})?$/" step="0.01" min="0" max="99999.99" class="form-control" name="zielpreis" ng-model="zusatzAbotyp.zielpreis"></input>
Copy link
Member

Choose a reason for hiding this comment

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

This has not been the case so far, but can we imagine a Abo or Zusatzabo with a negative price? This could be the case if someone is getting a discount of some sort?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is right, that was an option until know. I do not particularly like to have this "hack" to apply some "discount" or "voucher". I would be more in favor of implementing this functionality in case someone needs it. However, this would represent an effort that I don't think we would want to make in the short term... in any case we would need to define a min to avoid errors in the database, being the biggest min -99999.99

@mcmpp mcmpp merged commit 616eb5c into prod Oct 4, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants