<div class="no-display"> <!-- NO CONTENT IN THIS DIV WILL DISPLAY -->
<!-- BEGIN SET STARTUP VALUES -->
<!-- BEGIN FEE SCHEDULE VALUES -->
<!-- IF ONLY CHANGING FEE VALUES EDIT THESE VARIABLE VALUES -->
<<set $dig_ret_fee = 5>>
<<set $minimum_fee_res to 375>>
<<set $permit_fee_rate_res to .025>>
<<set $commercial_fee_ceiling_1 to 50000>>
<<set $commercial_fee_ceiling_2 to 250000>>
<<set $commercial_fee_ceiling_3 to 450000>>
<<set $commercial_fee_1 to 125>>
<<set $commercial_fee_2 to 900>>
<<set $commercial_fee_3 to 1750>>
<<set $commercial_fee_4 to 3500>>
<<set $base_fee_max to 3500>>
<<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>>
<<set $app_fee_percentage to 1>>
<!-- END FEE SCHEDULE VALUES -->
<!-- BEGIN OTHER STARTUP VALUES -->
<<set $sign_permits_array to ['Sign']>> <!-- ARRAY OF ALL SIGN PERMIT TYPES -->
<<set $digit_values to ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "."]>>
<<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'>>
<<set $con_val_array to []>>
<<set $con_val_calc to "">>
<<for _i to 0; _i < $con_value.length; _i++>>
<<if $digit_values.includes($con_value[_i])>>
<<if $con_value[_i] is ".">>
<<if _i > ($con_value.length - 4)>>
<<set $con_val_array.push($con_value[_i])>>
<</if>>
<<else>>
<<set $con_val_array.push($con_value[_i])>>
<</if>>
<</if>>
<</for>>
<<for _i to 0; _i < $con_val_array.length; _i++>>
<<set $con_val_calc to ($con_val_calc +$con_val_array[_i])>>
<</for>>
<</widget>>
<!-- END DATA VALIDATION LOGIC -->
<!-- BEGIN WIDGET FOR CALCULATION BUTTON -->
<<widget 'button-calculation'>>
<<data-validation>>
<!-- BEGIN BASE FEE CALC -->
<<if $structure_type is "Commercial">>
<<if $con_val_calc <= $commercial_fee_ceiling_1>>
<<set $base_fee_calc = $commercial_fee_1>>
<<elseif $con_val_calc <= $commercial_fee_ceiling_2>>
<<set $base_fee_calc = $commercial_fee_2>>
<<elseif $con_val_calc <= $commercial_fee_ceiling_3>>
<<set $base_fee_calc = $commercial_fee_3>>
<<elseif $con_val_calc > $commercial_fee_ceiling_3>>
<<set $base_fee_calc = $commercial_fee_4>>
<<else>>
<<set $base_fee_calc = "error">>
<</if>>
<<elseif $structure_type is "Residential">>
<<set $adj_base_fee_calc = $minimum_fee_res>>
<<set $base_fee_calc = ($con_val_calc * $permit_fee_rate_res)>>
<</if>>
<<if $base_fee_calc > $base_fee_max>>
<<set $base_fee_calc = $base_fee_max>>
<</if>>
<!-- END BASE FEE CALC -->
<!-- BEGIN SET CORRECTED FEE -->
<<if $base_fee_calc < $adj_base_fee_calc>>
<<set $corrected_base_fee_calc = $adj_base_fee_calc>>
<<else>>
<<set $corrected_base_fee_calc = $base_fee_calc>>
<</if>>
<!-- END SET CORRECTED FEE -->
<!-- BEGIN TECH FEE CALC -->
<<if $corrected_base_fee_calc <= $tech_fee_ceiling_1>>
<<set $tech_fee_calc = $tech_fee_1>>
<<elseif $corrected_base_fee_calc <= $tech_fee_ceiling_2>>
<<set $tech_fee_calc = $tech_fee_2>>
<<elseif $corrected_base_fee_calc <= $tech_fee_ceiling_3>>
<<set $tech_fee_calc = $tech_fee_3>>
<<elseif $corrected_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_calc = $corrected_base_fee_calc + $tech_fee_calc + $dig_ret_fee>>
<!-- BEGIN ERROR CHECKING FUNCTION -->
<<if $con_val_calc is "" or $con_value is "">>
<<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="permit-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>>
<<else>>
<!-- BEGIN RESULTS REPLACEMENT FUNCTION -->
<<replace "#Results">> Your Calculated Fee
Application Type: <<print $structure_type>> Plan Review Meeting
Base Fee: <<print asDollars($base_fee_calc)>> <span id="minimum-fee-break"></span>
Tech Fee: <<print asDollars($tech_fee_calc)>>
Digital Retention Fee: <<print asDollars($dig_ret_fee)>>
----
Total Cost: <<print asDollars($total_fee_calc)>>
<span id="app-fee"></span>
<</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 and $structure_type is "Residential">>
<<replace "#minimum-fee-break">>
Minimum Fee Applies
Adjusted Base Fee: <<print asDollars($adj_base_fee_calc)>><</replace>>
<<else>>
<</if>>
<!-- BEGIN APP FEE REPLACEMENT -->
<<if ($structure_type is "Commercial")>>
<<replace "#app-fee">> Your application fee will be <<print asDollars($total_fee_calc)>>.
Additional fees may be assessed as needed. Please see the 2024 PLI Fee Schedule for a full break down of fees.<</replace>>
<<elseif $structure_type is "Residential">>
<<replace "#app-fee">>Your application fee will be <<print asDollars($total_fee_calc)>>.
Additional fees may be assessed as needed. Please see the 2024 PLI Fee Schedule for a full break down of fees.<</replace>>
<<else>>
<<replace "#app-fee">> Your application fee will be <<print asDollars($total_fee_calc)>>.
Additional fees may be assessed as needed. Please see the 2024 PLI Fee Schedule for a full break down of fees.<</replace>>
<</if>>
<!-- END APP FEE REPLACEMENT -->
<!-- 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 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 -->
<div class="col1"> <!-- BEGIN COL1 DIV. ALL DATA ENTRY HAPPENS IN THIS COLUMN -->
<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><!-- STRUCTURE TYPE SELECTOR -->
<label><<radiobutton "$structure_type" "Commercial">> Commercial</label>
<label><<radiobutton "$structure_type" "Residential">> Residential</label>
<span id="section-title">Value of Construction:</span> <!-- VALUE OF CONSTRUCTION ENTRY -->
<<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>
<div class="button"><<button "Calculate">> <!-- BUTTON RUNS ALL LOGIC TO POPULATE VALUES IN DIV COL2 -->
<<button-calculation>> <!-- RUNS MACRO LOCATED IN NO-DISPLAY DIV -->
<</button>> <!-- END BUTTON --></div>
<div class="button"><<button [[Reset Form | PLI Plan Review Meeting Fee Calculator]]>><</button>> <!-- REFRESHES THE PAGE --></div>
</div> <!-- END COL1 DIV -->
<div class="col2"> <!-- BEGIN COL2 DIV. ALL RESULTS DISPLAYED HERE --> <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 below.
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 -->