P3: dated 1099 decisions, payment methods and the card exception (defects 23, 12, 18, D-40)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
A vendor's 1099 decision is its own dated fact (files NEC or MISC, not reportable with its reason, or undetermined), applied by each payment's date. Payment methods are recorded; card and network payments are left out and listed; a member's check through financing counts; a bank payment with no method counts (D-40); $2,000 for payments after 2025. One worksheet for the tool, the viewer and the CPA package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
This commit is contained in:
77 files changed
+11455
-970
No files matched your search
@@ -123,6 +123,27 @@ proptest! {
|
||||
prop_assert_eq!(ri, kernel::reversal(&to_dec(&lines)));
|
||||
}
|
||||
|
||||
/// The 1099 kernel (rules.md B-19): a payment split into its buckets,
|
||||
/// and netted, the same at both types.
|
||||
#[test]
|
||||
fn payment_buckets_agree(lines in arb_lines()) {
|
||||
let bucket = |k: u8| match k {
|
||||
0 => Some(kernel::Bucket::Counts),
|
||||
1 => Some(kernel::Bucket::Card),
|
||||
2 => Some(kernel::Bucket::Undetermined),
|
||||
_ => None,
|
||||
};
|
||||
let i: Vec<_> = lines.iter().map(|&(k, s, a)| (bucket(k), s, a)).collect();
|
||||
let d: Vec<_> = lines.iter().map(|&(k, s, a)| (bucket(k), s, dec(a))).collect();
|
||||
let si = kernel::split_payment(&i).unwrap();
|
||||
let sd = kernel::split_payment(&d).unwrap();
|
||||
prop_assert_eq!(si.map(dec), sd);
|
||||
prop_assert_eq!(
|
||||
kernel::net_buckets(si).map(|b| b.map(dec)),
|
||||
kernel::net_buckets(sd)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn balances_agree(t in arb_type(), m in arb_cents()) {
|
||||
prop_assert_eq!(kernel::normal_balance(t, m).map(dec), kernel::normal_balance(t, dec(m)));
|
||||
|
||||
Reference in new issue
Block a user