From a51d1b0d9aad09ed9295004c28fef9b2ba418989 Mon Sep 17 00:00:00 2001 From: fomichev Date: Fri, 29 Nov 2024 16:07:14 +0300 Subject: [PATCH] =?utf8?q?=D0=A4=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D1=80?= =?utf8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/api2/controllers/DataController.php | 9 --------- erp24/modul/products/ajax_products_in_group.php | 2 +- erp24/records/Products1c.php | 2 -- erp24/records/Products1cAdditionalCharacteristics.php | 1 - erp24/records/Products1cOptions.php | 1 - erp24/records/ProductsClass.php | 2 -- 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index 4b9b1dec..be456d82 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -465,11 +465,8 @@ class DataController extends BaseController { } } if (!empty($result['self_cost'])) { - - $storeMap = []; - $cityStoreIds = CityStore::find()->select('id')->column(); // Получаем соответствия export_val => entity_id из таблицы ExportImportTable @@ -483,12 +480,9 @@ class DataController extends BaseController { $storeMap[$record->export_val] = $record->entity_id; } - $values = []; - foreach ($result['self_cost'] as $selfCost) { - $storeId = $storeMap[$selfCost['store_id']] ?? null; if (!$storeId) { continue; @@ -510,10 +504,7 @@ class DataController extends BaseController { } if (!empty($values)) { - - $this->setSelfCostUpdate($values); - } } diff --git a/erp24/modul/products/ajax_products_in_group.php b/erp24/modul/products/ajax_products_in_group.php index 490ab3e2..e96f87f4 100644 --- a/erp24/modul/products/ajax_products_in_group.php +++ b/erp24/modul/products/ajax_products_in_group.php @@ -5,7 +5,7 @@ include_once(dirname(__DIR__, 2) . "/inc/db.php"); include_once(dirname(__DIR__, 2) . "/inc/base_new.php"); if(!empty($_REQUEST["parent_id"])) { $parent_id=htmlentities($_REQUEST["parent_id"]); -$q = "SELECT p.id, p.name, e.entity_id, p.view FROM products_1c as p LEFT JOIN export_import_table as e ON e.export_iD e.export_val=p.id='1' AND e.entity='products' ANd WHERE p.tip='products' AND p.parent_id=? order by p.name ASC"; +$q = "SELECT p.id, p.name, e.entity_id, p.view FROM products_1c as p LEFT JOIN export_import_table as e ON e.export_id='1' AND e.entity='products' AND e.export_val=p.id WHERE p.tip='products' AND p.parent_id=? order by p.name ASC"; $data = $db::getRows($q,[$parent_id]); diff --git a/erp24/records/Products1c.php b/erp24/records/Products1c.php index 11b180ee..f3f6c2ad 100644 --- a/erp24/records/Products1c.php +++ b/erp24/records/Products1c.php @@ -79,7 +79,6 @@ class Products1c extends \yii\db\ActiveRecord */ public static function getProducts1cByType(string $tip, $guids = [], $parentIds = [], $orderBy = null, $view = null) : array { - $query = self::find() ->select(['name', 'id' , 'parent_id']) ->andWhere('tip=:tip', [':tip' => $tip]); @@ -143,7 +142,6 @@ class Products1c extends \yii\db\ActiveRecord */ public static function getProducts1c(array $guids = [], $indexById = false) : array { - $query = self::find(); if (!empty($guids)) { diff --git a/erp24/records/Products1cAdditionalCharacteristics.php b/erp24/records/Products1cAdditionalCharacteristics.php index 2739bdfb..adc901b4 100644 --- a/erp24/records/Products1cAdditionalCharacteristics.php +++ b/erp24/records/Products1cAdditionalCharacteristics.php @@ -50,7 +50,6 @@ class Products1cAdditionalCharacteristics extends \yii\db\ActiveRecord public function attributeLabels() { return [ - 'product_id' => 'Product ID', 'property_id' => 'Property ID', 'value' => 'Value Name', diff --git a/erp24/records/Products1cOptions.php b/erp24/records/Products1cOptions.php index 5c8f41c7..8b29b2d9 100644 --- a/erp24/records/Products1cOptions.php +++ b/erp24/records/Products1cOptions.php @@ -34,7 +34,6 @@ class Products1cOptions extends \yii\db\ActiveRecord public function rules() { return [ - [['id', 'options', 'provider_id', 'expiration_days', 'min_lot', 'colors', 'price_zakup', 'min_order', 'group_id', 'main'], 'required'], [['options', 'colors'], 'string'], diff --git a/erp24/records/ProductsClass.php b/erp24/records/ProductsClass.php index e3fa91a9..e935f3c1 100755 --- a/erp24/records/ProductsClass.php +++ b/erp24/records/ProductsClass.php @@ -12,7 +12,6 @@ use Yii; */ class ProductsClass extends \yii\db\ActiveRecord { - public const HINT_WRAP = 'wrap'; public const HINT_POTTED = 'potted'; public const HINT_SERVICES = 'services'; @@ -23,7 +22,6 @@ class ProductsClass extends \yii\db\ActiveRecord public const HINT_MARKETPLACE_ADDITIONAL = 'marketplace_additional'; public const HINT_RELATED = 'related'; public const HINT_OTHER_ITEMS = 'other_items'; - public const MARKETPLACE = 'marketplace'; // TODO: replace with HINT_MARKETPLACE public const MARKETPLACE_ADDITIONAL = 'marketplace_additional'; // TODO: replace with HINT_MARKETPLACE_ADDITIONAL -- 2.39.5