]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Форматирование кода
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 29 Nov 2024 13:07:14 +0000 (16:07 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Fri, 29 Nov 2024 13:07:14 +0000 (16:07 +0300)
erp24/api2/controllers/DataController.php
erp24/modul/products/ajax_products_in_group.php
erp24/records/Products1c.php
erp24/records/Products1cAdditionalCharacteristics.php
erp24/records/Products1cOptions.php
erp24/records/ProductsClass.php

index 4b9b1dec74b7d634fd7314c07a9a69b8d5ec654f..be456d82d6a9601b9f251e8c87678e8aca873f74 100644 (file)
@@ -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);
-
                 }
             }
 
index 490ab3e22fede530568e820c239186f6c6eba435..e96f87f441b5db0eb59321d749571308e5f345a6 100644 (file)
@@ -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]);
 
index 11b180eee921340ac6870d4edd4aae69bdc651dd..f3f6c2ad6a4da3b80e80fa9de43eed019e126dac 100644 (file)
@@ -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)) {
index 2739bdfb2b33ef9fd14120e31b9cf319405e33ad..adc901b4657621efecc5bf1b9e4fb4d41347a3f7 100644 (file)
@@ -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',
index 5c8f41c7a2283479e0c3e90c9a0bc51e3871116d..8b29b2d98534a4884b4f0abd9ce93d49585f6125 100644 (file)
@@ -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'],
index e3fa91a91b56ba9838d5d1ce10e65b993c769bdc..e935f3c1d35bb317cfbdc89a8e4b42d4b4348516 100755 (executable)
@@ -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