Closed IkumaTadokoro closed 2 years ago
特定の条件下で0割が発生し、エラーになる
以下のparam
age: "20" employmentMonth: "2023/04" postalCode: "270-1154" retirementMonth: "2022/04" salary: "5000000" scheduledSalary: "5000000" scheduledSocialInsurance: "735000" simulationDate: "2022-03-05T13:23:55.361Z" socialInsurance: "735000"
No response
ActionView::Template::Error (divided by 0): 1: json.simulation do 2: json.retirement_month @simulation.retirement_month 3: json.employment_month @simulation.employment_month 4: json.grand_total @simulation.grand_total 5: json.sub_total @simulation.sub_total 6: json.monthly_payment @simulation.monthly_payment 7: end app/models/concerns/local_tax_law.rb:23:in `/' app/models/concerns/local_tax_law.rb:23:in `calc_installments' app/models/simulation/insurance.rb:34:in `block in monthly_insurance' app/models/simulation/insurance.rb:27:in `each' app/models/simulation/insurance.rb:27:in `flat_map' app/models/simulation/insurance.rb:27:in `monthly_insurance' app/models/simulation/insurance.rb:19:in `call' app/models/simulation/insurance.rb:7:in `call' app/models/simulation.rb:41:in `insurance' app/models/simulation.rb:22:in `monthly_payment' app/models/simulation.rb:18:in `block in sub_total' app/models/simulation.rb:18:in `sub_total' app/models/simulation.rb:14:in `grand_total' app/views/api/simulations/show.json.jbuilder:4 app/views/api/simulations/show.json.jbuilder:1
千代田区にすると落ちない模様
現時点で判明している原因は2つ
概要
特定の条件下で0割が発生し、エラーになる
再現手順
以下のparam
期待される振る舞い
No response
スクリーンショット
環境
No response
関連Issue
No response