aa
This commit is contained in:
@@ -26,7 +26,7 @@ class ArticleController extends Controller
|
|||||||
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
$join->on('T_WEB_Articoli.IdStatoProdotto', '=', 'f.IdStatoProdotto');
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
->whereIn('f.DescrizioneStatoProdotto', ['In commercio', 'In prevendita', 'Prossima uscita'])
|
->whereIn('f.DescrizioneStatoProdotto', ['In commercio'])
|
||||||
->selectRaw('
|
->selectRaw('
|
||||||
T_WEB_Articoli.idArticolo,
|
T_WEB_Articoli.idArticolo,
|
||||||
T_WEB_Articoli.Titolo,
|
T_WEB_Articoli.Titolo,
|
||||||
@@ -73,9 +73,11 @@ class ArticleController extends Controller
|
|||||||
$response->headers->set('Content-Type', 'text/csv');
|
$response->headers->set('Content-Type', 'text/csv');
|
||||||
$response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '"');
|
$response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '"');
|
||||||
|
|
||||||
$csvContent = "IdArticolo,Titolo,TotaleVenduto\n";
|
|
||||||
|
$csvContent = "IdArticolo,Titolo,TotaleVenduto,TotaleVendutoUltimoMese,TotaleVendutoUltimi6Mesi,TotaleVendutoUltimoAnno\n";
|
||||||
|
|
||||||
foreach ($articoliVenduti as $articoloVenduto) {
|
foreach ($articoliVenduti as $articoloVenduto) {
|
||||||
$csvContent .= "{$articoloVenduto->idArticolo},{$articoloVenduto->Titolo},{$articoloVenduto->totaleVenduto}\n";
|
$csvContent .= "{$articoloVenduto->idArticolo},{$articoloVenduto->Titolo},{$articoloVenduto->totaleVenduto},{$articoloVenduto->totaleVendutoUltimoMese},{$articoloVenduto->totaleVendutoUltimi6Mesi},{$articoloVenduto->totaleVendutoUltimoAnno}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$response->setContent($csvContent);
|
$response->setContent($csvContent);
|
||||||
|
|||||||
Reference in New Issue
Block a user