From ff9bf5477d38f525e2643f7a644fe3fd2b9887fb Mon Sep 17 00:00:00 2001 From: fomichev Date: Wed, 27 Nov 2024 17:37:20 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB?= =?utf8?q?=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BA?= =?utf8?q?=D0=BB=D0=B0=D1=81=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/api2/controllers/DataController.php | 6 +++--- erp24/controllers/ProductsController.php | 4 ++-- erp24/records/Products1cAdditionalCharacteristics.php | 6 +++--- erp24/records/Products1cPropType.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index 8bb0d9e9..338c76be 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -28,7 +28,7 @@ use yii_app\records\PaymentTypes; use yii_app\records\Prices; use yii_app\records\PricesDynamic; use yii_app\records\PricesZakup; -use yii_app\records\Products1CPropType; +use yii_app\records\Products1cPropType; use yii_app\records\Products1c; use yii_app\records\Products1cAdditionalCharacteristics; use yii_app\records\Sales; @@ -605,9 +605,9 @@ class DataController extends BaseController { foreach ($arr["AdditionCharacteristics"] as $characteristic) { - $propertyType = Products1CPropType::findOne(['id' => $characteristic["id"]]); + $propertyType = Products1cPropType::findOne(['id' => $characteristic["id"]]); if (!$propertyType) { - $propertyType = new Products1CPropType(); + $propertyType = new Products1cPropType(); $propertyType->id = $characteristic["id"]; $propertyType->name = $characteristic["name"]; if (!$propertyType->save()) { diff --git a/erp24/controllers/ProductsController.php b/erp24/controllers/ProductsController.php index 31c5c3e0..4d0743bd 100755 --- a/erp24/controllers/ProductsController.php +++ b/erp24/controllers/ProductsController.php @@ -8,7 +8,7 @@ use yii\helpers\Html; use yii\web\Controller; use yii_app\records\ExportImportTable; use yii_app\records\Prices; -use yii_app\records\Products1CPropType; +use yii_app\records\Products1cPropType; use yii_app\records\Products1c; use yii_app\records\Products1cAdditionalCharacteristics; use yii_app\records\Products1cOptions; @@ -219,7 +219,7 @@ class ProductsController extends Controller } - $properties = Products1CPropType::find() + $properties = Products1cPropType::find() ->select(['id', 'name']) ->all(); $properties = ArrayHelper::map($properties, 'id', 'name'); diff --git a/erp24/records/Products1cAdditionalCharacteristics.php b/erp24/records/Products1cAdditionalCharacteristics.php index 0cd8219f..33555901 100644 --- a/erp24/records/Products1cAdditionalCharacteristics.php +++ b/erp24/records/Products1cAdditionalCharacteristics.php @@ -12,7 +12,7 @@ use Yii; * @property string $property_id ID из product_1c_prop_type * @property string $value Название свойства, привязанного к продукту и относящегося к данному property_id * - * @property Products1CPropType $property + * @property Products1cPropType $property */ class Products1cAdditionalCharacteristics extends \yii\db\ActiveRecord { @@ -39,7 +39,7 @@ class Products1cAdditionalCharacteristics extends \yii\db\ActiveRecord return [ [['product_id', 'property_id', 'value'], 'required'], [['product_id', 'property_id', 'value'], 'string', 'max' => 255], - [['property_id'], 'exist', 'skipOnError' => true, 'targetClass' => Products1CPropType::class, 'targetAttribute' => ['property_id' => 'id']], + [['property_id'], 'exist', 'skipOnError' => true, 'targetClass' => Products1cPropType::class, 'targetAttribute' => ['property_id' => 'id']], ]; } @@ -63,6 +63,6 @@ class Products1cAdditionalCharacteristics extends \yii\db\ActiveRecord */ public function getProperty() { - return $this->hasOne(Products1CPropType::class, ['id' => 'property_id']); + return $this->hasOne(Products1cPropType::class, ['id' => 'property_id']); } } diff --git a/erp24/records/Products1cPropType.php b/erp24/records/Products1cPropType.php index 3f534c4b..b747943e 100644 --- a/erp24/records/Products1cPropType.php +++ b/erp24/records/Products1cPropType.php @@ -12,7 +12,7 @@ use Yii; * * @property Products1cAdditionalCharacteristics[] $products1cAdditionalCharacteristics */ -class Products1CPropType extends \yii\db\ActiveRecord +class Products1cPropType extends \yii\db\ActiveRecord { /** * {@inheritdoc} -- 2.39.5