Esempio n. 1
0
    </div>
    <div class="panel-body">
        <table id="table-data" class="display" border="1" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <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']) {
Esempio n. 2
0
<?php

$con = connect_db();
$rs = getTable_order('send_repair', 'sr_id', 'DESC', $con);
?>
<div class="panel panel-default">
    <div class="panel-heading">
        <div>รายการใบส่งซ่อม <a href="index.php?module=system_repair&action=form_send_repair" class="btn btn-success pull-right">เพิ่มใบส่งซ่อม</a></div>
        <div class="clearfix"></div>
    </div>
    <div class="panel-body">
        
        <table id="table-data" class="display" border="1" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>รหัส</th>
                    <th>ร้านที่ส่งซ่อม</th>
                    <th>วันที่</th>
                    <th style="width: 15%"></th>
                </tr>
            </thead>
            <tbody>
               <?php 
while ($r = assoc_get($rs)) {
    ?>
                <tr>
                    <td><?php 
    echo $r['sr_id'];
    ?>
</td>
                    <td><?php 
Esempio n. 3
0
$con = connect_db();
$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';
    }