mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Fixed #5172 - autosum on assets detail view for components tab
This commit is contained in:
parent
e5c1f4847d
commit
086683319a
|
@ -605,6 +605,8 @@
|
|||
<tbody>
|
||||
<?php $totalCost = 0; ?>
|
||||
@foreach ($asset->components as $component)
|
||||
|
||||
|
||||
@if (is_null($component->deleted_at))
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -612,6 +614,7 @@
|
|||
</td>
|
||||
<td>{{ $component->pivot->assigned_qty }}</td>
|
||||
<td>{{ $component->purchase_cost }}</td>
|
||||
<?php $totalCost = $totalCost + $component->purchase_cost ;?>
|
||||
|
||||
</tr>
|
||||
@endif
|
||||
|
@ -620,7 +623,9 @@
|
|||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7" class="text-right">{{ $use_currency.$totalCost }}</td>
|
||||
<td colspan="2">
|
||||
</td>
|
||||
<td>{{ $totalCost }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue