Fix display of unfeasibility explanation

We were missing a check to make sure valuation had finished before
displaying the unfeasibility explanation
This commit is contained in:
rgarcia
2018-03-04 22:29:40 +01:00
parent 0e61d49800
commit 71bb5b3dcf
4 changed files with 69 additions and 2 deletions

View File

@@ -298,6 +298,10 @@ class Budget
should_show_price? && price_explanation.present?
end
def should_show_unfeasibility_explanation?
unfeasible? && valuation_finished? && unfeasibility_explanation.present?
end
def formatted_price
budget.formatted_amount(price)
end