]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Добавление запроса на получение нового типа цены
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 11 Jun 2024 14:06:15 +0000 (17:06 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Tue, 11 Jun 2024 14:06:15 +0000 (17:06 +0300)
erp24/api2/controllers/DataController.php

index e93ae7877da90b11c7f8c9f1c37c64f30be25b51..fc5c1b35ae1484f75cd9a8690c092c3ab6551812 100644 (file)
@@ -1039,7 +1039,17 @@ class DataController extends BaseController {
 
             if (!empty($result['prices'])) {
                 foreach ($result["prices"] as $idp => $price) {
-                    if (!empty($price) and $type_price == "Розничная цена") {
+                    if (
+                        !empty($price)
+                        &&
+                        in_array(
+                            $type_price,
+                            [
+                                "Розничная цена",
+                                "Розничная Маг на Московск",
+                            ]
+                        )
+                    ) {
                         Prices::deleteAll(['product_id' => $idp]);
                         $price1 = new Prices;
                         $price1->product_id = $idp;