#282 uq_id 필드 제거

This commit is contained in:
chicpro
2013-08-23 10:39:16 +09:00
parent 8ae41a2213
commit 523c6e5e31
44 changed files with 216 additions and 269 deletions

View File

@ -9,7 +9,7 @@ if ($token && get_session("ss_token") == $token) {
alert_close("토큰 에러");
}
$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' and mb_id = '{$member['mb_id']}' ");
$od = sql_fetch(" select * from {$g4['shop_order_table']} where od_id = '$od_id' and mb_id = '{$member['mb_id']}' ");
if (!$od['od_id']) {
alert("존재하는 주문이 아닙니다.");
@ -19,11 +19,14 @@ if (!$od['od_id']) {
$sql = " select SUM(IF(ct_status = '주문', 1, 0)) as od_count2,
COUNT(*) as od_count1
from {$g4['shop_cart_table']}
where uq_id = '$uq_id' ";
where od_id = '$od_id' ";
$ct = sql_fetch($sql);
if($ct['od_count1'] != $ct['od_count2'] || ($od['od_settle_case'] == '가상계좌' && $od['od_receipt_amount'] > 0))
alert("취소할 수 있는 주문이 아닙니다.", G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uq_id=$uq_id");
$uid = md5($od['od_id'].$od['od_time'].$od['od_ip']);
if($ct['od_count1'] != $ct['od_count2'] || ($od['od_settle_case'] == '가상계좌' && $od['od_receipt_amount'] > 0)) {
alert("취소할 수 있는 주문이 아닙니다.", G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
}
// PG 결제 취소
if($od['od_tno']) {
@ -57,16 +60,16 @@ if($od['od_tno']) {
}
// 장바구니 자료 취소
sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where uq_id = '$uq_id' ");
sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where od_id = '$od_id' ");
// 주문 취소
$cancel_memo = addslashes($cancel_memo);
//sql_query(" update $g4[shop_order_table] set od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' ");
sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_temp_point = '0', od_receipt_amount = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' ");
sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_temp_point = '0', od_receipt_amount = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where od_id = '$od_id' ");
// 주문취소 회원의 포인트를 되돌려 줌
if ($od['od_receipt_point'] > 0)
insert_point($member['mb_id'], $od['od_receipt_point'], "주문번호 $od_id 본인 취소");
goto_url(G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uq_id=$uq_id");
$
goto_url(G4_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
?>