From: fomichev Date: Wed, 27 Nov 2024 14:37:20 +0000 (+0300) Subject: Поправил название класса X-Git-Tag: 1.7~212^2~7 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=ff9bf5477d38f525e2643f7a644fe3fd2b9887fb;p=erp24_rep%2Fyii-erp24%2F.git Поправил название класса --- 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}