@php $accAccountLedger = DB::table('acc_account_ledger')->get(); $transactionHeadCount = $transactionHeads->count(); $rowSpanProjectType = $transactionHeadCount + $transactionHeadCount; @endphp {!! Form::open(['url'=>'/hr/autoVoucherSettings/save','class'=>'form-horizontal']) !!}
{{-- When auto voucher settings dont exist --}} {{ Form::hidden('project_id_fk', $projectSelected->id) }} @foreach($projectTypes as $projectTypeIndex => $projectType) @foreach($staffTypes as $staffTypeIndex => $staffType) @foreach($transactionHeads as $transactionHeadIndex => $transactionHead) {{ Form::hidden('project_type_id_fk[]', $projectType->id) }} {{ Form::hidden('staff_type_id_fk[]', $staffType->id) }} {{ Form::hidden('transaction_head_id_fk[]', $transactionHead->id) }} @if($staffTypeIndex == 0 && $transactionHeadIndex == 0) @endif @if($transactionHeadIndex == 0) @endif @endforeach @endforeach @endforeach {{-- When auto voucher settings exist --}}
Project Type Type Transaction Head Ledger Code ( Pri ) Ledger Code ( Int )
{{ $projectType->name }}{{ $staffType->name }}{{ $transactionHead->name }} {{ Form::text('ledger_account_pri_code_id[]',$autoVoucherSetting ? $autoVoucherSettingItem->getLedgerCode($autoVoucherSetting->id,$projectType->id, $staffType->id,$transactionHead->id, 'acc_account_ledger_id_fk_for_ledger_code_pri') : null,['class'=>'form-control text-right js-borderEffect','autocomplete'=>'off']) }} {{ Form::text('ledger_account_int_code_id[]',$autoVoucherSetting ? $autoVoucherSettingItem->getLedgerCode($autoVoucherSetting->id,$projectType->id, $staffType->id,$transactionHead->id, 'acc_account_ledger_id_fk_for_ledger_code_int') : null,['class'=>'form-control text-right js-borderEffect','autocomplete'=>'off']) }}
{{-- ./col-md-12 --}}
{{-- ./row --}}

Reset {!! Form::button(" Save",['type'=>'submit','class'=>'btn btn-success']) !!}
{!! Form::close() !!}