@php($page = 'vouchers') {{env('APP_NAME')}} | View Voucher {{-- --}}
@include("components.navbar")
@include("components.sidebar")

Voucher Information

{{-- Actions --}}
Title : {{$voucher->title}}
Voucher #ID. : {{$voucher->code}}
Category : {{$voucher->category}}
Amount : {{formatPrice($voucher->total)}}
Date : {{$voucher->date}}
Remarks : {{$voucher->remarks}}

Status : {{$voucher->status}}
Created By : {{$voucher->user->fullname ?? ""}}
Created At : {{substr($voucher->created_at,0,10)}}
Approved By : {{$voucher->approvedBy->fullname ?? ""}}
Approved At : {{substr($voucher->approved_at,0,10)}}

@if($voucher->attachment)
Attachment:
@endif
@if($voucher->status !== 'Canceled') @if(in_array($voucher->status, ['Pending']) ) Edit @endif {{-- APPROVE --}} @can('approve_vouchers') @if($voucher->status == "Pending")
@csrf @method('PUT')
@csrf @method('PUT')
@endif @endcan @can('cancel_vouchers') {{-- CANCEL --}}
@csrf @method('PUT')
@endcan @endif
@include("components.footer")
{{-- --}} {{-- --}}