@extends('layout.app') @section('title', 'Edit Purchase Voucher') @push('header_script') @endpush @section('content')
{!! Form::open([ 'route' => ['purchase-voucher.update', $purchaseVoucher->id], 'onsubmit' => 'BtnSubmit.disabled = true', 'class' => 'needs-validation', 'method' => 'put', 'autocomplete' => 'off', 'files' => true, ]) !!}
{{-- ======================================== SECTION 1: VOUCHER DETAILS ======================================== --}}
Voucher Details
{{ $errors->first('voucher_no') }}
{{ $errors->first('voucher_date') }}
{{ $errors->first('supplier_invoice_no') }}
{{ $errors->first('supplier_invoice_date') }}
{{-- ======================================== PARTY DETAILS CARD ======================================== --}}
Party Details
{{ $partyDetails ? $partyDetails->party_name : '-' }}
{{ $partyDetails ? $partyDetails->gst_no : '-' }}
{{ $partyDetails ? $partyDetails->mobile_no : '-' }}
{{ $partyDetails ? $partyDetails->address : '-' }}
{{ $partyDetails ? ($partyDetails->city->city_name ?? '') . ' / ' . ($partyDetails->state->state_name ?? '') : '-' }}
{{ $partyDetails ? $partyDetails->register_type : '-' }}
-
{{-- ======================================== INFORMATION PANEL CARD ======================================== --}}
Information Panel
{!! Form::select( 'party_account_ledger_id', ['' => '--Select--'] + $partyLedger, $purchaseVoucher->party_account_ledger_id, ['class' => 'form-control select2', 'id' => 'party_account_ledger_id', 'required'], ) !!} Balance:
{{ $errors->first('party_account_ledger_id') }}
@php $is_party_cash_bank = 'no'; if ( $partyDetails?->accountLedger?->accountGroup?->a_group_name == 'Cash In Hand' || $partyDetails?->accountLedger?->accountGroup?->a_group_name == 'Bank Accounts' ) { $is_party_cash_bank = 'yes'; } @endphp
{{ $errors->first('created_by') }}
@if ($purchaseVoucher->doc) View Doc @endif
{{ $errors->first('doc') }}
{{-- ======================================== SECTION 3: SELECTED ITEM DETAILS ======================================== --}}
Selected Item Details
@php $i = 10; @endphp @foreach ($purchaseVoucher->voucherDetails as $details) @php $i++; @endphp @endforeach
Name of Item * Qty * Unit * Rate/Unit * Amount * Tax Rate (%) Tax Amount Total Amount *
{!! Form::select('product_id[]', ['' => '--Select--'] + $product, $details->product_id, [ 'class' => 'form-control select2', 'id' => "product_id_$i", 'required', ]) !!} @php $isGstApplicable = ($details->product && $details->product->gst_applicable == 'yes') ? true : false; $selectAttributes = [ 'class' => 'form-control select2 taxGroupIds', 'id' => 'tax_group_id_' . $i, 'required' ]; if (!$isGstApplicable) { $selectAttributes['disabled'] = 'disabled'; } @endphp {!! Form::select('tax_group_id[]', ['' => '--Select--'] + $taxGroup, $details->tax_group_id, $selectAttributes) !!} @if (!$loop->first) @endif
Total Amount
{{-- Calculation Section --}}
(Enter negative value to deduct)
@php $j = 10; @endphp @if ($purchaseVoucher->voucherExpense->isNotEmpty()) @foreach ($purchaseVoucher->voucherExpense as $expense)
@php $j++; @endphp @endforeach @endif
(Enter negative value to deduct)
@php $ag = 10; @endphp @if (optional($purchaseVoucher->voucherAfterGstCharge)->isNotEmpty()) @foreach ($purchaseVoucher->voucherAfterGstCharge as $afterGst)
@php $ag++; @endphp @endforeach @endif
@php $k = 10; @endphp @if ($purchaseVoucher->voucherPayment->isNotEmpty()) @foreach ($purchaseVoucher->voucherPayment as $payment)
@php $k++; @endphp @endforeach @endif
{{ $errors->first('remark') }}
{!! Form::close() !!}
@include('common.modal.common_party') @include('common.modal.product') @endsection @push('footer_script') {{-- Party modal --}} {{-- - product modal ---------- --}} @endpush