Small interface improvements

This commit is contained in:
Pinga 2025-04-23 11:42:17 +03:00
parent 95bd3725ca
commit 6f7f767547
3 changed files with 9 additions and 6 deletions

View file

@ -149,8 +149,11 @@ class FinancialsController extends Controller
$db = $this->container->get('db');
$registrar_id = $data['registrar'];
$amount = $data['amount'];
$description = empty($data['description']) ? "funds added to account balance" : $data['description'];
$description = "funds added to account balance";
if (!empty($data['description'])) {
$description .= " (" . $data['description'] . ")";
}
$isPositiveNumberWithTwoDecimals = filter_var($amount, FILTER_VALIDATE_FLOAT) !== false && preg_match('/^\d+(\.\d{1,2})?$/', $amount);
if ($isPositiveNumberWithTwoDecimals) {