blob: 4c34e185ad479b383a5bde90f65f64fd77d650c8 (
plain) (
tree)
|
|
// Command line app for the fatura invoicing system
//
// SPDX-FileCopyrightText: 2024 Eilertsens Kodeknekkeri
// SPDX-FileCopyrightText: 2024 Harald Eilertsen
//
// SPDX-License-Identifier: AGPL-3.0-or-later
mod api;
use api::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let clients = Client::all()?;
for c in clients {
print!("{}: {} <{}>", c.id, c.name, c.email);
if let Some(contact) = c.contact {
print!(", c/o {}", contact);
}
if let Some(address) = c.address {
print!(", {}", address);
}
if let Some(phone) = c.phone {
print!(", ph: {}", phone);
}
if c.vat {
print!(", VAT");
}
println!("");
}
Ok(())
}
|