3namespace Bitrix\Catalog\Access\Filter;
5use Bitrix\Catalog\Access\Permission\PermissionDictionary;
6use Bitrix\Catalog\StoreDocumentElementTable;
7use Bitrix\Catalog\StoreDocumentTable;
8use Bitrix\Main\Access\Filter\AbstractAccessFilter;
9use Bitrix\Main\Access\Filter\UnknownEntityException;
10use Bitrix\Main\Loader;
11use Bitrix\Main\SystemException;
12use Bitrix\Sale\Internals\ShipmentItemTable;
13use Bitrix\Sale\Internals\ShipmentTable;
33 Loader::includeModule(
'sale');
37 if ($this->user->isAdmin())
42 if (
$entity === StoreDocumentTable::class)
44 return $this->getDocumentFilter(
$action);
47 if (
$entity === StoreDocumentElementTable::class)
49 return $this->getElementFilter(
$action);
52 if (
$entity === ShipmentTable::class)
54 return $this->getShipmentFilter(
$action);
57 if (
$entity === ShipmentItemTable::class)
59 return $this->getShipmentItemFilter(
$action);
71 private function validateEntity(
string $entity): void
74 StoreDocumentTable::class,
75 StoreDocumentElementTable::class,
77 ShipmentItemTable::class,
80 if (!in_array(
$entity, $available,
true))
93 private function getDocumentFilter(
string $action): ?
array
95 $types = array_filter(
96 PermissionDictionary::getAvailableStoreDocuments(),
97 fn(
string $docType) => $this->controller->check(
$action,
null, [
'value' => $docType])
108 '=DOC_TYPE' => $types,
119 private function getElementFilter(
string $action): ?
array
121 $types = array_filter(
122 PermissionDictionary::getAvailableStoreDocuments(),
123 fn(
string $docType) => $this->controller->check(
$action,
null, [
'value' => $docType])
134 '=DOCUMENT.DOC_TYPE' => $types,
145 private function getShipmentFilter(
string $action): ?
array
165 private function getShipmentItemFilter(
string $action): ?
array
168 return $this->getShipmentFilter(
$action);
getFilter(string $entity, array $params=[])
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']