<th>APOTEK</th> <th>TOTAL</th> </tr> <?php $grandtotal = 0; ?> <?php foreach ($order as $data) { ?> <tr> <td><?php echo '#' . $data->KODE_ORDER; ?> </td> <td><?php echo MyFormatter::formatTanggal($data->TANGGAL_ORDER); ?> </td> <td><?php echo $data->pasien->NAMA_PASIEN; ?> </td> <td> <?php $total = 0; foreach ($data->orderdetail as $value) { if ($value->item->ID_KATEGORI == Item::KATEGORI_OBAT) { $total += $value->HARGA * $value->JUMLAH; } } ?>
</div> <div><?php echo $model->pasien->ALAMAT; ?> </div> </div> </header> <main> <div id="details" class="clearfix"> <div id="client"> <h2 class="name">NOTA : #<?php echo $model->KODE_ORDER; ?> </h2> <div class="date">TANGGAL : <?php echo MyFormatter::formatTanggal($model->TANGGAL_ORDER); ?> </div> </div> <div id="invoice"> </div> </div> <table border="0" cellspacing="0" cellpadding="0"> <thead> <tr style="border-top: 1px dotted #000000;"> <th>#</th> <th class="unit">KODE</th> <th class="desc">NAMA ITEM</th> <th class="qty">JUMLAH YANG DIBELI</th> <th class="unit">HARGA</th>
<!-- BEGIN PAGE HEADER--> <!-- <div class="page-bar"> <ul class="page-breadcrumb"> <li> <a href="index.html">Home</a> <i class="fa fa-circle"></i> </li> <li> <span>Horizontal Menu</span> </li> </ul> <div class="page-toolbar"> <div id="dashboard-report-range" class="pull-right tooltips btn btn-sm"> <i class="icon-calendar"></i> <span class="thin uppercase hidden-xs"><?php echo MyFormatter::formatTanggal(date('Y-m-d')); ?> </span> </div> </div> </div> --> <!-- BEGIN PAGE TITLE--> <h3 class="page-title"> KASIR KLINIK AR RAHMA <small>Selamat datang di Halaman Kasir</small> </h3> <!-- END PAGE TITLE--> <!-- END PAGE HEADER--> <?php echo $content; ?> </div>
public function actionStokHarian() { //$barang = Barang::getBarang(); $criteria = new CDbCriteria(); //$criteria->addBetweenCondition('TGL_ORDER', date('Y-m-01',strtotime('this month')), date('Y-m-t',strtotime('this month'))); $criteria->condition = "RESEP = :resep AND ID_LAYANAN != '5' AND date(TANGGAL_ORDER) = date(NOW())"; $criteria->params = array(':resep' => Order::RESEP_DOKTER); $order = Order::model()->findAll($criteria); $total = 0; foreach ($order as $k) { $total += $k->TOTAL; } $filename = 'REKAP STOK HARIAN - ' . MyFormatter::formatTanggal(date('Y-m-d')); header("Cache-Control: no-cache, no-store, must-revalidate"); header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=" . $filename . ".xls"); $this->renderPartial('_rekap_harian', array('order' => $order)); exit; }
?> </td> <td><?php echo CHtml::encode($data->NAMA_ITEM); ?> </td> <td><?php echo CHtml::encode($data->SATUAN); ?> </td> <td><?php echo CHtml::encode($data->golongan->NAMA_GOLONGAN); ?> </td> <td><?php echo CHtml::encode(MyFormatter::formatUang($data->HARGA_JUAL)); ?> </td> <td><?php echo $jumlah_stok == NULL || $jumlah_stok == '' || $jumlah_stok == 0 ? '<span class="label label-info"> <b>HABIS</b></span>' : MyFormatter::stokBarang($jumlah_stok); ?> </td> <td><?php echo MyFormatter::formatTanggal($data->TANGGAL_EXPIRED); ?> </td> <!-- <td><?php echo MyFormatter::statusAktif($data->STATUS); ?> </td> --> </tr>
<tbody> <?php foreach (Item::getObatExpired() as $key => $value) { $jumlah_stok = Item::getTotalStok($value->ID_ITEM); ?> <tr> <td> <?php echo $key + 1; ?> </td> <td> <?php echo $value->NAMA_ITEM; ?> </td> <td> <?php echo MyFormatter::formatTanggal($value->TANGGAL_EXPIRED); ?> </td> <td> <?php echo $jumlah_stok == NULL || $jumlah_stok == '' || $jumlah_stok == 0 ? '<span class="label label-danger">HABIS</span>' : MyFormatter::stokBarang($jumlah_stok); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <!-- END CONDENSED TABLE PORTLET-->