前提・実現したいこと
ここに質問の内容を詳しく書いてください。
現在、ワードプレスにてContact Form 7 Cost Calculator - Price Calculationという
プラグインを追加し、そこで保険料の見積り計算が出来るように
計算結果が出るところまで出来ました。
しかしながら、
合計金額で小数点以下が表示されるため、
Math.round()にて
小数点以下が四捨五入したいと思っていたのですが、
そこでエラーが発生し、
うまく機能しません。
発生している問題・エラーメッセージ
[calculated calculated-122 "select_custom-840*365/1000*number-269*select_custom-618/12"] この項目を [calculated calculated-122 "Math.round(select_custom-840*365/1000*number-269*select_custom-618/12)"] にて、小数点以下を四捨五入を試みたところ エラーが発生し機能しません。
該当のソースコード
給付基礎日額(円) [select_custom* select_custom-840 "3500|3500円" "4000|4000円" "5000|5000円" "6000|6000円" "7000|7000円" "8000|8000円" "9000|9000円" "10000|10000円" "12000|12000円" "14000|14000円" "16000|16000円" "18000|18000円" "20000|20000円" "22000|22000円" "24000|24000円" "25000|25000円"] 労災料率 [number number-269 readonly value "18"] 加入月 [select_custom* select_custom-618 "12|4月" "11|5月" "10|6月" "9|7月" "8|8月" "7|9月" "6|10月" "5|11月" "4|12月" "3|1月" "2|2月" "1|3月"] 保険料 [calculated calculated-122 "select_custom-840*365/1000*number-269*select_custom-618/12"]
試したこと
math.round
round
floor
など色々試してみましたが
うまくいきません。
補足情報(FW/ツールのバージョンなど)
Contact Form 7 Cost Calculator - Price Calculation バージョン 5.4
WP バージョン 5.2.2–ja
あなたの回答
tips
プレビュー