Add expenses on customer jobs

- New Expenses module: purchases (materials, other) with a description
  and cost, and mileage priced with the price list's mileage rate.
- Who paid and whether the expense is billed are separate: an employee's
  own payments are reimbursed elsewhere. A billed expense has a markup
  and a billed amount, cost plus markup unless given.
- A job's expenses page lists, adds, edits and removes them; amounts of
  others' expenses need the expenses permission, own ones always show.
  Done jobs lock their expenses.
- The Kulut menu shows the user's own expenses by month. Management
  records subcontractors' expenses, which they see but cannot change.
- The price list gets a default markup for new purchases.
- Number fields that update a calculation now use wire:model.live.blur:
  in Livewire 4 plain .blur no longer sends the value to the server,
  which also fixes the product form's VAT calculation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 08:11:27 +02:00
co-authored by Claude Opus 5.5
parent bdd8d446d8
commit 54d98d9d2f
64 changed files with 3092 additions and 9 deletions
+9
View File
@@ -145,6 +145,14 @@ return [
'package' => 'paketti',
],
'expense_markup' => [
'section' => 'Kulut',
'label' => 'Kulujen oletuskate (%)',
'help' => 'Ehdotetaan uusien hankintakulujen katteeksi, esim. 15. Kilometrikuluille ei lisätä katetta. Tyhjä kenttä: ei katetta.',
'saved' => 'Kulujen oletuskate :markup tallennettu.',
'removed' => 'Kulujen oletuskate poistettu.',
],
'mileage' => [
'title' => 'Km-hinta',
'rate' => 'Km-hinta (€/km, ALV 0)',
@@ -164,6 +172,7 @@ return [
'name_taken' => 'Samalla tasolla on jo tämänniminen rivi.',
'service_not_in_unit' => 'Valittu palvelu kuuluu toiseen palveluyksikköön.',
'shared_unit_has_no_services' => 'Kaikille yhteisille työtehtäville ei voi lisätä palveluja.',
'invalid_markup' => 'Anna kate prosentteina väliltä 0–100, enintään kaksi desimaalia (esim. 15).',
'invalid_price' => 'Anna hinta euroina, esim. 85 tai 85,50 (enintään kaksi desimaalia, 0–1 000 000 €).',
'price_required' => 'Anna hinta.',
'invalid_unit' => 'Valitse yksikkö listasta.',