{!! Form::open(['url' => action('TransactionPaymentController@update', [$payment_line->id]), 'method' => 'put', 'id' => 'transaction_payment_add_form', 'files' => true ]) !!} {!! Form::hidden('default_payment_accounts', !empty($transaction->location) ? $transaction->location->default_payment_accounts : '[]', ['id' => 'default_payment_accounts']); !!}

@lang( 'purchase.edit_payment' )

@if(!empty($transaction->contact))
@lang('purchase.supplier'): {{ $transaction->contact->name }}
@lang('business.business'): {{ $transaction->contact->supplier_business_name }}
@endif @if($transaction->type != 'opening_balance')
@lang('purchase.ref_no'): {{ $transaction->ref_no }}
@if(!empty($transaction->location)) @lang('purchase.location'): {{ $transaction->location->name }} @endif
@lang('sale.total_amount'): {{ $transaction->final_total }}
@lang('purchase.payment_note'): @if(!empty($transaction->additional_notes)) {{ $transaction->additional_notes }} @else -- @endif
@endif
{!! Form::label("amount" , __('sale.amount') . ':*') !!}
{!! Form::text("amount", @num_format($payment_line->amount), ['class' => 'form-control input_number', 'required', 'placeholder' => 'Amount']); !!}
{!! Form::label("paid_on" , __('lang_v1.paid_on') . ':*') !!}
{!! Form::text('paid_on', @format_datetime($payment_line->paid_on), ['class' => 'form-control', 'readonly', 'required']); !!}
{!! Form::label("method" , __('purchase.payment_method') . ':*') !!}
{!! Form::select("method", $payment_types, $payment_line->method, ['class' => 'form-control select2 payment_types_dropdown', 'required', 'style' => 'width:100%;']); !!}
{!! Form::label('document', __('purchase.attach_document') . ':') !!} {!! Form::file('document', ['accept' => implode(',', array_keys(config('constants.document_upload_mimes_types')))]); !!}

@lang('lang_v1.previous_file_will_be_replaced') @includeIf('components.document_help_text')

@if(!empty($accounts))
{!! Form::label("account_id" , __('lang_v1.payment_account') . ':') !!}
{!! Form::select("account_id", $accounts, !empty($payment_line->account_id) ? $payment_line->account_id : '' , ['class' => 'form-control select2', 'id' => "account_id", 'style' => 'width:100%;']); !!}
@endif
@include('transaction_payment.payment_type_details')
{!! Form::label("note", __('lang_v1.payment_note') . ':') !!} {!! Form::textarea("note", $payment_line->note, ['class' => 'form-control', 'rows' => 3]); !!}
{!! Form::close() !!}