Implemented Event Budget
This commit is contained in:
@@ -42,12 +42,10 @@ class CostUnitEstimate extends InstancedModel
|
||||
default:
|
||||
$event = $this->costUnit()->first()->event()?->first();
|
||||
if (null !== $event) {
|
||||
|
||||
$participants = $event->participants()->count();
|
||||
return $this->amount_by_user->multiply($participants);
|
||||
|
||||
$amount = clone($this->amount_by_user);
|
||||
return $amount->multiply($participants);
|
||||
} else {
|
||||
dd('U');
|
||||
return $this->amount_by_user;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user