Beispiel #1
0
use app\models\account\Account;
use app\models\contractor\Contractor;
use app\models\transaction\TransactionIncoming;
use yii\helpers\ArrayHelper;
if (is_null($__ITEM)) {
    $__ITEM = new TransactionIncoming();
}
?>

<li class="incoming" data-key="incoming-<?php 
echo $__ITEM->id;
?>
">
    <?php 
echo $form->field($__ITEM, 'account_id')->label(false)->dropDownList(ArrayHelper::merge(["" => "Select account"], Account::plainHierarcyForUser(Yii::$app->user->getId())));
?>
    <?php 
echo $form->field($__ITEM, 'contractor_id')->label(false)->dropDownList(ArrayHelper::merge(["" => "Select contractor"], Contractor::dropdown(Yii::$app->user->getId())), ['style' => 'display: none;']);
?>
    <?php 
echo $form->field($__ITEM, 'sum')->label(false)->textInput();
?>
    <div role="comment-container-incoming-<?php 
echo $__ITEM->id;
?>
">
    <?php 
if ($__ITEM->comment) {
    ?>
        <?php 
Beispiel #2
0
    <?php 
}
?>

    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'virtual')->checkbox(['1']);
?>

    <?php 
if ($model->scenario == 'insert') {
    ?>
        <?php 
    echo $form->field($model, 'parent_id')->dropDownList(ArrayHelper::merge(['' => ''], Account::plainHierarcyForUser(Yii::$app->user->getId())));
    ?>
    <?php 
} else {
    ?>
        <div class="form-group field-account-currency">
        <label class="control-label" for="account-currency">Parent</label>
        <div><?php 
    echo $model->parent_id;
    ?>
</div>

        <div class="help-block"></div>
        </div>
    <?php 
}