1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
checkservice.php
См. документацию.
1<?php
2
3namespace Bitrix\Sale\Cashbox\Rest;
4
5use Bitrix\Main;
6use Bitrix\Rest\RestException;
7use Bitrix\Sale\Cashbox\CheckManager;
8use Bitrix\Sale\Helpers;
9use Bitrix\Sale\Cashbox;
10
11if (!Main\Loader::includeModule('rest'))
12{
13 return;
14}
15
21{
22 private const ERROR_CHECK_NOT_FOUND = 'ERROR_CHECK_NOT_FOUND';
23 private const ERROR_CHECK_APPLY = 'ERROR_CHECK_APPLY';
24
30 private static function checkParamsBeforeApplyCheck($params)
31 {
32 if (!$params['UUID'])
33 {
34 throw new RestException('Parameter UUID is not defined', self::ERROR_CHECK_FAILURE);
35 }
36
38 if (!$checkInfo)
39 {
40 throw new RestException('Check not found', self::ERROR_CHECK_NOT_FOUND);
41 }
42 }
43
52 public static function applyCheck($params)
53 {
56 self::checkParamsBeforeApplyCheck($params);
57
59 if ($result->isSuccess())
60 {
61 return true;
62 }
63
64 $errors = implode("\n", $result->getErrorMessages());
65 throw new RestException($errors, self::ERROR_CHECK_APPLY);
66 }
67}
static includeModule($moduleName)
Определения loader.php:67
static applyCheckResult(array $data)
Определения cashbox.php:286
static getCheckInfoByExternalUuid($uuid)
Определения checkmanager.php:1685
static applyCheck($params)
Определения checkservice.php:52
static prepareIncomingParams(array $data)
Определения restservice.php:112
$result
Определения get_property_values.php:14
$errors
Определения iblock_catalog_edit.php:74
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799