- 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]>
63 lines
1.8 KiB
PHP
63 lines
1.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Jobs\Application\Contracts;
|
|
|
|
use App\Modules\Jobs\Application\DTOs\CustomerJobDetails;
|
|
use App\Modules\Jobs\Application\DTOs\CustomerJobSummary;
|
|
use App\Modules\Jobs\Application\DTOs\JobChangeEntry;
|
|
use App\Modules\Jobs\Application\DTOs\JobListFilter;
|
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
|
|
|
/**
|
|
* Read side of customer jobs, for the job pages and other modules (tasks,
|
|
* time entries, billing).
|
|
*/
|
|
interface CustomerJobQueries
|
|
{
|
|
/**
|
|
* Jobs by due date (none last), then newest first.
|
|
*
|
|
* @return LengthAwarePaginator<int, CustomerJobSummary>
|
|
*/
|
|
public function paginate(JobListFilter $filter, int $perPage = 25): LengthAwarePaginator;
|
|
|
|
/**
|
|
* The Kanban board: every Kanban status (archived left out) with its
|
|
* jobs by due date, empty statuses included.
|
|
*
|
|
* @return array<string, list<CustomerJobSummary>>
|
|
*/
|
|
public function board(JobListFilter $filter, int $limitPerStatus = 100): array;
|
|
|
|
public function findDetails(int $id): ?CustomerJobDetails;
|
|
|
|
/**
|
|
* Summaries of the given jobs, keyed by id; unknown ids are left out.
|
|
*
|
|
* @param list<int> $ids
|
|
* @return array<int, CustomerJobSummary>
|
|
*/
|
|
public function summariesByIds(array $ids): array;
|
|
|
|
/**
|
|
* The job's history, newest first.
|
|
*
|
|
* @return list<JobChangeEntry>
|
|
*/
|
|
public function changes(int $jobId): array;
|
|
|
|
/**
|
|
* Stored tag names that contain the term, for suggestions.
|
|
*
|
|
* @return list<string>
|
|
*/
|
|
public function tagSuggestions(string $term = '', int $limit = 20): array;
|
|
|
|
/**
|
|
* Whether the user is a named member of the job in any role.
|
|
*/
|
|
public function isMember(int $jobId, int $userId): bool;
|
|
}
|