Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/exchange/entity/ |
Upload File : |
<?php namespace Bitrix\Sale\Exchange\Entity; use Bitrix\Crm\Invoice\EntityMarker; use Bitrix\Sale\Exchange\EntityType; use Bitrix\Sale\Order; class PaymentInvoiceBase extends PaymentImport { /** * @param $order * @param $entity * @param $result */ protected function addMarker($invoice, $entity, $result) { EntityMarker::addMarker($invoice, $entity, $result); } /** * @param array $fields * @return Order|null */ protected function loadParentEntity(array $fields) { $entity = null; if(!empty($fields['ID'])) { /** @var Order $entity */ $entity = \Bitrix\Crm\Invoice\Invoice::load($fields['ID']); } return $entity; } /** * @param string $type * @return int */ static public function resolveEntityTypeIdByCodeType($type) { switch($type) { case 'Y': $resolveType = EntityType::INVOICE_PAYMENT_CASH; break; case 'N': $resolveType = EntityType::INVOICE_PAYMENT_CASH_LESS; break; case 'A': $resolveType = EntityType::INVOICE_PAYMENT_CARD_TRANSACTION; break; default; $resolveType = EntityType::UNDEFINED; } return $resolveType; } }