From eeb6f5bcd11e5ee713f918a220862cd9652eaac0 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Wed, 30 Apr 2025 10:37:57 -0400 Subject: [PATCH] Se agrega condicion --- app/src/Service/Valor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/Service/Valor.php b/app/src/Service/Valor.php index 2df3da9..7789e84 100644 --- a/app/src/Service/Valor.php +++ b/app/src/Service/Valor.php @@ -80,13 +80,16 @@ class Valor if (strlen($parts[0]) > 3) { // 1000.000 || 1,000.000 return true; } + if (strlen($parts[1]) < 3) { // #####.00 + return true; + } if (str_contains($value, ',')) { if (strpos($value, ',') > strpos($value, '.')) { // 1.000,000 return false; } return true; // 1,000.000 } - if ((int) $parts[0] < 10) { + if ((int) $parts[0] < 10) { // 1.000 return true; } return false;