From 993fe2b39681baf04c067957599d4c6468cb5624 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 12 Jun 2013 10:25:45 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=A4=EC=B6=9C=ED=98=84=ED=99=A9=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B8=88=EC=95=A1=EA=B3=84=EC=82=B0=20=EC=BF=BC?= =?UTF-8?q?=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/sale1date.php | 4 ++-- adm/shop_admin/sale1month.php | 4 ++-- adm/shop_admin/sale1today.php | 6 +++--- adm/shop_admin/sale1year.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/adm/shop_admin/sale1date.php b/adm/shop_admin/sale1date.php index 75a3183ef..427f1bbc0 100644 --- a/adm/shop_admin/sale1date.php +++ b/adm/shop_admin/sale1date.php @@ -53,8 +53,8 @@ for ($i=0; $row=mysql_fetch_array($result); $i++) $lines[$i] = $row; // 장바구니 상태별 금액 - $sql1 = " select (SUM(ct_price * ct_qty)) as orderamount, /* 주문합계 */ - (SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_price * ct_qty, 0))) as ordercancel /* 주문취소 */ + $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']}' "; $row1 = sql_fetch($sql1); diff --git a/adm/shop_admin/sale1month.php b/adm/shop_admin/sale1month.php index eee76ed36..4f27d249c 100644 --- a/adm/shop_admin/sale1month.php +++ b/adm/shop_admin/sale1month.php @@ -53,8 +53,8 @@ for ($i=0; $row=mysql_fetch_array($result); $i++) $lines[$i] = $row; // 장바구니 상태별 금액 - $sql1 = " select (SUM(ct_price * ct_qty)) as orderamount, /* 주문합계 */ - (SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_price * ct_qty, 0))) as ordercancel /* 주문취소 */ + $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']}' "; $row1 = sql_fetch($sql1); diff --git a/adm/shop_admin/sale1today.php b/adm/shop_admin/sale1today.php index 52a70e109..6a8dffeda 100644 --- a/adm/shop_admin/sale1today.php +++ b/adm/shop_admin/sale1today.php @@ -6,7 +6,7 @@ auth_check($auth[$sub_menu], "r"); $date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $date); -$g4['title'] = "$date 일일 매출현황"; +$g4['title'] = "$date 일 매출현황"; include_once (G4_ADMIN_PATH.'/admin.head.php'); unset($tot); @@ -31,8 +31,8 @@ for ($i=0; $row=mysql_fetch_array($result); $i++) $lines[$i] = $row; // 장바구니 상태별 금액 - $sql1 = " select (SUM(ct_price * ct_qty)) as orderamount, /* 주문합계 */ - (SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_price * ct_qty, 0))) as ordercancel /* 주문취소 */ + $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']}' "; $row1 = sql_fetch($sql1); diff --git a/adm/shop_admin/sale1year.php b/adm/shop_admin/sale1year.php index ac841b02e..e9ee44307 100644 --- a/adm/shop_admin/sale1year.php +++ b/adm/shop_admin/sale1year.php @@ -48,8 +48,8 @@ for ($i=0; $row=mysql_fetch_array($result); $i++) $lines[$i] = $row; // 장바구니 상태별 금액 - $sql1 = " select (SUM(ct_price * ct_qty)) as orderamount, /* 주문합계 */ - (SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_price * ct_qty, 0))) as ordercancel /* 주문취소 */ + $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']}' "; $row1 = sql_fetch($sql1);