Exemplo n.º 1
0
<div class="stock-opname-form">
    <?php 
echo Html::errorSummary($model, ['class' => 'alert alert-danger alert-dismissible']);
?>
    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
    <div class="row">
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'number')->textInput(['maxlength' => true]);
?>

            <?php 
echo $form->field($model, 'warehouse_id')->dropDownList(Warehouse::selectOptions());
?>

            <?php 
echo $form->field($model, 'Date')->widget('yii\\jui\\DatePicker', ['dateFormat' => 'dd-MM-yyyy', 'options' => ['class' => 'form-control', 'style' => 'width:60%;']]);
?>
        </div>
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'description')->textInput(['maxlength' => true]);
?>

            <?php 
echo $form->field($model, 'operator')->textInput(['maxlength' => true]);
?>
Exemplo n.º 2
0
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="col-lg-12">
    <div class='btn-group pull-right'>
        <?php 
echo Html::button('New Good Movement', ['class' => 'btn bg-aqua', 'type' => 'button']);
?>
        
        <?php 
echo Html::button('<span class="caret"></span><span class="sr-only">Toggle Dropdown</span>', ['class' => 'btn btn-default dropdown-toggle', 'aria-expanded' => false, 'type' => 'button', 'data-toggle' => 'dropdown']);
?>
        <ul class="dropdown-menu" role="menu">
            <li><?php 
echo Html::a('Receive', ['create', 'type' => $searchModel::TYPE_RECEIVE]);
?>
</li>
            <li><?php 
echo Html::a('Issue', ['create', 'type' => $searchModel::TYPE_ISSUE]);
?>
</li>
        </ul>        
    </div>
</div>
<br><br>
<div class="col-lg-12 goods-movement-index">
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'tableOptions' => ['class' => 'table table-hover'], 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'number', 'nmReffType', ['attribute' => 'warehouse_id', 'value' => 'warehouse.name', 'filter' => Warehouse::selectOptions()], ['attribute' => 'vendor_id', 'value' => 'vendor.name'], 'Date', ['attribute' => 'type', 'value' => 'nmType', 'filter' => GoodsMovement::enums('TYPE_')], ['attribute' => 'status', 'value' => 'nmStatus', 'filter' => GoodsMovement::enums('STATUS_')], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Exemplo n.º 3
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use backend\models\inventory\GoodsMovement;
use backend\models\master\Warehouse;
/* @var $this yii\web\View */
/* @var $searchModel GoodsMovement */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = $searchModel->type == GoodsMovement::TYPE_RECEIVE ? 'Penerimaan' : 'Mutasi';
$this->title = $searchModel->type == GoodsMovement::TYPE_ISSUE ? 'Pengeluaran' : $this->title;
$this->title .= ' Barang';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="col-lg-12">
    <div class='btn-group pull-right'>
        <?php 
echo $searchModel->type ? Html::a($searchModel->type == GoodsMovement::TYPE_RECEIVE ? 'Penerimaan Baru' : 'Pengeluaran Baru', ['inventory/gm-manual/create', 'type' => $searchModel->type], ['class' => 'btn btn-default']) : '';
?>
    </div>
</div>
<br><br>
<div class="col-lg-12 goods-movement-index">
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'tableOptions' => ['class' => 'table table-hover'], 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'number', ['attribute' => 'type', 'value' => 'nmType', 'filter' => GoodsMovement::enums('TYPE_')], 'description', ['attribute' => 'warehouse_id', 'value' => 'warehouse.name', 'filter' => Warehouse::selectOptions()], ['attribute' => 'vendor_id', 'value' => 'vendor.name', 'filter' => \backend\models\master\Vendor::selectOptions()], 'date', ['attribute' => 'status', 'value' => 'nmStatus', 'filter' => GoodsMovement::enums('STATUS_')], ['label' => 'Invoice Number', 'format' => 'raw', 'value' => function ($model) {
    return $model->invoice != null ? Html::a($model->invoice->number, ['/accounting/invoice/view', 'id' => $model->invoice->id]) : '';
}], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>