My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/apps/koffice/invoice/src/pfile.rs

34 lines
715 B

use crate::{Meta, 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(meta: &Meta) -> String {
let invoice_id = meta.new_invoice_id();
todo!()
}