partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 9533df73128bff4f18064a56b349659709bb4f17
parent 5a5a0f9651f8270628df04842bccba7f8b243331
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri,  4 Sep 2015 18:44:04 +0200

Implemented setter for the minimum stock level

Diffstat:
Msrc/PartKeepr/PartBundle/Entity/Part.php | 19+++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/PartKeepr/PartBundle/Entity/Part.php b/src/PartKeepr/PartBundle/Entity/Part.php @@ -136,6 +136,7 @@ class Part extends BaseEntity * The minimum stock level for this part. If we run out of this part (e.g. stockLevel < minStockLevel), * we can see that in the system and re-order parts. * + * @Groups({"default"}) * @ORM\Column(type="integer") * @var integer */ @@ -387,6 +388,16 @@ class Part extends BaseEntity } /** + * Returns the minimum stock level + * + * @return int + */ + public function getMinStockLevel() + { + return $this->minStockLevel; + } + + /** * Returns the category path * @Groups({"default"}) * @@ -656,18 +667,22 @@ class Part extends BaseEntity /** * Adds a new stock entry to this part + * * @param StockEntry $stockEntry */ - public function addStockEntry (StockEntry $stockEntry) { + public function addStockEntry(StockEntry $stockEntry) + { $stockEntry->setPart($this); $this->getStockLevels()->add($stockEntry); } /** * Returns the project parts + * * @return ArrayCollection */ - public function getProjectParts () { + public function getProjectParts() + { return $this->projectParts; }