<input type="date" name="date" value="<?php echo $val; ?> "><button type="submit">ค้นหา</button> </form> <table class="table table-bordered"> <tr> <th>ลำดับ</th> <th>รหัสใบแจ้งซ่อม</th> <th>ชื่อ-นามสกุล</th> <th>วันที่ เวลา</th> <th>สถานะ</th> </tr> <?php $i = 1; while ($r = assoc_get($result)) { ?> <tr> <td><?php echo $i; ?> </td> <td>RP-<?php echo $r['rp_id']; ?> </td> <td><?php echo $r['c_flname']; ?> </td> <td><?php
<?php $con = connect_db(); $result = getTable_where('admin_user', 'am_id', $_GET['id'], $con); $r = assoc_get($result); ?> <div class="panel panel-defautl"> <div class="panel-heading">เพิ่มข้อมูลพนักงาน</div> <div class="panel-body"> <form class="form-horizontal" action="index.php?module=system_staff&action=update_staff" method="POST"> <div class="form-group"> <label for="username" class="col-sm-2 control-label">Username : </label> <div class="col-sm-10"> <input type="hidden" value="<?php echo $r['am_id']; ?> " name="id"> <input type="text" class="form-control" name="u[am_username]" id="username" value="<?php echo $r['am_username']; ?> "> </div> </div> <div class="form-group"> <label for="password" class="col-sm-2 control-label">Password : </label> <div class="col-sm-10"> <input type="password" class="form-control" name="u[am_password]" id="password" value="<?php echo $r['am_password']; ?> "> </div>
<td>ชื่อร้านที่รับเครม</td> <td colspan="3"> PS Supply </td> </tr> </table> <div class="table-pd-claim"> <table class="table table-bordered" id="table-claim"> <tr> <th>รหัสบาร์โค้ด</th> <th>ชื่อสินค้า</th> <th>จำนวน</th> </tr> <?php $result_pd = getTable_where('product_claim', 'cl_id', $r['cl_id'], $con); while ($r_pd = assoc_get($result_pd)) { ?> <tr> <td><?php echo $r_pd['pc_barcode']; ?> </td> <td> <?php foreach ($data as $val) { if ($val['p_barcode'] == $r_pd['pc_barcode']) { echo $val['p_name']; } } ?> </td>
<div class="col-sm-5"> <input type="text" name="pd[p_name]" class="form-control" value="<?php echo $p['p_name']; ?> " placeholder="ชื่อสินค้า"> </div> </div> <div class="form-group"> <?php $rs = getTable('type_product', $con); ?> <label for="" class="col-sm-3 control-label">ประเภทสินค้า</label> <div class="col-sm-5"> <select name="pd[tp_id]" class="form-control" id=""> <?php while ($r = assoc_get($rs)) { ?> <option value="<?php echo $r['tp_id']; ?> " <?php echo $p['tp_id'] == $r['tp_id'] ? 'selected' : ''; ?> ><?php echo $r['tp_name']; ?> </option> <?php } ?> </select>
<?php $con = connect_db(); $customer = $_POST['customer']; $result = get_query("SELECT count(c_id) AS cntid FROM customer_fix WHERE c_phone='{$customer['c_phone']}'", $con); $rs = assoc_get($result); if ($rs['cntid'] <= 0) { insert_table('customer_fix', $customer, $con); $result = getTable_where('customer_fix', 'c_phone', $customer['c_phone'], $con); $rsNewCustomer = assoc_get($result); $repair = $_POST['rp']; $repair['c_id'] = $rsNewCustomer['c_id']; $repair['rp_datekey'] = date("Y-m-d H:i:s"); insert_table('repair_tb', $repair, $con); } else { $result = getTable_where('customer_fix', 'c_phone', $customer['c_phone'], $con); $rsNewCustomer = assoc_get($result); $repair = $_POST['rp']; $repair['c_id'] = $rsNewCustomer['c_id']; $repair['rp_datekey'] = date("Y-m-d H:i:s"); //dieArray($repair); insert_table('repair_tb', $repair, $con); } close_db($con); ?> <script> alert('เพิ่มข้อมูลเรียบร้อยแล้ว'); window.location='index.php?module=system_repair&action=list_repair'; </script>
<div class="panel-heading">รายละเอียด</div> <div class="panel-body"> <table class="table table-bordered tr-td"> <tbody> <tr> <td width="20%">รหัส</td> <td><?php echo $r['p_id']; ?> </td> </tr> <tr> <td>ประเภทสินค้า</td> <td> <?php while ($r_tp = assoc_get($rs_tp)) { if ($r_tp['tp_id'] == $r['tp_id']) { echo $r_tp['tp_name']; } } ?> </td> </tr> <tr> <td>ชื่อสินค้า</td> <td><?php echo $r['p_name']; ?> </td> </tr> <tr>
</tr> </tbody> </table> </div> <table id="table-data" class="display" border="1" cellspacing="0" width="100%"> <thead> <tr> <th>รหัส</th> <th>วันที่ซ่อม</th> <th></th> </tr> </thead> <tbody> <?php $rs_rp = getTable_where('repair', 'c_id', $r['c_id'], $con); while ($r_rp = assoc_get($rs_rp)) { ?> <tr> <td align="center"><?php echo $r_rp['rp_id']; ?> </td> <td align="center"><?php echo formatDateThaiFromDatatime($r_rp['rp_datetime']); ?> </td> <td><a href="index.php?module=control&action=detail_repair&id=<?php echo $r_rp['rp_id']; ?> " class="btn btn-success" title="ใบแจ้งซ่อมที่ <?php echo $r_rp['rp_id'];
echo $r_customer['c_phone']; ?> </td> </tr> </table> <table class="table table-bordered"> <tr> <th>ลำดับ</th> <th>รหัสใบแจ้งซ่อม</th> <th>วันที่</th> <th>สถานะ</th> </tr> <?php $i = 1; while ($r = assoc_get($result_repair)) { ?> <tr> <td><?php echo $i; ?> </td> <td>RP-<?php echo $r['rp_id']; ?> </td> <td><?php echo $r['rp_datekey']; ?> </td> <?php
<input type="text" class="form-control" name="send[sr_company]" placeholder="ร้านที่ส่งซ่อม"> </div> </div> <div class="form-group"> <label for="sendrepair" class="col-sm-2 control-label">เบอร์โทรศัพท์</label> <div class="col-sm-5"> <input type="text" class="form-control" name="send[sr_phone]" id="phone" placeholder="เบอร์โทรศัพท์"> </div> </div> <div class="form-group"> <label for="sendrepair" class="col-sm-2 control-label">รหัสใบแจ้งซ่อม</label> <div class="col-sm-5"> <select name="send[rp_id]" class="form-control"> <option value="">-- เลือก --</option> <?php while ($r = assoc_get($query_rp)) { ?> <option value="<?php echo $r['rp_id']; ?> "><?php echo $r['rp_id']; ?> </option> <?php } ?> </select> </div> </div> <div class="form-group">
delete_data('type_repair', 'tr_id', $_GET['id'], $con); echo "<script>window.location='index.php?system=1&module=control&action=type_repair'</script>"; } $tr = getTable('type_repair', $con); ?> <table id="table-data" class="display table-data" border="1" cellspacing="0" width="100%"> <thead> <tr> <th>รหัส</th> <th>ชื่อลูกค้า</th> <th style="width:15%">สถานะ</th> </tr> </thead> <tbody> <?php while ($r = assoc_get($tr)) { ?> <tr> <td><?php echo $r['tr_id']; ?> </td> <td><?php echo $r['tr_name']; ?> </td> <td align="center"> <a href="#" data-code="<?php echo $r['tr_id']; ?> " data-name="<?php
<hr style="border: 1px solid #999"> <div class="panel-body"> <form action="" method="POST"> <table class="table table-bordered"> <tr><td>รหัสลูกค้า : </td><td colspan="3"><input type="text" name="c_id" class="form-control" readonly></td></tr> <tr><td width="20%">ชื่อ-นามสกุล : </td><td colspan="3"><input type="text" name="flname" class="form-control" required></td></tr> <tr><td>ที่อยู่ : </td><td colspan="3"><textarea class="form-control" rows="5" name="address"></textarea></td></tr> <tr><td>เบอร์โทรศัพท์ : </td><td colspan="3"><input type="text" class="form-control" maxlength="20" name="phone" required></td></tr> <tr><td>รายการ : </td> <td> <?php $rs_tr = getTable('type_repair', $con); ?> <select name="pd_type_id" id="" class="form-control" required> <?php while ($tr = assoc_get($rs_tr)) { ?> <option value="<?php echo $tr['tr_id']; ?> "><?php echo $tr['tr_name']; ?> </option> <?php } ?> </select> </td> <td>รุ่น : </td> <td>
echo $rs_customer['c_flname']; ?> "></td></tr> <tr><td>ที่อยู่ : </td><td colspan="3"><textarea class="form-control" rows="5" name="address" readonly><?php echo $rs_customer['c_address']; ?> </textarea></td></tr> <tr><td>เบอร์โทรศัพท์ : </td><td colspan="3"><input type="text" class="form-control" maxlength="20" name="phone" readonly value="<?php echo $rs_customer['c_phone']; ?> "></td></tr> <tr><td>รายการ : </td> <td> <select name="pd_type_id" class="form-control" required> <?php while ($rs_type = assoc_get($t_repair)) { if ($rs_repair['tr_id'] == $rs_type['tr_id']) { ?> <option value="<?php echo $rs_type['tr_id']; ?> " selected><?php echo $rs_type['tr_name']; ?> </option> <?php } else { ?> <option value="<?php echo $rs_type['tr_id']; ?>
<th>รหัส</th> <th>ชื่อลูกค้า</th> <th>วันที่เวลา</th> <th>สถานะ</th> <th></th> </tr> </thead> <tbody> <?php $con = connect_db(); $repair = getTable_order('repair', 'rp_id', 'DESC', $con); $customer = getTable('customer_fix', $con); while ($rc = assoc_get($customer)) { $arr_cus[] = array('c_id' => $rc['c_id'], 'name' => $rc['c_flname']); } while ($r = assoc_get($repair)) { ?> <tr> <td><?php echo $r['rp_id']; ?> </td> <td> <?php foreach ($arr_cus as $val) { if ($r['c_id'] == $val['c_id']) { echo $val['name']; } } ?> </td>
<?php $repair = getTable_where('repair', 'rp_id', $_GET['id'], $con); $type_tr = getTable('type_repair', $con); $rs_r = assoc_get($repair); $customer = getTable_where('customer_fix', 'c_id', $rs_r['c_id'], $con); $rs_cus = assoc_get($customer); $arr_rp = unserialize($rs_r['rp_item']); $arr_sw = unserialize($rs_r['rp_software']); //dieArray($arr_sw); while ($rs_type = assoc_get($type_tr)) { if ($rs_type['tr_id'] == $rs_r['tr_id']) { $pd = $rs_type['tr_name']; } } ?> <div class="height-report" style="padding-top:10px"> <div class="container"> <div class="title-report col-md-12"><?php echo $name_report; ?> <span class="pull-right"> สำหรับลูกค้า</span></div> <table class="table table-bordered height-table"> <tr> <td colspan="3"> <span>พีเอส ซัพพลาย</span><span class="pull-right">เลขที่ <?php echo $rs_r['rp_id']; ?> </span><br> <span>อาคารคอมพิวเตอร์พลาซ่า ห้อง A12</span> <br> <span>312 ถ.มณีนพรัตน์ ต.ศรีภูมิ อ.เมือง จ.เชียงใหม่ 50200</span><span class="pull-right">วันที่ <?php
<?php $con = connect_db(); $rs_sr = getTable_where('send_repair', 'sr_id', $_GET['id'], $con); $r_sr = assoc_get($rs_sr); $rs_rp = getTable_where('repair_tb', 'rp_id', $r_sr['rp_id'], $con); $r_rp = assoc_get($rs_rp); ?> <div class="panel panel-default"> <div class="panel-heading">รายละเอียดใบส่งซ่อม</div> <div class="panel-body"> <table class="table table-bordered"> <tr> <td width="20%">รหัสใบส่งซ่อม</td> <td><?php echo $r_sr['sr_id']; ?> </td> </tr> <tr> <td>ชื่อร้านที่ส่งซ่อม</td> <td><?php echo $r_sr['sr_company']; ?> </td> </tr> <tr> <td>รหัสใบแจ้งซ่อม</td> <td><?php echo $r_rp['rp_id']; ?>
<?php $con = connect_db(); $rs = getTable_where('customer_quote', 'q_id', $_GET['id'], $con); $r = assoc_get($rs); ?> <div class="container"> <div class="row"> <div class="col-md-10"> <P><b>ร้าน พีเอส ซัพพลาย อาคารคอมพิวเตอร์พลาซ่า ห้อง A12</b></P> <P><b>312 ถ.มณีนพรัตน์ ต.ศรีภูมิ อ.เมือง จ.เชียงใหม่ 50200</b></P> <P><b>TEL: 094-607-1991 FAX: 053-405399</b></P> </div> <div class="col-md-2"> <table class="table table-bordered"> <tr> <th style="background: #FFFFFF; color:#000000;">Quotation<br>ใบเสนอราคา</th> </tr> </table> </div> </div> <div class="row"> <div class="col-md-12"> <table class="table table-bordered"> <tr> <td style="width:55%"> <form class="form-inline"> <div class="form-group"> <p><b>ชื่อผู้ติดต่อ </b> <span style="margin-left:99px"><?php echo $r['q_name']; ?>
$data['sp_list'] = serialize($_SESSION['sale_product']); $data['sp_total'] = $_POST['total']; $data['sp_income'] = $_POST['income']; $data['sp_change'] = $_POST['change']; $data['am_id'] = $_SESSION['am_id']; //dieArray($_SESSION['sale_product']); foreach ($_SESSION['sale_product'] as $k => $v) { $result = getTable_where('products', 'p_barcode', $v['p_barcode'], $con); $r = assoc_get($result); $amount['p_amount'] = $r['p_amount'] - $v['p_amount']; update_table('products', $amount, 'p_barcode', $v['p_barcode'], $con); } insert_table('saleproduct_tb', $data, $con); unset($_SESSION['sale_product']); $result_sale = getTable_order('saleproduct_tb', 'sp_id', 'DESC LIMIT 1', $con); $rs = assoc_get($result_sale); //echo $rs['sp_id']; ?> <script> var id = <?php echo $rs['sp_id']; ?> ; js_popup('index.php?module=system_pos&action=receipt&id='+id,783,600); function js_popup(theURL,width,height) { //v2.0 leftpos = (screen.availWidth - width) / 2; toppos = (screen.availHeight - height) / 2; window.open(theURL, "viewdetails","width=" + width + ",height=" + height + ",left=" + leftpos + ",top=" + toppos); window.location='index.php?module=system_pos&action=pos_page'; } </script>