@extends('layouts.acc_layout') @section('Auto Voucher Settings', '| ' . $pageTitle) @section('stylesheets') @endsection @section('content')
{{ $pageTitle }}
{!! Form::open([ 'url' => route('finalPaymentAutoVoucherMasterConfiguration.create'), 'class' => 'form-horizontal', 'method' => 'GET', ]) !!} {{ csrf_field() }}
{{ Form::label('project_id_fk', 'Project') }} {!! Form::text('project_id_fk', $mProject->find($fpAvMaster->project_id_fk)->name ?? '', [ 'class' => 'form-control project', 'autocomplete' => 'off', 'readonly', ]) !!}
{{ Form::label('project_type_id_fk', 'Project Type') }} {!! Form::text('project_type_id_fk', $mProjectType->find($fpAvMaster->project_type_id_fk)->name ?? '', [ 'class' => 'form-control project-type', 'autocomplete' => 'off', 'readonly', ]) !!}
{{ Form::label('voucher_type_id_fk', 'Voucher Type') }} {!! Form::text('voucher_type_id_fk', $mAddVoucherType->find($fpAvMaster->voucher_type_id_fk)->name ?? '', [ 'class' => 'form-control voucher-type', 'autocomplete' => 'off', 'readonly', ]) !!}
""
{!! Form::button("", ['type' => 'submit', 'class' => 'btn btn-info', 'disabled']) !!}
{!! Form::close() !!}

{!! Form::open([ 'url' => route('finalPaymentAutoVoucherMasterConfiguration.update', $fpAvMaster->id), 'class' => 'form-horizontal', 'id' => 'form-nagodan', ]) !!} {{ csrf_field() }} {!! Form::hidden('project_id_fk', $fpAvMaster->project_id_fk, [ 'class' => 'form-control project project-hidden', 'autocomplete' => 'off', ]) !!} {!! Form::hidden('project_type_id_fk', $fpAvMaster->project_type_id_fk, [ 'class' => 'form-control project-type project-type-hidden', 'autocomplete' => 'off', ]) !!} {!! Form::hidden('voucher_type_id_fk', $fpAvMaster->voucher_type_id_fk, [ 'class' => 'form-control voucher-type-hidden', 'autocomplete' => 'off', ]) !!}
{{-- Item Wrapper --}}
@if ($fpAvMaster->items) @foreach ($fpAvMaster->items as $item)
{{ Form::label('project_template_id_fk', 'Project', ['style' => 'font-weight: bold;']) }} {{ Form::select('project_template_id_fk[]', $projectOptionList, $item->project_id_fk, ['class' => 'form-control project-template', 'autocomplete' => 'off']) }}
{{ Form::label('project_type_template_id_fk', 'Project Type', ['style' => 'font-weight: bold;']) }} {{ Form::select('project_type_template_id_fk[]', $projectTypeOptionList, $item->project_type_id_fk, ['class' => 'form-control project-type-template', 'autocomplete' => 'off']) }}
{{ Form::label('counter', 'Counter', ['style' => 'font-weight: bold;']) }} {{ Form::select('counter[]', [0 => 'N/A', 1 => 1, 2 => 2, 3 => 3], $item->counter ?? 0, ['class' => 'form-control counter-template', 'autocomplete' => 'off']) }}
{{-- Hidden attr for breaking dr and cr id project and project type wise --}} {{ Form::hidden('debit[]', '-', ['class' => 'form-control project-template', 'autocomplete' => 'off']) }} {{ Form::hidden('credit[]', '-', ['class' => 'form-control project-template', 'autocomplete' => 'off']) }} {{ Form::hidden('amount_head[]', '-', ['class' => 'form-control project-template', 'autocomplete' => 'off']) }}
@php $headOptions = $mFpAvMasterItem ->getByProjectAndProjectTypeId( $item->project_id_fk, $item->project_type_id_fk, ) ->filter(function ($item) use ( $mAddLedger, $mTransactionHeadInfo, ) { if ( empty($item->ledger_id_fk) ) { return false; } $ledger = $mAddLedger ->where( 'id', $item->ledger_id_fk, ) ->first(); $head = $mTransactionHeadInfo ->where( 'id', $item->hr_transaction_head_informations_id_fk, ) ->first(); if (!$head) { return false; } $item->name = $head->name . ' - ' . $ledger->code; $item->head_id_fk = $head->id; return true; }) ->pluck('name', 'head_id_fk') ->toArray(); @endphp @foreach ($item->subItems as $subItem) @endforeach
Amount Head Before Mature After Mature Action
Debit Credit Debit Credit
@endforeach @endif

{!! Form::close() !!}
{{-- ./panel-body --}}
{{-- ./col-md-12 --}}
{{-- .row --}}
{{-- ./panel-body --}}
{{-- ./panel --}}
{{-- ./col-md-10 --}}
{{-- Template --}} @endsection @section('script') @endsection