FIX: removed whitespaces from generated csv files to improve Excel compability

This commit is contained in:
Keanu D?lle 2022-04-05 22:02:51 +02:00
parent f02c963e62
commit 78109686f2
2 changed files with 10 additions and 10 deletions

View File

@ -262,7 +262,7 @@ pub async fn approve(
};
debug!("Generated CSV: {}", csv);
if settings.billing.send_personnel_billing_to_email {
let attachement = Attachment::new(String::from("Einsatzabrechnung.csv")).body(csv, ContentType::parse("text/csv").unwrap());
let attachement = Attachment::new(String::from("Einsatzabrechnung.txt")).body(csv, ContentType::parse("text/csv").unwrap());
let msg = Message::builder()
.from(settings.mail.from.clone().parse().unwrap())
.reply_to(settings.mail.reply_to.clone().parse().unwrap())

View File

@ -97,7 +97,7 @@ pub fn generate_billing_csv(settings: &State<Settings>, event_id: uuid::Uuid) ->
}
}
res.push_str("\n");
res.push('\n');
let instances = get_instances(settings, event_id)?;
@ -135,7 +135,7 @@ pub fn generate_billing_csv(settings: &State<Settings>, event_id: uuid::Uuid) ->
};
}
}
res.push_str("\n");
res.push('\n');
}
Ok(res)
}