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/cashbox/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/cashbox/cashbox1c.php
<?php

namespace Bitrix\Sale\Cashbox;

use Bitrix\Main;
use Bitrix\Main\Localization;
use Bitrix\Sale\Cashbox\Internals\CashboxTable;

Localization\Loc::loadMessages(__FILE__);

/**
 * Class Cashbox1C
 * @package Bitrix\Sale\Cashbox
 */
class Cashbox1C extends Cashbox
{
	const CACHE_ID = 'BITRIX_CASHBOX_1C_ID';
	const TTL = 31536000;


	/**
	 * @param Check $check
	 * @return array
	 */
	public function buildCheckQuery(Check $check)
	{
		return array();
	}

	/**
	 * @param $id
	 * @return array
	 */
	public function buildZReportQuery($id)
	{
		return array();
	}

	/**
	 * @return string
	 */
	public static function getName()
	{
		return Localization\Loc::getMessage('SALE_CASHBOX_1C_TITLE');
	}

	/**
	 * @return int
	 */
	public static function getId()
	{
		$id = 0;
		$cacheManager = Main\Application::getInstance()->getManagedCache();

		if ($cacheManager->read(self::TTL, self::CACHE_ID))
			$id = $cacheManager->get(self::CACHE_ID);

		if ($id <= 0)
		{
			$data = CashboxTable::getRow(
				array(
					'select' => array('ID'),
					'filter' => array('=HANDLER' => '\Bitrix\Sale\Cashbox\Cashbox1C')
				)
			);
			if (is_array($data) && $data['ID'] > 0)
			{
				$id = $data['ID'];
				$cacheManager->set(self::CACHE_ID, $id);
			}
		}

		return $id;
	}

	/**
	 * @param array $data
	 * @throws Main\NotImplementedException
	 * @return array
	 */
	protected static function extractCheckData(array $data)
	{
		return array(
			'ID' => $data['ID'],
			'LINK_PARAMS' => array(
				Check::PARAM_FISCAL_DOC_ATTR => $data['LINK_PARAMS']['FISCAL_SIGN'],
				Check::PARAM_REG_NUMBER_KKT => $data['LINK_PARAMS']['REG_NUMBER_KKT']
			)
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit