403Webshell
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 :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/exchange/entity/shipmentinvoice.php
<?php

namespace Bitrix\Sale\Exchange\Entity;


use Bitrix\Crm\Invoice\EntityMarker;
use Bitrix\Main\ArgumentException;
use Bitrix\Sale\BasketBase;
use Bitrix\Sale\BasketItem;
use Bitrix\Sale\Exchange\EntityType;
use Bitrix\Sale\Internals\Entity;
use Bitrix\Sale\Order;
use Bitrix\Sale\Shipment;

class ShipmentInvoice extends ShipmentImport
{
	public function getOwnerTypeId()
	{
		return EntityType::INVOICE_SHIPMENT;
	}

	/**
	 * @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 Entity $shipment
	 * @return int
	 * @throws ArgumentException
	 */
	public static function resolveEntityTypeId(Entity $shipment)
	{
		if(!($shipment instanceof Shipment))
			throw new ArgumentException("Entity must be instanceof Shipment");

		return EntityType::INVOICE_SHIPMENT;
	}

	/**
	 * @param BasketBase $basket
	 * @param array $item
	 * @return \Bitrix\Sale\BasketItem|bool
	 */
	protected function getBasketItemByItem(BasketBase $basket, array $item)
	{
		return Invoice::getBasketItemByItem($basket, $item);
	}

	/**
	 * @param BasketItem $basket
	 * @return array
	 */
	protected function getAttributesItem(BasketItem $basket)
	{
		return Invoice::getAttributesItem($basket);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit