diff --git a/adm/shop_admin/index.php b/adm/shop_admin/index.php index f4e5493e9..57883c09f 100644 --- a/adm/shop_admin/index.php +++ b/adm/shop_admin/index.php @@ -52,6 +52,51 @@ function get_order_date_sum($date) return $info; } +// 일자별 결제수단 주문 합계 금액 +function get_order_settle_sum($date) +{ + global $g5, $default; + + $case = array('신용카드', '계좌이체', '가상계좌', '무통장', '휴대폰'); + $info = array(); + + // 결제수단별 합계 + foreach($case as $val) + { + $sql = " select sum(od_cart_price + od_send_cost + od_send_cost2) as price, + count(*) as cnt + from {$g5['g5_shop_order_table']} + where SUBSTRING(od_time, 1, 10) = '$date' + and od_settle_case = '$val' "; + $row = sql_fetch($sql); + + $info[$val]['price'] = (int)$row['price']; + $info[$val]['count'] = (int)$row['cnt']; + } + + // 포인트 합계 + $sql = " select sum(od_receipt_point) as price, + count(*) as cnt + from {$g5['g5_shop_order_table']} + where SUBSTRING(od_time, 1, 10) = '$date' + and od_receipt_point > 0 "; + $row = sql_fetch($sql); + $info['포인트']['price'] = (int)$row['price']; + $info['포인트']['count'] = (int)$row['cnt']; + + // 쿠폰 합계 + $sql = " select sum(od_cart_coupon + od_coupon + od_send_coupon) as price, + count(*) as cnt + from {$g5['g5_shop_order_table']} + where SUBSTRING(od_time, 1, 10) = '$date' + and ( od_cart_coupon > 0 or od_coupon > 0 or od_send_coupon > 0 ) "; + $row = sql_fetch($sql); + $info['쿠폰']['price'] = (int)$row['price']; + $info['쿠폰']['count'] = (int)$row['cnt']; + + return $info; +} + function get_max_value($arr) { foreach($arr as $key => $val) @@ -68,6 +113,27 @@ function get_max_value($arr) } ?> +
+

재고 및 SMS

+ + +
+ + + + + + + + + + + + +
재고부족 상품재고부족 옵션SMS 잔여금액
+
+
+

처리해야할 주문

@@ -198,6 +264,75 @@ function get_max_value($arr)
+
+

결제수단별 주문현황

+ + + =0; $i--) + { + $date = date("Y-m-d", strtotime('-'.$i.' days', G5_SERVER_TIME)); + $info[$date] = get_order_settle_sum($date); + } + ?> + +
+ + + + + =0; $i--) { + $date = date("Y-m-d", strtotime('-'.$i.' days', G5_SERVER_TIME)); + $info[$date] = get_order_settle_sum($date); + + $day = substr($date, 5, 5).' ('.get_yoil($date).')'; + $info_key[] = $date; + ?> + + + + + + + + + + + + + + + + + + + + + +
 
건수금액
+
+
+