Merge branch 'master' of github.com:gnuboard/yc4s

This commit is contained in:
whitedot
2013-12-03 14:06:48 +09:00
4 changed files with 31 additions and 31 deletions

View File

@ -820,9 +820,9 @@ $(function() {
$(".cp_btn").click(function() { $(".cp_btn").click(function() {
$cp_btn_el = $(this); $cp_btn_el = $(this);
$cp_row_el = $(this).closest("tr"); $cp_row_el = $(this).closest("li");
$("#cp_frm").remove(); $("#cp_frm").remove();
var it_id = $cp_btn_el.closest("tr").find("input[name^=it_id]").val(); var it_id = $cp_btn_el.closest("li").find("input[name^=it_id]").val();
$.post( $.post(
"./orderitemcoupon.php", "./orderitemcoupon.php",
@ -856,7 +856,7 @@ $(function() {
if(id == cp_id) { if(id == cp_id) {
cp_dup_idx = index; cp_dup_idx = index;
cp_dup = true; cp_dup = true;
$cp_dup_el = $(this).closest("tr");; $cp_dup_el = $(this).closest("li");;
return false; return false;
} }
@ -868,10 +868,13 @@ $(function() {
return false; return false;
} else { } else {
coupon_cancel($cp_dup_el); coupon_cancel($cp_dup_el);
$("#cp_frm").remove();
$cp_dup_el.find(".cp_btn").text("쿠폰적용").focus();
$cp_dup_el.find(".cp_cancel").remove();
} }
} }
var $s_el = $cp_row_el.find(".total_price");; var $s_el = $cp_row_el.find(".total_price strong");;
sell_price = parseInt($cp_row_el.find("input[name^=it_price]").val()); sell_price = parseInt($cp_row_el.find("input[name^=it_price]").val());
sell_price = sell_price - parseInt(price); sell_price = sell_price - parseInt(price);
if(sell_price < 0) { if(sell_price < 0) {
@ -884,9 +887,9 @@ $(function() {
calculate_total_price(); calculate_total_price();
$("#cp_frm").remove(); $("#cp_frm").remove();
$cp_btn_el.text("변경").focus(); $cp_btn_el.text("쿠폰변경").focus();
if(!$cp_row_el.find(".cp_cancel").size()) if(!$cp_row_el.find(".cp_cancel").size())
$cp_btn_el.after("<button type=\"button\" class=\"cp_cancel btn_frmline\">취소</button>"); $cp_btn_el.after("<button type=\"button\" class=\"cp_cancel btn_frmline\">쿠폰취소</button>");
}); });
$("#cp_close").live("click", function() { $("#cp_close").live("click", function() {
@ -895,10 +898,10 @@ $(function() {
}); });
$(".cp_cancel").live("click", function() { $(".cp_cancel").live("click", function() {
coupon_cancel($(this).closest("tr")); coupon_cancel($(this).closest("li"));
calculate_total_price(); calculate_total_price();
$("#cp_frm").remove(); $("#cp_frm").remove();
$(this).closest("tr").find(".cp_btn").text("쿠폰적용").focus(); $(this).closest("li").find(".cp_btn").text("쿠폰적용").focus();
$(this).remove(); $(this).remove();
}); });
@ -1103,7 +1106,7 @@ $(function() {
function coupon_cancel($el) function coupon_cancel($el)
{ {
var $dup_sell_el = $el.find(".total_price"); var $dup_sell_el = $el.find(".total_price strong");
var $dup_price_el = $el.find("input[name^=cp_price]"); var $dup_price_el = $el.find("input[name^=cp_price]");
var org_sell_price = $el.find("input[name^=it_price]").val(); var org_sell_price = $el.find("input[name^=it_price]").val();

View File

@ -132,7 +132,9 @@ include_once(G5_MSHOP_PATH.'/_head.php');
<?php <?php
// 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 - 배송비할인 // 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 - 배송비할인
$tot_price = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon']; $tot_price = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2']
- $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon']
- $od['od_cancel_price'];
?> ?>
<dl id="sod_bsk_tot"> <dl id="sod_bsk_tot">
@ -164,6 +166,11 @@ include_once(G5_MSHOP_PATH.'/_head.php');
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_send_cost2']); ?> 원</strong></dd> <dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_send_cost2']); ?> 원</strong></dd>
<?php } ?> <?php } ?>
<?php if ($od['od_cancel_price'] > 0) { ?>
<dt class="sod_bsk_dvr">취소금액</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_cancel_price']); ?> 원</strong></dd>
<?php } ?>
<dt class="sod_bsk_cnt">총계</dt> <dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원</strong></dd> <dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원</strong></dd>
@ -318,16 +325,6 @@ include_once(G5_MSHOP_PATH.'/_head.php');
<?php <?php
} }
if ($od['od_cancel_price'] > 0)
{
?>
<tr>
<th scope="row">취소 금액</th>
<td><?php echo display_price($od['od_cancel_price']); ?></td>
</tr>
<?php
}
if ($od['od_refund_price'] > 0) if ($od['od_refund_price'] > 0)
{ {
?> ?>

View File

@ -1131,6 +1131,9 @@ $(function() {
return false; return false;
} else { } else {
coupon_cancel($cp_dup_el); coupon_cancel($cp_dup_el);
$("#cp_frm").remove();
$cp_dup_el.find(".cp_btn").text("적용").focus();
$cp_dup_el.find(".cp_cancel").remove();
} }
} }

View File

@ -146,7 +146,9 @@ if(openwin != null) {
<?php <?php
// 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 - 배송비할인 // 총계 = 주문상품금액합계 + 배송비 - 상품할인 - 결제할인 - 배송비할인
$tot_price = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2'] - $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon']; $tot_price = $od['od_cart_price'] + $od['od_send_cost'] + $od['od_send_cost2']
- $od['od_cart_coupon'] - $od['od_coupon'] - $od['od_send_coupon']
- $od['od_cancel_price'];
?> ?>
<dl id="sod_bsk_tot"> <dl id="sod_bsk_tot">
@ -178,6 +180,11 @@ if(openwin != null) {
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_send_cost2']); ?> 원</strong></dd> <dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_send_cost2']); ?> 원</strong></dd>
<?php } ?> <?php } ?>
<?php if ($od['od_cancel_price'] > 0) { ?>
<dt class="sod_bsk_dvr">취소금액</dt>
<dd class="sod_bsk_dvr"><strong><?php echo number_format($od['od_cancel_price']); ?> 원</strong></dd>
<?php } ?>
<dt class="sod_bsk_cnt">총계</dt> <dt class="sod_bsk_cnt">총계</dt>
<dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원</strong></dd> <dd class="sod_bsk_cnt"><strong><?php echo number_format($tot_price); ?> 원</strong></dd>
@ -330,16 +337,6 @@ if(openwin != null) {
<?php <?php
} }
if ($od['od_cancel_price'] > 0)
{
?>
<tr>
<th scope="row">취소 금액</th>
<td><?php echo display_price($od['od_cancel_price']); ?></td>
</tr>
<?php
}
if ($od['od_refund_price'] > 0) if ($od['od_refund_price'] > 0)
{ {
?> ?>