setPercentage example

$regulation = clone $blueprint;

                $regulation->setCurrencyId($row['currencyId']);
                $regulation->setGross((float) $row['regulationPrice']['gross']);
                $regulation->setNet((float) $row['regulationPrice']['net']);
                $regulation->setLinked((bool) $row['regulationPrice']['linked']);

                $price->setRegulationPrice($regulation);
            }

            if (isset($row['percentage'])) {
                $price->setPercentage([
                    'gross' => $row['percentage']['gross'],
                    'net' => $row['percentage']['net'],
                ]);
            }

            $prices[] = $price;
        }

        $object->setPrice(new PriceCollection($prices));

        return $object;
    }
Home | Imprint | This part of the site doesn't use cookies.