Merge branch 'master' of github.com:gnuboard/yc5
This commit is contained in:
@ -494,6 +494,19 @@ $(function(){
|
||||
<label for="chk_all_it_stock_qty">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_noti_qty">재고 통보수량</label></th>
|
||||
<td>
|
||||
<?php echo help("상품의 재고가 통보수량보다 작을 때 쇼핑몰 현황 재고부족상품에 표시됩니다.<br>옵션이 있는 상품은 개별 옵션의 통보수량이 적용됩니다."); ?>
|
||||
<input type="text" name="it_noti_qty" value="<?php echo $it['it_noti_qty']; ?>" id="it_noti_qty" class="frm_input" size="8"> 개
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_ca_it_noti_qty" value="1" id="chk_ca_it_noti_qty">
|
||||
<label for="chk_ca_it_noti_qty">분류적용</label>
|
||||
<input type="checkbox" name="chk_all_it_noti_qty" value="1" id="chk_all_it_noti_qty">
|
||||
<label for="chk_all_it_noti_qty">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="it_buy_min_qty">최소구매수량</label></th>
|
||||
<td>
|
||||
|
||||
@ -288,6 +288,7 @@ $sql_common = " ca_id = '$ca_id',
|
||||
it_sell_email = '$it_sell_email',
|
||||
it_use = '$it_use',
|
||||
it_stock_qty = '$it_stock_qty',
|
||||
it_noti_qty = '$it_noti_qty',
|
||||
it_sc_type = '$it_sc_type',
|
||||
it_sc_method = '$it_sc_method',
|
||||
it_sc_price = '$it_sc_price',
|
||||
@ -462,6 +463,7 @@ if(is_checked('chk_ca_it_cust_price')) $ca_fields .= " , it_cust_price
|
||||
if(is_checked('chk_ca_it_point')) $ca_fields .= " , it_point = '$it_point' ";
|
||||
if(is_checked('chk_ca_it_point_type')) $ca_fields .= " , it_point_type = '$it_point_type' ";
|
||||
if(is_checked('chk_ca_it_stock_qty')) $ca_fields .= " , it_stock_qty = '$it_stock_qty' ";
|
||||
if(is_checked('chk_ca_it_noti_qty')) $ca_fields .= " , it_noti_qty = '$it_noti_qty' ";
|
||||
if(is_checked('chk_ca_it_sendcost')) $ca_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
|
||||
if(is_checked('chk_ca_it_buy_min_qty')) $ca_fields .= " , it_buy_min_qty = '$it_buy_min_qty' ";
|
||||
if(is_checked('chk_ca_it_buy_max_qty')) $ca_fields .= " , it_buy_max_qty = '$it_buy_max_qty' ";
|
||||
@ -506,6 +508,7 @@ if(is_checked('chk_all_it_cust_price')) $all_fields .= " , it_cust_pric
|
||||
if(is_checked('chk_all_it_point')) $all_fields .= " , it_point = '$it_point' ";
|
||||
if(is_checked('chk_all_it_point_type')) $all_fields .= " , it_point_type = '$it_point_type' ";
|
||||
if(is_checked('chk_all_it_stock_qty')) $all_fields .= " , it_stock_qty = '$it_stock_qty' ";
|
||||
if(is_checked('chk_all_it_noti_qty')) $all_fields .= " , it_noti_qty = '$it_noti_qty' ";
|
||||
if(is_checked('chk_all_it_sendcost')) $all_fields .= " , it_sc_type = '$it_sc_type', it_sc_method = '$it_sc_method', it_sc_price = '$it_sc_price', it_sc_minimum = '$it_sc_minimum', it_sc_qty = '$it_sc_qty' ";
|
||||
if(is_checked('chk_all_it_buy_min_qty')) $all_fields .= " , it_buy_min_qty = '$it_buy_min_qty' ";
|
||||
if(is_checked('chk_all_it_buy_max_qty')) $all_fields .= " , it_buy_max_qty = '$it_buy_max_qty' ";
|
||||
|
||||
@ -19,8 +19,8 @@ if ($sel_ca_id != "") {
|
||||
}
|
||||
|
||||
if ($sel_field == "") $sel_field = "it_name";
|
||||
if ($sort1 == "") $sort1 = "it_id";
|
||||
if ($sort2 == "") $sort2 = "desc";
|
||||
if ($sort1 == "") $sort1 = "it_stock_qty";
|
||||
if ($sort2 == "") $sort2 = "asc";
|
||||
|
||||
$sql_common = " from {$g5['g5_shop_item_table']} ";
|
||||
$sql_common .= $sql_search;
|
||||
@ -38,7 +38,8 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
$sql = " select it_id,
|
||||
it_name,
|
||||
it_use,
|
||||
it_stock_qty
|
||||
it_stock_qty,
|
||||
it_noti_qty
|
||||
$sql_common
|
||||
order by $sort1 $sort2
|
||||
limit $from_record, $rows ";
|
||||
@ -135,7 +136,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
from {$g5['g5_shop_cart_table']}
|
||||
where it_id = '{$row['it_id']}'
|
||||
and ct_stock_use = '0'
|
||||
and ct_status in ('주문', '준비') ";
|
||||
and ct_status in ('주문', '입금', '준비') ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
$wait_qty = $row1['sum_qty'];
|
||||
}
|
||||
@ -143,6 +144,14 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
// 가재고 (미래재고)
|
||||
$temporary_qty = $row['it_stock_qty'] - $wait_qty;
|
||||
|
||||
// 통보수량보다 재고수량이 작을 때
|
||||
$it_stock_qty = number_format($row['it_stock_qty']);
|
||||
$it_stock_qty_st = ''; // 스타일 정의
|
||||
if($row['it_stock_qty'] <= $row['it_noti_qty']) {
|
||||
$it_stock_qty_st = ' sit_stock_qty_alert';
|
||||
$it_stock_qty = ''.$it_stock_qty.' !<span class="sound_only"> 재고부족 </span>';
|
||||
}
|
||||
|
||||
$tr_bg = 'tr_bg'.($i%2);
|
||||
|
||||
?>
|
||||
@ -152,7 +161,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
<?php echo $row['it_id']; ?>
|
||||
</td>
|
||||
<td><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?><?php echo cut_str(stripslashes($row['it_name']), 60, "…"); ?></a></td>
|
||||
<td class="td_num"><?php echo number_format($row['it_stock_qty']); ?></td>
|
||||
<td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo $it_stock_qty; ?></td>
|
||||
<td class="td_num"><?php echo number_format($wait_qty); ?></td>
|
||||
<td class="td_num"><?php echo number_format($temporary_qty); ?></td>
|
||||
<td class="td_num"><input type="text" name="it_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['it_stock_qty']; ?>" class="frm_input" size="10" autocomplete="off"></td>
|
||||
|
||||
@ -16,5 +16,5 @@ for ($i=0; $i<count($_POST['it_id']); $i++)
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url("./itemstocklist.php?sort1=$sort&sort2=$sort2&sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&page=$page");
|
||||
goto_url("./itemstocklist.php?sort1=$sort1&sort2=$sort2&sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&page=$page");
|
||||
?>
|
||||
|
||||
@ -56,7 +56,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall; ?>
|
||||
전체 상품 <?php echo $total_count; ?>개
|
||||
전체 옵션 <?php echo $total_count; ?>개
|
||||
</div>
|
||||
|
||||
<form name="flist" class="local_sch01 local_sch">
|
||||
@ -132,7 +132,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
where it_id = '{$row['it_id']}'
|
||||
and io_id = '{$row['io_id']}'
|
||||
and ct_stock_use = '0'
|
||||
and ct_status in ('주문', '준비') ";
|
||||
and ct_status in ('주문', '입금', '준비') ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
$wait_qty = $row1['sum_qty'];
|
||||
|
||||
@ -164,7 +164,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
$io_stock_qty = number_format($row['io_stock_qty']);
|
||||
$io_stock_qty_st = ''; // 스타일 정의
|
||||
if($row['io_stock_qty'] <= $row['io_noti_qty']) {
|
||||
$io_stock_qty_st = 'sit_stock_qty_alert';
|
||||
$io_stock_qty_st = ' sit_stock_qty_alert';
|
||||
$io_stock_qty = ''.$io_stock_qty.' !<span class="sound_only"> 재고부족 </span>';
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
||||
</td>
|
||||
<td class="td_itopt"><?php echo $option; ?></td>
|
||||
<td class="td_mng"><?php echo $type; ?></td>
|
||||
<td class="td_num <?php echo $io_stock_qty_st; ?>"><?php echo $io_stock_qty; ?></td>
|
||||
<td class="td_num<?php echo $io_stock_qty_st; ?>"><?php echo $io_stock_qty; ?></td>
|
||||
<td class="td_num"><?php echo number_format($wait_qty); ?></td>
|
||||
<td class="td_num"><?php echo number_format($temporary_qty); ?></td>
|
||||
<td class="td_num"><input type="text" name="io_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['io_stock_qty']; ?>" class="frm_input" size="8" autocomplete="off"></td>
|
||||
|
||||
@ -18,5 +18,5 @@ for ($i=0; $i<count($_POST['it_id']); $i++)
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url("./optionstocklist.php?sort1=$sort&sort2=$sort2&sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&page=$page");
|
||||
goto_url("./optionstocklist.php?sort1=$sort1&sort2=$sort2&sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&page=$page");
|
||||
?>
|
||||
|
||||
@ -685,4 +685,10 @@ if(!sql_query(" select od_cash_info from {$g5['g5_shop_order_table']} limit 1",
|
||||
DROP `od_cash_tr_code`,
|
||||
DROP `od_cash_id_info` ", true);
|
||||
}
|
||||
|
||||
// 상품테이블 재고통보수량 필드 추가
|
||||
if(!sql_query(" select it_noti_qty from {$g5['g5_shop_item_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
|
||||
ADD `it_noti_qty` int(11) NOT NULL DEFAULT '0' AFTER `it_stock_qty` ", true);
|
||||
}
|
||||
?>
|
||||
|
||||
@ -423,6 +423,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_item` (
|
||||
`it_sell_email` varchar(255) NOT NULL DEFAULT '',
|
||||
`it_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_stock_qty` int(11) NOT NULL DEFAULT '0',
|
||||
`it_noti_qty` int(11) NOT NULL DEFAULT '0',
|
||||
`it_sc_type` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_sc_method` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`it_sc_price` int(11) NOT NULL DEFAULT '0',
|
||||
|
||||
@ -75,6 +75,7 @@ $sql = " update {$g5['g5_shop_order_table']}
|
||||
od_cart_coupon = '0',
|
||||
od_coupon = '0',
|
||||
od_send_coupon = '0',
|
||||
od_status = '취소',
|
||||
od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G5_TIME_YMDHIS." (취소이유 : {$cancel_memo})\")
|
||||
where od_id = '$od_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
Reference in New Issue
Block a user