OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

Permit Fee Calculator

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Permit Fee Calculator
Page: [1]
 
 
mwackers

 

Posts: 8
Joined: 2/11/2009
Status: offline

 
Permit Fee Calculator - 2/27/2009 15:49:01   


I am working on a permit fee calculator, but I'm having difficulty translating the fee structure to a calculation.

The fee for this building permit is based on 1,000's of square feet.

- First 1,000 square feet is $100 flat fee.
- Each 1,000 square feet from 1,000 sqft. to 30,000 sqft. is $10 per 1,000 sqft.
- Each 1,000 square feet over 30,000 sqft. is $1 per 1,000 sqft.
- $30 State Tax

My problem is that I don't know how to scale an equation in this fashion. The I have returns a result
of $145.67 for a 2,567 sqft. building.

The answer should be $150.



http://www.middletownplanning.com/Calculators/calculator_spr_nonres_fee.asp




<%@ Language=VBSCRIPT %>
<% Option Explicit %>

<%
'Read in the form field variables
Dim isprbuilding_sqft
isprbuilding_sqft = Request.Form("isprbuilding_sqft")

Dim isprcom_fee
If isprbuilding_sqft < 1000 Then
isprcom_fee = 130
End If
If (isprbuilding_sqft >= 1000) AND (isprbuilding_sqft < 30000) Then
isprcom_fee = 130 + ((Int((isprbuilding_sqft - 1000)) / 1000) * 10)
End If
If (isprbuilding_sqft >= 30000) Then
isprcom_fee = 130 + ((Int((isprbuilding_sqft - 1000) / 1000)) * 10) + ((Int((isprbuilding_sqft - 30000) / 1000)) * 2)
End If

%>


<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<img border="0" src="http://www.middletownplanning.com/images/MiddletownBanner_blue_copy.jpg" ALT="topbar" USEMAP="#topbar" width="700" height="140">
<p><font face="Arial" size="1"><i>The following calculator is provided as a
resource. <BR>Any results it provides may not be accurate for a number of reasons.<br>
To get an accurate fee calculation contact the City of
Middletown's Department of Planning Conservation and Development.</i></font></p>

<form method="POST" action="http://www.middletownplanning.com/Calculators/calculator_spr_nonres_fee.asp">
<p>
<b><font face="Arial">Site Plan Review Fee Calculator - Non Residential Project</font></b></p>
<p><font size="2" face="Arial">Square feet of building </font>
<font face="Arial"> <input type="text" name="isprbuilding_sqft" size="20"></font></p>
<p>
<font face="Arial">
<B> <font size="2">$<%=isprcom_fee%></font></B><font size="2"> is the fee for a Non-residential Site Plan Review Permit involving a <%=isprbuilding_sqft%> sq.ft. building.
</font></font>
</p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>


</body>

</html>
BeTheBall

 

Posts: 6502
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Permit Fee Calculator - 2/28/2009 16:15:41   
I just rebuilt my PC so don't have my server up and running to be able to test this, but see if the following works:

<%@ Language=VBSCRIPT %>
<% Option Explicit %>

<%
'Read in the form field variables
Dim isprbuilding_sqft
isprbuilding_sqft = Request.Form("isprbuilding_sqft")

Function multiplier(n)
If n mod 1000 > 0 Then
x = (Int(n/1000)+1)
Else
x = n
End If
multiplier = x
End Function

If isprbuilding_sqft < 1000 Then
isprcom_fee = 130
Else if
multiplier(isprbuilding_sqft) > 1 AND multiplier(isprbuilding_sqft) < 30 Then
isprcom_fee = 130 + ((multiplier(isprbuilding_sqft) - 1) * 10)
Else
isprcom_fee = 420 + ((multiplier(isprbuilding_sqft) - 30) * 2)
End If
%>


<html>
etc.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to mwackers)
TexasWebDevelopers

 

Posts: 761
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Permit Fee Calculator - 2/28/2009 18:14:19   
That's a nice solution, Duane.

_____________________________

:)

Follow us on TWITTER

(in reply to BeTheBall)
BeTheBall

 

Posts: 6502
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Permit Fee Calculator - 2/28/2009 19:31:13   
Only if it works. :)

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to TexasWebDevelopers)
mwackers

 

Posts: 8
Joined: 2/11/2009
Status: offline

 
RE: Permit Fee Calculator - 3/2/2009 9:40:01   
I did try and unfortunately I maynot done it right.

I see what your doing though.


http://www.middletownplanning.com/Calculators/calculator_spr_nonres_fee.asp


<%@ Language=VBSCRIPT %>
<% Option Explicit %>

<%
'Read in the form field variables
Dim isprbuilding_sqft
isprbuilding_sqft = Request.Form("isprbuilding_sqft")

Function multiplier(n)
If n mod 1000 > 0 Then
x = (Int(n/1000)+1)
Else
x = n
End If
multiplier = x
End Function

Dim isprcom_fee
If isprbuilding_sqft < 1000 Then
isprcom_fee = 130
Else if
multiplier(isprbuilding_sqft) > 1 AND multiplier(isprbuilding_sqft) < 30 Then
isprcom_fee = 130 + ((multiplier(isprbuilding_sqft) - 1) * 10)
Else
isprcom_fee = 420 + ((multiplier(isprbuilding_sqft) - 30) * 2)
End If
%>



<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<img border="0" src="http://www.middletownplanning.com/images/MiddletownBanner_blue_copy.jpg" ALT="topbar" USEMAP="#topbar" width="700" height="140">
<p><font face="Arial" size="1"><i>The following calculator is provided as a
resource. <BR>Any results it provides may not be accurate for a number of reasons.<br>
To get an accurate fee calculation contact the City of
Middletown's Department of Planning Conservation and Development.</i></font></p>

<form method="POST" action="http://www.middletownplanning.com/Calculators/calculator_spr_nonres_fee.asp">
<p>
<b><font face="Arial">Site Plan Review Fee Calculator - Non Residential Project</font></b></p>
<p><font size="2" face="Arial">Square feet of building </font>
<font face="Arial"> <input type="text" name="isprbuilding_sqft" size="20"></font></p>
<p>
<font face="Arial">
<B> <font size="2">$<%=isprcom_fee%></font></B><font size="2"> is the fee for a Non-residential Site Plan Review Permit involving a <%=isprbuilding_sqft%> sq.ft. building.
</font></font>
</p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>


</body>

</html>

(in reply to mwackers)
BeTheBall

 

Posts: 6502
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Permit Fee Calculator - 3/2/2009 10:16:04   
Try this version. I tested on a few numbers and it seems to work.

<%
'Read in the form field variables
Dim isprbuilding_sqft
isprbuilding_sqft = Request.Form("isprbuilding_sqft") 

Function getFee(n)
a = 130
if n mod 1000 > 0 Then
x = Int(n/1000)+1
else
x = n/1000
end if
if n > 30000 Then
b = 290
c = (x-30) * 2
elseif n > 1000 Then
b = (x-1) * 10
c=0
else
b=0
c=0
end if
getFee = a+b+c
End Function
%>

<html>
<head>
<title>ASP Test</title>
</head>
<body>
<%=getFee(isprbuilding_sqft)%>
</body>
</html>


_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to mwackers)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Permit Fee Calculator
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts