26 if (!Main\Loader::includeModule(
'rest'))
31 if (empty($fields[
'APP_ID']) || empty($fields[
'CLEAN']) || $fields[
'CLEAN'] !==
true)
36 $app = Rest\AppTable::getByClientId($fields[
'APP_ID']);
42 $restHandlerResult = Sale\Internals\CashboxRestHandlerTable::getList([
43 'select' => [
'ID',
'CODE'],
45 '=APP_ID' => $app[
'CLIENT_ID'],
48 while ($restHandler = $restHandlerResult->fetch())
50 $cashboxResult = Sale\Cashbox\Manager::getList([
53 '=HANDLER' =>
'\\' .
Sale\
Cashbox\CashboxRest::class,
56 while ($cashbox = $cashboxResult->fetch())
58 $cashboxObj = Sale\Cashbox\Manager::getObjectById($cashbox[
'ID']);
61 $handlerCode = $cashboxObj->getValueFromSettings(
'REST',
'REST_CODE');
62 if ($handlerCode === $restHandler[
'CODE'])
64 Sale\Cashbox\Manager::delete($cashbox[
'ID']);
69 Sale\Internals\CashboxRestHandlerTable::delete($restHandler[
'ID']);
81 'sale.cashbox.handler.add' => [HandlerService::class,
'addHandler'],
82 'sale.cashbox.handler.update' => [HandlerService::class,
'updateHandler'],
83 'sale.cashbox.handler.delete' => [HandlerService::class,
'deleteHandler'],
84 'sale.cashbox.handler.list' => [HandlerService::class,
'getHandlerList'],
87 'sale.cashbox.add' => [CashboxService::class,
'addCashbox'],
88 'sale.cashbox.update' => [CashboxService::class,
'updateCashbox'],
89 'sale.cashbox.delete' => [CashboxService::class,
'deleteCashbox'],
90 'sale.cashbox.list' => [CashboxService::class,
'getCashboxList'],
92 'sale.cashbox.settings.get' => [CashboxService::class,
'getCashboxSettings'],
93 'sale.cashbox.settings.update' => [CashboxService::class,
'updateCashboxSettings'],
95 'sale.cashbox.ofd.settings.get' => [CashboxService::class,
'getCashboxOfdSettings'],
96 'sale.cashbox.ofd.settings.update' => [CashboxService::class,
'updateCashboxOfdSettings'],
99 'sale.cashbox.check.apply' => [CheckService::class,
'applyCheck'],
102 'sale.ofd.list' => [OfdService::class,
'getOfdList'],
103 'sale.ofd.settings.get' => [OfdService::class,
'getOfdSettings'],