Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = PaymentMethodModel::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         $query->where('1=0');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'branch_id' => $this->branch_id, 'coa_id' => $this->coa_id, 'created_at' => $this->created_at, 'created_by' => $this->created_by, 'updated_at' => $this->updated_at, 'updated_by' => $this->updated_by]);
     $query->andFilterWhere(['like', 'method', $this->method]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPaymentMethod()
 {
     return $this->hasOne(PaymentMethod::className(), ['id' => 'payment_method']);
 }
Ejemplo n.º 3
0
            <?php 
echo '';
?>
            <?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 
echo $form->field($model, 'vendor_name')->textInput(['required' => true]);
?>
            <?php 
echo Html::activeHiddenInput($model, 'vendor_id');
?>
            <?php 
echo $form->field($model, 'payment_method')->dropDownList(\backend\models\accounting\PaymentMethod::selectOptions(\Yii::$app->profile->branch_id), ['prompt' => '--Pilih payment method--', 'style' => 'width:60%;']);
?>
        </div>
        <div class="col-md-4">
        </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">
                    <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
                </li>
            </ul>
            <div class="tab-content" >
 /**
  * Finds the PaymentMethod model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return PaymentMethod the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = PaymentMethod::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Ejemplo n.º 5
0
                            <tfoot id="payback-panel" class="hidden">
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>Payback</td>
                                    <td id="payback-value" style="text-align: right;"></td>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                    <div id="payment-input-panel">
                        <div class="col-lg-6">
                            <?php 
echo Html::label('Method');
?>
                            <?php 
echo Html::dropDownList('', '', PaymentMethod::selectOptions($branch_id), ['class' => 'form-control', 'id' => 'inp-payment-method']);
?>
                        </div>
                        <div class="col-lg-4">
                            <?php 
echo Html::label('Value');
?>
                            <?php 
echo Html::textInput('', '', ['class' => 'form-control', 'id' => 'inp-payment-value']);
?>
                        </div>
                        <div class="col-lg-2" style="padding-left: 0px;">
                            <?php 
echo Html::buttonInput('Add', ['class' => 'btn btn-primary', 'style' => 'margin-top:24px;', 'id' => 'btn-payment-add']);
?>
                        </div>