Skip to content

Commit

Permalink
Enable usage of a comma within cost field
Browse files Browse the repository at this point in the history
  • Loading branch information
Harm Akkerman committed Aug 19, 2022
1 parent 063c5a1 commit 4f0113f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Controller/AjaxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public function addCost($id)
{
$wi = $this->workIntervalMapper->find($id);
$cost = $this->request->cost;
$cost = str_replace(',', '.', $cost);

if (!is_numeric($cost)) {
return new JSONResponse(['error' => 'Non numeric value'], Http::STATUS_BAD_REQUEST);
Expand Down

0 comments on commit 4f0113f

Please sign in to comment.