Exemple #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = BranchModel::find();
     $query->with(['orgn']);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         $query->where('1=0');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'orgn_id' => $this->orgn_id, 'created_at' => $this->created_at, 'created_by' => $this->created_by, 'updated_at' => $this->updated_at, 'updated_by' => $this->updated_by]);
     $query->andFilterWhere(['like', 'code', $this->code])->andFilterWhere(['like', 'name', $this->name]);
     return $dataProvider;
 }
Exemple #2
0
use yii\web\View;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use backend\models\sales\Sales;
use backend\models\master\Branch;
/* @var $this View */
/* @var $model Sales */
/* @var $form ActiveForm */
?>
<div class="row">
    <div class="col-md-4">
        <?php 
echo $form->field($model, 'number')->textInput(['readonly' => true, 'style' => 'width:40%;']);
?>
        <?php 
echo $form->field($model, 'branch_id')->dropDownList(Branch::selectOptions());
?>
    </div>
    <div class="col-md-4">
        <?php 
echo $form->field($model, 'vendor_name')->textInput([]);
?>
        <?php 
echo Html::activeHiddenInput($model, 'vendor_id');
?>
        <?php 
echo $form->field($model, 'Date')->widget('yii\\jui\\DatePicker', ['dateFormat' => 'dd-MM-yyyy', 'options' => ['class' => 'form-control', 'style' => 'width:40%;']]);
?>
    </div>
    <div class="col-md-4">
        <?php 
Exemple #3
0
use yii\helpers\Html;
use yii\grid\GridView;
use backend\models\inventory\Transfer;
use backend\models\inventory\search\Transfer as TransferSearch;
use backend\models\master\Branch;
/* @var $this yii\web\View */
/* @var $searchModel TransferSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Transfer';
$this->params['breadcrumbs'][] = $this->title;
?>
<p class='pull-right'>
    <?php 
echo Html::a('Create Transfer', ['create'], ['class' => 'btn btn-default']);
?>
</p>
<br>

<div class="transfer-index">

    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>


    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'tableOptions' => ['class' => 'table table-hover'], 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'number', ['attribute' => 'branch_id', 'value' => 'branch.name', 'filter' => Branch::selectOptions()], ['attribute' => 'branch_dest_id', 'value' => 'branchDest.name', 'filter' => Branch::selectOptions()], ['attribute' => 'Date'], ['attribute' => 'status', 'value' => 'nmStatus', 'filter' => Transfer::enums('STATUS_')], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBranch()
 {
     return $this->hasOne(\backend\models\master\Branch::className(), ['id' => 'branch_id']);
 }
 /**
  * Finds the Branch model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Branch the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Branch::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemple #6
0
?>
        <div class="col-md-2">
            <?php 
echo $form->field($model, 'number')->textInput(['readonly' => true]);
?>
            <?php 
echo $form->field($model, 'Date')->widget('yii\\jui\\DatePicker', ['dateFormat' => 'dd-MM-yyyy', 'options' => ['class' => 'form-control']]);
?>
            
        </div>
        <div class="col-md-4">
            <?php 
echo $form->field($model->branch, 'name')->textInput(['readOnly' => true]);
?>
            <?php 
echo $form->field($model, 'branch_dest_id')->dropDownList(Branch::selectOptions(), ['prompt' => '--destination--', 'readonly' => true]);
?>
        </div>
        <div class="col-md-6">
            <?php 
echo $form->field($model, 'value')->textInput(['style' => 'width:40%;']);
?>
            <?php 
echo $form->field($model, 'branch_id')->hiddenInput()->label(false);
?>
        </div>
        <div class="nav-tabs-justified col-lg-12"  style="margin-top: 20px;">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#item" data-toggle="tab" aria-expanded="false">Items</a></li>
                <li><a href="#notes" data-toggle="tab" aria-expanded="false">Notes</a></li>
                <li class="pull-right">
Exemple #7
0
use yii\web\JsExpression;
use mdm\admin\models\User;
use yii\jui\AutoComplete;
/* @var $this yii\web\View */
/* @var $model app\models\master\U2Branch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="u2-branch-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'branch_id')->dropDownList(\backend\models\master\Branch::selectOptions(), ['style' => 'width:60%;'])->label('Branch');
?>

    <?php 
$data = User::find()->select(['username as value', 'username as  label', 'id as id'])->asArray()->all();
echo AutoComplete::widget(['model' => $model, 'attribute' => 'user_name', 'options' => ['class' => 'form-control'], 'clientOptions' => ['source' => $data, 'autoFill' => true, 'minLength' => '1', 'select' => new JsExpression("function( event, ui ) {\n                \$('#u2branch-user_id').val(ui.item.id);\n             }"), 'search' => new JsExpression("function( event, ui ) {\n                \$('#u2branch-user_id').val('');\n             }")]]);
?>

    <?php 
echo $form->field($model, 'user_id')->hiddenInput()->label(false);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
Exemple #8
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBranch()
 {
     return $this->hasOne(Branch::className(), ['id' => 'branch_id']);
 }
Exemple #9
0
</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                </div>
            </div>
            <!-- search form -->
            <?php 
    echo Html::beginForm(['/site/change-branch'], 'post', ['class' => 'sidebar-form']);
    ?>
<!--                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search..."/>
                    <span class="input-group-btn">
                        <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
                    </span>
                </div>-->
                    <?php 
    echo Html::dropDownList('activeBrach', Yii::$app->profile->branch_id, Branch::selectAssignedOptions(), ['class' => 'form-control', 'prompt' => '== Active Branch ==', 'id' => 'select-branch']);
    ?>
            <?php 
    echo Html::endForm();
    ?>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
        <?php 
}
?>

        <?php 
echo SideNav::widget(['items' => require '_item_menu.php']);
?>
    </section>
    <!-- /.sidebar -->
Exemple #10
0
/* @var $model backend\models\sales\search\SalesDtl */
/* @var $form yii\widgets\ActiveForm */
/*
 * Create By Mujib Masyhudi <*****@*****.**>
 * Create at {date('now')}
 */
