วันพุธที่ 23 สิงหาคม พ.ศ. 2560

`หาวัสดุคอมพิวเตอร์SQL

select a.ivt_id, b.ivt_name, sum(a.quantity) AS amount, d.uunit_name, avg(a.pack_price) AS avg_price from order_details a, inventory b, invoices c, ivt_units d where c.ivs_date between '2016.10.01' and '2017.09.30' and a.ivs_id = c.ivs_id and a.ivt_id = b.ivt_id and b.ivc_id = '04' and c.exp_id = '013' and a.uunit_id = d.uunit_id group by a.ivt_id order by b.ivt_name

วันพุธที่ 16 สิงหาคม พ.ศ. 2560

Active Form `ส่งตัวแปร ไปยัง`Action `ในController

$this->title = "DEP_REGIPD";
//$this->params['breadcrumbs'][] = ['label' => 'รายงาน', 'url' => ['reg/index']];
$this->params['breadcrumbs'][] = 'รายงานผู้ป่วยในแยกตามแผนก';
?>
<b style = "color:blue">รายงานผู้ป่วยในแยกตามแผนก</b>
<div class='well'>
     <?php $form = ActiveForm::begin([
    'method' => 'POST',
    'action' => ['reg/depregipd'],
]); ?>
        <?php
        $items = ArrayHelper::map(MbIpdreg::find()->all(), 'UNIT_ID', 'UNIT_NAME');
        echo Html::dropDownList('unitid', $unitid, $items, ['prompt' => '--- หน่วยบริการ ---']);
        ?>