use aamos_core::LedgerResult; use aamos_ledger::{JournalEntry, SourceType}; use std::io::{Read, Write}; pub mod parser; pub mod exporter; // ── SIE4 Parser ─────────────────────────────────────────────────────────── pub struct Sie4Parser; impl Sie4Parser { pub fn parse(reader: R) -> LedgerResult> { parser::parse_entries(reader) } } // ── SIE4 Exporter ───────────────────────────────────────────────────────── pub struct Sie4Exporter; impl Sie4Exporter { pub fn export( writer: &mut W, entries: &[JournalEntry], accounts: &[(String, String)], // (account_number, name) fiscal_year: i32, ) -> LedgerResult<()> { exporter::write_sie4(writer, entries, accounts, fiscal_year) } } // ── SIE4-serie ──────────────────────────────────────────────────────────── pub fn source_type_to_series(source_type: SourceType) -> char { match source_type { SourceType::Bank => 'B', SourceType::ImportSie => 'S', _ => 'A', } }