#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

@ -34,7 +34,7 @@ if ($sel_ca_id != "") {
if ($sel_field == "") $sel_field = "od_id";
$sql_common = " from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (a.uq_id=b.uq_id)
left join {$g4['shop_cart_table']} b on (a.od_id=b.od_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음
@ -171,7 +171,6 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<tr>
<td>
<input type="hidden" name="od_id[<?php echo $i; ?>]" value="<?php echo $row['od_id']; ?>">
<input type="hidden" name="uq_id[<?php echo $i; ?>]" value="<?php echo $row['uq_id']; ?>">
<input type="hidden" name="od_tno[<?php echo $i; ?>]" value="<?php echo $row['od_tno']; ?>">
<input type="hidden" name="od_escrow[<?php echo $i; ?>]" value="<?php echo $row['od_escrow']; ?>">
<a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>"><?php echo $row['od_id']; ?></a>

View File

@ -51,18 +51,17 @@ for ($m=0; $m<count($_POST['od_id']); $m++)
$od_id = $_POST['od_id'][$m];
// 장바구니 상태가 '주문', '준비' 일 경우 '배송' 으로 상태를 변경
$uq_id = $_POST['uq_id'][$m];
$sql = " update {$g4['shop_cart_table']}
set ct_status = '배송'
where ct_status in ('주문', '준비')
and uq_id = '$uq_id' ";
and od_id = '$od_id' ";
sql_query($sql);
include "./ordermail.inc.php";
// 재고 반영
$sql2 = " select it_id, ct_id, ct_stock_use, ct_qty from {$g4['shop_cart_table']}
where uq_id = '$uq_id'
where od_id = '$od_id'
and ct_stock_use = '0' ";
$result2 = sql_query($sql2);
for ($k=0; $row2=mysql_fetch_array($result2); $k++)
@ -73,7 +72,7 @@ for ($m=0; $m<count($_POST['od_id']); $m++)
$sql4 = " update {$g4['shop_cart_table']}
set ct_stock_use = '1',
ct_history = CONCAT(ct_history,'\n배송일괄|$now|$REMOTE_ADDR')
where uq_id = '$uq_id'
where od_id = '$od_id'
and ct_id = '{$row2['ct_id']}' ";
sql_query($sql4);
}

View File

@ -35,7 +35,7 @@ $pg_anchor = '<ul class="anchor">
$sql = " select a.od_id,
a.*, "._MISU_QUERY_."
from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (b.uq_id=a.uq_id)
left join {$g4['shop_cart_table']} b on (b.od_id=a.od_id)
group by a.od_id
/*having misu <= 0 and a.od_invoice = '' and ordercancel = 0*/
/*having orderamount - receiptamount = 0 and a.od_invoice = ''*/
@ -100,7 +100,7 @@ $pg_anchor = '<ul class="anchor">
$sql = " select a.od_id,
a.*, "._MISU_QUERY_."
from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (b.uq_id=a.uq_id)
left join {$g4['shop_cart_table']} b on (b.od_id=a.od_id)
group by a.od_id
/* having receiptamount <= 0 */
having misu > 0

View File

@ -44,7 +44,7 @@ for ($i=0; $i<$cnt; $i++)
$ct_id = $_POST['ct_id'][$k];
$sql = " select * from {$g4['shop_cart_table']}
where uq_id = '$uq_id'
where od_id = '$od_id'
and ct_id = '$ct_id' ";
$ct = sql_fetch($sql);
if(!$ct['ct_id'])
@ -76,7 +76,7 @@ for ($i=0; $i<$cnt; $i++)
$sql = " update {$g4['shop_cart_table']}
set ct_qty = '$ct_qty'
where ct_id = '$ct_id'
and uq_id = '$uq_id' ";
and od_id = '$od_id' ";
sql_query($sql);
$mod_history .= G4_TIME_YMDHIS.' '.$ct['ct_option'].' 수량변경 '.$ct['ct_qty'].' -> '.$ct_qty."\n";
}
@ -141,7 +141,7 @@ for ($i=0; $i<$cnt; $i++)
{
$point_use = 0;
//insert_point($mb_id, (-1) * ($ct[ct_point] * $ct[ct_qty]), "주문번호 $od_id ($ct_id) 취소");
delete_point($mb_id, "@delivery", $mb_id, "$od_id,$uq_id,$ct_id");
delete_point($mb_id, "@delivery", $mb_id, "$od_id,$ct_id");
}
// 히스토리에 남김
@ -153,7 +153,7 @@ for ($i=0; $i<$cnt; $i++)
ct_stock_use = '$stock_use',
ct_status = '$ct_status',
ct_history = CONCAT(ct_history,'$ct_history')
where uq_id = '$uq_id'
where od_id = '$od_id'
and ct_id = '$ct_id' ";
sql_query($sql);
}

