1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
shipmentstore.php
См. документацию.
1
<?php
2
namespace
Bitrix\Catalog\Product\Store\DistributionStrategy;
3
4
use Bitrix\Catalog\EO_StoreBatchDocumentElement_Collection;
5
use Bitrix\Catalog\EO_StoreBatch;
6
use Bitrix\Catalog\Product\Store\BatchManager;
7
use Bitrix\Catalog\StoreBatchDocumentElementTable;
8
use Bitrix\Main\Loader;
9
use Bitrix\Main\Result;
10
use Bitrix\Sale\ShipmentItemStore;
11
12
Loader::includeModule(
'sale'
);
13
19
final
class
ShipmentStore
extends
Base
20
{
21
private
ShipmentItemStore
$shipmentItemStore;
22
public
function
__construct
(
BatchManager
$batchManager
,
ShipmentItemStore
$shipmentItemStore)
23
{
24
parent::__construct(
$batchManager
, $shipmentItemStore->getStoreId());
25
26
$this->shipmentItemStore = $shipmentItemStore;
27
}
28
29
protected
function
addRegistryItem
(
EO_StoreBatch
$batchItem,
float
$amount
):
Result
30
{
31
return
StoreBatchDocumentElementTable::add
([
32
'SHIPMENT_ITEM_STORE_ID'
=> $this->shipmentItemStore->getId(),
33
'AMOUNT'
=> -
$amount
,
34
'PRODUCT_BATCH_ID'
=> $batchItem->getId(),
35
'BATCH_PRICE'
=> $batchItem->getPurchasingPrice(),
36
'BATCH_CURRENCY'
=> $batchItem->getPurchasingCurrency(),
37
]);
38
}
39
40
protected
function
getRegistryItems
():
EO_StoreBatchDocumentElement_Collection
41
{
42
return
StoreBatchDocumentElementTable::getList
([
43
'filter'
=> [
'=SHIPMENT_ITEM_STORE_ID'
=> $this->shipmentItemStore->getId()],
44
])
45
->fetchCollection()
46
;
47
}
48
}
Bitrix\Catalog\EO_StoreBatchDocumentElement_Collection
Определения
orm.php:6697
Bitrix\Catalog\EO_StoreBatch
Определения
orm.php:7942
Bitrix\Catalog\Product\Store\BatchManager
Определения
batchmanager.php:19
Bitrix\Catalog\Product\Store\DistributionStrategy\Base
Определения
base.php:21
Bitrix\Catalog\Product\Store\DistributionStrategy\Base\$batchManager
BatchManager $batchManager
Определения
base.php:23
Bitrix\Catalog\Product\Store\DistributionStrategy\ShipmentStore
Определения
shipmentstore.php:20
Bitrix\Catalog\Product\Store\DistributionStrategy\ShipmentStore\addRegistryItem
addRegistryItem(EO_StoreBatch $batchItem, float $amount)
Определения
shipmentstore.php:29
Bitrix\Catalog\Product\Store\DistributionStrategy\ShipmentStore\getRegistryItems
getRegistryItems()
Определения
shipmentstore.php:40
Bitrix\Catalog\Product\Store\DistributionStrategy\ShipmentStore\__construct
__construct(BatchManager $batchManager, ShipmentItemStore $shipmentItemStore)
Определения
shipmentstore.php:22
Bitrix\Main\ORM\Data\DataManager\getList
static getList(array $parameters=array())
Определения
datamanager.php:431
Bitrix\Main\ORM\Data\DataManager\add
static add(array $data)
Определения
datamanager.php:877
Bitrix\Main\ORM\Data\Result
Определения
result.php:16
Bitrix\Sale\ShipmentItemStore
Определения
shipmentitemstore.php:16
$amount
if(!function_exists("bx_hmac")) $amount
Определения
payment.php:30
bitrix
modules
catalog
lib
product
store
distributionstrategy
shipmentstore.php
Создано системой
1.14.0