CoolCMS API

AdjustResult
in package

FinalYes

Result of a stock count / inventory (inventura). Value object (no DI — `*DTO*` folder mask).

document is the posted inventory document — null when no line had an effect (all rejected / delta=0): no numbered empty document is founded then, only the per-line outcome returns. warnings are non-fatal notices (e.g. a counted quantity fell below the reserved amount — physical reality wins, the shortage is still posted). rejectedLines are lines skipped without failing the whole document (TOCTOU snapshot mismatch, negative count), each {stockItemId, reason}.

Tags
phpstan-type

RejectedLine array{stockItemId: int, reason: string}

Table of Contents

Properties

$document  : StockDocument|null
$rejectedLines  : array<string|int, mixed>
$warnings  : array<string|int, mixed>

Methods

__construct()  : mixed

Properties

$rejectedLines read-only

public array<string|int, mixed> $rejectedLines = []

$warnings read-only

public array<string|int, mixed> $warnings = []

Methods

__construct()

public __construct(StockDocument|null $document[, array<int, string> $warnings = [] ][, array<int, array{stockItemId: int, reason: string}> $rejectedLines = [] ]) : mixed
Parameters
$document : StockDocument|null
$warnings : array<int, string> = []
$rejectedLines : array<int, array{stockItemId: int, reason: string}> = []
On this page

Search results