View File

@ -6,16 +6,16 @@ check_demo();
auth_check($auth[$sub_menu], "d");
if ($od_id && $uq_id)
if ($od_id)
{
// 장바구니 삭제
sql_query(" delete from {$g4['shop_cart_table']} where uq_id = '$uq_id' ");
sql_query(" delete from {$g4['shop_cart_table']} where od_id = '$od_id' ");
// 카드결제내역 삭제
sql_query(" delete from {$g4['shop_card_history_table']} where od_id = '$od_id' and uq_id = '$uq_id' ");
sql_query(" delete from {$g4['shop_card_history_table']} where od_id = '$od_id' ");
// 주문서 삭제
sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' and uq_id = '$uq_id' ");
sql_query(" delete from {$g4['shop_order_table']} where od_id = '$od_id' ");
}
if ($return_url)

View File

@ -43,14 +43,14 @@ if (!isset($order_not_point)) {
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 회원 ID 를 얻는다.
$tmp_row = sql_fetch("select od_id, mb_id from {$g4['shop_order_table']} where uq_id = '{$row['uq_id']}' ");
$tmp_row = sql_fetch("select od_id, mb_id from {$g4['shop_order_table']} where od_id = '{$row['od_id']}' ");
// 회원이면서 포인트가 0보다 크다면
if ($tmp_row['mb_id'] && $row['ct_point'] > 0)
{
$po_point = $row['ct_point'] * $row['ct_qty'];
$po_content = "$cart_title3 {$tmp_row['od_id']} ({$row['ct_id']}) $cart_title4";
insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['uq_id']},{$row['ct_id']}");
insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['ct_id']}");
}
sql_query("update {$g4['shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
@ -95,7 +95,7 @@ $sql = " select it_id,
cp_amount,
ct_notax
from {$g4['shop_cart_table']}
where uq_id = '{$od['uq_id']}'
where od_id = '{$od['od_id']}'
and ct_num = '0'
order by ct_id ";
$result = sql_query($sql);
@ -123,7 +123,6 @@ $pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
<?php } ?>
<form name="frmorderform" method="post" action="./ordercartupdate.php" onsubmit="return form_submit(this);">
<input type="hidden" name="uq_id" value="<?php echo $od['uq_id']; ?>">
<input type="hidden" name="od_id" value="<?php echo $od_id; ?>">
<input type="hidden" name="mb_id" value="<?php echo $od['mb_id']; ?>">
<input type="hidden" name="od_email" value="<?php echo $od['od_email']; ?>">
@ -172,7 +171,7 @@ $pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
// 상품의 옵션정보
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
from {$g4['shop_cart_table']}
where uq_id = '{$od['uq_id']}'
where od_id = '{$od['od_id']}'
and it_id = '{$row['it_id']}'
order by ct_num ";
$res = sql_query($sql);
@ -291,7 +290,7 @@ $pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
</thead>
<tbody>
<tr>
<td class="td_odrnum2"><?php echo $od['od_id']; ?><!-- uq_id : <?php echo $od['uq_id']; ?> --></td>
<td class="td_odrnum2"><?php echo $od['od_id']; ?></td>
<td class="td_payby"><?php echo $s_receipt_way; ?></td>
<td class="td_bignum"><?php echo display_price($amount['정상']); ?></td>
<td class="td_bignum"><?php echo display_point($od['od_receipt_point']); ?></td>
@ -332,7 +331,7 @@ $pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
break;
}
$sql = " select it_name, ct_option from {$g4['shop_cart_table']} where uq_id = '{$od['uq_id']}' and ct_id = '$rq_ct_id' ";
$sql = " select it_name, ct_option from {$g4['shop_cart_table']} where od_id = '{$od['od_id']}' and ct_id = '$rq_ct_id' ";
$rq_ct = sql_fetch($sql);
$rq_subject = $rq_row['rq_time'].' '.$rq_ct['it_name'].' '.$rq_ct['ct_option'];
if($rq_item_count > 1)
@ -340,7 +339,7 @@ $pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
$rq_subject .= ' '.$type.'요청';
if($rq_row['rq_id'] != $rq_id) {
$order_href = './orderform.php?od_id='.$od['od_id'].'&amp;uq_id='.$od['uq_id'].'&amp;rq_id='.$rq_row['rq_id'].'&amp;'.$qstr.'#anc_sodr_request';
$order_href = './orderform.php?od_id='.$od['od_id'].'&amp;rq_id='.$rq_row['rq_id'].'&amp;'.$qstr.'#anc_sodr_request';
$rq_subject = '<a href="'.$order_href.'">'.$rq_subject.'</a>';
}
@ -550,7 +549,7 @@ $pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
<?php if ($od['od_cash']) { ?>
<a href="javascript:;" onclick="window.open('https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp?cash_no=<?php echo $od['od_cash_no']; ?>', 'taxsave_receipt', 'width=360,height=647,scrollbars=0,menus=0');">현금영수증 확인</a>
<?php } else { ?>
<a href="javascript:;" onclick="window.open('<?php echo G4_SHOP_URL; ?>/taxsave_kcp.php?od_id=<?php echo $od_id; ?>&amp;uq_id=<?php echo $od['uq_id']; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');">현금영수증 발급</a>
<a href="javascript:;" onclick="window.open('<?php echo G4_SHOP_URL; ?>/taxsave_kcp.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');">현금영수증 발급</a>
<?php } ?>
</td>
</tr>
@ -929,7 +928,7 @@ $pg_anchor .='<li><a href="#anc_sodr_chk">결제상세정보 확인</a></li>
</div>
<div class="btn_confirm">
<a href="./orderdelete.php?od_id=<?php echo $od['od_id']; ?>&amp;uq_id=<?php echo $od['uq_id']; ?>&amo;mb_id=<?php echo $od['mb_id']; ?>&amp;<?php echo $qstr; ?>" onclick="return del_confirm();">주문서 삭제</a>
<a href="./orderdelete.php?od_id=<?php echo $od['od_id']; ?>&amo;mb_id=<?php echo $od['mb_id']; ?>&amp;<?php echo $qstr; ?>" onclick="return del_confirm();">주문서 삭제</a>
<a href="./orderlist.php?<?php echo $qstr; ?>">목록</a>
</div>

