Merge pull request 'no fee for 'ehrenmitglieder' (#256) from staging into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m42s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 4m5s

Reviewed-on: #256
This commit is contained in:
philipp 2024-03-08 13:58:42 +01:00
commit 5da1900ae8

View File

@ -212,6 +212,8 @@ impl User {
} else if Family::find_by_opt_id(db, self.family_id).await.is_none() {
if self.has_role(db, "Student").await || self.has_role(db, "Schüler").await {
fee.add("Schüler/Student".into(), STUDENT_OR_PUPIL);
} else if self.has_role(db, "Ehrenmitglied").await {
fee.add("Ehrenmitglied".into(), 0);
} else {
fee.add("Mitgliedsbeitrag".into(), REGULAR);
}