Fix controllo numerazione secondaria

This commit is contained in:
Beppe 2023-05-15 11:03:52 +02:00
parent f4ed9940a0
commit 4a43fe68ca
1 changed files with 1 additions and 0 deletions

View File

@ -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();