관리자님의 온라인견적에서요 부가세 안나오게 하려면 어떻게 하면될까요? 정보
관리자님의 온라인견적에서요 부가세 안나오게 하려면 어떻게 하면될까요?본문
관리자님의 온라인견적에서요 부가세 안나오게 하려면 어떻게 하면될까요?
초보인 저에게는 좀 무리가 있네요
고수님들 가르쳐주세요~
초보인 저에게는 좀 무리가 있네요
고수님들 가르쳐주세요~
댓글 전체
되네요. 오운현님 감사합니다. 항상 좋은하루 되세요~
예상견적 합계 (부가세 포함) => (부가세 포함) 삭제하시구요.
tot = tot + (tot * 0.1);
이부분을 //tot = tot + (tot * 0.1); 주석처리하시면 되겠네요.
즐거운 하루되세요.
tot = tot + (tot * 0.1);
이부분을 //tot = tot + (tot * 0.1); 주석처리하시면 되겠네요.
즐거운 하루되세요.
소스값을 올려봅니다. 한번보시고 부가세 안나오게 하는 방법 좀 가르쳐주세요
이것저것빼봐도 나오네요.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
define("_DOCTYPE_", "DESIGN");
$sub_title = "실시간 예상견적";
$html_title = "쇼핑몰구축 > $sub_title";
function print_checkbox($idx) {
return "<input type='checkbox' name='chk[$idx]' value='$idx' onclick='compute();'>";
}
function print_qty($idx, $hidden='') {
if ($hidden == 'hidden') {
return "<input type='hidden' name='qty[$idx]' value='1'>";
} else {
$s = "<select name='qty[$idx]' onchange='compute();'>";
for ($i=1; $i<=5; $i++) {
$s .= "<option value='$i'>$i";
}
$s .= "</select>";
return $s;
}
}
function print_amount($idx) {
return "<input type=text name='amount[$idx]' size=10 readonly style='text-align:right; border-width:0px;'>";
}
?>
<table width="740" cellpadding=1 cellspacing=1 align=center bgcolor=#FFFFFF>
<form name=fsbestimate>
<colgroup width=100 align=center>
<colgroup width=''>
<colgroup width=60 align=center>
<colgroup width=100 align=right>
<colgroup width=60 align=center>
<tr height=25 align=center>
<td><B>항 목</B></td>
<td><B>내 용</B></td>
<td><B>수 량</B></td>
<td><B>금 액</B> </td>
<td><B>선 택</B></td>
</tr>
<tr><td colspan=5 bgcolor=#ACACAC height=1></td></tr>
<tr>
<td> <FONT COLOR="#599023"><B>솔루션</B></FONT></td>
<td><B>ㆍ</B>영카트 1카피 구입</td>
<td><?=print_qty('100', 'hidden')?>1 COPY</td>
<td><?=print_amount('100')?>원 </td>
<td><?=print_checkbox('100')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td> <FONT COLOR="#599023"><B>메인화면</B></FONT></td>
<td style='line-height:170%'>
<B>ㆍ</B>상단메뉴 , 메인 중앙 이미지<br>
<B>ㆍ</B>로그인+로그아웃<br>
<B>ㆍ</B>상품분류(카테고리)<br>
<B>ㆍ</B>상품검색<br>
<B>ㆍ</B>히트상품, 추천상품, 신규상품, 경매, 공동구매 타이틀 이미지<br>
<B>ㆍ</B>커뮤니티, 이벤트, 장바구니, 온라인투표, 방문자수 타이틀 이미지
</td>
<td><?=print_qty('200', 'hidden')?>-</td>
<td><?=print_amount('200')?>원 </td>
<td><?=print_checkbox('200')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td rowspan="2"> <FONT COLOR="#599023"><B>JPG 배너</B></FONT></td>
<td><B>ㆍ</B>왼쪽 또는 메인우측 배너</td>
<td><?=print_qty('300')?>개</td>
<td><?=print_amount('300')?>원 </td>
<td><?=print_checkbox('300')?></td>
</tr>
<tr>
<td><B>ㆍ</B>스크롤 배너</td>
<td><?=print_qty('310')?>개</td>
<td><?=print_amount('310')?>원 </td>
<td><?=print_checkbox('310')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td rowspan="5"> <FONT COLOR="#599023"><B>플래쉬</B></FONT></td>
<td><B>ㆍ</B>왼쪽 또는 메인우측 배너</td>
<td><?=print_qty('400')?>개</td>
<td><?=print_amount('400')?>원 </td>
<td><?=print_checkbox('400')?></td>
</tr>
<tr>
<td><B>ㆍ</B>스크롤 배너</td>
<td><?=print_qty('410')?>개</td>
<td><?=print_amount('410')?>원 </td>
<td><?=print_checkbox('410')?></td>
</tr>
<tr>
<td><B>ㆍ</B>메인 중앙 이미지</td>
<td><?=print_qty('420', 'hidden')?>-</td>
<td><?=print_amount('420')?>원 </td>
<td><?=print_checkbox('420')?></td>
</tr>
<tr>
<td><B>ㆍ</B>상품분류(카테고리)</td>
<td><?=print_qty('430', 'hidden')?>-</td>
<td><?=print_amount('430')?>원 </td>
<td><?=print_checkbox('430')?></td>
</tr>
<tr>
<td><B>ㆍ</B>상단 메뉴</td>
<td><?=print_qty('440', 'hidden')?>-</td>
<td><?=print_amount('440')?>원 </td>
<td><?=print_checkbox('440')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td rowspan="5"> <FONT COLOR="#599023"><B>페이지</B></FONT></td>
<td><B>ㆍ</B>마이페이지</td>
<td><?=print_qty('500', 'hidden')?>-</td>
<td><?=print_amount('500')?>원 </td>
<td><?=print_checkbox('500')?></td>
</tr>
<tr>
<td><B>ㆍ</B>회사소개</td>
<td><?=print_qty('510', 'hidden')?>-</td>
<td><?=print_amount('510')?>원 </td>
<td><?=print_checkbox('510')?></td>
</tr>
<tr>
<td><B>ㆍ</B>약도</td>
<td><?=print_qty('520', 'hidden')?>-</td>
<td><?=print_amount('520')?>원 </td>
<td><?=print_checkbox('520')?></td>
</tr>
<tr>
<td><B>ㆍ</B>팝업창</td>
<td><?=print_qty('530')?>개</td>
<td><?=print_amount('530')?>원 </td>
<td><?=print_checkbox('530')?></td>
</tr>
<tr>
<td><B>ㆍ</B>개별페이지</td>
<td><?=print_qty('540')?>개</td>
<td><?=print_amount('540')?>원 </td>
<td><?=print_checkbox('540')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td> <FONT COLOR="#599023"><B>전체</B></FONT></td>
<td><B>ㆍ</B>상단 이미지 변경</td>
<td><?=print_qty('600', 'hidden')?>-</td>
<td><?=print_amount('600')?>원 </td>
<td><?=print_checkbox('600')?></td>
</tr>
<tr><td colspan=5 bgcolor=#ACACAC height=2></td></tr>
<tr>
<td colspan="3" align=right height=35>예상견적 합계 (부가세 포함) </td>
<td align=center colspan=2><input type="text" name="tot_amount" size="10" style='text-align:right; border-width:0px;'> 원 이상</td>
</tr>
</form>
</table>
<script>
var money = new Array();
money[100] = 300000; // 영카트
money[200] = 300000; // 메인화면
money[300] = 20000; // JPG 배너 : 왼쪽 또는 메인우측 배너
money[310] = 30000; // 스크롤 배너
money[400] = 30000; // 플래쉬 : 왼쪽 또는 메인우측 배너
money[410] = 50000; // : 스크롤 배너
money[420] = 50000; // : 메인 중앙 이미지
money[430] = 50000; // : 상품분류(카테고리)
money[440] = 50000; // : 상단 메뉴
money[500] = 70000; // 페이지 : 마이페이지
money[510] = 30000; // : 회사소개
money[520] = 30000; // : 약도
money[530] = 40000; // : 팝업창
money[540] = 50000; // : 개별페이지
money[600] = 300000; // 전체 : 상단 이미지 변경
function compute()
{
var f = document.fsbestimate;
var idx = null;
var amt = null;
var tot = 0;
for (i=0; i<f.elements.length; i++) {
if (f.elements[i].type == "checkbox") {
idx = f.elements[i].value;
if (f.elements[i].checked) {
amt = parseInt(f.elements("qty["+idx+"]").value) * money[idx];
} else {
amt = 0;
}
f.elements("amount["+idx+"]").value = number_format(amt.toString());
tot += amt;
}
}
tot = tot + (tot * 0.1);
f.tot_amount.value = number_format(tot.toString());
}
document.fsbestimate.elements("chk[100]").checked = true;
compute();
</script>
이것저것빼봐도 나오네요.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
define("_DOCTYPE_", "DESIGN");
$sub_title = "실시간 예상견적";
$html_title = "쇼핑몰구축 > $sub_title";
function print_checkbox($idx) {
return "<input type='checkbox' name='chk[$idx]' value='$idx' onclick='compute();'>";
}
function print_qty($idx, $hidden='') {
if ($hidden == 'hidden') {
return "<input type='hidden' name='qty[$idx]' value='1'>";
} else {
$s = "<select name='qty[$idx]' onchange='compute();'>";
for ($i=1; $i<=5; $i++) {
$s .= "<option value='$i'>$i";
}
$s .= "</select>";
return $s;
}
}
function print_amount($idx) {
return "<input type=text name='amount[$idx]' size=10 readonly style='text-align:right; border-width:0px;'>";
}
?>
<table width="740" cellpadding=1 cellspacing=1 align=center bgcolor=#FFFFFF>
<form name=fsbestimate>
<colgroup width=100 align=center>
<colgroup width=''>
<colgroup width=60 align=center>
<colgroup width=100 align=right>
<colgroup width=60 align=center>
<tr height=25 align=center>
<td><B>항 목</B></td>
<td><B>내 용</B></td>
<td><B>수 량</B></td>
<td><B>금 액</B> </td>
<td><B>선 택</B></td>
</tr>
<tr><td colspan=5 bgcolor=#ACACAC height=1></td></tr>
<tr>
<td> <FONT COLOR="#599023"><B>솔루션</B></FONT></td>
<td><B>ㆍ</B>영카트 1카피 구입</td>
<td><?=print_qty('100', 'hidden')?>1 COPY</td>
<td><?=print_amount('100')?>원 </td>
<td><?=print_checkbox('100')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td> <FONT COLOR="#599023"><B>메인화면</B></FONT></td>
<td style='line-height:170%'>
<B>ㆍ</B>상단메뉴 , 메인 중앙 이미지<br>
<B>ㆍ</B>로그인+로그아웃<br>
<B>ㆍ</B>상품분류(카테고리)<br>
<B>ㆍ</B>상품검색<br>
<B>ㆍ</B>히트상품, 추천상품, 신규상품, 경매, 공동구매 타이틀 이미지<br>
<B>ㆍ</B>커뮤니티, 이벤트, 장바구니, 온라인투표, 방문자수 타이틀 이미지
</td>
<td><?=print_qty('200', 'hidden')?>-</td>
<td><?=print_amount('200')?>원 </td>
<td><?=print_checkbox('200')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td rowspan="2"> <FONT COLOR="#599023"><B>JPG 배너</B></FONT></td>
<td><B>ㆍ</B>왼쪽 또는 메인우측 배너</td>
<td><?=print_qty('300')?>개</td>
<td><?=print_amount('300')?>원 </td>
<td><?=print_checkbox('300')?></td>
</tr>
<tr>
<td><B>ㆍ</B>스크롤 배너</td>
<td><?=print_qty('310')?>개</td>
<td><?=print_amount('310')?>원 </td>
<td><?=print_checkbox('310')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td rowspan="5"> <FONT COLOR="#599023"><B>플래쉬</B></FONT></td>
<td><B>ㆍ</B>왼쪽 또는 메인우측 배너</td>
<td><?=print_qty('400')?>개</td>
<td><?=print_amount('400')?>원 </td>
<td><?=print_checkbox('400')?></td>
</tr>
<tr>
<td><B>ㆍ</B>스크롤 배너</td>
<td><?=print_qty('410')?>개</td>
<td><?=print_amount('410')?>원 </td>
<td><?=print_checkbox('410')?></td>
</tr>
<tr>
<td><B>ㆍ</B>메인 중앙 이미지</td>
<td><?=print_qty('420', 'hidden')?>-</td>
<td><?=print_amount('420')?>원 </td>
<td><?=print_checkbox('420')?></td>
</tr>
<tr>
<td><B>ㆍ</B>상품분류(카테고리)</td>
<td><?=print_qty('430', 'hidden')?>-</td>
<td><?=print_amount('430')?>원 </td>
<td><?=print_checkbox('430')?></td>
</tr>
<tr>
<td><B>ㆍ</B>상단 메뉴</td>
<td><?=print_qty('440', 'hidden')?>-</td>
<td><?=print_amount('440')?>원 </td>
<td><?=print_checkbox('440')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td rowspan="5"> <FONT COLOR="#599023"><B>페이지</B></FONT></td>
<td><B>ㆍ</B>마이페이지</td>
<td><?=print_qty('500', 'hidden')?>-</td>
<td><?=print_amount('500')?>원 </td>
<td><?=print_checkbox('500')?></td>
</tr>
<tr>
<td><B>ㆍ</B>회사소개</td>
<td><?=print_qty('510', 'hidden')?>-</td>
<td><?=print_amount('510')?>원 </td>
<td><?=print_checkbox('510')?></td>
</tr>
<tr>
<td><B>ㆍ</B>약도</td>
<td><?=print_qty('520', 'hidden')?>-</td>
<td><?=print_amount('520')?>원 </td>
<td><?=print_checkbox('520')?></td>
</tr>
<tr>
<td><B>ㆍ</B>팝업창</td>
<td><?=print_qty('530')?>개</td>
<td><?=print_amount('530')?>원 </td>
<td><?=print_checkbox('530')?></td>
</tr>
<tr>
<td><B>ㆍ</B>개별페이지</td>
<td><?=print_qty('540')?>개</td>
<td><?=print_amount('540')?>원 </td>
<td><?=print_checkbox('540')?></td>
</tr>
<tr><td colspan=5 bgcolor=#DADADA height=1></td></tr>
<tr>
<td> <FONT COLOR="#599023"><B>전체</B></FONT></td>
<td><B>ㆍ</B>상단 이미지 변경</td>
<td><?=print_qty('600', 'hidden')?>-</td>
<td><?=print_amount('600')?>원 </td>
<td><?=print_checkbox('600')?></td>
</tr>
<tr><td colspan=5 bgcolor=#ACACAC height=2></td></tr>
<tr>
<td colspan="3" align=right height=35>예상견적 합계 (부가세 포함) </td>
<td align=center colspan=2><input type="text" name="tot_amount" size="10" style='text-align:right; border-width:0px;'> 원 이상</td>
</tr>
</form>
</table>
<script>
var money = new Array();
money[100] = 300000; // 영카트
money[200] = 300000; // 메인화면
money[300] = 20000; // JPG 배너 : 왼쪽 또는 메인우측 배너
money[310] = 30000; // 스크롤 배너
money[400] = 30000; // 플래쉬 : 왼쪽 또는 메인우측 배너
money[410] = 50000; // : 스크롤 배너
money[420] = 50000; // : 메인 중앙 이미지
money[430] = 50000; // : 상품분류(카테고리)
money[440] = 50000; // : 상단 메뉴
money[500] = 70000; // 페이지 : 마이페이지
money[510] = 30000; // : 회사소개
money[520] = 30000; // : 약도
money[530] = 40000; // : 팝업창
money[540] = 50000; // : 개별페이지
money[600] = 300000; // 전체 : 상단 이미지 변경
function compute()
{
var f = document.fsbestimate;
var idx = null;
var amt = null;
var tot = 0;
for (i=0; i<f.elements.length; i++) {
if (f.elements[i].type == "checkbox") {
idx = f.elements[i].value;
if (f.elements[i].checked) {
amt = parseInt(f.elements("qty["+idx+"]").value) * money[idx];
} else {
amt = 0;
}
f.elements("amount["+idx+"]").value = number_format(amt.toString());
tot += amt;
}
}
tot = tot + (tot * 0.1);
f.tot_amount.value = number_format(tot.toString());
}
document.fsbestimate.elements("chk[100]").checked = true;
compute();
</script>
부가세 변수값을 찾아서 불러들이는걸 빼버리면 부가세가 안나오겠죠..
물론 text도 부가세라는 말또한 지우셔야 하겠죠.. 더 자세히 알고 싶으시면 소스를 올려주시는게 제일 좋아요..^^
그럼..
물론 text도 부가세라는 말또한 지우셔야 하겠죠.. 더 자세히 알고 싶으시면 소스를 올려주시는게 제일 좋아요..^^
그럼..