From: fomichev Date: Tue, 15 Jul 2025 13:02:31 +0000 (+0300) Subject: Повторная отправка - количество попыток 4 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=754f6279b2d61a756c45b06933bd0bc2b44e6443;p=erp24_rep%2Fyii-erp24%2F.git Повторная отправка - количество попыток 4 --- diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index 2ec1143a..ad6d0647 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -873,6 +873,7 @@ class DataController extends BaseController // 'raw_data' => $marketplaceOrder->raw_data, ]; $marketplaceOrder->sent_1c_at = date('Y-m-d H:i:s'); + $marketplaceOrder->attempts_number = 1; $marketplaceOrder->status_1c = MarketplaceOrders::STATUSES_1C_SENDED_TO_1C; $marketplaceOrder->save(); } @@ -2419,7 +2420,7 @@ class DataController extends BaseController $sentAt = strtotime($order->sent_1c_at ?? '2025-07-01 00:00:00'); $attempts = (int)$order->attempts_number; if (($now - $sentAt) > 300) { - if ($attempts < 3) { + if ($attempts < 4) { $order->sent_1c_at = null; $order->attempts_number = $attempts + 1; $order->status_1c = MarketplaceOrders::STATUSES_1C_CREATED_IN_ERP;