相続財産評価額と相続人の数を基に申告報酬の概算金額を算出します。
if($_POST['Submit']){ unset($data,$f_1,$f_5,$r); foreach($_POST as $k => $v){ if(!is_numeric($v)){ $v = str_replace(',','',$v); $data[$k] = mb_convert_kana($v, "n", "EUC-JP"); }else{ $data[$k] = $v; } } } $f_1 = $data['f_1']/0.8; $f_5 = $f_1 + $data['f_2'] + $data['f_3'] + $data['f_4'] + $data['f_5'] + $data['f_7'] + $data['f_8'] + $data['f_9']; #基礎要素 報酬額 if($f_5){ if($f_5 < 5000) $r = 15; elseif($f_5 < 7000) $r = 25; elseif($f_5 < 10000) $r = 35; elseif($f_5 < 15000) $r = 50; elseif($f_5 < 20000) $r = 65; elseif($f_5 < 30000) $r = 95; elseif($f_5 < 40000) $r = 125; elseif($f_5 < 50000) $r = 155; else $r = "応相談"; }else{ $r = 0; } #加算要素 報酬額 $f_6 = $data['f_6'] ? $data['f_6'] : 1; $kasan = $r*0.1*($data['f_6']-1); #申告報酬額 $result = ($kasan<0 || !is_numeric($r)) ? $r : $r + $kasan; ?>