diff --git a/backend/modules/shop/views/express-template/express_area_view.php b/backend/modules/shop/views/express-template/express_area_view.php index 31d353e..88bc8e4 100755 --- a/backend/modules/shop/views/express-template/express_area_view.php +++ b/backend/modules/shop/views/express-template/express_area_view.php @@ -6,6 +6,7 @@ use backend\modules\shop\models\ars\Province; use yii\helpers\Html; use yii\widgets\DetailView; use backend\modules\shop\models\ars\ExpressTemplate; +use backend\modules\shop\logic\ShopManager; /* @var $this yii\web\View */ /* @var $model backend\modules\shop\models\ars\ExpressTemplate */ @@ -32,7 +33,7 @@ $this->params['breadcrumbs'][] = $this->title; 'value' => function ($model) { $expressTemplateModel = ExpressTemplate::findOne($model->express_template); if ($expressTemplateModel->calculation_type == ExpressTemplate::CALCULATION_TYPE_WEIGHT) { - return $model->basic_count /= 10; + return $model->basic_count /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_WEIGHT); } else { return $model->basic_count; } @@ -42,7 +43,7 @@ $this->params['breadcrumbs'][] = $this->title; 'attribute' => 'basic_price', 'label' => ExpressArea::$formList[$expressTemplateModel->calculation_type]['basic_price'], 'value' => function ($model) { - return $model->basic_price /= 100; + return $model->basic_price /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_MONEY); } ], [ @@ -51,7 +52,7 @@ $this->params['breadcrumbs'][] = $this->title; 'value' => function ($model) { $expressTemplateModel = ExpressTemplate::findOne($model->express_template); if ($expressTemplateModel->calculation_type == ExpressTemplate::CALCULATION_TYPE_WEIGHT) { - return $model->extra_count /= 10; + return $model->extra_count /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_WEIGHT); } else { return $model->extra_count; } @@ -61,7 +62,7 @@ $this->params['breadcrumbs'][] = $this->title; 'attribute' => 'extra_price', 'label' => ExpressArea::$formList[$expressTemplateModel->calculation_type]['extra_price'], 'value' => function ($model) { - return $model->extra_price /= 100; + return $model->extra_price /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_MONEY); } ], 'updated_at:datetime',