The third of the paused branches: Ledger::settle with discounts and the processor's fee (kernel::settle, Kani settle_is_exact, Lean settle_posts_a_document_step), books.receive_payment and books.pay_bill with applications, books.bills_due, the agings' detail and tie-out, the aging exports and the CPA package's aging CSVs, the handlers in tools/settlements.rs. Twelve files conflicted with the S4.4 and S5 merges, resolved as plan 8.0.2 says: both routers; both test appends (the shared match arm in arap_standing.rs spliced into both tests; the shared `.unwrap()` in store.rs); the scope table at 124; one invoices-and-bills handbook (S5's send step 1 with S6's steps 2, 3, 5 and procedures) registered once; docs/mcp-interface.md with S4.4's create docs and S6's payment docs; S5's law renumbered 35 and S6's 36 (S1's is 34); the parity rows and sections of both. S6's wire tests create their bills as S4.4's contract now requires (confirmed, the vendor's number, a line account, the vendor's invoice uploaded) and live in their own module beside S4.4's tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
59 lines
2.4 KiB
Rust
59 lines
2.4 KiB
Rust
//! The CPA handoff package, and the reports, worksheets, and text helpers
|
|
//! the server's tools and the viewer both make: built from the books
|
|
//! read-only, through [`PackageBooks`] (the server's
|
|
//! [`ledger_store::Store`], the viewer's [`ledger_store::Snapshot`]).
|
|
//!
|
|
//! ```text
|
|
//! GOAL: the server (books.export_cpa_package, books.vendor_1099) and the
|
|
//! viewer make the same package and the same 1099 worksheet, byte
|
|
//! for byte, from one piece of code, and neither can change the
|
|
//! books making them.
|
|
//! SOURCE: the books.export_cpa_package and books.vendor_1099 contracts
|
|
//! (ledger-mcp server.rs; docs/mcp-interface.md), moved here
|
|
//! unchanged so the viewer, which reads the books only through a
|
|
//! Snapshot and doesn't depend on ledger-mcp, builds them too.
|
|
//! INVARIANTS:
|
|
//! 1. Read-only: nothing here writes anywhere (the books, the vault, a
|
|
//! file). The builders return bytes; recording a file that holds
|
|
//! full TINs (ledger-mcp tin_files.rs) and handing it over are the
|
|
//! caller's.
|
|
//! 2. Full TINs come only from the TIN source the caller gives
|
|
//! ([`TinSource`]); without one, a worksheet carries last fours only.
|
|
//! 3. The same books, settings, and request give the same bytes,
|
|
//! whichever [`PackageBooks`] they are read through.
|
|
//! ```
|
|
|
|
mod aging;
|
|
mod attention;
|
|
mod books;
|
|
mod iif;
|
|
mod invoice;
|
|
mod k1_tax;
|
|
mod package;
|
|
mod reports;
|
|
mod text;
|
|
mod tins;
|
|
mod vendor_1099;
|
|
|
|
pub use aging::{AGING_CSV_HEADER, aging_csv, aging_statement};
|
|
pub use attention::{
|
|
Attention, Integrity, Report, Severity, Target, files_1099, find, find_with, reconcile_prompt,
|
|
w9_missing, w9_prompt,
|
|
};
|
|
pub use books::PackageBooks;
|
|
pub use iif::export_iif;
|
|
pub use invoice::{draft_invoice_document, invoice_document, issued_invoice_document};
|
|
pub use k1_tax::{open_text, tax_basis_csv};
|
|
pub use package::{Package, PackageRequest, build_package, package_file_name};
|
|
pub use reports::{
|
|
Settings, as_of_date, bs_statement, cash_flow_for, cash_flow_statement, member_capitals,
|
|
pnl_statement, report_members, report_meta, statement_range, year_earnings,
|
|
};
|
|
pub use text::{csv_escape, money, parse_date, share_text};
|
|
pub use tins::{TinSource, tin_kind, tin_type_key, vault_tin};
|
|
pub use vendor_1099::{
|
|
VENDOR_1099_CSV_HEADER, Vendor1099Worksheet, Vendor1099WorksheetLine, form_1099_label,
|
|
payment_accounts, vendor_1099_csv, vendor_1099_csv_name, vendor_1099_report,
|
|
vendor_1099_worksheet,
|
|
};
|