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:
1 parent
d59eca0c1a
commit
9c299eb768
3 files changed
+4
-4
No files matched your search
@@ -1513,7 +1513,7 @@ impl BooksServer {
|
||||
} else {
|
||||
cash
|
||||
};
|
||||
ledger_package::export_iif(store.ledger(), cash, as_of)
|
||||
ledger_package::export_iif(store.ledger(), cash, as_of).map_err(|e| e.to_string())
|
||||
}
|
||||
/// The general journal as JSON or CSV: each entry posted in the
|
||||
/// period (BS-period-3, as the XLSX journal), in posting order.
|
||||
|
||||
Reference in new issue
Block a user