aa
This commit is contained in:
@@ -45,9 +45,10 @@ class ArticleController extends Controller
|
||||
$ordini = DB::table('T_WEB_Ordini as O')
|
||||
->join('T_WEB_Articoli as A', 'O.CodArticoloGM', '=', 'A.IdArticolo')
|
||||
->select(
|
||||
DB::raw('ROW_NUMBER() OVER (ORDER BY O.DataOra DESC) AS progressivo'),
|
||||
'O.DataOra',
|
||||
'O.Qta',
|
||||
'A.Titolo'
|
||||
// 'A.Titolo'
|
||||
)
|
||||
->orderBy('O.DataOra', 'desc')
|
||||
->get();
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Num</th>
|
||||
<th>Data Ora</th>
|
||||
<th>Quantità</th>
|
||||
<th>Titolo Articolo</th>
|
||||
@@ -22,9 +23,12 @@
|
||||
<tbody>
|
||||
@foreach($ordini as $ordine)
|
||||
<tr>
|
||||
<td>{{ $ordine->progressivo }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($ordine->DataOra)->format('d/m/Y H:i:s') }}</td>
|
||||
<td>{{ $ordine->Qta }}</td>
|
||||
<td>{{ $ordine->Titolo }}</td>
|
||||
<td>@if (isset($articolo->Qta)){{ $ordine->Qta }}@endif
|
||||
</td>
|
||||
<td>@if (isset($articolo->Titolo)){{ $ordine->Titolo }}@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user