You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
150 lines
4.2 KiB
150 lines
4.2 KiB
<?php
|
|
include "../header.php";
|
|
// 載入db.php來連結資料庫
|
|
require_once "../database.php";
|
|
|
|
|
|
// 設置一個空陣列來放資料
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$sql = "SELECT * FROM paid_customer_detail ORDER BY customer_id";
|
|
|
|
// 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
$data = mysqli_query($link, $sql);
|
|
|
|
?>
|
|
|
|
<!-- <a href="create.php"><h2>新增</h2></a> -->
|
|
<p>
|
|
<a href="paid_customer_detail_import.php" class="btn btn-info btn-sm">
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
</a>
|
|
</p>
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
if ($data) :
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
if (empty($_POST["name"]) && empty($_POST["email"]) && empty($_POST["website"])) {
|
|
echo "<p class='error'>Please fill up the required field!</p>";
|
|
} else {
|
|
header("Location:repair-index.php");
|
|
}
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
<style>
|
|
table {
|
|
table-layout: fixed;
|
|
width: 100%;
|
|
}
|
|
|
|
td {
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
img {
|
|
width: 125px;
|
|
}
|
|
|
|
.width_style_1 {
|
|
width: 125px;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
}
|
|
|
|
#table_index_filter {
|
|
float: right;
|
|
}
|
|
|
|
#table_index_paginate {
|
|
float: right;
|
|
}
|
|
|
|
label {
|
|
display: inline-flex;
|
|
margin-bottom: .5rem;
|
|
margin-top: .5rem;
|
|
|
|
}
|
|
</style>
|
|
|
|
<div style="overflow-x:auto;">
|
|
<table id="table_index" class="table table-striped table-bordered" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th>項次</th>
|
|
<th>录入年月</th>
|
|
<th>繳款賬號</th>
|
|
<th>客戶代號</th>
|
|
<th>客戶名稱</th>
|
|
<th>客戶類別</th>
|
|
<th>繳款日期</th>
|
|
<th>應繳</th>
|
|
<th>應繳起始日</th>
|
|
<th>應交截止日</th>
|
|
<th>創建日期</th>
|
|
<th>創建人員</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php foreach ($data as $data) : ?>
|
|
<tr>
|
|
<td><?php echo $data['id']; ?></td>
|
|
<td><?php echo $data['yyyymm']; ?></td>
|
|
<td><?php echo $data['pay_account']; ?></td>
|
|
<td><?php echo $data['customer_id']; ?></td>
|
|
<td><?php echo $data['customer_name']; ?></td>
|
|
<td><?php echo $data['kind']; ?></td>
|
|
<td><?php echo $data['pay_date']; ?></td>
|
|
<td><?php echo $data['amount_payable']; ?></td>
|
|
<td><?php echo $data['start_date_payable']; ?></td>
|
|
<td><?php echo $data['end_date_payable']; ?></td>
|
|
<td><?php echo $data['create_at']; ?></td>
|
|
<td><?php echo $data['creater']; ?></td>
|
|
<!-- <td>
|
|
<p>
|
|
<a href="repair-edit.php?id=<?php echo $data['id']; ?>" class="btn btn-info btn-sm">
|
|
<span class="glyphicon glyphicon-pencil"></span>
|
|
</a>
|
|
</p>
|
|
</td> -->
|
|
<td>
|
|
<p>
|
|
|
|
<a href="paid_order_relate.php?id=<?php echo $data['id']; ?>" class="btn
|
|
|
|
<?php echo empty($data['ec_id']) ? "bt-info" : "btn-success"; ?>
|
|
btn-sm">
|
|
<span><?php echo empty($data['ec_id']) ? "勾稽請款單" : "已勾稽查看"; ?></span>
|
|
</a>
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<?php
|
|
|
|
else :
|
|
echo "<h2>There is no record!</h2>";
|
|
endif;
|
|
|
|
#代錶結束連線
|
|
mysqli_close($link);
|
|
|
|
include "../footer.php";
|
|
|
|
?>
|