@extends('layouts.master') @section('title', 'Receive Voucher Detail') @section('page-header') Receive Voucher Detail @stop @push('style') @endpush @section('content')
@include('partials._alert_message')

@yield('page-header')

Print

Voucher Type {{ $voucher->voucher_type }}

Description {{ $voucher->description }}

Invoice No {{ $voucher->invoice_no }}

Date {{ $voucher->date }}

@foreach($voucher->details as $item) @endforeach @php $totalAmount = $voucher->details->sum('amount') > 0 ? $voucher->details->sum('amount') / 2 : 0; @endphp
Sl Account Debit Credit
{{ $loop->iteration }} {{ optional($item->account)->name }} @if($item->balance_type == 'Debit') {{ number_format($item->amount, 2) }} @endif @if($item->balance_type == 'Credit') {{ number_format($item->amount, 2) }} @endif
Total {{ number_format($totalAmount, 2) }} {{ number_format($totalAmount, 2) }}
@if(request('type') == 'approve' && !$voucher->is_approved)
@csrf
@endif
@endsection