P3: depreciation straight-line by days through the final month, schedules by day (defects 22, 9, D-37)
The final month takes what the months before leave, spread over its days; a disposed asset stops on its disposal day. A skipped month is caught up in the month the run is made; a reversed run un-posts its month. New schedules spread by day; equal-months schedules must start on the 1st. Amounts round to the currency's own minor unit. Kani and Lean proofs; an exhaustive search over runs, reversals and disposals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
This commit is contained in:
69 files changed
+10529
-841
No files matched your search
@@ -1261,8 +1261,9 @@ impl AssetRegister {
|
||||
/// unposted_depreciation and unregistered_cost are zero exactly when
|
||||
/// register and books agree.
|
||||
/// 6. NEVER panics: a contributor basis is as journaled, of any size
|
||||
/// (rules.md B-28), and a total past exact arithmetic is refused
|
||||
/// (TooLargeToCompute).
|
||||
/// (rules.md B-28), and a total past exact arithmetic, or a schedule
|
||||
/// that can't be computed, is refused (TooLargeToCompute,
|
||||
/// DateOutOfRange).
|
||||
/// ```
|
||||
pub fn fixed_asset_register(
|
||||
ledger: &Ledger,
|
||||
@@ -1290,7 +1291,7 @@ pub fn fixed_asset_register(
|
||||
let acc = if disposed.is_some() {
|
||||
Decimal::ZERO
|
||||
} else {
|
||||
crate::assets::accumulated_depreciation(a, as_of)
|
||||
crate::assets::accumulated_depreciation(a, as_of)?
|
||||
};
|
||||
if disposed.is_none() {
|
||||
cost = cost
|
||||
|
||||
Reference in new issue
Block a user