public function init() { $this->name = \Yii::t('skeeks/shop/app', 'VAT rates'); $this->modelShowAttribute = "name"; $this->modelClassName = ShopVat::className(); parent::init(); }
public function init() { $this->name = \skeeks\cms\shop\Module::t('app', 'VAT_rates'); $this->modelShowAttribute = "name"; $this->modelClassName = ShopVat::className(); parent::init(); }
use skeeks\cms\modules\admin\widgets\form\ActiveFormUseTab as ActiveForm; /* @var $this yii\web\View */ /* @var $model \skeeks\cms\shop\models\ShopProduct */ /* @var $productPrices \skeeks\cms\shop\models\ShopProductPrice[] */ ?> <?php $form = ActiveForm::begin(); ?> <?php echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Prices')); ?> <?php echo $form->fieldSelect($model, 'vat_id', \yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopVat::find()->all(), 'id', 'name')); ?> <?php echo $form->fieldRadioListBoolean($model, 'vat_included'); ?> <?php echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \skeeks\cms\shop\Module::t('app', 'Main prices')]); ?> <div class="row"> <div class="col-md-3"> <?php echo $form->field($model, 'purchasing_price')->textInput();
/** * @return \yii\db\ActiveQuery */ public function getVat() { return $this->hasOne(ShopVat::className(), ['id' => 'vat_id']); }