Make quick sale products on machines as orders paid when ready
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Sales\Application\Contracts;
|
||||
|
||||
use App\Modules\Sales\Application\DTOs\OrderLineSummary;
|
||||
use App\Modules\Sales\Application\DTOs\OrderSummary;
|
||||
|
||||
/**
|
||||
* Reads quick sale orders. The Machines module reads order lines for the
|
||||
* machine console through this contract.
|
||||
*/
|
||||
interface QuickSaleOrderQueries
|
||||
{
|
||||
/**
|
||||
* Orders being made or waiting to be paid, and paid ones still being
|
||||
* made, oldest first.
|
||||
*
|
||||
* @return list<OrderSummary>
|
||||
*/
|
||||
public function openOrders(): array;
|
||||
|
||||
public function findOrder(int $id): ?OrderSummary;
|
||||
|
||||
/**
|
||||
* @param list<int> $lineIds
|
||||
* @return array<int, OrderLineSummary> By line id.
|
||||
*/
|
||||
public function lines(array $lineIds): array;
|
||||
|
||||
/**
|
||||
* How many orders are not yet paid (cancelled ones left out).
|
||||
*/
|
||||
public function unpaidCount(): int;
|
||||
}
|
||||
Reference in New Issue
Block a user