diff --git a/adm/admin.menu400.shop_1of2.php b/adm/admin.menu400.shop_1of2.php index 1af40089b..620df3357 100644 --- a/adm/admin.menu400.shop_1of2.php +++ b/adm/admin.menu400.shop_1of2.php @@ -13,6 +13,7 @@ $menu['menu400'] = array ( array('400650', '사용후기', G4_ADMIN_URL.'/shop_admin/itempslist.php', 'scf_ps'), array('400620', '상품재고관리', G4_ADMIN_URL.'/shop_admin/itemstocklist.php', 'scf_item_stock'), array('400610', '상품유형관리', G4_ADMIN_URL.'/shop_admin/itemtypelist.php', 'scf_item_type'), + array('400500', '상품옵션재고관리', G4_ADMIN_URL.'/shop_admin/optionstocklist.php', 'scf_item_option'), array('400500', '배송일괄처리', G4_ADMIN_URL.'/shop_admin/deliverylist.php', 'scf_deli', 1), array('400740', '배송업체관리', G4_ADMIN_URL.'/shop_admin/deliverycodelist.php', 'scf_deli_co', 1), array('400630', '이벤트관리', G4_ADMIN_URL.'/shop_admin/itemevent.php', 'scf_event'), diff --git a/adm/shop_admin/itemstocklist.php b/adm/shop_admin/itemstocklist.php index 2cf3d6e1b..f1e62f8cb 100644 --- a/adm/shop_admin/itemstocklist.php +++ b/adm/shop_admin/itemstocklist.php @@ -131,13 +131,19 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌 { $href = G4_SHOP_URL."/item.php?it_id={$row['it_id']}"; - $sql1 = " select SUM(ct_qty) as sum_qty - from {$g4['shop_cart_table']} - where it_id = '{$row['it_id']}' - and ct_stock_use = '0' - and ct_status in ('주문', '준비') "; - $row1 = sql_fetch($sql1); - $wait_qty = $row1['sum_qty']; + // 선택옵션이 있을 경우 주문대기 수량 계산하지 않음 + $sql2 = " select count(*) as cnt from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' "; + $row2 = sql_fetch($sql2); + + if(!$row2['cnt']) { + $sql1 = " select SUM(ct_qty) as sum_qty + from {$g4['shop_cart_table']} + where it_id = '{$row['it_id']}' + and ct_stock_use = '0' + and ct_status in ('주문', '준비') "; + $row1 = sql_fetch($sql1); + $wait_qty = $row1['sum_qty']; + } // 가재고 (미래재고) $temporary_qty = $row['it_stock_qty'] - $wait_qty; @@ -154,7 +160,7 @@ if ($search) // 검색 결과일 때만 처음 버튼을 보여줌
재고수정의 수치를 수정하시면 창고재고의 수치가 변경됩니다.
+ +