use crate::types::*;
pub fn check(file: &BeancountFile<rust_decimal::Decimal>) -> anyhow::Result<()> {
for d in &file.directives {
let t = match &d.content {
DirectiveContent::Transaction(t) => t,
_ => continue,
};
if !t.balanced {
println!("Transaction not balanced:\n{}", d);
}
}
Ok(())
}