Creation and editing of events
This commit is contained in:
@@ -44,4 +44,11 @@ class Amount {
|
||||
public function subtractAmount(Amount $amount) : void {
|
||||
$this->amount -= $amount->getAmount();
|
||||
}
|
||||
|
||||
public function getFormattedAmount() : string {
|
||||
$value = number_format( round( $this->amount, 2 ), 2, ',', '.' );
|
||||
return $value
|
||||
|> trim(...)
|
||||
|> function (string $value) : string { return str_replace('.', ',', $value); };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user