|
|
@@ -89,8 +89,17 @@
|
|
|
<th scope="col" style="border-left:3px solid white;"></th>
|
|
|
<th scope="col" style="border-left:3px solid white;"></th>
|
|
|
@foreach($payments as $p)
|
|
|
- <th scope="col" style="text-align:right; border-left:3px solid white;">Entrate</th>
|
|
|
- <th scope="col" style="text-align:right">Uscite</th>
|
|
|
+ @if($p->type == 'ALL')
|
|
|
+ <th scope="col" style="text-align:right; border-left:3px solid white;">Entrate</th>
|
|
|
+ <th scope="col" style="text-align:right">Uscite</th>
|
|
|
+ @elseif($p->type == 'IN')
|
|
|
+ <th scope="col" style="text-align:right; border-left:3px solid white;">Entrate</th>
|
|
|
+ <th scope="col" style="text-align:right;"></th>
|
|
|
+
|
|
|
+ @elseif($p->type == 'OUT')
|
|
|
+ <th style="border-left:3px solid white;"></th>
|
|
|
+ <th scope="col" style="text-align:center;">Uscite</th>
|
|
|
+ @endif
|
|
|
@endforeach
|
|
|
</tr>
|
|
|
</thead>
|
|
|
@@ -145,11 +154,26 @@
|
|
|
<td><b>Totale</b></td>
|
|
|
@foreach($payments as $p)
|
|
|
@if(isset($totals[$p->name]))
|
|
|
- <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice($totals[$p->name]["IN"])}}</b></span></td>
|
|
|
- <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice($totals[$p->name]["OUT"])}}</b></span></td>
|
|
|
+ @if($p->type == 'ALL')
|
|
|
+ <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
|
|
|
+ <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
|
|
|
+ @elseif($p->type == 'IN')
|
|
|
+ <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
|
|
|
+ @elseif($p->type == 'OUT')
|
|
|
+ <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
|
|
|
+ @endif
|
|
|
@else
|
|
|
- <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(0)}}</b></span></td>
|
|
|
- <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(0)}}</b></span></td>
|
|
|
+ @if($p->type == 'ALL')
|
|
|
+ <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
|
|
|
+ <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
|
|
|
+ @elseif($p->type == 'IN')
|
|
|
+ <td style="text-align:right"><span class="tablesaw-cell-content primary" style="color:green; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["IN"] : 0)}}</b></span></td>
|
|
|
+ <td style="text-align:right"></td>
|
|
|
+ @elseif($p->type == 'OUT')
|
|
|
+ <td style="text-align:right"></td>
|
|
|
+ <td style="text-align:center"><span class="tablesaw-cell-content primary" style="color:red; font-size:18px;"><b>{{formatPrice(isset($totals[$p->name]) ? $totals[$p->name]["OUT"] : 0)}}</b></span></td>
|
|
|
+
|
|
|
+ @endif
|
|
|
@endif
|
|
|
@endforeach
|
|
|
</tr>
|