Skip to content

feat: tabular reports — five company-panel report pages (IP-145)#604

Closed
nielsdrost7 wants to merge 1 commit into
chore/test-infra-and-gitignorefrom
feature/145-tabular-reports
Closed

feat: tabular reports — five company-panel report pages (IP-145)#604
nielsdrost7 wants to merge 1 commit into
chore/test-infra-and-gitignorefrom
feature/145-tabular-reports

Conversation

@nielsdrost7

Copy link
Copy Markdown
Collaborator

Based on #602 (test-infra PR) — this PR's base branch is chore/test-infra-and-gitignore so the diff shows only its own commits; it retargets to develop automatically when #602 merges.

Implements Track B of epic #506 — the tabular reports module per naui95's spec in #145. Independent of the Report Builder (no shared code path).

What's in here

Five read-only Filament pages in the company panel under a Reports navigation group, each with a date-range filter (defaults to the current month), an optional client filter, a totals summary line under the table, and a CSV export of the filtered rows:

Report Query
Payment History payments in range, with invoice + client
Invoicing History invoices in range with status badge; summary splits paid vs outstanding
Invoiced Amount by Client per-client count + sum via withCount/withSum
Sales by Date per-day revenue of paid invoices
Invoices per Client per-client count + average invoice value

All queries are tenant-scoped by the BelongsToCompany global scope. Shared behavior lives in BaseTabularReportPage (filters, CSV streaming, access control: client_admin + elevated roles).

Also ships the AbstractCompanyPanelTestCase::testLivewire() fix (broken Livewire import + withSession chained on the wrong object) — identical fix is on the report-builder branch (underdogg-forks#2); whichever merges second resolves cleanly.

Testing

Full suite green: 314 tests, 1,033 assertions, 0 failures (develop baseline: 307). The three scenarios drafted in the issue body (in-range vs out-of-range payments, per-client sum shows 1500, cross-company invisibility) plus client filtering, paid-only sales-by-date, page smoke for all five, and the CSV download assertion.

Follow-up

The issue's "later enhancement" (print/PDF export of these reports through builder templates) stays out of scope, as specified in #145.

🤖 Generated with Claude Code

Track B of epic #506, per naui95's spec: Payment History, Invoicing
History, Invoiced Amount by Client, Sales by Date (paid invoices), and
Invoices per Client. Each is a read-only Filament page under a Reports
navigation group with a date-range filter (defaults to the current
month), an optional client filter, a totals summary line, and a CSV
export streaming the filtered rows. Tenant scoping comes from the
BelongsToCompany global scope and is covered by a cross-company test.

Includes the AbstractCompanyPanelTestCase::testLivewire fix (wrong
Livewire import + withSession chained on the wrong object) — the same
fix ships in the report-builder branch; whichever merges second
resolves cleanly to identical content.

Test scenarios follow the issue body: in-range vs out-of-range
payments, per-client invoiced sum, company scoping, plus client
filtering, paid-only sales, and the CSV download.

Refs #145 #506

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 16636331-d666-4b92-ab78-b597e1de548d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/145-tabular-reports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nielsdrost7

Copy link
Copy Markdown
Collaborator Author

Recreated as #609 with the head branch on the fork (underdogg-forks) per the repo workflow — development on the fork, PRs land here. Same commits.

@nielsdrost7
nielsdrost7 deleted the feature/145-tabular-reports branch July 13, 2026 20:14
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