test(core): the adapter runs schedules that take the pick, settings, role accounts, tax summaries and an export's line ending
A schedule may now leave its convention to the engine, so an example can show BS-prepaid-2's pick: the adapter registers such a schedule by the day, wanderbooks' method (D-11, D-37), and the equal-months examples are skipped as the runner skips another engine's option. The yen examples run through `Store::register_schedule`, whose `schedule_minor_unit` feature rounds a monthly-even month to the currency's minor unit (D-72, K-U5); `answer_schedule_plan` now prints each month as the plan holds it, so a yen month is 333 and not 333.00. The new events and queries go through the engine's own commands, never a reimplementation: `set_setting` is `Store::change_settings` with its `Source` (who decided and when), the setting query reads `Ledger::settings`, the role account query reads `Ledger::role_account`, the tax summary is `tax::tax_summary`'s once-rounded lines, and the line ending is the `ledger_import` file's own CR LF. The BS-format-9 example uses an entry posted as an earlier version wrote it, so its memo is the example's and no document's wording stands between the file and the check. The skip count moves from 16 to 22, the six new unpicked-option examples (the cent rule, the file's place, one fiscal year, closes written, the platform line ending and per-account rounding). Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
This commit is contained in:
1 parent
01acb159f0
commit
688ab951d3
9 files changed
+227
-21
No files matched your search
@@ -1,6 +1,7 @@
|
||||
use crate::*;
|
||||
|
||||
pub(crate) mod assets;
|
||||
pub(crate) mod book;
|
||||
pub(crate) mod commands;
|
||||
pub(crate) mod dates;
|
||||
pub(crate) mod documents;
|
||||
@@ -93,6 +94,9 @@ impl Books<'_> {
|
||||
"invoice_numbers" => self.answer_invoice_numbers(q),
|
||||
"draft_state" => self.answer_draft_state(q),
|
||||
"evidence" => self.answer_evidence(q),
|
||||
"setting" => self.answer_setting(q),
|
||||
"role_account" => self.answer_role_account(q),
|
||||
"tax_summary" => self.answer_tax_summary(q),
|
||||
"run" => self.answer_run(q),
|
||||
"disposal" => self.answer_disposal(q),
|
||||
"depreciation_schedule" => self.answer_depreciation_schedule(q),
|
||||
@@ -127,7 +131,7 @@ impl Books<'_> {
|
||||
.map(|a| Value::String(format!("{} {}", a.code, a.name)))
|
||||
.collect(),
|
||||
)),
|
||||
"iif_lines" | "iif_changes" => self.answer_iif(q),
|
||||
"iif_lines" | "iif_changes" | "iif_line_ending" => self.answer_iif(q),
|
||||
"rename_account" | "add_account" | "set_tax_category" => self.answer_command(q),
|
||||
other => Err(Refusal::new(
|
||||
RuleId::new(Area::Ledger, 1),
|
||||
|
||||
Reference in new issue
Block a user