From 95f7840a44fdeeb3f340228384bd6650eac4b578 Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Thu, 11 Apr 2024 16:24:29 +0200 Subject: [PATCH] Fix verifica numero ddt --- modules/ddt/edit.php | 2 +- modules/ddt/modutil.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ddt/edit.php b/modules/ddt/edit.php index 847baad13..eef2a3b7e 100755 --- a/modules/ddt/edit.php +++ b/modules/ddt/edit.php @@ -28,7 +28,7 @@ include_once __DIR__.'/../../core.php'; $block_edit = $record['flag_completato']; if ($dir == 'entrata') { - $numero_previsto = verifica_numero_ddt($ddt); + $numero_previsto = verifica_numero_ddt($ddt, $id_segment); if (!empty($numero_previsto)) { echo '
diff --git a/modules/ddt/modutil.php b/modules/ddt/modutil.php index e258f8ec5..978553292 100644 --- a/modules/ddt/modutil.php +++ b/modules/ddt/modutil.php @@ -234,7 +234,7 @@ if (!function_exists('get_stato_ddt')) { } if (!function_exists('verifica_numero_ddt')) { - function verifica_numero_ddt(DDT $ddt) + function verifica_numero_ddt(DDT $ddt, $id_segment) { global $dbo; @@ -253,7 +253,7 @@ if (!function_exists('verifica_numero_ddt')) { ->get(); // Recupero maschera per questo segmento - $maschera = setting('Formato numero secondario ddt'); + $maschera = Generator::getMaschera($id_segment); $ultimo = Generator::getPreviousFrom($maschera, 'dt_ddt', $campo, [ 'data < '.prepare(date('Y-m-d', strtotime($data))),