From d9e3d4a6f443c0dfa3367a42a8e79626f60b6e37 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Thu, 16 Oct 2025 18:21:32 +0300 Subject: [PATCH] =?utf8?q?=D0=9B=D0=BE=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/services/UploadService.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/erp24/services/UploadService.php b/erp24/services/UploadService.php index 69081175..27315966 100644 --- a/erp24/services/UploadService.php +++ b/erp24/services/UploadService.php @@ -1114,9 +1114,9 @@ class UploadService { } if (!empty($result['checks']) && count($result['checks']) < 1000) { - + LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE)); foreach ($result["checks"] as $arr) { - + LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE)); $check_id = $arr["id"]; if ($arr["seller_id"] == '00000000-0000-0000-0000-000000000000') { $arr["seller_id"] = "NULL"; @@ -1140,6 +1140,7 @@ class UploadService { // SalesProductsUpdate::deleteAll(['check_id' => $arr["id"]]); if ($update) { + LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE)); $sales = Sales::find()->where(['id' => $arr["id"]])->one(); if ($sales) { $sales->delete(); @@ -1218,6 +1219,7 @@ class UploadService { // } if ($update) { + LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE)); $sales2 = new Sales; $sales2->phone = $arr["client_phone"] ?? 0; $sales2->id = $arr["id"]; @@ -1241,6 +1243,7 @@ class UploadService { $sales2->delivery_date = date('Y-m-d', strtotime($arr['delivery_date'] ?? '')); $sales2->pickup = $arr['pickup'] ?? false; $sales2->save(); + LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE)); if ($sales2->getErrors()) { LogService::apiErrorLog(json_encode(["error_id" => 21, "error" => $sales2->getErrors()], JSON_UNESCAPED_UNICODE)); } @@ -1341,6 +1344,7 @@ class UploadService { } } } elseif (!empty($result['checks'])) { + LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE)); file_put_contents(self::OUT_DIR . '/error_upload.txt', PHP_EOL . "elseif", FILE_APPEND); $dataArrayValues = self::getSalesDate($result["checks"], $update); @@ -1567,7 +1571,7 @@ class UploadService { foreach ($result["marketplace_orders"] as $mpOrder) { $updateResult = self::changeMarketplaceOrderStatusFrom1C($mpOrder); //изменение статусов if ($updateResult['status'] == 'error') { - LogService::apiErrorLog(json_encode(["error_id" => 40, "error" => $updateResult['message']], JSON_UNESCAPED_UNICODE)); + // LogService::apiErrorLog(json_encode(["error_id" => 40, "error" => $updateResult['message']], JSON_UNESCAPED_UNICODE)); } } } -- 2.39.5