| Data | Causale | @foreach($payments as $p){{$p->name}} | @endforeach||||
|---|---|---|---|---|---|---|
| @foreach($payments as $p) | Entrate | Uscite | @endforeach||||
| {{date("d/m/Y", strtotime($d))}} | {{$c}} | @foreach($payments as $p) @if(isset($record[$p->name]))@if(isset($record[$p->name]["IN"])) {{formatPrice($record[$p->name]["IN"])}} @endif | @if(isset($record[$p->name]["OUT"])) {{formatPrice($record[$p->name]["OUT"])}} @endif | @else@endif @endforeach | ||
| Totale | @foreach($payments as $p) @if(isset($totals[$p->name])){{formatPrice($totals[$p->name]["IN"])}} | {{formatPrice($totals[$p->name]["OUT"])}} | @else{{formatPrice(0)}} | {{formatPrice(0)}} | @endif @endforeach||
| Differenza | @foreach($payments as $p) @if(isset($totals[$p->name])) @php $diff = $totals[$p->name]["IN"] - $totals[$p->name]["OUT"]; @endphp @if($diff < 0)@endif | {{formatPrice($diff)}} | @if($diff > 0)@endif @else | {{formatPrice(0)}} | @endif @endforeach||