@if (!empty($transaction->location)) {!! Form::hidden('default_payment_accounts', $transaction->location->default_payment_accounts, [ 'id' => 'default_payment_accounts', ]) !!} @endif

@lang('purchase.add_payment')

@if (!empty($transaction->contact))
@if (in_array($transaction->type, ['purchase', 'purchase_return'])) @lang('purchase.supplier') @elseif(in_array($transaction->type, ['sell', 'sell_return'])) @lang('contact.customer') @endif :{{ $transaction->contact->name }}
@if ($transaction->type == 'purchase') @lang('business.business'): {{ $transaction->contact->supplier_business_name }} @endif
@endif
@if (in_array($transaction->type, ['sell', 'sell_return'])) @lang('sale.invoice_no'): {{ $transaction->invoice_no }} @else @lang('purchase.ref_no'): {{ $transaction->ref_no }} @endif @if (!empty($transaction->location))
@lang('purchase.location'): {{ $transaction->location->name }} @endif
@lang('sale.total_amount'): 0
@lang('purchase.payment_note'): @if (!empty($transaction->additional_notes)) {{ $transaction->additional_notes }} @else -- @endif
{!! Form::label('amount', __('sale.amount') . ':*') !!}
{!! Form::text('amount', 0, [ 'class' => 'form-control input_number', 'id' => 'modal_amount', 'required', 'placeholder' => 'Amount', ]) !!}
{!! Form::label('paid_on', __('lang_v1.paid_on') . ':*') !!}
{!! Form::text('paid_on', @format_datetime($payment_line->paid_on), [ 'class' => 'form-control exchange_paid_on', '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%;', ]) !!}
@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
{!! Form::label('document', __('purchase.attach_document') . ':') !!} {!! Form::file('document', [ 'accept' => implode(',', array_keys(config('constants.document_upload_mimes_types'))), ]) !!}

@includeIf('components.document_help_text')

@include('Exchange.payment_type_details')
{!! Form::label('note', __('lang_v1.payment_note') . ':') !!} {!! Form::textarea('note', $payment_line->note, ['class' => 'form-control', 'rows' => 3]) !!}