From eaa37171144a65fa2b70f00993ff7605aefbffbc Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Fri, 14 Mar 2025 09:24:39 +0300 Subject: [PATCH] =?utf8?q?[ERP-370]=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?utf8?q?=D0=B8=D0=BB=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D1=83=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/commands/PriceController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erp24/commands/PriceController.php b/erp24/commands/PriceController.php index b18a158f..8c0cc0f8 100644 --- a/erp24/commands/PriceController.php +++ b/erp24/commands/PriceController.php @@ -23,9 +23,13 @@ class PriceController extends Controller { $cnt = count($priceDynamicDatas); for ($ind = 0; $ind < $cnt - 1; $cnt++) { if ($ind < $cnt - 1) { - PricesDynamic::updateAll(['active' => 0, 'date_to' => $priceDynamicDatas[$ind+1]['date_to']], + PricesDynamic::updateAll(['active' => 0, 'region_id' => 52, 'date_to' => $priceDynamicDatas[$ind+1]['date_to']], ['id' => $priceDynamicDatas[$ind]['id']]); echo '1'; + } else { + PricesDynamic::updateAll(['active' => 0, 'region_id' => 52, 'date_to' => $p[52][$productId][count($p[52][$productId]) - 1]['date_to']], + ['id' => $priceDynamicDatas[$ind]['id']]); + echo '2'; } } } -- 2.39.5