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.
124 lines
5.5 KiB
124 lines
5.5 KiB
<?php
|
|
include "./header.php";
|
|
$Bill = $_POST['Bill'];
|
|
$BillData = json_decode($Bill, true);
|
|
?>
|
|
<div style="width: 90%;">
|
|
|
|
<div style="padding-left: 2rem; padding-bottom: 1rem;">
|
|
<button type="button" onclick="backToIndex()" class="btn btn-outline-primary btn-lg"><span class="glyphicon glyphicon-menu-left"></span></button>
|
|
</div>
|
|
</div>
|
|
<div class="container">
|
|
<div class="text-center">
|
|
<h3><strong><?= $BillData[4] ?></strong></h3>
|
|
<h4>新增收款資訊</h4>
|
|
</div>
|
|
<form class="form-horizontal" id="pay_received" method="POST" action="account-receivable-received-submit.php?type=create&<?= $token_link ?>" enctype="multipart/form-data">
|
|
<div class="form-group" style="margin-left: 1%;margin-right: 1%;">
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="BillNo">合約號</label>
|
|
<input type="text" class="form-control" id="BillNo" name="BillNo" value="<?= $BillData[0] ?>" disabled>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="DeptName">部門</label>
|
|
<input type="text" class="form-control" id="DeptName" name="DeptName" value="<?= $BillData[1] ?>" disabled>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="ManagerName">經理</label>
|
|
<input type="text" class="form-control" id="ManagerName" name="ManagerName" value="<?= $BillData[2] ?>" disabled>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="PersonName">營業員</label>
|
|
<input type="text" class="form-control" id="PersonName" name="PersonName" value="<?= $BillData[3] ?>" disabled>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="EnterpriseName">抬頭</label>
|
|
<input type="text" class="form-control" id="EnterpriseName" name="EnterpriseName" value="<?= $BillData[14] ?>" disabled>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="TaxNo">統一編號</label>
|
|
<input type="text" class="form-control" id="TaxNo" name="TaxNo" value="<?= $BillData[15] ?>" disabled>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="ContactAddress">聯絡地址</label>
|
|
<input type="text" class="form-control" id="ContactAddress" name="ContactAddress" value="<?= $BillData[16] ?>" disabled>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="InvoiceDate">發票開立日期</label>
|
|
<input type="date" class="form-control" id="InvoiceDate" name="InvoiceDate">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="InvoiceAmount">發票金額</label>
|
|
<input type="number" class="form-control" id="InvoiceAmount" name="InvoiceAmount">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="InvoiceNo">發票號碼</label>
|
|
<input type="text" class="form-control" id="InvoiceNo" name="InvoiceNo">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="ReceivedDate">收款日期</label>
|
|
<input type="date" class="form-control" id="ReceivedDate" name="ReceivedDate">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="ReceivedAmount">收款金額</label>
|
|
<input type="number" class="form-control" id="ReceivedAmount" name="ReceivedAmount">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="remark">備註</label>
|
|
<input type="text" class="form-control" id="remark" name="remark">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<input type="hidden" name="DeptId" value="<?= $BillData[17] ?>">
|
|
<input type="hidden" name="PersonId" value="<?= $BillData[18] ?>">
|
|
<input type="hidden" name="CustName" value="<?= $BillData[4] ?>">
|
|
<input type="hidden" name="Bill" id="Bill" value="">
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
</div>
|
|
<div class="col-md-9">
|
|
<button type="button" onclick="send()" class="btn btn-primary btn-lg pull-right">送出</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
function backToIndex() {
|
|
var Bill = <?= $Bill ?>;
|
|
var form = document.createElement("form");
|
|
form.method = 'POST';
|
|
form.action = "account-receivable-check.php?<?= $token_link ?>";
|
|
var input = document.createElement("input");
|
|
input.type = "hidden";
|
|
input.name = "Bill";
|
|
input.value = JSON.stringify(Bill);
|
|
form.appendChild(input);
|
|
document.body.appendChild(form);
|
|
form.submit();
|
|
}
|
|
|
|
function send() {
|
|
event.preventDefault();
|
|
$("#BillNo").prop("disabled", false);
|
|
$("#DeptName").prop("disabled", false);
|
|
$("#ManagerName").prop("disabled", false);
|
|
$("#PersonName").prop("disabled", false);
|
|
var Bill = <?= $Bill ?>;
|
|
Bill = JSON.stringify(Bill);
|
|
$("#Bill").val(Bill);
|
|
$("#pay_received").submit();
|
|
}
|
|
</script>
|