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>
|
<tbody>
|
||||||
<?php $totalCost = 0; ?>
|
<?php $totalCost = 0; ?>
|
||||||
@foreach ($asset->components as $component)
|
@foreach ($asset->components as $component)
|
||||||
|
|
||||||
|
|
||||||
@if (is_null($component->deleted_at))
|
@if (is_null($component->deleted_at))
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -612,6 +614,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $component->pivot->assigned_qty }}</td>
|
<td>{{ $component->pivot->assigned_qty }}</td>
|
||||||
<td>{{ $component->purchase_cost }}</td>
|
<td>{{ $component->purchase_cost }}</td>
|
||||||
|
<?php $totalCost = $totalCost + $component->purchase_cost ;?>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
|
@ -620,7 +623,9 @@
|
||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="7" class="text-right">{{ $use_currency.$totalCost }}</td>
|
<td colspan="2">
|
||||||
|
</td>
|
||||||
|
<td>{{ $totalCost }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue