Skip to content

[IP-145]: tabular reports — five company-panel report pages#609

Open
nielsdrost7 wants to merge 2 commits into
InvoicePlane:developfrom
underdogg-forks:feature/145-tabular-reports
Open

[IP-145]: tabular reports — five company-panel report pages#609
nielsdrost7 wants to merge 2 commits into
InvoicePlane:developfrom
underdogg-forks:feature/145-tabular-reports

Conversation

@nielsdrost7

@nielsdrost7 nielsdrost7 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Built on the test-infra PR #607 — merge that first. Until it merges, this diff also shows #607's single commit.

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.

nielsdrost7 and others added 2 commits July 13, 2026 20:40
Ports the standing fixes that so far only lived on the fork's develop
branch, so every future PR can be cut from this repo directly:

- Panel test base classes seed Spatie roles/permissions in setUp —
  without this every company-panel Livewire test 403s. Also fixes
  testLivewire(), which imported the Filament schema component instead
  of the Livewire test facade and chained withSession onto the wrong
  object (it could never have run).
- RolesSeeder: restore company CRUD permissions for client_admin.
- Invoices/Quotes feature test adjustments that go with the seeding.

.gitignore now excludes local tooling that kept leaking into pull
requests (/automation/, /.claude/fable5/, pint_output.log,
audit-report.json) and drops the Modules controller ignores that hid
real source files.

README: the resolved dependency tree requires PHP >= 8.3 (composer's
platform check rejects 8.2), so the badge and requirements now say
8.3+. composer.json still declares ^8.2 — bumping it needs a lock
re-resolve that currently fails because roave/security-advisories
conflicts with the locked guzzlehttp/guzzle < 7.12.1; a follow-up
`composer update -W guzzlehttp/guzzle` would fix the constraint and
the three open guzzle advisories together.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ages (Phase 5)

Track B of epic InvoicePlane#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 InvoicePlane#145 InvoicePlane#506

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

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@nielsdrost7, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cec2ef83-55bf-4590-a8bf-39d65bd5076f

📥 Commits

Reviewing files that changed from the base of the PR and between d086ad1 and f3aa738.

📒 Files selected for processing (24)
  • .gitignore
  • Modules/Core/Database/Seeders/RolesSeeder.php
  • Modules/Core/Filament/Company/Pages/Reports/BaseTabularReportPage.php
  • Modules/Core/Filament/Company/Pages/Reports/InvoicedByClientReport.php
  • Modules/Core/Filament/Company/Pages/Reports/InvoicesPerClientReport.php
  • Modules/Core/Filament/Company/Pages/Reports/InvoicingHistoryReport.php
  • Modules/Core/Filament/Company/Pages/Reports/PaymentHistoryReport.php
  • Modules/Core/Filament/Company/Pages/Reports/SalesByDateReport.php
  • Modules/Core/Providers/CompanyPanelProvider.php
  • Modules/Core/Tests/AbstractAdminPanelTestCase.php
  • Modules/Core/Tests/AbstractCompanyPanelTestCase.php
  • Modules/Core/Tests/Feature/CompanyTabularReportsTest.php
  • Modules/Core/resources/views/filament/company/pages/reports/tabular-report.blade.php
  • Modules/Invoices/Tests/Feature/InvoicesTest.php
  • Modules/Quotes/Tests/Feature/QuotesTest.php
  • README.md
  • public/build/assets/app-BA_uZO_d.css
  • public/build/assets/app-f1GSCnwV.js
  • public/build/assets/invoiceplane-BRKoI_Ls.css
  • public/build/assets/invoiceplane-blue-DySqjbYI.css
  • public/build/assets/nord-DE5VcrRz.css
  • public/build/assets/orange-CttdIaNv.css
  • public/build/assets/reddit-BXTru7AK.css
  • resources/lang/en/ip.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 nielsdrost7 changed the title feat: tabular reports — five company-panel report pages (IP-145) [IP-145]: tabular reports — five company-panel report pages Jul 17, 2026
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