?>
 
<?php 
$form = ActiveForm::begin(['method' => 'get']);
?>
 
<div class="sales-dtl-search">
    <div class="col-lg-12">
        <?php 
echo $form->field($model, 'branch_id')->dropDownList(Branch::selectOptions(), ['style' => 'width:16%;', 'prompt' => '-- All --'])->label('Branch');
?>
    </div>
    <div class="col-lg-2">
        <?php 
echo $form->field($model, 'FrDate')->widget(\yii\jui\DatePicker::className(), ['dateFormat' => 'dd-MM-yyyy', 'options' => ['class' => 'form-control']]);
?>
    
    </div>
    <div class="col-lg-2">
        <?php 
echo $form->field($model, 'ToDate')->widget(\yii\jui\DatePicker::className(), ['dateFormat' => 'dd-MM-yyyy', 'options' => ['class' => 'form-control']]);
?>
    
    </div>    
    <div class="col-lg-8 form-group"> 
Exemple #11
0
use backend\models\master\Branch;
use backend\models\master\Warehouse;
/* @var $this yii\web\View */
/* @var $model backend\models\sales\Config */
/* @var $form ActiveForm */
$this->title = 'SalesPoint Config';
?>
<div class="sales-sales-x-config">

    <?php 
$form = ActiveForm::begin();
?>
    <div class="row">
        <div class="col-lg-4">
            <?php 
echo $form->field($model, 'branch_id')->dropDownList(Branch::selectAssignedOptions(), ['prompt' => '== Unit Aktif ==']);
?>
            <?php 
echo $form->field($model, 'warehouse_id')->dropDownList(Warehouse::selectAssignedOptions(), ['prompt' => '== Warehouse Aktif ==']);
?>
        </div>
        <div class="col-lg-12">
            <div class="form-group">
                <?php 
echo Html::submitButton('Submit', ['class' => 'btn btn-primary']);
?>
            </div>
        </div>
    </div>
    <?php 
ActiveForm::end();
Exemple #12
0
/* @var $this yii\web\View */
/* @var $model backend\models\accounting\GlHeader */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="gl-header-form">

    <?php 
$form = ActiveForm::begin();
?>
    <div class="col-lg-4">
        <?php 
echo $form->field($model, 'number')->textInput(['maxlength' => true, 'style' => 'width:30%;']);
?>
        <?php 
echo $form->field($model, 'branch_id')->dropDownList(Branch::selectOptions(), ['style' => 'width:40%;']);
?>
    </div>
    <div class="col-lg-4">      
        <?php 
echo $form->field($model, 'GlDate')->widget('yii\\jui\\DatePicker', ['dateFormat' => 'dd-MM-yyyy', 'options' => ['class' => 'form-control', 'style' => 'width:30%;']]);
?>
        <?php 
echo $form->field($model, 'periode_id')->dropDownList(backend\models\accounting\AccPeriode::selectOptions(), ['style' => 'width:40%;']);
?>
    </div>
    <div class="col-lg-4">      
        <?php 
$list_status = $model::enums('STATUS_');
$nlist = [];
foreach ($list_status as $key => $dval) {
Exemple #13
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBranches()
 {
     return $this->hasMany(Branch::className(), ['orgn_id' => 'id']);
 }