Fix verifica numero ddt

This commit is contained in:
Pek5892 2024-04-11 16:24:29 +02:00
parent 8a018f8606
commit 95f7840a44
2 changed files with 3 additions and 3 deletions

View File

@ -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 '
<div class="alert alert-warning">

View File

@ -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))),