P3: dated 1099 decisions, payment methods and the card exception (defects 23, 12, 18, D-40)
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:
swaitsandClaude Opus 5.5 committed 2026-10-21 12:12:26 -06:00
1 parent c2ceabbae9
commit 1304b9c0ad
77 files changed
+11455 -970

No files matched your search

+22 -3
View File
@@ -42,16 +42,35 @@ pub struct Vendor {
pub id: VendorId,
/// Display name.
pub name: String,
/// The information return this vendor gets, if any (see
/// [`crate::form1099`]).
/// Its 1099 decisions, each from the date it takes effect, in date
/// order (one from the beginning first); none when nobody has decided
/// (see [`crate::form1099`], D-40).
#[serde(default)]
pub form_1099: Option<crate::form1099::Form1099>,
pub decisions_1099: Vec<crate::form1099::Dated1099>,
/// A W-9 (taxpayer identification number) is on file. The number
/// itself is never stored here.
#[serde(default)]
pub tin_on_file: bool,
}
impl Vendor {
/// The 1099 decision in force on `date`, if any was recorded by then.
pub fn decision_on(&self, date: NaiveDate) -> Option<&crate::form1099::Decision1099> {
crate::form1099::in_force(&self.decisions_1099, date).map(|d| &d.decision)
}
/// The latest 1099 decision recorded (the one in force from the last
/// effective date on), if any.
pub fn latest_1099(&self) -> Option<&crate::form1099::Dated1099> {
self.decisions_1099.last()
}
/// The return its latest decision files, if it files one.
pub fn form_1099(&self) -> Option<crate::form1099::Form1099> {
self.latest_1099().and_then(|d| d.decision.form())
}
}
/// Payment status of an invoice or bill.
#[derive(Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)]
pub enum DocumentStatus {