FEA: allow setting up names for lump sum and money for time
This commit is contained in:
parent
ff6fa999e4
commit
cc1e3fe334
|
@ -36,4 +36,6 @@ default_pagination_limit = 20
|
|||
#If set true members don't need billing related permissions if they are member_responsible for specific event
|
||||
member_responsible_overwrites_permissions = true
|
||||
send_personnel_billing_to_email = true
|
||||
personnel_billing_emails = "receiver@localhost,receiver2@localhost"
|
||||
personnel_billing_emails = "receiver@localhost,receiver2@localhost"
|
||||
lump_sum_name = "Lump Sum"
|
||||
money_for_time_name = "Money for Time"
|
|
@ -37,4 +37,6 @@ default_pagination_limit = 20
|
|||
#If set true members don't need billing related permissions if they are member_responsible for specific event
|
||||
member_responsible_overwrites_permissions = true
|
||||
send_personnel_billing_to_email = true
|
||||
personnel_billing_emails = "receiver@localhost,receiver2@localhost"
|
||||
personnel_billing_emails = "receiver@localhost,receiver2@localhost"
|
||||
lump_sum_name = "Lump Sum"
|
||||
money_for_time_name = "Money for Time"
|
|
@ -43,7 +43,9 @@ pub struct Api {
|
|||
pub struct Billing {
|
||||
pub member_responsible_overwrites_permissions: bool,
|
||||
pub send_personnel_billing_to_email: bool,
|
||||
pub personnel_billing_email: String,
|
||||
pub personnel_billing_emails: String,
|
||||
pub lump_sum_name: String,
|
||||
pub money_for_time_name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default, Clone)]
|
||||
|
|
|
@ -110,7 +110,7 @@ pub fn generate_billing_csv(settings: &State<Settings>, event_id: uuid::Uuid) ->
|
|||
res.push_str(&format!("Abrechnungssatz:,{},{},Pauschale:,{},€/Stunde:,{}\n", sanitize(billing_rate.name), sanitize(billing_rate.description.unwrap_or(String::from(""))), sanitize(format!("{} €", billing_rate.lump_sum)), sanitize(format!("{} €", billing_rate.payment_per_hour))));
|
||||
}
|
||||
|
||||
res.push_str(&format!("{},{},{},{},{},{},{},{},{}\n", String::from("Personalnummer"), String::from("Vorname"), String::from("Nachname"), String::from("Von"), String::from("Bis"), String::from("Stunden"), String::from("Pauschale"), String::from("Stundengeld"), String::from("Gesamt")));
|
||||
res.push_str(&format!("{},{},{},{},{},{},{},{},{}\n", String::from("Personalnummer"), String::from("Vorname"), String::from("Nachname"), String::from("Von"), String::from("Bis"), String::from("Stunden"), settings.billing.lump_sum_name, settings.billing.money_for_time_name, String::from("Gesamt")));
|
||||
|
||||
|
||||
let position_instances = get_position_instances(settings, instance.instance_id)?;
|
||||
|
|
Loading…
Reference in New Issue