상품옵션재고관리 페이지 추가

This commit is contained in:
chicpro
2013-05-28 18:22:12 +09:00
parent 72de24c44b
commit 9806185507
4 changed files with 244 additions and 8 deletions

View File

@ -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) // 검색 결과일 때만 처음 버튼을 보여줌
<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>
<td class="td_chk"><input type="checkbox" name="it_use[<?php echo $i; ?>]" value="1" <?php echo ($row['it_use'] ? "checked" : ""); ?>></td>
<td class="td_smallmng"><a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>&amp;ca_id=<?php echo $row['ca_id']; ?>&amp;$qstr">수정</a></td>
<td class="td_smallmng"><a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>&amp;ca_id=<?php echo $row['ca_id']; ?>&amp;<?php echo $qstr; ?>">수정</a></td>
</tr><tr>
<?php
}