@extends('layouts.app') @php($editing = isset($item) && $item !== null) @php($selectedType = old('voucher_type', $item->voucher_type ?? $defaultType)) @php($formLines = old('lines', $item->form_lines ?? [])) @php($standardLines = $selectedType === 'contra' ? [] : ($formLines ?: ($selectedType === 'journal' ? [['account_id' => '', 'entry_type' => 'debit', 'amount' => ''], ['account_id' => '', 'entry_type' => 'credit', 'amount' => '']] : [['account_id' => '', 'amount' => '']]))) @php($contraLines = $selectedType === 'contra' ? ($formLines ?: [['debit_account_id' => '', 'debit_amount' => '', 'credit_account_id' => '', 'credit_amount' => '']]) : []) @php($selectedLabel = $selectedType === 'receipt' ? 'Receive' : ucfirst($selectedType)) @section('title', $selectedLabel . ' Voucher Create') @section('content')

{{ $selectedLabel }} Voucher Create

@can('viewAny', \App\Models\Voucher::class) Voucher List @endcan
@if ($errors->any())
@endif
@csrf @if ($editing) @method('PUT') @endif
{{ $selectedLabel }} Voucher Information
S/L Account Head * Trnx Type * Amount * Details
Total Debit 0.00
Total Credit 0.00
Difference 0.00 Not balanced
S/L Debit Account Head * Dr. Amount * Credit Account Head * Cr. Amount *
Total Debit 0.00 Total Credit 0.00
Difference Not balanced
Basic Information
PDF, JPG or PNG; max 5 MB. @if ($editing && $item->attachment_path) Download current file @endif
Cancel
@endsection