1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-22 12:00:19 +01:00

Fix generazione numero

This commit is contained in:
Beppe 2022-09-01 16:40:27 +02:00
parent 41d30d515b
commit 8e321842fe

View File

@ -204,8 +204,7 @@ class Generator
//Lunghezza maschera
$mask_length = strlen($maschera);
$query = Manager::table($table)->select($field)->where($field, 'like', $maschera)->whereRaw('LENGTH( numero_esterno )<='.$mask_length)->orderByRaw('LENGTH(numero_esterno) DESC')->orderByRaw($order);
$query = Manager::table($table)->select($field)->where($field, 'like', $maschera)->orderByRaw('LENGTH(numero_esterno) DESC')->orderByRaw($order);
foreach ($where as $and) {
$query->whereRaw($and);