View File

@ -24,12 +24,12 @@ if ($search != "")
$page = 1;
}
if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sel_field == "") $sel_field = "a.od_id";
if ($sort1 == "") $sort1 = "a.od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (a.uq_id=b.uq_id)
left join {$g4['shop_cart_table']} b on (a.od_id=b.od_id)
$sql_search ";
// 김선용 200805 : 조인 사용으로 전체카운트가 일정레코드 이상일 때 지연시간 문제가 심각하므로 변경
@ -37,7 +37,7 @@ $sql_common = " from {$g4['shop_order_table']} a
$result = sql_query(" select DISTINCT od_id ".$sql_common);
$total_count = mysql_num_rows($result);
*/
$sql = " select count(distinct od_id) as cnt " . $sql_common;
$sql = " select count(distinct a.od_id) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
@ -103,7 +103,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
<option value="od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
<option value="a.od_id" <?php echo get_selected($sel_field, 'a.od_id'); ?>>주문번호</option>
<option value="mb_id" <?php echo get_selected($sel_field, 'mb_id'); ?>>회원 ID</option>
<option value="od_name" <?php echo get_selected($sel_field, 'od_name'); ?>>주문자</option>
<option value="od_tel" <?php echo get_selected($sel_field, 'od_tel'); ?>>주문자전화</option>
@ -234,7 +234,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<td><?php echo $s_receipt_way; ?></td>
<td class="td_mng">
<a href="./orderform.php?od_id=<?php echo $lines[$i]['od_id']; ?>&amp;<?php echo $qstr; ?>"><span class="sound_only"><?php echo $lines[$i]['od_id']; ?> </span>수정</a>
<a href="./orderdelete.php?od_id=<?php echo $lines[$i]['od_id']; ?>&amp;uq_id=<?php echo $lines[$i]['uq_id']; ?>&amp;mb_id=<?php echo $lines[$i]['mb_id']; ?>&amp;<?php echo $qstr; ?>" onclick="return delete_confirm();"><span class="sound_only"><?php echo $lines[$i]['od_id']; ?> </span>삭제</a>
<a href="./orderdelete.php?od_id=<?php echo $lines[$i]['od_id']; ?>&amp;mb_id=<?php echo $lines[$i]['mb_id']; ?>&amp;<?php echo $qstr; ?>" onclick="return delete_confirm();"><span class="sound_only"><?php echo $lines[$i]['od_id']; ?> </span>삭제</a>
</td>
</tr>
<?php

