fix(invoices): make View work on received invoices and estimates

Merged
JO
18d ago
+12-6

Fix the View button on Received Invoices and Received Estimates

What was wrong

On the Received Invoices page, selecting an invoice and clicking View did nothing. The same problem happened on Received Estimates.

What changed

  • View now opens the invoice (or estimate) you selected in the table, just like Edit and Download already did.
  • If nothing is selected, clicking View still does nothing, as before.

How to test

  1. Go to Accounting → Invoices → Received Invoices.
  2. Select an invoice in the table.
  3. Click View. The invoice's page should open.
  4. Repeat on Received Estimates.

Summary by cubic

Fixes the View button on the Received Invoices and Received Estimates pages so it opens the selected row instead of doing nothing.

The header toolbar renders View without a selected item, so view() returned early. It now falls back to the row selected in the table, matching how Edit and Download already behave.