aggiunto :

->where(function ($query) {
                $query->where('DescrizioneStatoProdotto', 'In commercio')
                    ->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
                    ->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
                    ->orWhere('DescrizioneStatoProdotto', 'In prevendita')
                    ->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
            })
This commit is contained in:
paoloar77
2025-04-16 15:48:50 +02:00
parent 89f44f02d9
commit 9d64036519
7 changed files with 53 additions and 15 deletions

View File

@@ -285,7 +285,13 @@ class ArticleController extends Controller
DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'),
DB::raw('s.ultimoOrdine')
)
->where('DescrizioneStatoProdotto', 'In commercio')
->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
})
->where('DescrizioneTipologia', 'Libri')
->orderBy('totVen', 'desc')
->get();
@@ -394,7 +400,13 @@ class ArticleController extends Controller
DB::raw('COALESCE(r.rank1Y, 0) as rank1Y'),
DB::raw('s.ultimoOrdine')
)
->where('DescrizioneStatoProdotto', 'In commercio')
->where(function ($query) {
$query->where('DescrizioneStatoProdotto', 'In commercio')
->orWhere('DescrizioneStatoProdotto', '2023 in commercio')
->orWhere('DescrizioneStatoProdotto', 'Vendita sito')
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
})
->where('DescrizioneTipologia', 'Libri')
//->orderBy('rank1Y', 'asc')
->orderBy('totFat', 'desc')