Example #1
0
?>
                </div>
                <div class="tab-pane col-lg-12" id="delivery-pane">
                    <div class="box box-solid">
                        <?php 
//                        echo ListView::widget([
//                            'dataProvider' => $greceipt,
//                            'layout' => '{items}',
//                            'itemView' => '_greceipt',
//                                //'options' => ['class' => 'box-body']
//                        ]);
?>
                        <?php 
echo yii\grid\GridView::widget(['tableOptions' => ['class' => 'table table-striped'], 'layout' => '{items}', 'dataProvider' => $greceipt, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'Receipt Number', 'format' => 'raw', 'value' => function ($data) {
    return Html::a($data->number, ['inventory/movement/view', 'id' => $data->id]);
}], 'date:date', ['attribute' => 'warehouse_id', 'value' => 'warehouse.name', 'filter' => Warehouse::selectOptions()], ['attribute' => 'status', 'format' => 'raw', 'filter' => [GoodsMovement::STATUS_DRAFT => 'Draft', GoodsMovement::STATUS_PROCESS => 'Proccess', GoodsMovement::STATUS_CLOSE => 'Closed'], 'value' => function ($data) {
    $color = $data->status == GoodsMovement::STATUS_DRAFT ? 'danger' : 'success';
    $color = $data->status == GoodsMovement::STATUS_PROCESS ? 'info' : $color;
    $color = $data->status == GoodsMovement::STATUS_CLOSE ? 'success' : $color;
    return Html::tag('small', $data->nmStatus, ['class' => 'label label-' . $color]);
}]]]);
?>
                    </div>            
                </div>
                <div class="tab-pane col-lg-12" id="payments-pane">
                    Payments
                </div>
            </div>
        </div>
    </section>
</div>
Example #2
0
echo Toolbar::widget(['items' => [['label' => '', 'url' => ['print-html'], 'icon' => 'fa fa-print', 'linkOptions' => ['class' => 'btn btn-default btn-sm disabled', 'target' => '_blank', 'title' => 'Html Print']], ['label' => '', 'url' => ['print-pdf'], 'icon' => 'fa fa-file', 'linkOptions' => ['class' => 'btn btn-default btn-sm disabled', 'target' => '_blank', 'title' => 'Export to Pdf']], ['label' => '', 'url' => ['print-xsl'], 'icon' => 'fa fa-table', 'linkOptions' => ['class' => 'btn btn-default btn-sm disabled', 'target' => '_blank', 'title' => 'Export to Excel']]]]) . '&nbsp;&nbsp;';
echo ActionToolbar::widget(['items' => [['label' => 'Create New', 'url' => ['create'], 'icon' => 'fa fa-plus-square'], ['label' => 'Update', 'url' => ['update', 'id' => $model->id], 'icon' => 'fa fa-pencil'], ['label' => 'Delete', 'url' => ['delete', 'id' => $model->id], 'icon' => 'fa fa-trash-o', 'linkOptions' => ['data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]], ['label' => 'Goods Movement List', 'url' => ['index'], 'icon' => 'fa fa-list']]]);
?>
<div class="box box-primary" style="min-height: 160px; margin-bottom: 20px; padding-top: 20px;">
    <div class="box-body">
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'number')->textInput(['readonly' => true, 'style' => 'width:30%;']);
?>
            <?php 
if (isset($config['branch_field'])) {
    $branch_id = $model->reffDoc->{$config['branch_field']};
} else {
    $branch_id = null;
}
echo $form->field($model, 'warehouse_id')->dropDownList(Warehouse::selectOptions($branch_id));
?>
    
            <?php 
echo $form->field($model, 'nmStatus')->textInput(['maxlength' => 16, 'readonly' => true, 'style' => 'width:20%;']);
?>
       
        </div>
        <div class="col-lg-6">                
            <?php 
echo $form->field($model, 'Date')->widget('yii\\jui\\DatePicker', ['options' => ['class' => 'form-control', 'style' => 'width:150px;']]);
?>
            <?php 
echo $form->field($model, 'description')->textInput(['maxlength' => 255]);
?>
            <div class="form-group field-goodsmovement-number">
Example #3
0
    <section class="col-lg-12">
        <?php 
echo Toolbar::widget(['items' => [['label' => '', 'url' => ['print-html'], 'icon' => 'fa fa-print', 'linkOptions' => ['class' => 'btn btn-default btn-sm disabled', 'target' => '_blank', 'title' => 'Html Print']], ['label' => '', 'url' => ['print-pdf'], 'icon' => 'fa fa-file', 'linkOptions' => ['class' => 'btn btn-default btn-sm disabled', 'target' => '_blank', 'title' => 'Export to Pdf']], ['label' => '', 'url' => ['print-xsl'], 'icon' => 'fa fa-table', 'linkOptions' => ['class' => 'btn btn-default btn-sm disabled', 'target' => '_blank', 'title' => 'Export to Excel']]]]) . '&nbsp;&nbsp;';
echo ActionToolbar::widget(['items' => [['label' => 'Create New', 'url' => ['create', 'type' => 100], 'icon' => 'fa fa-plus-square'], ['label' => 'Update', 'url' => ['update'], 'icon' => 'fa fa-pencil', 'linkOptions' => ['class' => 'disabled']], ['label' => 'Delete', 'url' => ['delete'], 'icon' => 'fa fa-trash-o', 'linkOptions' => ['class' => 'disabled', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]], ['label' => 'Goods Movement List', 'url' => ['index'], 'icon' => 'fa fa-list', 'linkOptions' => ['class' => 'disabled']]]]);
?>
        <div class="box box-info">
            <div class="box-body no-padding">
                <?php 
$filterRef = [];
foreach (Configs::movement() as $key => $value) {
    $filterRef[$key] = isset($value['name']) ? $value['name'] : $key;
}
?>
                <?php 
\yii\widgets\Pjax::begin(['enablePushState' => false]);
?>
                <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => "{items}\n{pager}", 'tableOptions' => ['class' => 'table table-striped'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'number', 'date:date', ['attribute' => 'reff_type', 'value' => 'nmReffType', 'filter' => $filterRef], ['label' => 'Reference', 'value' => 'reffLink', 'format' => 'raw'], ['attribute' => 'warehouse_id', 'value' => 'warehouse.name', 'filter' => Warehouse::selectOptions()], ['attribute' => 'status', 'format' => 'raw', 'filter' => [GoodsMovement::STATUS_DRAFT => 'Draft', GoodsMovement::STATUS_PROCESS => 'Proccess', GoodsMovement::STATUS_CLOSE => 'Closed'], 'value' => function ($data) {
    $color = $data->status == GoodsMovement::STATUS_DRAFT ? 'danger' : 'success';
    $color = $data->status == GoodsMovement::STATUS_PROCESS ? 'info' : $color;
    $color = $data->status == GoodsMovement::STATUS_CLOSE ? 'success' : $color;
    return Html::tag('small', $data->nmStatus, ['class' => 'label label-' . $color]);
}], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}{update}{delete}{apply}']]]);
?>
                <?php 
\yii\widgets\Pjax::end();
?>
            </div>
        </div>
    </section>
</div>