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

@@ -84,10 +84,12 @@ class TestPao extends Command
->where('data', '>=', $fromtime)
->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','Video Streaming')
//->where('DescrizioneTipologia','Video Streaming')
->orderBy('Titolo')
->take(2)
->get();
@@ -207,7 +209,7 @@ class TestPao extends Command
'key' => 'DataPubblicazione',
'value' => $article->DataPubblicazione
],
]
];
if ($id == 0) {
@@ -243,7 +245,7 @@ class TestPao extends Command
$productLogger->addLog('info', " QtaDisp: " . $stock->QtaDisponibile);
$productLogger->addLog('info', " DataOra: " . $stock->DataOra);
// Get the productsku record by $stock->Codice
// Get the productsku record by $stock->Codice
$productsku = Product::where('sku', $stock->Codice)->first();
if ($productsku->count() > 0) {
@@ -258,7 +260,7 @@ class TestPao extends Command
echo "************** FINE *********** ";
// Select all the fields of the Stock table
// Select all the fields of the Stock table
} catch (\Exception $e) {
$productLogger->addLog('info', $e->getMessage());
@@ -268,7 +270,7 @@ class TestPao extends Command
$productLogger->setLogandSendEmail('Test Paolo');
if (true) {
// Send the email
// Send the email
Mail::raw($log, function ($message) {
$message->to(Mylog::getEmail());
$message->subject(Mylog::getSubjectEmail("TESTPAO"));