reflect new fee structure
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m28s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2025-05-16 23:02:40 +02:00
parent 1e2dc4ccbc
commit dc75e0145a
7 changed files with 116 additions and 65 deletions

View File

@ -1,9 +1,9 @@
use std::{error::Error, fs};
use lettre::{
Address, Message, SmtpTransport, Transport,
message::{Attachment, MultiPart, SinglePart, header::ContentType},
message::{header::ContentType, Attachment, MultiPart, SinglePart},
transport::smtp::authentication::Credentials,
Address, Message, SmtpTransport, Transport,
};
use sqlx::{Sqlite, SqlitePool, Transaction};
@ -161,6 +161,11 @@ impl Mail {
continue;
}
}
if user.has_role(db, "schnupperant").await {
continue;
}
if !user.has_role(db, "paid").await || test.is_some() {
let mut is_family = false;
let mut send_to = String::new();
@ -273,6 +278,11 @@ Der Vorstand");
continue;
}
}
if user.has_role(db, "schnupperant").await {
continue;
}
if let Some(fee) = user.fee(db).await {
if !fee.paid || test.is_some() {
let mut is_family = false;