Skip to content

Commit

Permalink
Fixing a divide by zero situation. See #353
Browse files Browse the repository at this point in the history
  • Loading branch information
kunnis committed Mar 1, 2015
1 parent 1ef2fb7 commit a859e88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/corporation/starbase/starbase.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,12 @@
{{ Seat\Services\Helpers\Img::type($content_item['typeID'], 32, array('style' => 'width: 18px;height: 18px;', )) }}
{{ $content_item['name'] }}
</td>
<td>{{ round(( ($content_item['quantity'] * $content_item['volume']) / $module_content['used_volume']) * 100, 0) }}%</td>
{{-- Report 0% if the used_volume is 0. This can happen if there's just a bookmarks in a CHA. --}}
@if($module_content['used_volume'] > 0)
<td>{{ round(( ($content_item['quantity'] * $content_item['volume']) / $module_content['used_volume']) * 100, 0) }}%</td>
@else
<td>0%</td>
@endif
</tr>

@endforeach
Expand Down

0 comments on commit a859e88

Please sign in to comment.