Exemplo n.º 1
0
 public function Jml($id)
 {
     $personil = \backend\models\SimpelPersonil::find();
     $rincian = \backend\models\SimpelRincianBiaya::find();
     $daftar = \backend\models\SimpelDafKatBiaya::find();
     return $id;
 }
                <h2 class="StepTitle">Input Data Pembiayaan</h2>
                <br/>
                <table width="1000px" class="table table-striped table-bordered">
                    <tr style="background-color:#4e95f4;">
                        <td>No</td><td>Kategori Pembiayaan</td><td style="width:130px;">Bukti Kwitansi</td><td>Volume </td><td>Harga Satuan</td><td>Jumlah</td><td>Urian Pembiyaian</td>
                    </tr>
                    <tbody id="container">
                        <!-- nanti rows nya muncul di sini -->
                        <?php 
$no = 1;
switch ($model2->negara) {
    case "1":
        $input = \backend\models\SimpelDafKatBiaya::find()->where('kat_biaya_id in (1,2,3,4,5,6,7,8,9,10)')->orderby('kat_biaya_id asc')->all();
        break;
    case "2":
        $input = \backend\models\SimpelDafKatBiaya::find()->where('kat_biaya_id in (16,11,12,13,14,15,19)')->orderby('kat_biaya_id asc')->all();
        break;
}
foreach ($input as $ke) {
    ?>
                        <tr>
                            <td>
                                <?php 
    echo $no;
    ?>
                            </td>
                            <td>
                            <?php 
    echo $ke->nama;
    ?>
 public function getBiaya()
 {
     return $this->hasOne(\backend\models\SimpelDafKatBiaya::className(), ['kat_biaya_id' => 'kat_biaya_id']);
 }