From f7be300e7fcc21bcadfdba52376772ac89b9a6e1 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 19 Jun 2013 10:36:17 +0900 Subject: [PATCH] =?UTF-8?q?#235=20=EC=A3=BC=EB=AC=B8=ED=8F=BC=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=B3=B5=ED=95=A9=EA=B3=BC=EC=84=B8=20=EA=B3=84?= =?UTF-8?q?=EC=82=B0=EC=9D=84=20=ED=95=9C=EB=B2=88=EB=A7=8C=20=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/orderform.php | 43 +++++++++++---------------------------- shop/orderform.php | 39 ++++++++--------------------------- 2 files changed, 20 insertions(+), 62 deletions(-) diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index 9461d613f..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()) { 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()) {