From 4a43fe68caf9a80599eb02992f3f5639176a0b95 Mon Sep 17 00:00:00 2001 From: Beppe Date: Mon, 15 May 2023 11:03:52 +0200 Subject: [PATCH] Fix controllo numerazione secondaria --- modules/ddt/actions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ddt/actions.php b/modules/ddt/actions.php index 3b85580eb..ea7aa829b 100755 --- a/modules/ddt/actions.php +++ b/modules/ddt/actions.php @@ -145,6 +145,7 @@ switch (filter('op')) { $count = DDT::where('numero_esterno', $numero_esterno) ->where('id', '!=', $id_record) ->where('idanagrafica', '=', $id_anagrafica) + ->whereRaw('DATE_FORMAT(data, "%Y")='.date('Y')) ->whereHas('tipo', function ($query) use ($direzione) { $query->where('dir', '=', $direzione); })->count();