<!-- BEGIN SET STARTUP VALUES -->
<!-- BEGIN FEE SCHEDULE VALUES -->
<!-- IF ONLY CHANGING FEE VALUES EDIT THESE VARIABLE VALUES -->
<<set $dig_ret_fee = 5>>
<<set $permit_fee_rate_com to .0025>>
<<set $permit_fee_rate_res to .0025>>
<<set $minimum_fee_res to 125>>
<<set $minimum_fee_com to 125>>
<<set $maximum_fee_res to 7000>>
<<set $maximum_fee_com to 7000>>
<<set $tech_fee_ceiling_1 to 200>>
<<set $tech_fee_ceiling_2 to 1000>>
<<set $tech_fee_ceiling_3 to 10000>>
<<set $tech_fee_1 to 2>>
<<set $tech_fee_2 to 5>>
<<set $tech_fee_3 to 15>>
<<set $tech_fee_4 to 25>>
<!-- END FEE SCHEDULE VALUES -->
<!-- BEGIN OTHER STARTUP VALUES -->
<<set $structure_type to "">>
<<set $con_value_error to 0>>
<!-- END OTHER STARTUP VALUES -->
<!-- END SET STARTUP VALUES -->
<!-- BEGIN DATA VALIDATION LOGIC -->
<<widget 'data-validation'>>
<<if validateNumber($con_value) is "NaN">>
<<set $con_value_validated to "">>
<<else>>
<<set $con_value_validated to validateNumber($con_value)>>
<</if>>
<</widget>>
<!-- END DATA VALIDATION LOGIC -->
<!-- BEGIN WIDGET FOR CALCULATION BUTTON -->
<<widget 'button-calculation'>>
<<data-validation>>
<!-- BEGIN BASE FEE CALC -->
<<if $structure_type is "Commercial">>
<<set $base_fee_calc = ($con_value_validated * $permit_fee_rate_com)>>
<<if $base_fee_calc < $minimum_fee_com>>
<<set $adj_base_fee_calc = $minimum_fee_com>>
<<elseif $base_fee_calc > $maximum_fee_com>>
<<set $adj_base_fee_calc = $maximum_fee_com>>
<<else>>
<<set $adj_base_fee_calc = $base_fee_calc>>
<</if>>
<<elseif $structure_type is "Residential">>
<<set $base_fee_calc = ($con_value_validated * $permit_fee_rate_res)>>
<<if $base_fee_calc < $minimum_fee_res>>
<<set $adj_base_fee_calc = $minimum_fee_res>>
<<elseif $base_fee_calc > $maximum_fee_res>>
<<set $adj_base_fee_calc = $maximum_fee_res>>
<<else>>
<<set $adj_base_fee_calc = $base_fee_calc>>
<</if>>
<</if>>
<!-- END BASE FEE CALC -->
<!-- BEGIN TECH FEE CALC -->
<<if $adj_base_fee_calc <= $tech_fee_ceiling_1>>
<<set $tech_fee_calc = $tech_fee_1>>
<<elseif $adj_base_fee_calc <= $tech_fee_ceiling_2>>
<<set $tech_fee_calc = $tech_fee_2>>
<<elseif $adj_base_fee_calc <= $tech_fee_ceiling_3>>
<<set $tech_fee_calc = $tech_fee_3>>
<<elseif $adj_base_fee_calc > $tech_fee_ceiling_3>>
<<set $tech_fee_calc = $tech_fee_4>>
<<else>>
<<set $tech_fee_calc = "error">>
<</if>>
<!-- END TECH FEE CALC -->
<<set $total_fee = $adj_base_fee_calc + $tech_fee_calc + $dig_ret_fee>>
<!-- BEGIN ERROR CHECKING FUNCTION -->
<<if $con_value is "" or $con_value_validated is "" or $con_value_validated is "NaN">>
<<set $con_value_error to 1>>
<<else>>
<<set $con_value_error to 0>>
<</if>>
<<if $structure_type is "" or $permit_type is "" or $permit_type is "Select a Structure Type" or $con_value_error is 1>>
<<replace "#Results">><span id="structure-error"></span><span id="value-error"></span><</replace>>
<<if $structure_type is "">>
<<replace "#structure-error">>
<span class="Error">Please enter a Structure Type.</span>
<</replace>>
<<else>>
<<replace "#structure-error">><</replace>>
<</if>>
<<if $con_value_error is 1>>
<<replace "#value-error">>
<span class="Error">Please enter a Construction Value.</span>
<</replace>>
<<else>>
<<replace "#value-error">><</replace>>
<</if>>
<!-- END ERROR CHECKING FUNTION -->
<<else>>
<!-- BEGIN RESULTS REPLACEMENT FUNCTION -->
<<replace "#Results">> <span id="section-title">Your Calculated Fee</span>
''Application Type:'' <<print $structure_type>> Preliminary Plan Review Meeting
<span id="base-fee">''Base Fee:'' <<print numberWithCommas(asDollars($base_fee_calc))>> </span> <span id="minimum-fee-break"></span>
''Tech Fee:'' <<print numberWithCommas(asDollars($tech_fee_calc))>>
''Digital Retention Fee:'' <<print numberWithCommas(asDollars($dig_ret_fee))>>
----
''Total Cost:'' <<print numberWithCommas(asDollars($total_fee))>>
Your application fee will be <<print numberWithCommas(asDollars($total_fee))>>.
Additional fees may be assessed as appropriate. Please see the 2025 PLI Fee Schedule for a full break down of fees.
<</replace>>
<!-- END RESULTS REPLACEMENT FUNCTION -->
<!-- BEGIN RESULTS REPLACEMENT FUNCTION LOGIC - THIS MUST COME AFTER THE RESULTS REPLACEMENT FUNCTION -->
<<if $base_fee_calc < $adj_base_fee_calc>>
<<replace "#minimum-fee-break">>''Minimum Fee Applies''
''Adjusted Base Fee:'' <<print asDollars($adj_base_fee_calc)>><</replace>>
<<replace "#base-fee">><</replace>>
<<elseif $base_fee_calc > $adj_base_fee_calc>>
<<replace "#minimum-fee-break">>''Maximum Fee Applies''
''Adjusted Base Fee:'' <<print asDollars($adj_base_fee_calc)>><</replace>>
<<replace "#base-fee">><</replace>>
<<else>>
<</if>>
<!-- END RESULTS REPLACEMENT FUNCTION LOGIC - THIS MUST COME AFTER THE RESULTS REPLACEMENT FUNCTION -->
<</if>>
<</widget>>
<!-- END WIDGET FOR CALCULATION BUTTON -->
<!-- BEGIN HELP WIDGETS -->
<<widget 'structure-type-help'>>
<<replace "#structure-type-tooltip">>
<span class="help"><div class = "help-message" onclick="$.wiki('<<structure-type-help-close>>')">Select the type of structure in which work is being performed. If the work will result in a change of structure type, select the type which the structure will be upon completion.</div></span><</replace>>
<</widget>>
<<widget 'structure-type-help-close'>>
<<replace "#structure-type-tooltip">> <div class="help-prompt" onclick="$.wiki('<<structure-type-help>>')">?</div><</replace>>
<</widget>>
<<widget 'con-val-help'>>
<<replace "#con-val-tooltip">>
<span class="help"><div class = "help-message" onclick="$.wiki('<<con-val-help-close>>')">Cost of labor and materials for your permit scope.</div></span><</replace>>
<</widget>>
<<widget 'con-val-help-close'>>
<<replace "#con-val-tooltip">> <div class="help-prompt" onclick="$.wiki('<<con-val-help>>')">?</div><</replace>>
<</widget>>
<!-- END HELP WIDGETS -->
</div> <!-- END NO DISPLAY DIV -->
<!-- BEGIN DISPLAYED CONTENT -->
<!-- BEGIN GRID CONTAINER -->
<div class="grid-container">
<!-- BEGIN TITLE-HEADER DIV. HEADER IS A PROTECTED DIV DO NOT RENAME. -->
<div class="title-header">
<span id="header-title"><<print passage()>></span>
</div>
<!-- END TITLE-HEADER DIV -->
<!-- BEGIN INFO HEADER -->
<!-- END INFO HEADER -->
<!-- BEGIN COL1 DIV. ALL DATA ENTRY HAPPENS IN THIS COLUMN -->
<div class="col1"> <!-- BEGIN STRUCTURE TYPE SELECTOR --> <span id="section-title">Type of Structure:</span> <span id="structure-type-tooltip" title="Click here for more information about structure types."> <div class="help-prompt" onclick="$.wiki('<<structure-type-help>>')">?</div> </span>
<label><<radiobutton "$structure_type" "Commercial">> Commercial</label>
<label><<radiobutton "$structure_type" "Residential">> Residential</label> <!-- END STRUCTURE TYPE SELECTOR -->
<!-- BEGIN VALUE OF CONSTRUCTION ENTRY --> <span id="section-title">Value of Construction:</span>
<<textbox "$con_value" "">> <span id="con-val-tooltip" title="Click here for more information about what Value of Construction is."> <div class="help-prompt" onclick="$.wiki('<<con-val-help>>')">?</div> </span> <!-- END VALUE OF CONSTRUCTION ENTRY -->
<!-- BUTTON RUNS ALL LOGIC TO POPULATE VALUES IN DIV COL2 --> <span id="enterAct"> <div class="button"> <<button "Calculate">>
<<button-calculation>> <!-- RUNS MACRO LOCATED IN NO-DISPLAY DIV -->
<</button>> </div> </span> <!-- END BUTTON -->
<!-- BUTTON RELOADS THE CURRENT PASSAGE TO RESET THE FORM AND RESULTS --> <div class="button"><<button [[Reset Form | PLI Preliminary Plan Review Meeting Fee Calculator]]>> <</button>> </div> <!-- END BUTTON -->
</div>
<!-- END COL1 DIV -->
<!-- BEGIN COL2 DIV. ALL RESULTS DISPLAYED HERE -->
<div class="col2"> <span id="section-title">Results:</span>
<span id="Results">Please enter all information in the fields to the left. After you've entered your information, click or tap the "Calculate" button.
Click or tap the question mark buttons for more information about each field. Click or tap the help message to dismiss it.</span>
</div>
<!-- END COL2 DIV -->
<!-- BEGIN FOOTER -->
<div class="footer">
<div class="footer1"> <div class="button"> <<button "Return to PLI's Fee Page">>
<<script>>window.location = "https://www.pittsburghpa.gov/Business-Development/Permits-Licenses-and-Inspections/Fees";<</script>>
<</button>> </div>
</div>
<div class="footer2"> <div class="button"> <<button "Return to PLI's Home Page">>
<<script>>window.location = "https://www.pittsburghpa.gov/Business-Development/Permits-Licenses-and-Inspections";<</script>>
<</button>> </div>
</div>
<div class="footer3"><div class="button"> <<button "OneStopPGH">>
<<script>>window.location = "https://onestoppgh.pittsburghpa.gov/pghprod/webui/";<</script>>
<</button>> </div>
</div>
</div>
<!-- END FOOTER -->
</div>
<!-- END GRID CONTAINER -->
<!-- END DISPLAYED CONTENT -->