Skip to content

Commit

Permalink
Added tracked flag to variant stock query
Browse files Browse the repository at this point in the history
  • Loading branch information
rs2487 committed Sep 25, 2020
1 parent cb1a297 commit 66a1d65
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ public function __invoke(LoadProductVariantStockQuery $query): void

$query->setOnHand($variantData['onHand']);
$query->setOnHold($variantData['onHold']);
$query->setTracked($variantData['tracked']);
}
}
17 changes: 17 additions & 0 deletions Model/Product/Query/LoadProductVariantStockQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class LoadProductVariantStockQuery
*/
private $onHand;

/**
* @var bool|null
*/
private $tracked;

public function __construct(string $code, string $variantCode)
{
$this->code = $code;
Expand Down Expand Up @@ -74,4 +79,16 @@ public function setOnHand(?int $onHand): self

return $this;
}

public function isTracked(): ?bool
{
return $this->tracked;
}

public function setTracked(?bool $tracked): self
{
$this->tracked = $tracked;

return $this;
}
}

0 comments on commit 66a1d65

Please sign in to comment.