177 lines
7.1 KiB
PHP
177 lines
7.1 KiB
PHP
<!-- BEGIN PHP CODE PATIENT STAT PER DAY -->
|
|
<?php
|
|
//require("connect_web.php");
|
|
//require("connect_hosxp.php");
|
|
// require("date_format.php");
|
|
|
|
?>
|
|
<div class="headerpanel"> <a href="" class="showmenu"></a>
|
|
<div class="headerright">
|
|
<?php require("right_header.php"); ?>
|
|
</div>
|
|
<!--headerpanel-->
|
|
<div class="breadcrumbwidget">
|
|
<?php require("breadcrumb.php"); ?>
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
<!-- Content -->
|
|
<h4 class="widgettitle nomargin shadowed">คำนวณค่าใช้จ่ายในการผ่าตัด </h4>
|
|
<div class="widgetcontent bordered shadowed nopadding">
|
|
<table class="table table-bordered" id="" style="font-size: small;">
|
|
<colgroup>
|
|
<col class="con0" />
|
|
<col class="con1" />
|
|
<col class="con0" />
|
|
<col class="con1" />
|
|
<col class="con0" />
|
|
<col class="con1" />
|
|
<col class="con0" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<!-- <th class="head0"><center>ลำดับ</center></th> -->
|
|
<th class="head0">
|
|
<center>
|
|
รหัส
|
|
</center>
|
|
</th>
|
|
<th class="head0">
|
|
<center>
|
|
รายการ
|
|
</center>
|
|
</th>
|
|
<th class="head0">
|
|
<center>
|
|
ราคากลาง(กรมบัญชีกลาง)
|
|
</center>
|
|
</th>
|
|
<th class="head0">
|
|
<center>
|
|
ราคาจำหน่าย(HOSxP)
|
|
</center>
|
|
</th>
|
|
<th class="head0">
|
|
<center>
|
|
จำนวน
|
|
</center>
|
|
</th>
|
|
<th class="head0">
|
|
<center>
|
|
รวม
|
|
</center>
|
|
</th>
|
|
<th class="head0">
|
|
<center>
|
|
X
|
|
</center>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
/* ---------------------------SHOWDATA---------------------------- */
|
|
|
|
$sql = "select * from or_price where user='$account' ";
|
|
$sql2 = "select sum(price*amount) as cost from or_price where user='$account' ";
|
|
$result = mysqli_query($conn2, $sql);
|
|
$result2 = mysqli_query($conn2, $sql2);
|
|
$num = mysqli_num_rows($result);
|
|
$row_cost = mysqli_fetch_array($result2);
|
|
$cost = number_format($row_cost['cost'], 2, '.', ',');
|
|
$i = 0;
|
|
while ($i < $num) {
|
|
$row = mysqli_fetch_array($result);
|
|
// $id = $row['id'];
|
|
$icode = $row['icode'];
|
|
$name = $row['name'];
|
|
$amount = $row['amount'];
|
|
$price = number_format($row['price'], 2, '.', ',');
|
|
$amount2 = $row['amount'];
|
|
$price2 = $row['price'];
|
|
$sks_price = number_format($row['sks_price'], 2, '.', ',');
|
|
$sum = number_format($amount2 * $price2, 2, '.', ',');
|
|
|
|
echo "<tr class=\"gradeX\">";
|
|
echo "<td class=\"centeralign\">$icode</td>";
|
|
echo "<td>$name</td>";
|
|
echo "<td class=\"centeralign\">$sks_price</td>";
|
|
echo "<td class=\"centeralign\">$price</td>";
|
|
echo "<td class=\"centeralign\">$amount</td>";
|
|
echo "<td class=\"centeralign\">$sum</td>";
|
|
|
|
$del_icode = $row['icode']; //กำหนดตัวแปร del_id ให้กับ link
|
|
$del_user = $row['user'];
|
|
echo "<td class=\"centeralign\"><a href='javascript:;' class=\"deleterow\" onClick=\"del_item('$del_icode','$del_user')\"><span class=\"icon-trash\"></span></a></td>";
|
|
echo "</tr>";
|
|
|
|
$i++;
|
|
}
|
|
?>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div> </div> <br /><br />
|
|
<center><strong>รวมทั้งหมด : <font size="" color="#ff0099"><?php echo $cost; ?></font> <strong>บาท</strong></strong></center><br /> <br /><br />
|
|
|
|
<!----------------------FORM INSERT MEMBER---------------------->
|
|
<div>
|
|
<center>
|
|
<form name="form1" method="post">
|
|
<strong>ค้นหาเครื่องมือ/อุปกรณ์ : >> </strong>
|
|
<input name="show_arti_topic" type="text" id="show_arti_topic" size="50" /> <strong>จำนวน : >></strong>
|
|
<input name="amount" type="text" id="amount" size="10" />
|
|
<input name="h_arti_id" type="hidden" id="h_arti_id" value="" />
|
|
<input name="type2" type="hidden" id="type2" value="<?php echo $_GET['type']; ?>" />
|
|
<input name="user" type="hidden" id="user" value="<?php echo $account; ?>" />
|
|
<input value=" เพิ่มรายการ " onclick="insertsql()" type="button">
|
|
</form>
|
|
</center>
|
|
</div>
|
|
<br /><br />
|
|
<script type="text/javascript">
|
|
function make_autocom(autoObj, showObj) {
|
|
var mkAutoObj = autoObj;
|
|
var mkSerValObj = showObj;
|
|
new Autocomplete(mkAutoObj, function() {
|
|
this.setValue = function(id) {
|
|
document.getElementById(mkSerValObj).value = id;
|
|
}
|
|
if (this.isModified)
|
|
this.setValue("");
|
|
if (this.value.length < 1 && this.isNotClick)
|
|
return;
|
|
return "nondrugitems_data.php?q=" + encodeURIComponent(this.value);
|
|
});
|
|
}
|
|
|
|
make_autocom("show_arti_topic", "h_arti_id");
|
|
</script>
|
|
|
|
|
|
</div>
|
|
<!--widgetcontent-->
|
|
</div>
|
|
<!--span4-->
|
|
<!--span4-->
|
|
<!-- <div class="span4">
|
|
<h4 class="widgettitle nomargin">ข่าวประชาสัมพันธ์</h4>
|
|
<div class="widgetcontent bordered" style="height: 478px">
|
|
<?php //while ($row_news1 = mysqli_fetch_array($result_news2)) {
|
|
?>
|
|
<p><font size="" color="#0000ff"><?php //echo datetime_to_date($row_news1['date_add']);
|
|
?></font> : <?php //echo $row_news1['title'];
|
|
?></p>
|
|
<?php // }
|
|
?>
|
|
</div>
|
|
widgetcontent
|
|
</div> -->
|
|
<!--span4-->
|
|
|
|
<!--span4-->
|
|
</div>
|
|
<!--row-fluid-->
|
|
</div>
|
|
<!--contentinner-->
|
|
</div>
|
|
<!--maincontent-->
|