issue #8: sistemato quanto riportato nella issue

This commit is contained in:
Amministratore 2023-06-12 08:26:35 +02:00
parent 9952c06c71
commit a8a25063ac
11 changed files with 88 additions and 72 deletions

View File

@ -81,7 +81,7 @@ class MovimentiController extends Controller
foreach ($movimenti as $movimento) foreach ($movimenti as $movimento)
{ {
$lista[]=[ $lista[]=[
'Data'=>$movimento->Data, 'Data'=> date_format(date_create($movimento->Data),'d/m/Y'),
'Categoria'=>$movimento->Categoria, 'Categoria'=>$movimento->Categoria,
'Tag'=>$movimento->Tag, 'Tag'=>$movimento->Tag,
'Descrizione'=>$movimento->Descrizione, 'Descrizione'=>$movimento->Descrizione,

View File

@ -1,6 +1,6 @@
$(document).ready(function() { $(document).ready(function() {
$('#automobili').DataTable({ $('#automobili').DataTable({
responsive: true responsive: true,
fields: [ fields: [
{ {
label:"Data", label:"Data",

10
public/js/app/enel.js vendored
View File

@ -1,5 +1,11 @@
$(document).ready(function() { $(document).ready(function() {
$('#listaLettureEnel').DataTable({ $('#listaLettureEnel').DataTable({
responsive: true responsive: true,
fields: [
{
label:"Data lettura",
type: "datetime"
}
]
}); });
}); });

10
public/js/app/gas.js vendored
View File

@ -1,5 +1,11 @@
$(document).ready(function() { $(document).ready(function() {
$('#listaLettureGas').DataTable({ $('#listaLettureGas').DataTable({
responsive: true responsive: true,
fields: [
{
label:"Data lettura",
type: "datetime"
}
]
}); });
}); });

View File

@ -1,6 +1,12 @@
$(document).ready(function() { $(document).ready(function() {
$('#listamovimenti').DataTable({ $('#listamovimenti').DataTable({
"responsive": true, "responsive": true,
fields: [
{
label:"Data",
type: "datetime"
}
],
"order": [[0, "desc"]] "order": [[0, "desc"]]
}); });
}); });

View File

@ -1,7 +1,7 @@
$(document).ready(function() { $(document).ready(function() {
$('#tab_progetti').DataTable({ $('#tab_progetti').DataTable({
responsive: true responsive: true,
fields: [ fields: [
{ {
label:"Data", label:"Data",

View File

@ -4,10 +4,10 @@
<div class="col-lg-12"> <div class="col-lg-12">
<h1 class="page-header">{{ $dettagli->marca; }} {{ $dettagli->modello; }} targa: {{ $dettagli->targa; }}</h1> <h1 class="page-header">{{ $dettagli->marca; }} {{ $dettagli->modello; }} targa: {{ $dettagli->targa; }}</h1>
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<!-- Content here --> <!-- Content here -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<a class="btn btn-primary" href="operazioni/pdf?id={{ $dettagli->id; }}">Esporta PDF</a> <a class="btn btn-primary" href="operazioni/pdf?id={{ $dettagli->id; }}">Esporta PDF</a>
@ -19,10 +19,10 @@
<div class="panel-heading"> <div class="panel-heading">
Dettaglio auto {{ $dettagli->targa }} Dettaglio auto {{ $dettagli->targa }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id=""> <table class="table table-striped table-bordered table-hover" id="">
<thead> <thead>
<tr> <tr>
<th>Marca:</th> <th>Marca:</th>
@ -39,7 +39,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>{{ $dettagli->marca; }}</td> <td>{{ $dettagli->marca; }}</td>
<td>{{ $dettagli->modello; }}</td> <td>{{ $dettagli->modello; }}</td>
@ -53,9 +53,9 @@
<td>{{ $km ?? ''; }}</td> <td>{{ $km ?? ''; }}</td>
<td>{{ $dettagli->note; }}</td> <td>{{ $dettagli->note; }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -69,10 +69,10 @@
<div class="panel-heading"> <div class="panel-heading">
Revisioni auto {{ $dettagli->targa }} Revisioni auto {{ $dettagli->targa }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="revisione"> <table class="table table-striped table-bordered table-hover" id="revisione">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -88,7 +88,7 @@
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type =='revisione') @if ($operazioni->type =='revisione')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
@if($revisione[$operazioni->id][0]->superata >0) @if($revisione[$operazioni->id][0]->superata >0)
<td>Superata</td> <td>Superata</td>
@ -103,7 +103,7 @@
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -111,7 +111,7 @@
</div> </div>
</div> </div>
<!-- Fine Revisioni --> <!-- Fine Revisioni -->
<!-- Manutenzioni --> <!-- Manutenzioni -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
@ -119,10 +119,10 @@
<div class="panel-heading"> <div class="panel-heading">
Manutenzione auto {{ $dettagli->targa }} Manutenzione auto {{ $dettagli->targa }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="manutenzione"> <table class="table table-striped table-bordered table-hover" id="manutenzione">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -135,7 +135,7 @@
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type =='manutenzione') @if ($operazioni->type =='manutenzione')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
<td>{{ $manutenzione[$operazioni->id][0]->descrizione; }}</td> <td>{{ $manutenzione[$operazioni->id][0]->descrizione; }}</td>
<td>{{ $operazioni->importo; }}</td> <td>{{ $operazioni->importo; }}</td>
@ -143,7 +143,7 @@
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -151,7 +151,7 @@
</div> </div>
</div> </div>
<!-- Fine Manutenzioni --> <!-- Fine Manutenzioni -->
<!-- Accessori --> <!-- Accessori -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
@ -159,10 +159,10 @@
<div class="panel-heading"> <div class="panel-heading">
Accessori/Ricambi auto {{ $dettagli->targa }} Accessori/Ricambi auto {{ $dettagli->targa }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="accessori"> <table class="table table-striped table-bordered table-hover" id="accessori">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -175,7 +175,7 @@
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type=='accessori') @if ($operazioni->type=='accessori')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
<td>{{ $accessori[$operazioni->id][0]->descrizione; }}</td> <td>{{ $accessori[$operazioni->id][0]->descrizione; }}</td>
<td>{{ $operazioni->importo; }}</td> <td>{{ $operazioni->importo; }}</td>
@ -183,7 +183,7 @@
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -191,7 +191,7 @@
</div> </div>
</div> </div>
<!-- Fine Accessori --> <!-- Fine Accessori -->
<!-- Rifornimenti --> <!-- Rifornimenti -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
@ -199,10 +199,10 @@
<div class="panel-heading"> <div class="panel-heading">
Rifornimenti auto {{ $dettagli->targa }} Rifornimenti auto {{ $dettagli->targa }}
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id=""> <table class="table table-striped table-bordered table-hover" id="">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -217,7 +217,7 @@
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type =='rifornimento') @if ($operazioni->type =='rifornimento')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
<td>{{ $rifornimento[$operazioni->id][0]->distributore; }}</td> <td>{{ $rifornimento[$operazioni->id][0]->distributore; }}</td>
<td>{{ $rifornimento[$operazioni->id][0]->eurolitro; }}</td> <td>{{ $rifornimento[$operazioni->id][0]->eurolitro; }}</td>
@ -227,7 +227,7 @@
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -235,7 +235,7 @@
</div> </div>
</div> </div>
<!-- Fine Rifornimenti --> <!-- Fine Rifornimenti -->
<!-- --> <!-- -->
</div> </div>

View File

@ -30,10 +30,10 @@ table{
</style> </style>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<!-- Content here --> <!-- Content here -->
<span class="titolo"><h1>Scheda {{ $dettagli->marca; }} {{ $dettagli->modello; }} - {{ $dettagli->targa; }}</h1></span> <span class="titolo"><h1>Scheda {{ $dettagli->marca; }} {{ $dettagli->modello; }} - {{ $dettagli->targa; }}</h1></span>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
@ -41,14 +41,14 @@ table{
<div class="panel-heading"> <div class="panel-heading">
Dettaglio Dettaglio
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="intestazione_doc" id=""> <table class="intestazione_doc" id="">
<tr> <tr>
<th>Marca:</th><td>{{ $dettagli->marca; }}</td> <th>Marca:</th><td>{{ $dettagli->marca; }}</td>
<th>Modello:</th><td>{{ $dettagli->modello; }}</td> <th>Modello:</th><td>{{ $dettagli->modello; }}</td>
<th>Targa:</th> <td>{{ $dettagli->targa; }}</td> <th>Targa:</th> <td>{{ $dettagli->targa; }}</td>
</tr> </tr>
<tr> <tr>
<th>Alimentazione:</th><td>{{ $dettagli->alimentazione; }}</td> <th>Alimentazione:</th><td>{{ $dettagli->alimentazione; }}</td>
@ -78,10 +78,10 @@ table{
<div class="panel-heading"> <div class="panel-heading">
Revisioni Revisioni
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="revisione"> <table class="table table-striped table-bordered table-hover" id="revisione">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -97,7 +97,7 @@ table{
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type =='revisione') @if ($operazioni->type =='revisione')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
<td>{{ $revisione[$operazioni->id][0]->superata; }}</td> <td>{{ $revisione[$operazioni->id][0]->superata; }}</td>
<td>{{ $revisione[$operazioni->id][0]->centrorevisione; }}</td> <td>{{ $revisione[$operazioni->id][0]->centrorevisione; }}</td>
@ -108,7 +108,7 @@ table{
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -116,18 +116,18 @@ table{
</div> </div>
</div> </div>
<!-- Fine Revisioni --> <!-- Fine Revisioni -->
<br><hr> <br><hr>
<!-- Manutenzioni --> <!-- Manutenzioni -->
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
Manutenzione Manutenzione
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="manutenzione"> <table class="table table-striped table-bordered table-hover" id="manutenzione">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -140,7 +140,7 @@ table{
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type =='manutenzione') @if ($operazioni->type =='manutenzione')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
<td>{{ $manutenzione[$operazioni->id][0]->descrizione; }}</td> <td>{{ $manutenzione[$operazioni->id][0]->descrizione; }}</td>
<td>{{ $operazioni->importo; }}</td> <td>{{ $operazioni->importo; }}</td>
@ -148,7 +148,7 @@ table{
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -164,10 +164,10 @@ table{
<div class="panel-heading"> <div class="panel-heading">
Accessori/Ricambi Accessori/Ricambi
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="accessori"> <table class="table table-striped table-bordered table-hover" id="accessori">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -180,7 +180,7 @@ table{
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type=='accessori') @if ($operazioni->type=='accessori')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
<td>{{ $accessori[$operazioni->id][0]->descrizione; }}</td> <td>{{ $accessori[$operazioni->id][0]->descrizione; }}</td>
<td>{{ $operazioni->importo; }}</td> <td>{{ $operazioni->importo; }}</td>
@ -188,7 +188,7 @@ table{
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
@ -204,10 +204,10 @@ table{
<div class="panel-heading"> <div class="panel-heading">
Rifornimenti Rifornimenti
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id=""> <table class="table table-striped table-bordered table-hover" id="">
<thead> <thead>
<tr> <tr>
<th>Data</th> <th>Data</th>
@ -222,7 +222,7 @@ table{
@foreach($operazione as $operazioni) @foreach($operazione as $operazioni)
@if ($operazioni->type =='rifornimento') @if ($operazioni->type =='rifornimento')
<tr> <tr>
<td>{{ $operazioni->data; }}</td> <td>{{ date_format(date_create($operazioni->data),'d/m/Y'); }}</td>
<td>{{ $operazioni->km; }}</td> <td>{{ $operazioni->km; }}</td>
<td>{{ $rifornimento[$operazioni->id][0]->distributore; }}</td> <td>{{ $rifornimento[$operazioni->id][0]->distributore; }}</td>
<td>{{ $rifornimento[$operazioni->id][0]->eurolitro; }}</td> <td>{{ $rifornimento[$operazioni->id][0]->eurolitro; }}</td>
@ -232,7 +232,7 @@ table{
@endif @endif
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>

View File

@ -31,7 +31,7 @@
<tbody> <tbody>
@foreach( $movimenti as $movimento ) @foreach( $movimenti as $movimento )
<tr> <tr>
<td>{{ $movimento->mov_data; }}</td> <td>{{ date_format(date_create($movimento->mov_data),'d/m/Y'); }}</td>
<td>{{ $movimento->cat_name; }}</td> <td>{{ $movimento->cat_name; }}</td>
<td>{{ $movimento->mov_descrizione; }}</td> <td>{{ $movimento->mov_descrizione; }}</td>
<td>&euro; {{ $movimento->mov_importo; }}</td> <td>&euro; {{ $movimento->mov_importo; }}</td>

View File

@ -25,9 +25,9 @@
<tbody> <tbody>
@foreach( $dataSpesa as $dato ) @foreach( $dataSpesa as $dato )
<tr> <tr>
<td><a href="movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td> <td><a href="/admin/movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td>
<td>{{ $dato->resoconto; }}</td> <td>{{ $dato->resoconto; }}</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@ -55,9 +55,9 @@
<tbody> <tbody>
@foreach( $dataEntrate as $dato ) @foreach( $dataEntrate as $dato )
<tr> <tr>
<td><a href="movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td> <td><a href="/admin/movimenti/report/movimenti_categoria?cat={{ $dato->id }}&month={{ $_GET['Month'] ?? date('m')}}">{{ $dato->cat_name; }}</a> </td>
<td>{{ $dato->resoconto; }}</td> <td>{{ $dato->resoconto; }}</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@ -67,9 +67,8 @@
</div> </div>
</div> </div>
</div> </div>
@endsection @endsection
@section('script') @section('script')
<script src="/js/app/conti_categorie.js"></script> <script src="/js/app/conti_categorie.js"></script>
@endsection @endsection

View File

@ -24,7 +24,7 @@
Nuova lettura Gas Nuova lettura Gas
</div> </div>
<div class="panel-body"> <div class="panel-body">
<form action="" method="POST"> <form action="" method="POST">
@csrf @csrf
<div class="mb-3"> <div class="mb-3">
@ -38,7 +38,7 @@
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
</form> </form>
</div> </div>
</div> </div>
<div class="panel-heading"> <div class="panel-heading">
Letture Gas Letture Gas
@ -57,7 +57,7 @@
</thead> </thead>
<tbody> <tbody>
@php $dateprec=NULL; @endphp @php $dateprec=NULL; @endphp
@foreach($lettureGas as $lettura) @foreach($lettureGas as $lettura)
@php @php
if (!is_null($dateprec)) if (!is_null($dateprec))
@ -65,13 +65,13 @@
$diffdate=date_diff( $diffdate=date_diff(
date_create_from_format('Y-m-d',$lettura->gas_date), date_create_from_format('Y-m-d',$lettura->gas_date),
date_create_from_format('Y-m-d',$dateprec) date_create_from_format('Y-m-d',$dateprec)
)->format('%a'); )->format('%a');
$differenza=($lettura->gas_lettura)-$lettprec; $differenza=($lettura->gas_lettura)-$lettprec;
$mediagg=($differenza/$diffdate); $mediagg=($differenza/$diffdate);
} }
@endphp @endphp
<tr> <tr>
<td>{{ $lettura->gas_date; }}</td> <td>{{ date_format(date_create($lettura->gas_date),'d/m/Y'); }}</td>
<td>{{ $lettura->gas_lettura; }}</td> <td>{{ $lettura->gas_lettura; }}</td>
@if(!is_null($dateprec)) @if(!is_null($dateprec))
<td>{{ $diffdate ?? '' }}</td> <td>{{ $diffdate ?? '' }}</td>
@ -83,9 +83,9 @@
<td></td> <td></td>
@endif @endif
</tr> </tr>
@php @php
$dateprec=$lettura->gas_date; $dateprec=$lettura->gas_date;
$lettprec=$lettura->gas_lettura; $lettprec=$lettura->gas_lettura;
@endphp @endphp
@endforeach @endforeach
@ -96,9 +96,8 @@
</div> </div>
</div> </div>
</div> </div>
@endsection @endsection
@section('script') @section('script')
<script src="/js/app/gas.js"></script> <script src="/js/app/gas.js"></script>
@endsection @endsection