Files
2026-11-26 17:11:54 +02:00

29 lines
927 B
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Sales\Application\Contracts;
use DateTimeImmutable;
/**
* Books the hours of a quick sale on the seller, on the year's quick sale
* job. Implemented with the Jobs and TimeTracking modules.
*/
interface QuickSaleHours
{
/**
* Adds the hours to the seller's day on the work type's task.
*
* @return bool False when the hours could not be booked, e.g. the
* day's hours are already approved or would pass 24 hours.
*/
public function book(int $sellerId, DateTimeImmutable $day, int $workTypeId, int $quarters, int $saleId): bool;
/**
* Books the hours of a quick sale order's production step on the user
* who completed it, like book(); the note names the pickup number.
*/
public function bookForOrder(int $userId, DateTimeImmutable $day, int $workTypeId, int $quarters, int $pickupNumber): bool;
}