PR6 — party statement as PDF - #143
Conversation
1ff1dd4 to
2c761c6
Compare
2c761c6 to
54f83d9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54f83d9d4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
54f83d9 to
4312e65
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4312e65a4c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4312e65 to
1900596
Compare
1900596 to
2633a37
Compare
2633a37 to
f53e9d2
Compare
f53e9d2 to
771d668
Compare
771d668 to
a4cdaf7
Compare
a4cdaf7 to
5f7e8c1
Compare
Choose pdf-writer 0.15.0 (MIT OR Apache-2.0): it is a maintained pure-Rust PDF writer with no C toolchain and gives the statement renderer explicit control of layout and failure handling. It is preferred over printpdf and genpdf because this narrowly scoped report does not need a higher-level layout engine or bundled font stack; the renderer will intentionally use ASCII INR text with a core font rather than rely on the unsupported rupee glyph. No font is bundled.
Render the existing pure PartyStatement model with pdf-writer and PDF-standard Helvetica. Currency is deliberately emitted as ASCII INR because Helvetica has no rupee glyph; extraction coverage verifies the emitted text. The renderer validates its amount conversion before rendering and rejects unsupported core-font text rather than emitting blank data.
Let the party-statement command select xlsx or pdf while retaining XLSX as its default. Both UI actions use the existing checked report-download and reveal path; no second browser download mechanism is introduced.
Read the XLSX sheet XML alongside the PDF content stream to pin the rendered value shared by both client-facing formats. The test-only zip 8.6.0 dependency is MIT licensed; it is used with default features disabled and the pure-Rust deflate feature only to inspect workbook XML, and is included in the repository licence inventory.
Mutation proof: changing the repeated statement identity heading made every_pdf_page_repeats_the_statement_identity fail (RC 101). The page identity is restored.
Records source-surface digest changes only; no compatibility claim, evidence file, or trusted key changed.
Resealed entries: src-tauri/{Cargo.toml,Cargo.lock,src/commands.rs}; src/{OutstandingsScreen.tsx,styles.css}. Matrix changed only compatibility_surface_sha256.
Mirror the XLSX direction column in PDF as Receivable or Payable and rename the mixed-party aggregate to Total bill magnitudes (not net). Amount magnitudes and the shared statement total are unchanged.
Mutation proof: mapping payable bills to Receivable made renders_bill_direction_for_mixed_party_documents fail because the generated PDF text no longer contained the expected Payable row. Restored the Payable mapping; the generated-document test passes. This test covers the document boundary for the F3 direction presentation without changing any amount magnitude.
PDF and XLSX label unallocated residual magnitudes with the same receivable/payable wording. PDF also emits explicit Not due and Unaged fields for future-due bills. Proof: generated PDF text and generated XLSX XML assertions cover the new labels.
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>
Carry the PR6 PDF statement surface over the F4X BILLREF presentation disclosure. Claims, evidence, and trusted-evidence keys remain byte-identical to the preserved PR6 head. Compatibility gate: exit 0, unknown_claims=11, evidenced_claims=0. Claims/evidence/trusted identity checks: exit 0.
Rust 1.96.0 all-target Clippy failed at PR6 with needless_borrow (exit 101). The checked filename path is unchanged; default all-target Clippy passes at exit 0 after the repair.
5f7e8c1 to
45939e4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45939e4960
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Stacked on
feat/party-statement-xlsx— review only this PR's own diff.Local gate green at this level: workspace tests and clippy in both feature configurations, fmt, tools tests, live-read boundary, fixture byte integrity, licence inventory, tsc, production build, and the workflow-consistency gate.
CI is NOT proven: the GitHub-hosted Windows and bundle-smoke jobs have never run, and one read-transport harness test fails deterministically on macOS with an unknown ubuntu outcome.