test(core): the adapter runs a platform's payout, an asset's tag and the K-1's tax-basis note through the engine
The bookspec schema gained a `payout` event, a `tag_asset` event, an `asset_tag` query and a note on the tax-basis property line (BS-revenue-1, BS-asset-3, BS-partner-17). The adapter runs each through the engine and rebuilds none of it: a payout goes through `payouts::payout_plan`, which refuses unless gross less fee is the deposit to the cent, and its plan's lines post as one entry; a tag goes through `Store::set_asset_tag`, which refuses a tag of a wrong form and one another asset holds or ever held; the tax-basis line's note is `Note::PrepaidAtBook` read off the worksheet. The engine's InvalidPayout, InvalidAssetTag and AssetTagTaken are worded as the examples word them. Thirteen examples were added and every one the engine's picks reach passes: five are for options wanderbooks did not pick (no-tags, every-prepaid-is-cash, every-prepaid-is-property, left-open, whole-payment-to-each) and are skipped, so the skipped count is 22 + 5 = 27 and 112 of 139 run. A prepaid contract credited straight to capital is property (1,500.00 each) and a service paid through Due to Members is cash (1,000.00 each); the contract enters the tax capital at its book amount with the note; a 1,000.00 check naming Dana Studio at 600.00 counts 600.00 toward Dana's 1099. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e45c62348a
commit
a87e2d0a7a
8 files changed
+138
-11
No files matched your search
@@ -187,6 +187,16 @@ pub(crate) fn refusal(e: &LedgerError) -> String {
|
||||
LedgerError::ControlAccountMismatch { .. } => "role_account_mismatch",
|
||||
// A 1099 threshold for a year the books do not know (BS-1099-2).
|
||||
LedgerError::RuleNotKnown { .. } => "unknown_1099_year",
|
||||
// A platform's payout whose deposit is not gross less fee
|
||||
// (BS-revenue-1): `payout_plan` refuses it for no other reason that
|
||||
// the examples name.
|
||||
LedgerError::InvalidPayout(why) if why.starts_with("payout doesn't reconcile") => {
|
||||
"payout_does_not_reconcile"
|
||||
}
|
||||
// A tag of a wrong form, and one another asset holds or ever held
|
||||
// (BS-asset-3).
|
||||
LedgerError::InvalidAssetTag { .. } => "asset_tag_invalid",
|
||||
LedgerError::AssetTagTaken { .. } => "asset_tag_taken",
|
||||
other => return format!("another refusal: {other}"),
|
||||
}
|
||||
.to_string()
|
||||
|
||||
Reference in new issue
Block a user