30 return Main\Localization\Loc::getMessage(
'SALE_CASHBOX_CREDIT_NAME');
38 return static::CALCULATED_SIGN_INCOME;
46 return static::SUPPORTED_ENTITY_TYPE_SHIPMENT;
56 public function setEntities(array
$entities)
64 $this->
setField(
'SHIPMENT_ID', $entity->getId());
68 $this->
setField(
'CURRENCY', $entity->getOrder()->getCurrency());
71 $sum = $entity->getPrice();
72 $shipmentItemCollection = $entity->getShipmentItemCollection();
75 foreach ($shipmentItemCollection as $item)
77 $basketItem = $item->getBasketItem();
78 $sum += Sale\PriceMaths::roundPrecision($item->getQuantity() * $basketItem->getPrice());
91 $result = parent::extractDataInternal();
94 if (isset($result[
'PRODUCTS']))
96 foreach ($result[
'PRODUCTS'] as $item)
97 $totalSum += $item[
'SUM'];
100 if (isset($result[
'DELIVERY']))
102 foreach ($result[
'DELIVERY'] as $item)
103 $totalSum += $item[
'SUM'];
106 $result[
'PAYMENTS'] = array(
108 'TYPE' => static::PAYMENT_TYPE_CREDIT,
113 $result[
'TOTAL_SUM'] = $totalSum;
123 return static::SUPPORTED_ENTITY_TYPE_NONE;