mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Disallow checkout if qty = 0
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
688577c1ed
commit
0a9bd07f20
|
@ -126,10 +126,21 @@
|
|||
@endif
|
||||
|
||||
@can('checkout', \App\Models\Consumable::class)
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('consumables.checkout.show', $consumable->id) }}" style="padding-bottom:5px;" class="btn btn-primary btn-sm" {{ (($consumable->numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
@if ($consumable->numRemaining() > 0)
|
||||
<a href="{{ route('consumables.checkout.show', $consumable->id) }}" style="padding-bottom:5px;" class="btn btn-primary btn-sm">
|
||||
{{ trans('general.checkout') }}
|
||||
</a>
|
||||
@else
|
||||
<button style="padding-bottom:5px;" class="btn btn-primary btn-sm disabled">
|
||||
{{ trans('general.checkout') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endcan
|
||||
|
||||
@if ($consumable->notes)
|
||||
|
||||
|
|
Loading…
Reference in a new issue