View File

@ -21,12 +21,12 @@ if ($search != "")
$page = 1;
}
if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sel_field == "") $sel_field = "a.od_id";
if ($sort1 == "") $sort1 = "a.od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (a.uq_id=b.uq_id)
left join {$g4['shop_cart_table']} b on (a.od_id=b.od_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음
@ -78,7 +78,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
<option value="od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
<option value="a.od_id" <?php echo get_selected($sel_field, 'a.od_id'); ?>>주문번호</option>
<option value="mb_id" <?php echo get_selected($sel_field, 'mb_id'); ?>>회원 ID</option>
<option value="od_name" <?php echo get_selected($sel_field, 'od_name'); ?>>주문자</option>
<option value="od_b_name" <?php echo get_selected($sel_field, 'od_b_name'); ?>>받는분</option>
@ -102,7 +102,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</div>
<ul class="sort_odr">
<li><a href="<?php echo title_sort("od_id", 1)."&amp;$qstr1"; ?>">주문번호<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("a.od_id", 1)."&amp;$qstr1"; ?>">주문번호<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_name")."&amp;$qstr1"; ?>">주문자<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("itemcount", 1)."&amp;$qstr1"; ?>">건수<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("orderamount", 1)."&amp;$qstr1"; ?>">주문합계<span class="sound_only"> 순 정렬</span></a></li>
@ -198,7 +198,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
// 상품개별출력
$sql2 = " select it_id, it_name
from {$g4['shop_cart_table']}
where uq_id = '{$row['uq_id']}'
where od_id = '{$row['od_id']}'
and ct_num = '0'
order by ct_num ";
$result2 = sql_query($sql2);
@ -229,7 +229,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
// 옵션항목
$sql3 = " select *
from {$g4['shop_cart_table']}
where uq_id = '{$row['uq_id']}'
where od_id = '{$row['od_id']}'
and it_id = '{$row2['it_id']}'
order by ct_num ";
$result3 = sql_query($sql3);
@ -267,7 +267,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<div class="sodr_mng">
<a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>&amp;<?php echo $qstr; ?>">주문 수정</a>
|
<a href="./orderdelete.php?od_id=<?php echo $row['od_id']; ?>&amp;uq_id=<?php echo $row['uq_id']; ?>&amp;mb_id=<?php echo $row['mb_id']; ?>&amp;<?php echo $qstr; ?>&amp;list=2" onclick="return delete_confirm();">주문 삭제</a>
<a href="./orderdelete.php?od_id=<?php echo $row['od_id']; ?>&amp;mb_id=<?php echo $row['mb_id']; ?>&amp;<?php echo $qstr; ?>&amp;list=2" onclick="return delete_confirm();">주문 삭제</a>
</div>
</li>

View File

