3namespace Bitrix\Catalog\v2\MeasureRatio;
5use Bitrix\Catalog\MeasureRatioTable;
6use Bitrix\Catalog\v2\BaseEntity;
7use Bitrix\Catalog\v2\Sku\BaseSku;
33 throw new \OutOfRangeException($id);
42 return reset($entities) ?:
null;
63 if ($parent && !$parent->isNew())
65 $id = $parent->getId();
84 $entity->setProductId($productId);
97 if (!
$res->isSuccess())
106 if (
$res->isSuccess())
120 public function delete(BaseEntity ...$entities): Result
131 if (!
$res->isSuccess())
157 '=PRODUCT_ID' => $skuId,
164 return MeasureRatioTable::getList(
$params)
171 $entity = $this->factory->createEntity();
180 $collection = $this->factory->createCollection();
182 foreach ($entityFields as
$fields)
185 $collection->add($measureRatio);
197 if (
$res->isSuccess())
215 if (!
$res->isSuccess())
227 $res = MeasureRatioTable::delete($id);
229 if (!
$res->isSuccess())
getByProductId(int $skuId)
getProductId(BaseEntity $entity)
addInternal(array $fields)
createEntity(array $fields=[])
__construct(MeasureRatioFactory $factory)
createCollection(array $entityFields=[])
getCollectionByParent(BaseSku $sku)
updateInternal(int $id, array $fields)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
save(BaseEntity ... $entities)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']