]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Изменение прав
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 26 Aug 2025 12:43:09 +0000 (15:43 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 26 Aug 2025 12:43:09 +0000 (15:43 +0300)
erp24/api2/controllers/DataController.php

index bb60ba92617ba4b7347b78c5f708b8f0804027eb..309d09e679962aae8f720b026a68bb701ea99846 100644 (file)
@@ -2609,11 +2609,19 @@ class DataController extends BaseController
                                 if ($newType->save()) {
                                     $oldOperation->type = (int)$operation['type'];
                                     $oldOperation->type_id = $newType->id;
+                                    if (!$oldOperation->save()) {
+                                        LogService::apiErrorLog(
+                                            json_encode(
+                                                ["error_id" => 44.3, "error" => $oldOperation->getErrors()],
+                                                JSON_UNESCAPED_UNICODE
+                                            )
+                                        );
+                                    }
                                 } else {
                                     Yii::error('Ошибка сохранение типа ' . json_encode($newType->getErrors(), JSON_UNESCAPED_UNICODE), __METHOD__ );
                                     LogService::apiErrorLog(
                                         json_encode(
-                                            ["error_id" => 44.3, "error" => $oldOperation->getErrors()],
+                                            ["error_id" => 44.4, "error" => $oldOperation->getErrors()],
                                             JSON_UNESCAPED_UNICODE
                                         )
                                     );
@@ -2624,7 +2632,7 @@ class DataController extends BaseController
                                 if (!$oldOperation->save()) {
                                     LogService::apiErrorLog(
                                         json_encode(
-                                            ["error_id" => 44.4, "error" => $oldOperation->getErrors()],
+                                            ["error_id" => 44.5, "error" => $oldOperation->getErrors()],
                                             JSON_UNESCAPED_UNICODE
                                         )
                                     );