Просмотр исходного кода

ricevute - aggiunta colonna data pagamento

ferrari 3 месяцев назад
Родитель
Сommit
39543b1b64
2 измененных файлов с 7 добавлено и 1 удалено
  1. 4 0
      resources/views/livewire/receipt.blade.php
  2. 3 1
      routes/web.php

+ 4 - 0
resources/views/livewire/receipt.blade.php

@@ -92,6 +92,7 @@
                         <th scope="col">Cognome</th>
                         <th scope="col">Nome</th>
                         <th scope="col">Stato</th>
+                        <th scope="col">Data pagamento</th>
                         <th scope="col">Importo</th>
                         <th scope="col">...</th>
                     </tr>
@@ -381,6 +382,9 @@
                             return ret;
                         }
                     },
+                    {
+                        data: 'created_at'
+                    },
                     {
                         data: 'totals', className:"dt-type-numeric"
                     },

+ 3 - 1
routes/web.php

@@ -1870,6 +1870,7 @@ Route::get('/get_receipts', function () {
             'receipts.year',
             'receipts.number',
             'receipts.status',
+            'receipts.date',
             'receipts.created_at',
             'receipts.record_id',
             'members.first_name',
@@ -1929,7 +1930,8 @@ Route::get('/get_receipts', function () {
             'last_name' => $r->last_name ?? '',
             'first_name' => $r->first_name ?? '',
             'status' => $r->status,
-            'date' => date("d/m/Y", strtotime($r->created_at)),
+            'date' => date("d/m/Y", strtotime($r->date)),
+            'created_at' => date("d/m/Y", strtotime($r->created_at)),
             'totals' => formatPrice($r->totals),
             'action' => $ids
         );