PartKeepr\PartBundle\Entity\PartDistributor::setPackagingUnit PHP Method

setPackagingUnit() public method

For example, some distributors only sell resistors in packs of 100, so you can't order just one. We use the packagingUnit to calculate how many pieces will be delivered once ordered. So if your stock level falls below the minimum (example: you would need to order 10 resistors), we suggest that you only order one resistor pack instead of 10.
public setPackagingUnit ( integer $packagingUnit )
$packagingUnit integer The amount of items in one package
    public function setPackagingUnit($packagingUnit)
    {
        $packagingUnit = intval($packagingUnit);
        if ($packagingUnit < 1) {
            throw new PackagingUnitOutOfRangeException();
        }
        $this->packagingUnit = $packagingUnit;
    }