@ -19,7 +19,7 @@ if ($od_send_mail)
$sql = " select *
from {$g4['shop_cart_table']}
where uq_id = '{$od['uq_id']}'
where od_id = '{$od['od_id']}'
order by ct_id ";
$result = sql_query($sql);
for ($i=0; $ct=mysql_fetch_array($result); $i++) {

View File

@ -41,7 +41,7 @@ if ($csv == 'csv')
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost
FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
where a.uq_id = b.uq_id ";
where a.od_id = b.od_id ";
if ($case == 1) // 출력기간
$sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
else // 주문번호구간
@ -99,7 +99,7 @@ if ($csv == 'xls')
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost
FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
where a.uq_id = b.uq_id ";
where a.od_id = b.od_id ";
if ($case == 1) // 출력기간
$sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
else // 주문번호구간
@ -162,11 +162,11 @@ if ($csv == 'xls')
exit;
}
function get_order($uq_id)
function get_order($od_id)
{
global $g4;
$sql = " select * from {$g4['shop_order_table']} where uq_id = '$uq_id' ";
$sql = " select * from {$g4['shop_order_table']} where od_id = '$od_id' ";
return sql_fetch($sql);
}
@ -177,14 +177,14 @@ if ($case == 1)
{
$fr_date = date_conv($fr_date);
$to_date = date_conv($to_date);
$sql = " SELECT DISTINCT a.uq_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
where a.uq_id = b.uq_id
$sql = " SELECT DISTINCT a.od_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
where a.od_id = b.od_id
and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
}
else
{
$sql = " SELECT DISTINCT a.uq_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
where a.uq_id = b.uq_id
$sql = " SELECT DISTINCT a.od_id FROM {$g4['shop_order_table']} a, {$g4['shop_cart_table']} b
where a.od_id = b.od_id
and a.od_id between '$fr_od_id' and '$to_od_id' ";
}
if ($ct_status)
@ -213,7 +213,7 @@ if (mysql_num_rows($result) == 0)
$tot_total_amount = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from {$g4['shop_order_table']} where uq_id = '{$row['uq_id']}' ";
$sql1 = " select * from {$g4['shop_order_table']} where od_id = '{$row['od_id']}' ";
$row1 = sql_fetch($sql1);
// 1.03.02
@ -275,7 +275,7 @@ if (mysql_num_rows($result) == 0)
<?php
$sql2 = " select *
from {$g4['shop_cart_table']}
where uq_id = '{$row['uq_id']}' ";
where od_id = '{$row['od_id']}' ";
if ($ct_status)
$sql2 .= " and ct_status = '$ct_status' ";
$sql2 .= " order by ct_id ";

View File

@ -8,7 +8,7 @@ $item = explode(',', $rq['ct_id']);
$sql = " select ct_id, it_id, it_name, ct_option, ct_price, ct_qty, io_type, io_price, ct_status, ct_notax
from {$g4['shop_cart_table']}
where uq_id = '{$od['uq_id']}'
where od_id = '{$od['od_id']}'
order by ct_id ";
$result = sql_query($sql);
?>

View File

@ -96,7 +96,7 @@ if($rq['rq_parent']) {
// 요청상품
$sql = " select ct_id, it_id, it_name, ct_option, ct_price, ct_qty, io_type, io_price, ct_status
from {$g4['shop_cart_table']}
where uq_id = '{$od['uq_id']}'
where od_id = '{$od['od_id']}'
order by ct_id ";
$result = sql_query($sql);

View File

@ -53,7 +53,7 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select a.*, b.uq_id, b.od_temp_amount, b.od_name
$sql = " select a.*, b.od_temp_amount, b.od_name
$sql_common
order by $sst $sod, a.rq_id desc
limit $from_record, $rows ";
@ -165,7 +165,7 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
if($tmp['rq_time'])
$done_date = substr($tmp['rq_time'], 2, 8);
$order_href = './orderform.php?od_id='.$row['od_id'].'&amp;uq_id='.$row['uq_id'].'&amp;rq_id='.$row['rq_id'].'&amp;rq_type='.$rq_type.'&amp;'.$qstr;
$order_href = './orderform.php?od_id='.$row['od_id'].'&amp;rq_id='.$row['rq_id'].'&amp;rq_type='.$rq_type.'&amp;'.$qstr;
?>
<tr>

View File

@ -23,12 +23,12 @@ if ($search != "") {
$page = 1;
}
if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sel_field == "") $sel_field = "a.od_id";
if ($sort1 == "") $sort1 = "a.od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from {$g4['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (a.uq_id = b.uq_id)
left join {$g4['shop_cart_table']} b on (a.od_id = b.od_id)
left join {$g4['shop_item_table']} c on (b.it_id = c.it_id)
$sql_search ";
@ -105,7 +105,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<label for="sel_field" class="sound_only">검색대상</label>
<select name="sel_field" id="sel_field">
<option value="od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
<option value="a.od_id" <?php echo get_selected($sel_field, 'od_id'); ?>>주문번호</option>
<option value="od_name" <?php echo get_selected($sel_field, 'od_name'); ?>>주문자</option>
<option value="mb_id" <?php echo get_selected($sel_field, 'mb_id'); ?>>회원 ID</option>
<option value="od_deposit_name" <?php echo get_selected($sel_field, 'od_deposit_name'); ?>>입금자</option>
@ -128,7 +128,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
</div>
<ul class="sort_odr">
<li><a href="<?php echo title_sort("od_id")."&amp;$qstr1"; ?>">주문번호<span class="sound_only"> 순 정렬</span></a></th>
<li><a href="<?php echo title_sort("a.od_id")."&amp;$qstr1"; ?>">주문번호<span class="sound_only"> 순 정렬</span></a></th>
<li><a href="<?php echo title_sort("it_name")."&amp;$qstr1"; ?>">상품명<span class="sound_only"> 순 정렬</span></a></li>
<li><a href="<?php echo title_sort("od_name")."&amp;$qstr1"; ?>">주문자<span class="sound_only"> 순 정렬</span></a></th>
<li><a href="<?php echo title_sort("mb_id")."&amp;$qstr1"; ?>">회원ID<span class="sound_only"> 순 정렬</span></a></li>
@ -170,9 +170,6 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
$href = $_SERVER['PHP_SELF'].'?sort1='.$sort1.'&amp;sort2='.$sort2.'&amp;sel_field=c.it_id&amp;search='.$lines[$i]['it_id'];
$it_name = '<a href="'.$href.'">'.cut_str($lines[$i]['it_name'],35).'</a><br>';
$it_name .= print_item_options($lines[$i]['it_id'], $lines[$i]['it_opt1'], $lines[$i]['it_opt2'], $lines[$i]['it_opt3'], $lines[$i]['it_opt4'], $lines[$i]['it_opt5'], $lines[$i]['it_opt6']);
$s_mod = icon("수정", "");
$od_mobile = '';
if($lines[$i]['od_mobile'])

