diff --git a/app/Console/Commands/TestPao.php b/app/Console/Commands/TestPao.php index 237ab02c..99328e88 100644 --- a/app/Console/Commands/TestPao.php +++ b/app/Console/Commands/TestPao.php @@ -125,7 +125,7 @@ class TestPao extends Command $productsku = Product::where('sku', $article->IdArticolo)->first(); //if(Gm_product::where('id_gm',$article->IdArticolo)->doesntExist()) - if ($productsku->count() == 1110) { + if ($productsku->count() == 0) { $titolo = null; $formato = null; $prodotti = null; @@ -225,6 +225,7 @@ class TestPao extends Command } // get the last record of Stock + echo "\nLast record Stock ..."; $lastrecordStock = Stock::latest('DataOra')->take(10)->get(); @@ -240,7 +241,9 @@ class TestPao extends Command if ($productsku->count() > 0) { // log the productsku record - $log .= "\n" . $productsku->toArray(); + $productskustr = json_encode($productsku, JSON_PRETTY_PRINT); + echo $productskustr; + $log .= "\n" . $productskustr; } $log .= "\n";