// Command line app for the faktura invicing 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> { 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(()) }