View File

@ -35,7 +35,7 @@ function print_line($save)
unset($save);
unset($tot);
$lines = $lines1 = array();
$sql = " select uq_id,
$sql = " select od_id,
SUBSTRING(od_time,1,10) as od_date,
od_send_cost,
od_settle_case,
@ -56,7 +56,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$sql1 = " select (SUM(IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty))) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty), 0))) as ordercancel /* 주문취소 */
from {$g4['shop_cart_table']}
where uq_id = '{$row['uq_id']}' ";
where od_id = '{$row['od_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];

View File

@ -35,7 +35,7 @@ function print_line($save)
unset($save);
unset($tot);
$lines = $lines1 = array();
$sql = " select uq_id,
$sql = " select od_id,
SUBSTRING(od_time,1,7) as od_date,
od_send_cost,
od_settle_case,
@ -56,7 +56,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$sql1 = " select (SUM(IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty))) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty), 0))) as ordercancel /* 주문취소 */
from {$g4['shop_cart_table']}
where uq_id = '{$row['uq_id']}' ";
where od_id = '{$row['od_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];

View File

@ -14,7 +14,6 @@ $lines = $lines1 = array();
$sql = " select od_id,
mb_id,
od_name,
uq_id,
od_send_cost,
od_settle_case,
od_receipt_amount,
@ -34,7 +33,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$sql1 = " select (SUM(IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty))) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty), 0))) as ordercancel /* 주문취소 */
from {$g4['shop_cart_table']}
where uq_id = '{$row['uq_id']}' ";
where od_id = '{$row['od_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];

View File

@ -30,7 +30,7 @@ function print_line($save)
$lines = $lines1 = array();
unset($save);
unset($tot);
$sql = " select uq_id,
$sql = " select od_id,
SUBSTRING(od_time,1,4) as od_date,
od_send_cost,
od_settle_case,
@ -51,7 +51,7 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$sql1 = " select (SUM(IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty))) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', IF(io_type = 1, io_price * ct_qty, (ct_price + io_price) * ct_qty), 0))) as ordercancel /* 주문취소 */
from {$g4['shop_cart_table']}
where uq_id = '{$row['uq_id']}' ";
where od_id = '{$row['od_id']}' ";
$row1 = sql_fetch($sql1);
$row1['orderamount'] += $row['od_send_cost'];