@extends('layouts.app') @section('content') Edit Shareholder Account @method('PUT') @csrf {{-- Location dropdown --}} {!! Form::label('location_id', __('purchase.business_location').':*') !!} {!! Form::select('location_id', $business_locations, old('location_id', optional($shareholderAccount->transaction)->location_id ?? null), ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required'], $bl_attributes); !!} {{-- Shareholder details --}} @include('shareholder_account.form', ['account' => $shareholderAccount]) {{-- Payment details --}} @component('components.widget', ['class' => 'box-solid', 'id' => "payment_rows_div", 'title' => __('purchase.add_payment')]) @foreach($payments as $index => $payment_line) @php $row_index = $index; @endphp {{-- Amount --}} {!! Form::label("amount_$row_index" ,__('sale.amount') . ':*') !!} {!! Form::text("payment[$row_index][amount]", $payment_line['amount'], ['class' => 'form-control payment-amount input_number', 'required', 'id' => "amount_$row_index"]); !!} {{-- Paid On --}} {!! Form::label("paid_on_$row_index" , __('lang_v1.paid_on') . ':*') !!} {!! Form::text("payment[$row_index][paid_on]", $payment_line['paid_on'], ['class' => 'form-control paid_on', 'required']); !!} {{-- Payment method --}} {!! Form::label("method_$row_index" , __('lang_v1.payment_method') . ':*') !!} {!! Form::select("payment[$row_index][method]", $payment_types, $payment_line['method'], ['class' => 'form-control payment_types_dropdown', 'required', 'id' => "method_$row_index"]); !!} {{-- Payment account --}} @if(!empty($accounts)) {!! Form::label("account_$row_index" , __('lang_v1.payment_account') . ':') !!} {!! Form::select("payment[$row_index][account_id]", $accounts, $payment_line['account_id'], ['class' => 'form-control select2 account-dropdown', 'id' => "account_$row_index"]); !!} @endif {{-- Note --}} {!! Form::label("note_$row_index", __('sale.payment_note') . ':') !!} {!! Form::textarea("payment[$row_index][note]", $payment_line['note'], ['class' => 'form-control', 'rows' => 2, 'id' => "note_$row_index"]); !!} @endforeach @endcomponent Update @endsection @section('javascript') @endsection