bae705aa97
- Add NFC ePassport roadmap (ICAO 9303, eIDAS) - Add TensorFlow.js edge face detection (BlazeFace) - Add structured audit logger (GDPR-compliant) - Risk scoring support Part of KYC Apple Native UX v1.1.0
39 lines
1.4 KiB
Rust
39 lines
1.4 KiB
Rust
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<R: Read>(reader: R) -> LedgerResult<Vec<JournalEntry>> {
|
|
parser::parse_entries(reader)
|
|
}
|
|
}
|
|
|
|
// ── SIE4 Exporter ─────────────────────────────────────────────────────────
|
|
pub struct Sie4Exporter;
|
|
|
|
impl Sie4Exporter {
|
|
pub fn export<W: Write>(
|
|
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',
|
|
}
|
|
}
|