Skip to content

PR5 — party statement as xlsx - #142

Open
lamemustafa wants to merge 11 commits into
feat/outstandings-uifrom
feat/party-statement-xlsx
Open

PR5 — party statement as xlsx#142
lamemustafa wants to merge 11 commits into
feat/outstandings-uifrom
feat/party-statement-xlsx

Conversation

@lamemustafa

Copy link
Copy Markdown
Owner

Stacked on feat/outstandings-ui — 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.

@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from c8ae3c2 to a72a59a Compare August 14, 2026 05:30
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from a72a59a to 14006ee Compare August 14, 2026 07:21
@lamemustafa
lamemustafa marked this pull request as ready for review August 14, 2026 09:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14006eebde

ℹ️ 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".

Comment thread src-tauri/src/reports/party_statement.rs Outdated
Comment thread src-tauri/src/reports/party_statement_xlsx.rs Outdated
Comment thread src-tauri/src/reports/party_statement_xlsx.rs Outdated
Comment thread src-tauri/src/reports/party_statement_xlsx.rs
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from 14006ee to a2bfc2d Compare August 15, 2026 05:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2bfc2d8e5

ℹ️ 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".

Comment thread src-tauri/src/reports/party_statement_xlsx.rs Outdated
Comment thread src-tauri/src/commands.rs
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from a2bfc2d to e795385 Compare August 16, 2026 06:48
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from e795385 to 7d3cbf2 Compare August 17, 2026 14:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d3cbf2f22

ℹ️ 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".

Comment thread src-tauri/src/reports/party_statement_xlsx.rs
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from 7d3cbf2 to 96a4048 Compare August 17, 2026 18:16
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

worksheet.write_string_with_format(row, 0, "Grand total", &bold)?;
worksheet.write_number_with_format(
row,
4,
amount_to_f64(statement.grand_total.as_str())?,

P1 Badge Label the grand total as gross rather than net

For a party with both receivable/payable exposure and an unallocated residual, grand_total adds the absolute magnitudes of every bill and the residual, but this row labels the result simply “Grand total,” which can be read as the net amount owed. Fresh evidence after the earlier direction finding is that the current code labels only the bill subtotal as “not net” while lines 148–153 still emit this unqualified magnitude; label it as a gross/magnitude total or preserve separate directional totals.

AGENTS.md reference: AGENTS.md:L92-L108

ℹ️ 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".

@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from 96a4048 to e431a8f Compare August 17, 2026 21:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e431a8f3e8

ℹ️ 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".

Comment thread src-tauri/src/reports/party_statement.rs
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from e431a8f to cbaf823 Compare August 17, 2026 23:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cbaf8236c0

ℹ️ 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".

Comment thread src-tauri/src/reports/party_statement_xlsx.rs
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from cbaf823 to e994014 Compare August 18, 2026 04:20
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from e994014 to 54fef60 Compare August 18, 2026 09:10
Drive the private spreadsheet-cell conversion with each malformed or non-finite input it must reject. ExactDecimal rejects malformed source values earlier, so accepting a string at the final Excel boundary preserves renderer behavior while making the boundary testable without unsafe construction.

Mutation evidence (authorized fallback): before this change, replacing the conversion with `Ok(amount.as_str().parse::<f64>().unwrap_or(0.0))` left `an_unrepresentable_amount_fails_instead_of_becoming_zero` green (1 passed). After this change, the corresponding `Ok(text.parse::<f64>().unwrap_or(0.0))` mutation makes that test fail (assertion expected InvalidAmount); restored implementation passes.

No date conversion path changed. Scoped audit found no other report or client-facing document/cell conversion test that asserted only a literal or standard-library result instead of the boundary it named.
Mutation proof: changing the exact decimal round-trip predicate to accept every value made rejects_a_valid_decimal_that_excel_cannot_represent_exactly fail for 9007199254740993 (RC 101). Restoring the predicate passed (RC 0).
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/lib.rs}. Matrix changed only compatibility_surface_sha256.
Expose each bill as Receivable (they owe you) or Payable (you owe them) in XLSX without changing any amount magnitude. Rename the aggregate to Total bill magnitudes (not net): mixed-party bills must not imply a net balance.

Mutation proof: mapping payable to the receivable label made bill_direction_labels_make_mixed_party_amounts_unambiguous fail (left Receivable (they owe you), right Payable (you owe them)); restored mapping passes.
Statement bills carry an optional overdue age. Not-due bills render as Not due and Unaged, while due-today remains zero in the first ageing bucket. Unallocated residuals retain their signed direction and XLSX labels the magnitude as receivable or payable.

Proof: generated XLSX XML asserts the payable residual label; the raw-path integration regression covers future-due statement source and workbook content.
Signed-off-by: Tapish Khandelwal <tapishkhandelwal13@gmail.com>
Carry the PR5 XLSX statement surface over the F4X BILLREF presentation disclosure. Claims, evidence, and trusted-evidence keys remain byte-identical to the preserved PR5 head.

Compatibility gate: exit 0, unknown_claims=11, evidenced_claims=0. Claims/evidence/trusted identity checks: exit 0.
Carry the h2 0.4.16 master dependency surface through the PR5 stack level. Claims, evidence, and trusted keys are unchanged. Compatibility gate: exit 0, unknown_claims=11, evidenced_claims=0.
@lamemustafa
lamemustafa force-pushed the feat/party-statement-xlsx branch from 54fef60 to 76dfe30 Compare August 18, 2026 19:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76dfe30b37

ℹ️ 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".

Comment thread src-tauri/src/reports/party_statement.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant