?>
      
<style type="text/css">
    body{
        font-size: 13px;
    }
</style>
<?php 
$no = 1;
foreach ($model2 as $data) {
    $transport = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and kat_biaya_id=1')->one();
    $taksi = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and kat_biaya_id=2')->one();
    $uhr = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and kat_biaya_id=4')->one();
    $saku = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and kat_biaya_id=5')->one();
    $rep = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and kat_biaya_id=8')->one();
    $inap = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and kat_biaya_id=6')->one();
    ?>



    <table>
    <tr>
        <td>
            <h5 align="left"><img src="<?php 
    echo Url::to(['/images/logo_bp.png']);
    ?>
" width="60px"/></h5>

        </td>
        <td style="font-weight: bold;">
          <b>  BADAN PENGAWAS TENAGA NUKLIR </b><br/>
 public function actionTambahluar($id)
 {
     $model = new SimpelPersonil();
     $model2 = $this->findModel($id);
     $model3 = new SimpelRincianBiaya();
     if ($_POST) {
         $model->id_kegiatan = $model2->id_kegiatan;
         $model->tingkat_id = $_POST['SimpelPersonil']['tingkat_id'];
         $model->pegawai_id = $_POST['SimpelPersonil']['pegawai_id'];
         $model->tgl_penugasan = $_POST['SimpelPersonil']['tgl_penugasan'];
         $model->tgl_berangkat = $_POST['SimpelKeg']['tgl_mulai'];
         $model->tgl_kembali = $_POST['SimpelKeg']['tgl_selesai'];
         $model->no_sp = $_POST['SimpelPersonil']['no_sp'];
         $model->pejabat = $_POST['SimpelPersonil']['pejabat'];
         $model->uang_makan = $_POST['SimpelPersonil']['uang_makan'];
         $model->angkutan = $_POST['SimpelPersonil']['angkutan'];
         if ($model->save()) {
             $data = count($_POST['rows']);
             for ($i = 1; $i <= $data; $i++) {
                 $model3 = new SimpelRincianBiaya();
                 $model3->id_kegiatan = $model2->id_kegiatan;
                 $model3->personil_id = $model->getId();
                 $model3->kat_biaya_id = $_POST['kat_biaya_id' . $i];
                 $model3->harga_satuan = $_POST['satuan' . $i];
                 $model3->volume = $_POST['volume' . $i];
                 $model3->label = $_POST['label' . $i];
                 $model3->jml = $_POST['jml' . $i];
                 $model3->uraian_rincian = $_POST['uraian' . $i];
                 $model3->bukti_kwitansi = $_POST['bukti_kwitansi' . $i];
                 $model3->save();
             }
         }
         return $this->redirect(['create', 'id' => $model2->id_kegiatan]);
     } else {
         return $this->renderAjax('input_luar_negri', ['model' => $model, 'model2' => $model2]);
     }
 }
 public function actionLuar($id)
 {
     $model = $this->findModel($id);
     $model2 = \backend\models\SimpelKeg::find()->where('id_kegiatan=' . $model->id_kegiatan)->one();
     if ($_POST) {
         // print_r($_POST);
         // die();
         $model->pegawai_id = $_POST['SimpelPersonil']['pegawai_id'];
         $model->tingkat_id = $_POST['SimpelPersonil']['tingkat_id'];
         $model->tgl_penugasan = $_POST['SimpelPersonil']['tgl_penugasan'];
         $model->tgl_berangkat = $_POST['SimpelPersonil']['tgl_berangkat'];
         $model->tgl_kembali = $_POST['SimpelPersonil']['tgl_kembali'];
         $model->no_sp = $_POST['SimpelPersonil']['no_sp'];
         $model->pejabat = $_POST['SimpelPersonil']['pejabat'];
         $model->uang_makan = $_POST['SimpelPersonil']['uang_makan'];
         $model->angkutan = $_POST['SimpelPersonil']['angkutan'];
         if ($model->save()) {
             $data = count($_POST['rows']);
             for ($i = 1; $i <= $data; $i++) {
                 $model3 = SimpelRincianBiaya::findOne($_POST['id_rincian_biaya' . $i]);
                 $model3->id_kegiatan = $model2->id_kegiatan;
                 $model3->kat_biaya_id = $model3->kat_biaya_id;
                 $model3->harga_satuan = $_POST['satuan' . $i];
                 $model3->bukti_kwitansi = $_POST['bukti_kwitansi' . $i];
                 $model3->volume = $_POST['volume' . $i];
                 $model3->jml = $_POST['jml' . $i];
                 $model3->uraian_rincian = $_POST['uraian_rincian' . $i];
                 $model3->save();
             }
             // die();
         }
         return $this->redirect(['/simpel-keg/create', 'id' => $model->id_kegiatan]);
     } else {
         switch ($model2->negara) {
             case "1":
                 return $this->renderAjax('input', ['model' => $model, 'model2' => $model2]);
             case "2":
                 return $this->renderAjax('input_luar', ['model' => $model, 'model2' => $model2]);
                 break;
         }
     }
 }
Exemplo n.º 4
0
                <th rowspan="2">Lama </th>
                <th  colspan="6"><center>Biaya</center></th>

            </tr>
            <tr>
                <th  width="100">Transport </th>
                <th  width="100" >Taksi</th>
                <th  width="100">Uang Harian</th>
                <th  width="100" rowspan="1">Representatif </th>
                <th width="100" rowspan="1">Penginapan </th>
                <th width="100" rowspan="1">Jumlah </th>
            </tr>
            <?php 
$no = 1;
foreach ($models as $data) {
    $biaya = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and kat_biaya_id in (1,2,4,8,6)')->all();
    $count = Yii::$app->db->createCommand("SELECT sum(jml) from simpel_rincian_biaya where personil_id='" . $data->id_personil . "'  and kat_biaya_id in (1,2,4,8,6) ")->queryScalar();
    ?>


                <tr>
                    <td align="center"><?php 
    echo $no;
    ?>
</td>
                    <td align="left">
                        <?php 
    echo $data->no_sp;
    ?>
<br/>
                        <?php 
                            <tr>
                                <td>Jumlah DL Hari Kerja</td>
                                <td valign="top">:</td>
                                <td><?php 
    echo $key->uang_makan;
    ?>
  Hari</td>
                            </tr>


                        </tbody></table>
            
                </td>
                <td style="width:9000%;">
                <?php 
    $data = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $key->id_personil . ' and kat_biaya_id in(11,12,13,14,15,16) ')->all();
    ?>
                  <table style="width:100%">
                        <tbody>
                        <?php 
    foreach ($data as $rin) {
        ?>
                           <tr>
                                <td style="width:40%;"><?php 
        echo $rin->biaya->nama;
        ?>
</td>
                                <td valign="top">:</td>
                                <td>
                                Rp .<?php 
        if (!empty($rin->kat_biaya_id)) {
    </colgroup><tbody>
        <tr valign="top">
            <td width="7%" style="border-top: 2px solid black; font-weight: bold; text-align: center; border-bottom: 2px solid black; border-left: 2px solid black; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
                <p align="center">No</p>
            </td>
            <td width="70%" style="border-top: 2px solid black; font-weight: bold;  text-align: center; border-bottom: 2px solid black; border-left: 2px solid black; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
                <p align="center">Uraian</p>
            </td>
            <td width="22%" style="border: 2px solid black;  font-weight: bold;  text-align: center; padding: 0.04in">
                <p align="center">Jumlah</p>
            </td>
        </tr>
    </tbody>
    <tbody>
          <?php 
    $rincian = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $mode->id_personil . ' and bukti_kwitansi=2')->all();
    $n = 1;
    foreach ($rincian as $key) {
        ?>
                <tr valign="top">
                    <td valign="top" width="7%" style="border-top: none; text-align:center; border-bottom: none; border-left: 2px solid black; border-right: none; padding-top: 0in; padding-bottom: 0in; padding-left: 0.04in; padding-right: 0in">
                        <p align="center"><?php 
        echo $n;
        ?>
 </p> <br/><br/>
                    </td>
                    <td valign="top" width="70%" style="border-top: none; border-bottom: none; border-left: 2px solid black; border-right: none; padding-top: 0in; padding-bottom: 0in; padding-left: 0.04in; padding-right: 0in">
                        <p style="padding-top:-30px;">
                            <?php 
        echo $key->label;
        ?>
                            <tr>
                                <td>Jumlah DL Hari Kerja</td>
                                <td valign="top">:</td>
                                <td><?php 
    echo $key->uang_makan;
    ?>
  Hari</td>
                            </tr>


                        </tbody></table>
            
                </td>
                <td style="width:9000%;">
                  <?php 
    $data = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $key->id_personil . ' and kat_biaya_id in(1,2,3,4,5,6,7,8,9) ')->all();
    ?>
                  <table style="width:100%">
                        <tbody>
                        <?php 
    foreach ($data as $rin) {
        ?>
                           <tr>
                                <td style="width:60%;"><?php 
        echo $rin->biaya->nama;
        ?>
</td>
                                <td valign="top">:</td>
                                <td>
                                Rp .<?php 
        if (!empty($rin->kat_biaya_id)) {
Exemplo n.º 8
0
 public function Jml($id)
 {
     $personil = \backend\models\SimpelPersonil::find();
     $rincian = \backend\models\SimpelRincianBiaya::find();
     $daftar = \backend\models\SimpelDafKatBiaya::find();
     return $id;
 }
         break;
         break;
 }
 ?>
             <br/>
             &nbsp;&nbsp;
             </td>
             <td valign="top" width="22%" style="text-align:center;border-top: none; border-bottom: none; border-left: 2px solid black; border-right: 2px solid black; padding: 0in 0.04in">
                 <p style="font-weight: bold;">
                     Rp.
                 
                  <?php 
 switch ($key->kat_biaya_id) {
     case '1':
         echo '<u>' . number_format($key->jml, 0, ",", ".") . '</u>';
         $rinc = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and bukti_kwitansi=1 and kat_biaya_id in (2,3) ')->all();
         foreach ($rinc as $ke) {
             echo "<br/>";
             echo 'Rp. ' . number_format($ke->jml, 0, ",", ".");
             echo "<br/>";
         }
         break;
     default:
         echo number_format($key->jml, 0, ",", ".");
         break;
 }
 ?>
             </p>
             </td>
              <td valign="top" width="22%" style="text-align:center;border-top: none; border-bottom: none; border-left: 2px solid black; border-right: 2px solid black; padding: 0in 0.04in">
                 
Exemplo n.º 10
0
                        <tr style="background-color:#4e95f4;">
                            <td>No</td>
                            <td align="center">Kategori Pembiayian</td>
                            <td align="center">Bukti Kwitansi </td>
                            <td align="center">Volume </td>
                            <td align="center">Pagu</td>
                            <td align="center">%</td>
                            <td align="center">Harga Satuan</td>
                            <td align="center">Jumlah</td>
                            <td align="center">Uraian</td>
                        </tr>
                        <tbody id="container">
                            <!-- nanti rows nya muncul di sini -->
                         <?php 
$no = 1;
$input = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $model->id_personil)->all();
foreach ($input as $ke) {
    switch ($ke->kat_biaya_id) {
        case "1":
            echo '1';
            break;
        case "2":
            echo '1';
            break;
    }
    ?>

                                <tr>
                                    <td width="5%">
                                        <?php 
    echo $no;
        <th align="center" width="100">Tiket</th>
        <th align="center" width="100" >Asuransi</th>
        <th align="center" width="100">Airport tax </th>


    </tr>
    <?php 
$no = 1;
foreach ($model2 as $data) {
    $tiket = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and bukti_kwitansi in(1,2) and  kat_biaya_id=13')->one();
    $asuransi = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and bukti_kwitansi in(1,2) and kat_biaya_id=11')->one();
    $tax = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and bukti_kwitansi in(1,2) and kat_biaya_id=12')->one();
    $lumpsum = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and bukti_kwitansi in(1,2) and kat_biaya_id=14')->one();
    $lumpsum1 = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and bukti_kwitansi in(1,2) and kat_biaya_id=15')->one();
    $lumpsum2 = \backend\models\SimpelRincianBiaya::find()->where('personil_id=' . $data->id_personil . ' and bukti_kwitansi in(1,2) and kat_biaya_id=16')->one();
    $jab = MyHelper::Pangkat($data->pegawai->gol_id);
    ?>
        <tr>
            <td rowspan="3" align="center"><?php 
    echo $no;
    ?>
</td>
            <td rowspan="3" align="left">

                <?php 
    echo $data->pegawai->nama;
    ?>
 <br/>
                NIP. <?php 
    echo $data->pegawai->nip;