Fee Calculator

[insert_php]

// array index should match fieldname. If you want a dropdown with quantity,
// name the field fieldname_count and include an ‘item_price’ like the ‘div’ field
// below.echo “hi!”;

$prices = array(
‘fed_return’ => array(‘price’=>200),
‘ca_return’ => array(‘price’ => 50),
‘multi_return’ => array(‘price’ => 100),
‘schedule_a’ => array(‘price’ => 75),
‘schedule_c’ => array(‘price’ => 120),
‘div’ => array(‘price’ => 15,
‘item_price’ => 15),
‘interest’ => array(‘price’ => 15,
‘item_price’ => 15),
‘k_1’ => array(‘price’ => 35),
‘form_2106’ => array(‘price’ => 35),
‘schedule_b’ => array(‘price’ => 10,
‘item_price’ => 2.5),
‘schedule_d’ => array(‘price’ => 25,
‘item_price’ => 5),
‘depreciation’ => array(‘price’ => 25),
‘schedule_e’ => array(‘price’ => 75),
‘schedule_f’ => array(‘price’ => 100),
‘child_care’ => array(‘price’ => 30),
‘child_tax’ => array(‘price’ => 20),
‘sale_residence’ => array(‘price’ => 40),
‘auto_exp’ => array(‘price’ => 25),
‘moving’ => array(‘price’ => 35),
‘cas_loss’ => array(‘price’ => 15),
‘eic’ => array(‘price’ => 50),
‘home_office’ => array(‘price’ => 50),
‘medicare_tax’ => array(‘price’ => 50),
‘affordable_health’ => array(‘price’ => 50)
);

$admin_fee = 25;

$total_fee_estimate = 0;

foreach ($prices as $pricename => $price) {
if (isset($_POST[$pricename]) && isset($price[‘price’])) {
$total_fee_estimate += $price[‘price’];
//echo $pricename. “- selected”;
}

if (isset($_POST[$pricename.’_count’]) && isset($price[‘item_price’])) {
$total_fee_estimate += ((int)$_POST[‘$pricename’.’_count’] * $price[‘item_price’]);
//echo $pricename.”- has “.$_POST[$pricename.”_count”].” items. Adding.”;
}
}
[/insert_php]

Thank you

Your estimated total fee is $[insert_php] echo number_format($total_fee_estimate, 2);[/insert_php]