Commit 3d67f234 authored by xiphon's avatar xiphon

Project: cap percentage_funded at 100 max

parent 8b9073d8
......@@ -51,7 +51,7 @@ class Project extends Model
}
public function getPercentageFundedAttribute() {
return round($this->amount_received / $this->target_amount * 100);
return min(100, round($this->amount_received / $this->target_amount * 100));
}
public function getContributionsAttribute() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment