주문관리 수정중
This commit is contained in:
@ -20,47 +20,33 @@ $pg_anchor = '<ul class="anchor">
|
||||
<h2>주문현황</h2>
|
||||
<?php echo $pg_anchor; ?>
|
||||
|
||||
<<<<<<< HEAD
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '주문' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "주문 : ".$row['cnt'];
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '입금' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "입금 : ".$row['cnt'];
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '준비' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "준비 : ".$row['cnt'];
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '배송' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "배송 : ".$row['cnt'];
|
||||
?>
|
||||
=======
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '주문' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "주문 : ".$row['cnt'];
|
||||
?>
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '주문' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "<a href=\"./orderlist.php?od_status=주문\">주문 : ".$row['cnt']."</a>";
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '입금' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "입금 : ".$row['cnt'];
|
||||
?>
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '입금' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "입금 : ".$row['cnt'];
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '준비' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "준비 : ".$row['cnt'];
|
||||
?>
|
||||
|
||||
<?php
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_order_table']} where od_status = '배송' ";
|
||||
$row = sql_fetch($sql);
|
||||
echo "배송 : ".$row['cnt'];
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
>>>>>>> f73f62fa8521d8b34cab42061a1d73d5979cb198
|
||||
</section>
|
||||
|
||||
<section id="anc_sidx_rdy">
|
||||
|
||||
@ -200,7 +200,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
|
||||
<div class="tbl_head02 tbl_wrap">
|
||||
<table id="sodr_list">
|
||||
<caption>주문 내역 목록</caption></caption>
|
||||
<caption>주문 내역 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" rowspan="2">
|
||||
@ -275,9 +275,13 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
</td>
|
||||
<td headers="th_odrer" class="td_name"><?php echo $mb_nick; ?></td>
|
||||
<td rowspan="2" class="td_odrstatus">
|
||||
<input type="hidden" name="current_status[<?php echo $i ?>]" value="<?php echo $row['od_status'] ?>">
|
||||
<?php echo $row['od_status']; ?>
|
||||
</td>
|
||||
<td rowspan="2" class="td_payby"><?php echo $s_receipt_way; ?></td>
|
||||
<td rowspan="2" class="td_payby">
|
||||
<input type="hidden" name="current_settle_case[<?php echo $i ?>]" value="<?php echo $row['od_settle_case'] ?>">
|
||||
<?php echo $s_receipt_way; ?>
|
||||
</td>
|
||||
<td rowspan="2" class="td_numsum"><?php echo number_format($row['od_cart_price'] + $row['od_send_cost'] + $row['od_send_cost2']); ?></td>
|
||||
<td rowspan="2" class="td_numincome"><?php echo number_format($row['od_receipt_price']); ?></td>
|
||||
<td rowspan="2" class="td_numcancel"><?php echo number_format($row['od_cancel_price']); ?></td>
|
||||
@ -308,7 +312,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="orderlist">
|
||||
<th scope="row" colspan="5">합 계</td>
|
||||
<th scope="row" colspan="5">합 계</th>
|
||||
<td><?php echo number_format($tot_orderprice); ?></td>
|
||||
<td><?php echo number_format($tot_receiptprice); ?></td>
|
||||
<td><?php echo number_format($tot_ordercancel); ?></td>
|
||||
@ -401,6 +405,17 @@ function forderlist_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
var chk = document.getElementsByName("chk[]");
|
||||
for (var i=0; i<chk.length; i++) {
|
||||
if (chk[i].checked) {
|
||||
var k = chk[i].value;
|
||||
if (!(f.elements['current_settle_case['+k+']'].value == "무통장" && f.od_status.value == "입금")) {
|
||||
alert("무통장의 경우에만 입금 처리 가능합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
f.action = "./orderlistupdate.php";
|
||||
|
||||
return true;
|
||||
|
||||
@ -67,8 +67,7 @@ function change_order_status($current_staus, $change_status, $od)
|
||||
// 현재 주문상태와 바뀔 주문상태가 같다면 처리하지 않음
|
||||
if ($current_staus == $change_status) return;
|
||||
|
||||
$od = sql_fetch(" select od_settle_case from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if (!$od) return;
|
||||
$od_id = $od['od_id'];
|
||||
|
||||
switch ($current_staus)
|
||||
{
|
||||
@ -169,14 +168,14 @@ function change_order_status($current_staus, $change_status, $od)
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$k = $_POST['chk'][$i];
|
||||
$od_id = $_POST['od_id'][$k];
|
||||
|
||||
change_order_status($od['od_status'], $_POST['od_status'], $od_id);
|
||||
|
||||
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if (!$od) continue;
|
||||
|
||||
echo $od_id . "<br>";
|
||||
change_order_status($od['od_status'], $_POST['od_status'], $od);
|
||||
//echo $od_id . "<br>";
|
||||
}
|
||||
|
||||
$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search";
|
||||
@ -189,5 +188,7 @@ $qstr .= "&od_receipt_point=$od_receipt_point";
|
||||
$qstr .= "&od_receipt_coupon=$od_receipt_coupon";
|
||||
//$qstr .= "&page=$page";
|
||||
|
||||
//exit;
|
||||
|
||||
goto_url("./orderlist.php?$qstr");
|
||||
?>
|
||||
@ -606,4 +606,4 @@ if(!sql_query(" select it_1 from {$g5['g5_shop_item_table']} limit 1", false)) {
|
||||
ADD `ca_9` varchar(255) NOT NULL DEFAULT '' AFTER `ca_8`,
|
||||
ADD `ca_10` varchar(255) NOT NULL DEFAULT '' AFTER `ca_9` ", true);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user