#251 주문취소 기능 추가
This commit is contained in:
@ -57,6 +57,8 @@ if(openwin != null) {
|
||||
<dd>상품 배송이 완료되었습니다.</dd>
|
||||
</dl>
|
||||
<?php
|
||||
$od_count1 = $od_count2 = 0;
|
||||
|
||||
$sql = " select it_id, it_name, cp_amount
|
||||
from {$g4['shop_cart_table']}
|
||||
where uq_id = '$uq_id'
|
||||
@ -119,6 +121,11 @@ if(openwin != null) {
|
||||
$tot_point += $point;
|
||||
$tot_sell_amount += $sell_amount;
|
||||
}
|
||||
|
||||
// 전체 상품의 상태가 주문인지 비교할 때 사용
|
||||
$od_count1++;
|
||||
if($opt['ct_status'] == '주문')
|
||||
$od_count2++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
@ -541,18 +548,18 @@ if(openwin != null) {
|
||||
<?php
|
||||
// 취소한 내역이 없다면
|
||||
if ($tot_cancel_amount == 0) {
|
||||
if ($od['od_temp_amount'] > 0 && $od['od_receipt_amount'] == 0) {
|
||||
if ($od_count1 == $od_count2 && ($od['od_settle_case'] != '가상계좌' || $od['od_receipt_amount'] == 0)) {
|
||||
?>
|
||||
<button type="button" onclick="document.getElementById('sod_fin_cancelfrm').style.display='block';">주문 취소하기</button>
|
||||
|
||||
<div id="sod_fin_cancelfrm">
|
||||
<form method="post" action="./orderinquirycancel.php">
|
||||
<form method="post" action="./orderinquirycancel.php" onsubmit="return fcancel_check(this);">
|
||||
<input type="hidden" name="od_id" value="<?php echo $od['od_id']; ?>">
|
||||
<input type="hidden" name="uq_id" value="<?php echo $od['uq_id']; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
<label for="cancel_memo">취소사유</label>
|
||||
<input type="text" name="cancel_memo" id="cancel_memo" required class="frm_input" size="40" maxlength="100">
|
||||
<input type="text" name="cancel_memo" id="cancel_memo" required class="frm_input required" size="40" maxlength="100">
|
||||
<input type="submit" value="확인" class="btn_frmline">
|
||||
|
||||
</form>
|
||||
@ -586,6 +593,22 @@ if(openwin != null) {
|
||||
</div>
|
||||
<!-- } 주문상세내역 끝 -->
|
||||
|
||||
<script>
|
||||
function fcancel_check(f)
|
||||
{
|
||||
if(!confirm("주문을 정말 취소하시겠습니까?"))
|
||||
return false;
|
||||
|
||||
var memo = f.cancel_memo.value;
|
||||
if(memo == "") {
|
||||
alert("취소사유를 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
Reference in New Issue
Block a user