fix(package): the IIF export keeps its typed refusal

`export_iif` turned `journal_to_iif`'s refusal into a string, so a caller
could not tell why the file was refused without reading the message. An
entry on more than one receivable or payable account is BS-format-10's
own refusal (the receiving program will not take the transaction), while
every other IIF refusal is BS-format-2's; the bookspec adapter must name
the one rule an example expects. Returning `IifError` keeps the two apart
by type. The package and the MCP tool still hand the human a string.

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
This commit is contained in:
swaitsandDeepSeek V4.1 Flash committed 2026-11-09 07:40:21 -07:00
1 parent d59eca0c1a
commit 9c299eb768
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -564,7 +564,7 @@ pub fn build_package<B: PackageBooks + ?Sized>(
let seq = books.journal_seq();
// The journal through as_of for QuickBooks, closes left out, and what
// it writes differently (INVARIANT 8).
let iif = export_iif(ledger, cash_codes, as_of)?;
let iif = export_iif(ledger, cash_codes, as_of).map_err(|e| e.to_string())?;
let (warnings, iif_changes) = (iif.warnings(), iif.changes.len());
let receivable_payable: Vec<String> = iif
.receivable_payable