Пример #1
0
 public function init()
 {
     $this->name = \Yii::t('skeeks/shop/app', 'VAT rates');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopVat::className();
     parent::init();
 }
Пример #2
0
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'VAT_rates');
     $this->modelShowAttribute = "name";
     $this->modelClassName = ShopVat::className();
     parent::init();
 }
Пример #3
0
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();
Пример #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVat()
 {
     return $this->hasOne(ShopVat::className(), ['id' => 'vat_id']);
 }