aboutsummaryrefslogtreecommitdiff
path: root/apps/koffice/invoice/src/pfile.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/koffice/invoice/src/pfile.rs')
-rw-r--r--apps/koffice/invoice/src/pfile.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/apps/koffice/invoice/src/pfile.rs b/apps/koffice/invoice/src/pfile.rs
new file mode 100644
index 000000000000..ec99e5ab3049
--- /dev/null
+++ b/apps/koffice/invoice/src/pfile.rs
@@ -0,0 +1,33 @@
+use crate::{Account, Address, Worker, InvoiceId};
+use chrono::NaiveDate;
+use serde::{Serialize, Deserialize};
+
+/// Describes invoice metadata
+#[derive(Serialize, Deserialize)]
+pub struct InvoiceFile {
+ invoice_id: InvoiceId,
+ date: NaiveDate,
+ author: Worker,
+ account: Account,
+ client: Address,
+ vat: u8,
+ service: Vec<ServiceEntry>,
+ currency: String,
+ lang: String,
+}
+
+/// A service description
+#[derive(Serialize, Deserialize)]
+pub enum ServiceEntry {
+ Line(String),
+ Hash {
+ description: String,
+ price: usize,
+ details: Vec<String>,
+ }
+}
+
+pub fn data_templ() -> String {
+
+ todo!()
+}