From: Vladimir Fomichev Date: Fri, 22 Aug 2025 08:48:15 +0000 (+0300) Subject: Проверка терминалов X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=a5646b59b277c159459ca2ef1c725f2ba3766546;p=erp24_rep%2Fyii-erp24%2F.git Проверка терминалов --- diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index 578433d0..a4b10b99 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -1040,8 +1040,8 @@ class DataController extends BaseController ->andWhere(['tip' => 'terminals']) ->indexBy('id') ->asArray() - ->all(); - $existTerminals = Terminals::find()->indexBy('id')->asArray()->all(); + ->column(); + $existTerminals = Terminals::find()->indexBy('id')->asArray()->column(); foreach ($arr["terminals"] as $gi2 => $arr2) { if (in_array($arr2['id'], $products1cTerminals)) { continue; @@ -1054,6 +1054,7 @@ class DataController extends BaseController $products1c2->save(); if ($products1c2->getErrors()) { LogService::apiErrorLog(json_encode(["error_id" => 3, "error" => $products1c2->getErrors()], JSON_UNESCAPED_UNICODE)); + Yii::error(''); } }