Add an editable menu name and reserve billing material numbers on creation

- Company details get an optional "Valikon nimi", shown at the left of the
  main menu; it falls back to the application name when empty.
- A billing material gets its running number (billing_exports.number) only
  when it is created, so discarded drafts leave no gaps. Drafts have no
  number; existing created materials are numbered by the migration, and the
  CSV file name uses the number.
- TaskAssigneeMigrationTest rolls back from its own migration onward instead
  of assuming it is the last one.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-24 19:41:57 +02:00
co-authored by Claude Sonnet 5.5
parent 48030e7689
commit 7d7b72989d
25 changed files with 195 additions and 23 deletions
@@ -23,7 +23,8 @@ use App\Modules\Users\Application\Contracts\Clock;
* Creates the billing material from its draft (spec 12), all or nothing:
* checks every job again, marks the approved hours and billable expenses
* billed, forms the invoice lines from what was marked with the current
* prices, and moves the jobs to "Lasku luotu". Monthly fee jobs keep
* prices, gives the material the next running number (reserved only now, so
* discarded drafts leave no gaps), and moves the jobs to "Lasku luotu". Monthly fee jobs keep
* running, so their status stays.
*/
final class FinalizeBillingExport
@@ -81,7 +82,7 @@ final class FinalizeBillingExport
}
}
$export->finalize($linesByJob, $actorUserId, $this->clock->now());
$export->finalize($linesByJob, $this->exports->nextNumber(), $actorUserId, $this->clock->now());
$this->exports->save($export);
return count($export->invoices());