diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index f97723fb9..c027e782f 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -84,6 +84,11 @@ ob_start(); $good_info = ''; $it_send_cost = 0; + $comm_tax_mny = 0; // 과세금액 + $comm_vat_mny = 0; // 부가세 + $comm_free_mny = 0; // 면세금액 + $tot_tax_mny = 0; + for ($i=0; $row=mysql_fetch_array($result); $i++) { // 합계금액 계산 @@ -130,18 +135,12 @@ ob_start(); $it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']); } - // 복합과세금액 계산 + // 복합과세금액 if($default['de_tax_flag_use']) { - $tax_mny = $vat_mnt = $free_mny = 0; if($row['it_notax']) { - $free_mny = $sum['price']; - $comm_free_mny += $free_mny; + $comm_free_mny += $sum['price']; } else { - $tax_mny = round((int)$sum['price'] / 1.1); - $vat_mny = (int)$sum['price'] - $tax_mny; - - $comm_tax_mny += $tax_mny; - $comm_vat_mny += $vat_mny; + $tot_tax_mny += $sum['price']; } } @@ -220,13 +219,10 @@ ob_start(); } } - // 배송비 복합과세처리 - if($default['de_tax_flag_use'] && $send_cost > 0) { - $send_tax = round((int)$send_cost / 1.1); - $send_vat = (int)$send_cost - $send_tax; - - $comm_tax_mny += $send_tax; - $comm_vat_mny += $send_vat; + // 복합과세처리 + if($default['de_tax_flag_use']) { + $comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1); + $comm_vat_mnt = ($tot_tax_mny + $send_cost) - $comm_tax_mny; } ?> @@ -1023,14 +1019,6 @@ function calculate_total_amount() cp_amount = parseInt($cp_amt.eq(index).val()); sell_amount += it_amount; tot_cp_amount += cp_amount; - - it_notax = $("input[name^=it_notax]").eq(index).val(); - if(it_notax == "1") { - comm_free_mny += (it_amount - cp_amount); - } else { - tot_mny += (it_amount - cp_amount); - } - }); tot_sell_amount = sell_amount - tot_cp_amount + send_cost; @@ -1044,13 +1032,6 @@ function calculate_total_amount() $("input[name=item_coupon]").val(tot_cp_amount); $("input[name=od_coupon]").val(0); $("input[name=od_send_coupon]").val(0); - - comm_tax_mny = Math.round((tot_mny + send_cost) / 1.1); - comm_vat_mny = (tot_mny + send_cost) - comm_tax_mny; - $("input[name=comm_tax_mny]").val(comm_tax_mny); - $("input[name=comm_vat_mny]").val(comm_vat_mny); - $("input[name=comm_free_mny]").val(comm_free_mny); - 0) { ?> $("input[name=od_cp_id]").val(""); if($("#od_coupon_cancel").size()) { @@ -1079,7 +1060,7 @@ function calculate_order_amount() var send_cost2 = parseInt($("input[name=od_send_cost2]").val()); var tot_amount = sell_amount + send_cost + send_cost2; - $("input[name=good_mny]").val(tot_amount); + $("form[name=sm_form] input[name=good_mny]").val(tot_amount); $("#od_tot_amount").text(number_format(String(tot_amount))); 0 && $is_member) { ?> calculate_temp_point(); diff --git a/shop/orderform.php b/shop/orderform.php index 72137de31..77ab70312 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -162,6 +162,7 @@ setTimeout("init_pay_button();",300); $comm_tax_mny = 0; // 과세금액 $comm_vat_mny = 0; // 부가세 $comm_free_mny = 0; // 면세금액 + $tot_tax_mny = 0; for ($i=0; $row=mysql_fetch_array($result); $i++) { @@ -207,18 +208,12 @@ setTimeout("init_pay_button();",300); $it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']); } - // 복합과세금액 계산 + // 복합과세금액 if($default['de_tax_flag_use']) { - $tax_mny = $vat_mnt = $free_mny = 0; if($row['it_notax']) { - $free_mny = $sum['price']; - $comm_free_mny += $free_mny; + $comm_free_mny += $sum['price']; } else { - $tax_mny = round((int)$sum['price'] / 1.1); - $vat_mny = (int)$sum['price'] - $tax_mny; - - $comm_tax_mny += $tax_mny; - $comm_vat_mny += $vat_mny; + $tot_tax_mny += $sum['price']; } } @@ -297,13 +292,10 @@ setTimeout("init_pay_button();",300); } } - // 배송비 복합과세처리 - if($default['de_tax_flag_use'] && $send_cost > 0) { - $send_tax = round((int)$send_cost / 1.1); - $send_vat = (int)$send_cost - $send_tax; - - $comm_tax_mny += $send_tax; - $comm_vat_mny += $send_vat; + // 복합과세처리 + if($default['de_tax_flag_use']) { + $comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1); + $comm_vat_mnt = ($tot_tax_mny + $send_cost) - $comm_tax_mny; } ?> @@ -1222,14 +1214,6 @@ function calculate_total_amount() cp_amount = parseInt($cp_amt.eq(index).val()); sell_amount += it_amount; tot_cp_amount += cp_amount; - - it_notax = $("input[name^=it_notax]").eq(index).val(); - if(it_notax == "1") { - comm_free_mny += (it_amount - cp_amount); - } else { - tot_mny += (it_amount - cp_amount); - } - }); tot_sell_amount = sell_amount - tot_cp_amount + send_cost; @@ -1243,13 +1227,6 @@ function calculate_total_amount() $("input[name=item_coupon]").val(tot_cp_amount); $("input[name=od_coupon]").val(0); $("input[name=od_send_coupon]").val(0); - - comm_tax_mny = Math.round((tot_mny + send_cost) / 1.1); - comm_vat_mny = (tot_mny + send_cost) - comm_tax_mny; - $("input[name=comm_tax_mny]").val(comm_tax_mny); - $("input[name=comm_vat_mny]").val(comm_vat_mny); - $("input[name=comm_free_mny]").val(comm_free_mny); - 0) { ?> $("input[name=od_cp_id]").val(""); if($("#od_coupon_cancel").size()) { diff --git a/shop/orderinquirycancel.php b/shop/orderinquirycancel.php index ae2017881..6d141bd7c 100644 --- a/shop/orderinquirycancel.php +++ b/shop/orderinquirycancel.php @@ -27,7 +27,7 @@ sql_query(" update {$g4['shop_cart_table']} set ct_status = '취소' where uq_id // 주문 취소 $cancel_memo = addslashes($cancel_memo); //sql_query(" update $g4[shop_order_table] set od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - {$g4['time_ymdhis']} (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' "); -sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' "); +sql_query(" update {$g4['shop_order_table']} set od_send_cost = '0', od_send_cost2 = '0', od_temp_point = '0', od_receipt_point = '0', od_shop_memo = concat(od_shop_memo,\"\\n주문자 본인 직접 취소 - ".G4_TIME_YMDHIS." (취소이유 : {$cancel_memo})\") where uq_id = '$uq_id' "); // 주문취소 회원의 포인트를 되돌려 줌 if ($od['od_receipt_point'] > 0) {