[ledger] Invoices: the print language, Czech or English per invoice (Czech when absent); v0.4.1

This commit is contained in:
2026-11-05 15:06:31 +01:00
parent 95a8a8965b
commit 0f93d0ecb5
5 changed files with 36 additions and 7 deletions
+12
View File
@@ -98,6 +98,15 @@ pub struct InvoiceLine {
pub vat: Option<u8>,
}
/// The language an invoice is printed in, chosen per invoice.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Language {
#[default]
Cs,
En,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Invoice {
pub id: InvoiceId,
@@ -111,6 +120,9 @@ pub struct Invoice {
pub lines: Vec<InvoiceLine>,
/// The budget the payment goes into when it arrives; `None`: the default budget.
pub budget: Option<String>,
/// What the printed invoice is in. Absent in an event: Czech.
#[serde(default)]
pub language: Language,
}
/// What an invoice adds up to.