고수님, 도와주세요..plese~ 정보
고수님, 도와주세요..plese~본문
다른 거 소스를 복사해서 만들려고 하는데 머가먼지 도통 안되네요..견적계산을 하면 엉뚱한 값이 나오구여,,원래 일본물건 견적계산을 하는건데..엔화로 세팅된거를 중국위안화로 바꾸려고요,,엔화는 13.7원인가 하구요.,,중국은 195원이에요 195로 바꾸려는데 어디를 바꿔야 하는지 좀 고쳐주시면 고맙겠습니다...
<!-- 새페이지의 빈페이지 처리부분 -->
<html>
<head>
<title>견적계산기</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language='javascript' src='../JScript/common.js'></script>
<script language="JavaScript">
<!--
function commaNum(num) {
if (num < 0) { num *= -1; var minus = true}
else var minus = false
var dotPos = (num+"").split(".")
var dotU = dotPos[0]
var dotD = dotPos[1]
var commaFlag = dotU.length%3
if(commaFlag) {
var out = dotU.substring(0, commaFlag)
if (dotU.length > 3) out += ","
}
else var out = ""
for (var i=commaFlag; i < dotU.length; i+=3) {
out += dotU.substring(i, i+3)
if( i < dotU.length-3) out += ","
}
if(minus) out = "-" + out
if(dotD) return out + "." + dotD
else return out
}
function CalC()
{
var t_bidpay;
var t_gpcom;
var t_weight;
var t_totalp;
var check = 0;
var obj = document.formp;
if(document.formp.bidaucl.value == "") {
alert("상품가격을 입력하세요.");
document.formp.bidaucl.focus();
return false;
}
if(document.formp.delip.value == "") {
alert("중국내 운송료를 입력하세요.");
document.formp.delip.focus();
return false;
}
if(document.formp.tex.value == "") {
alert("송금수수료를 0으로 입력하세요.");
document.formp.tex.focus();
return false;
}
// 전체 금액을 더한다.
t_bprice = ((parseFloat(document.formp.bidaucl.value) * document.formp.kind_cnt.value) + parseFloat(document.formp.delip.value) + parseFloat(document.formp.tex.value));
var T=Number('1e'+1);
// 구매대금
document.formp.bprice.value = Math.round(parseFloat(t_bprice) * parseFloat(document.formp.won.value) * T)/T;
document.formp.bprice.value = Math.floor(document.formp.bprice.value);
if(document.formp.weight.value > document.formp.w_t.value){
r_weight = document.formp.weight.value;
}else{
r_weight = document.formp.w_t.value;
}
// EMS 운송료
var a_ems;
if(r_weight <= 0)a_ems = 0;
if(r_weight > 0 && r_weight <= 0.3)a_ems = 900;
if(r_weight > 0.3 && r_weight <= 0.5)a_ems = 1100;
if(r_weight > 0.5 && r_weight <= 0.6)a_ems = 1240;
if(r_weight > 0.6 && r_weight <= 0.7)a_ems = 1380;
if(r_weight > 0.7 && r_weight <= 0.8)a_ems = 1520;
if(r_weight > 0.8 && r_weight <= 0.9)a_ems = 1660;
if(r_weight > 0.9 && r_weight <= 1)a_ems = 1800;
if(r_weight > 1 && r_weight <= 1.25)a_ems = 2100;
if(r_weight > 1.25 && r_weight <= 1.5)a_ems = 2400;
if(r_weight > 1.5 && r_weight <= 1.75)a_ems = 2700;
if(r_weight > 1.75 && r_weight <= 2)a_ems = 3000;
if(r_weight > 2 && r_weight <= 2.5)a_ems = 3500;
if(r_weight > 2.5 && r_weight <= 3)a_ems = 4000;
if(r_weight > 3 && r_weight <= 3.5)a_ems = 4500;
if(r_weight > 3.5 && r_weight <= 4)a_ems = 5000;
if(r_weight > 4 && r_weight <= 4.5)a_ems = 5500;
if(r_weight > 4.5 && r_weight <= 5)a_ems = 6000;
if(r_weight > 5 && r_weight <= 5.5)a_ems = 6500;
if(r_weight > 5.5 && r_weight <= 6)a_ems = 7000;
if(r_weight > 6 && r_weight <= 7)a_ems = 7800;
if(r_weight > 7 && r_weight <= 8)a_ems = 8600;
if(r_weight > 8 && r_weight <= 9)a_ems = 9400;
if(r_weight > 9 && r_weight <= 10)a_ems = 10200;
if(r_weight > 10 && r_weight <= 11)a_ems = 11000;
if(r_weight > 11 && r_weight <= 12)a_ems = 11800;
if(r_weight > 12 && r_weight <= 13)a_ems = 12600;
if(r_weight > 13 && r_weight <= 14)a_ems = 13400;
if(r_weight > 14 && r_weight <= 15)a_ems = 14200;
if(r_weight > 15 && r_weight <= 16)a_ems = 15000;
if(r_weight > 16 && r_weight <= 17)a_ems = 15800;
if(r_weight > 17 && r_weight <= 18)a_ems = 16600;
if(r_weight > 18 && r_weight <= 19)a_ems = 17400;
if(r_weight > 19 && r_weight <= 20)a_ems = 18200;
if(r_weight > 20 && r_weight <= 21)a_ems = 19000;
if(r_weight > 21 && r_weight <= 22)a_ems = 19800;
if(r_weight > 22 && r_weight <= 23)a_ems = 20600;
if(r_weight > 23 && r_weight <= 24)a_ems = 21400;
if(r_weight > 24 && r_weight <= 25)a_ems = 22200;
if(r_weight > 25 && r_weight <= 26)a_ems = 23000;
if(r_weight > 26 && r_weight <= 27)a_ems = 23800;
if(r_weight > 27 && r_weight <= 28)a_ems = 24600;
if(r_weight > 28 && r_weight <= 29)a_ems = 25400;
if(r_weight > 29 && r_weight <= 30)a_ems = 26200;
if(r_weight > 30)a_ems = 800 * ((Math.ceil(r_weight)) - 30) + 26200;
var ems = Math.round(a_ems * parseFloat(document.formp.won.value) * T)/T;
document.formp.gkdel.value = ems;
// 코코디수수료 구하기 위한 기본 값
var tm_gprice = (parseInt(t_bprice) + parseInt(r_weight)) * document.formp.won.value;
if(document.formp.bidaucl.value <= 5000) var tmm_gprice = 800;
if(document.formp.bidaucl.value > 5000 && document.formp.bidaucl.value < 10000) var tmm_gprice = 900;
if(document.formp.bidaucl.value >= 10000 && document.formp.bidaucl.value < 50000) var tmm_gprice = document.formp.bidaucl.value * 0.09;
if(document.formp.bidaucl.value >= 50000 && document.formp.bidaucl.value < 100000) var tmm_gprice = 4500;
if(document.formp.bidaucl.value >= 100000) var tmm_gprice = document.formp.bidaucl.value * 0.05;;
var t_gprice = Math.floor(tmm_gprice + (tm_gprice * 0.05));
// 실질적인 코코디수수료
var t_gprice = Math.floor((tmm_gprice * parseFloat(document.formp.won.value)) * T)/T;
//수수료1 + 구매대금의 5% = 수수료
// 실질적인 코코디수수료
var t_gprice = Math.floor((t_gprice * (document.formp.level.value * 0.01))*T)/T;
// 수수료 x 수수료율(%)
document.formp.gpcom.value = t_gprice;
// 예상세금
if(document.formp.intex.value == -1){
var t_tax = 0; var t_tax_bu = 0;
}else{
var t_tax = Math.floor(parseInt(document.formp.intex.value) * 0.01 * (parseInt(document.formp.bprice.value) + parseInt(ems)));
var t_tax_bu = Math.floor(0.1 * (parseInt(document.formp.bprice.value) + parseInt(ems) + parseInt(t_tax)));
}
// if(tm_gprice+a_ems >= 150000){
// t_totalp = parseFloat(document.formp.bprice.value) + parseFloat(ems) + parseFloat(t_gprice) + parseFloat(t_tax)+ parseFloat(t_tax_bu);
// }
// if(tm_gprice+a_ems < 150000) {
// t_tax = 0; t_tax_bu = 0;
t_totalp = parseFloat(document.formp.bprice.value) + parseFloat(ems) + parseFloat(t_gprice);
// }
document.formp.totalp.value = Math.floor(t_totalp / 100) * 100;
document.formp.gtcom.value = t_tax;
document.formp.gvcom.value = t_tax_bu;
// 결과출력
document.all('d_totalp').innerHTML= commaNum(parseFloat(document.formp.bprice.value) + parseFloat(document.formp.apcum.value) + parseFloat(document.formp.gkdel.value) + parseInt(document.formp.gpcom.value));
document.all('d_totalp_d').innerHTML= commaNum(parseFloat(document.formp.gtcom.value) + parseFloat(document.formp.gvcom.value));
document.all('d_totalp_a').innerHTML= commaNum(parseFloat(document.formp.totalp.value) + parseFloat(document.formp.gtcom.value) + parseFloat(document.formp.gvcom.value));
obj1 = document.getElementById('tax');
obj2 = document.getElementById('p_won');
if(obj2.style.display == 'inline'){
}else{
obj2.style.display = 'inline';
obj1.style.display = 'none';
}
}
function help(cont) {
document.all('help_t').innerHTML= cont;
document.all('help_d').innerHTML= cont;
document.all('help_i').innerHTML= cont;
document.all('help_x').innerHTML= cont;
}
function Del(){
document.formp.bidaucl.value = "";
document.formp.delip.value = "";
document.formp.insul.value = "";
document.formp.tex.value = "";
obj1 = document.getElementById('tax');
obj2 = document.getElementById('p_won');
if(obj2.style.display == 'inline'){
obj1.style.display = 'inline';
obj2.style.display = 'none';
}else{
}
document.formp.bidaucl.focus();
}
function p_weight(aa) {
if(aa == '1'){document.formp.w_x.value = "";}
if(aa == '2'){document.formp.w_y.value = "";}
if(aa == '3'){document.formp.w_z.value = "";}
}
function x_weight(aa) {
if(aa == '1'){document.formp.i_x.value = "";}
if(aa == '2'){document.formp.i_y.value = "";}
if(aa == '3'){document.formp.i_z.value = "";}
}
function c_wei() {
if(document.formp.w_x.value != "" && document.formp.w_y.value != "" && document.formp.w_z.value != ""){
document.formp.w_t.value = parseFloat(document.formp.w_x.value) * parseFloat(document.formp.w_y.value) * parseFloat(document.formp.w_z.value) / 6000;
}
}
function i_wei() {
if(document.formp.i_x.value != "" && document.formp.i_y.value != "" && document.formp.i_z.value != ""){
var hap2 = parseFloat(document.formp.i_x.value * 2.54) * parseFloat(document.formp.i_y.value * 2.54) * parseFloat(document.formp.i_z.value * 2.54) / 6000;
document.formp.i_t.value = (Math.round(hap2*100))/100;
}
}
//-->
</script>
</head>
<body onload="Visi('');">
<form action="" name=formp method=post>
<input type=hidden name="won" value="13.7">
<input type=hidden name="bprice" value="0">
<input type=hidden name="apcum" value="0">
<input type=hidden name="gpcom" value="0">
<input type=hidden name="gtcom" value="0">
<input type=hidden name="gvcom" value="0">
<input type=hidden name="gkdel" value="0">
<input type=hidden name="totalp" value="0">
<input type=hidden name="cal_kind" value="1">
<table width="550" height="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign=top align="center">
<td width="550">
<table width="533" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td colspan="3"><img src="/web/upload/cal.gif" border="0"></td>
</tr>
<tr>
<map name="calcu">
<area shape="rect" coords="25,5,170,30" href="../help/calbiz_us.php?kind=1">
<area shape="rect" coords="190,5,335,30" href="../help/calbiz_jp.php">
</map>
</tr>
<tr>
<td height=5>
</td>
</tr>
<tr>
<td colspan=3 valign=top>
<table bgcolor="#fadadf" width="530" align=center>
<tr>
<td>
<table align=center width="520" border="1" bordercolordark="#ffffff" bordercolorlight="#efa1a1" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="85" bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">회원등급</td>
<td style="font-weight:bold;font-size:13;padding-left:10px">
<select name="level" class="searchbox01">
<option value="1">일반</option>
<option value="2">실버</option>
<option value="3">골드</option>
<option value="4">에메랄드</option>
<option value="5">루비</option>
<option value="6">다이아몬드</option>
</select>
</td>
<td width=110 bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">적용환율</td>
<td width=135 style="font-size:13;padding-left:10px"><input type="text" class="box" readonly style='width:80px;text-align:right' maxlength="4" value="1¥ = 195원"> </td>
</tr>
<tr>
<td colspan=4 width=100% height=1 bgcolor=efa1a1>
</td>
</tr>
<tr>
<td width=90 bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">상품가격</td>
<td width=145 style="font-size:13;padding-left:10px">
<input name="bidaucl" type="text" class="box" style='width:60px' maxlength="4">
<span id="help_t"> 위안</span>
</td>
<td width=70 height="26" bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px">수량</td>
<td width=145 height="26" style="font-size:13;padding-left:10px">
<select name="kind_cnt" class="searchbox01">
<option value="1">1 </option>
<option value="2">2 </option>
<option value="3">3 </option>
<option value="4">4 </option>
<option value="5">5 </option>
<option value="6">6 </option>
<option value="7">7 </option>
<option value="8">8 </option>
<option value="9">9 </option>
<option value="10">10 </option>
</select>
개
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td height=5>
</td>
</tr>
</table>
<table align=center width="520" border="1" bordercolordark="#ffffff" bordercolorlight="#efa1a1" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width=85 bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">현지배송비</td>
<td width=130 style="font-size:13;padding-left:10px">
<input name="delip" type="text" class="box" style='width:50px' maxlength="4">
<span id="help_d">위안</span> <!-- 현지배송비 -->
</td>
<td width=100 height="26" bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px">100%안심보험</td>
<td width=140 style="font-size:13;padding-left:10px">
<input type="radio" name="bidpay2" value="1" checked>
가입
<input type="radio" name="bidpay2" value="2">
미가입
</td>
</tr>
<tr>
<td colspan=4 width=100% height=1 bgcolor=efa1a1>
</td>
</tr>
<tr>
<td width=90 bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">송금수수료</td>
<td colspan=3 width=300 style="font-size:13;padding-left:10px"><input name="tex" type="text" class="box" style='width:50px'><span id="help_i"> 위안(송금수수료는 없으니 0으로 기재)</span></td><!-- 중국내 세금 -->
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td height=5>
</td>
</tr>
</table>
<table align=center width="520" border="1" bordercolordark="#ffffff" bordercolorlight="#efa1a1" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width=95 bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px" rowspan=6>항공1일특송비</td>
<td colspan=2 width=400 style="font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">
(예상)실측무게
<input name="weight" class=box size=10>Kg
</td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=efa1a1>
</td>
</tr>
<tr>
<td rowspan=2 height=50 style="font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">부피무게</td>
<td>
<input name=w_x class=box size=3 value="가로" onclick="p_weight('1');">cm X <input name=w_y class=box size=3 value="세로" onclick="p_weight('2');">cm X <input name=w_z class=box size=3 value="높이" onclick="p_weight('3');" onkeyup="c_wei();">cm = <input readonly name=w_t class=box size=5>Kg
</td>
</tr>
<tr>
<td>
<input name=i_x class=box size=3 value="가로" onclick="x_weight('1');">Inch X <input name=i_y class=box size=3 value="세로" onclick="x_weight('2');">Inch X <input name=i_z class=box size=3 value="높이" onclick="x_weight('3');" onkeyup="i_wei();">Inch = <input readonly name=i_t class=box size=5>Kg
</td>
</tr>
<span id=t_w style="display:none">
<tr>
<td colspan=2 height=1 bgcolor=efa1a1>
</td>
</tr>
<tr>
<td colspan=2 width=400 style="font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">
적용무게
<input name="t_weight" class=box size=10 readonly>Kg <font color="#3ab54a">※실측,부피 중 큰 값으로 적용</font>
</td>
</tr>
</span>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td height=5>
</td>
</tr>
</table>
<table id=tax align=center width="520" border="1" bordercolordark="#ffffff" bordercolorlight="#efa1a1" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#FFFFFF">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan=3 width=95 bgcolor="#fadadf" style="font-weight:bold;font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">관세</td>
<td width=380 style="font-size:13;padding-left:20px;padding-top:5px;padding-bottom:5px">
예상관세율
<select name="intex" class="searchbox01">
<option value="36">36 %</option>
<option value="13">13 %</option>
<option value="8">8 %</option>
<option value="5.4">5.4 %</option>
<option value="3.6">3.6 %</option>
<option value="3">3 %</option>
<option value="0" selected>0 %</option>
<option value="-1">무관세</option>
</select>
<span class=small><a href="http://www.customs.go.kr/" border="0" target="new" style="font-weight:bold;color:fd51fd">[관세청 바로가기]</a>
</td>
</tr>
<tr>
<td colspan=2 height=1 bgcolor=efa1a1>
</td>
</tr>
<tr>
<td style="font-size:11;padding-left:20px;padding-top:5px;padding-bottom:5px">
세금발생 기준은 구매대금 + 국제운송료를 기준으로 부과되며<br>
대부분의 물품에는 8%, 의류, 신발의 경우 13%가 적용됩니다.<br>
물품에 따라 더 높은 관세율이 적용될 수 있으며 자세한 사항은<br>
저희 코코디 1:1질문게시판에 문의해 주시기 바랍니다.<br>
깔끔한 통관을 위한 경험과 노하우로 모시겠습니다~~
</td>
</tr>
</table>
</td>
</tr>
</table>
<table id=p_won style="display:none" align=center width="520" border="1" bordercolordark="#ffffff" bordercolorlight="#efa1a1" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#FFFFFF">
<table width=100% border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan=2 align=right>
<img src="/web/upload/calcu5.jpg">
</td>
<td align=right style="font-size:14;color:ff01ff;font-weight:bold">
<span id=d_totalp>0</span>
</td>
<td rowspan=2>
원
</td>
</tr>
<tr>
<Td height=1 bgcolor=a7a7a7>
</td>
</tr>
<tr>
<td rowspan=2 align=right>
<img src="/web/upload/calcu2.jpg">
</td>
<td align=right style="font-size:14;color:444444;font-weight:bold">
<span id=d_totalp_d>0</span>
</td>
<td rowspan=2>
원
</td>
</tr>
<tr>
<Td height=1 bgcolor=a7a7a7>
</td>
</tr>
<tr bgcolor="f26d7e">
<td rowspan=2 height=80 align=right>
<img src="/web/upload/calcu4.jpg">
</td>
<td align=right height=80 style="font-size:25;color:white;font-weight:bold;padding-top:5px;padding-bottom:5px">
<span id=d_totalp_a>0</span>
</td>
<td rowspan=2 style="font-size:14;font-weight:bold;color:ffff01">
원
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=100%>
<tr>
<td align=center>
<img src="/web/upload/acept_bt.jpg" align="absmiddle" style="cursor:hand;" Onclick="CalC();"> <img src="/web/upload/del_bt.jpg" align="absmiddle" style="cursor:hand;" Onclick="Del();">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</body>
</html>
<script language="javascript" src="/front/php/login_js.php"></script>
댓글 전체
아님...ㅋㅋ구찮아서 대충 봤는데..ㅎ
컨트롤 f 13.7찾아서 195로..