use Carbon\Carbon; @extends('layouts.default') @section('title', trans('invoices.receive_payment') . 'for ' . $customer_parent->original['full_name']) @section('new_button') @endsection @section('content')
{!! Form::open(['url' => 'incomes/invoices/customerpayment', 'files' => true, 'id' => 'customerpayment','role' => 'form']) !!}
{{ Form::textGroup('name', trans('general.coustomer_name'), $customer->name, ['disabled' => 'disabled']) }}
{{ Form::textGroup('paid_at', trans('general.date'), Date::now()->format(env('APP_DATE')), ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'mm-dd-yyyy\'', 'data-mask' => '']) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), $payment_methods, isset($customer->payment_method)?$customer->payment_method:config('accounts.payment_method'), []) }}
{{ Form::selectGroup('account_id', trans_choice('general.depositto', 1), $accounts, setting('general.default_account'),['data-live-search'=>'true']) }}
{{ Form::hidden('account_chart_id', null, ['id'=>'account_chart_id']) }} {{ Form::hidden('customer_id', isset($customer->id)) }} {!! Form::hidden('currency_code', 'USD' , ['id' => 'currency_code']) !!}

Outstanding Transactions

{{ trans('general.description') }} {{ trans('invoices.due_date') }} {{ trans('general.totalamount') }} {{ trans('general.recivedamount') }} {{ trans_choice('general.balance', 2) }} {{ 'Discount Account' }} {{ 'Discount' }} {{ trans_choice('general.payments',1) }}
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
{{ Form::saveButton('Save incomes/invoices') }}
{!! Form::close() !!} @foreach($payments_lists as $k => $payments_list)

{{ $payments_list->invoice_number . $payments_list->notes }}

{{ trans('invoices.histories') }}

@foreach($payments_list->histories as $histories) @endforeach
{{ trans('general.date') }} {{ trans_choice('general.statuses', 1) }} {{ trans('general.description') }}
{{ Date::parse($histories->created_at)->format($date_format) }} {{ $histories->status->name }} {{ isset($histories->description)?$histories->description:'' }}

{{ trans('invoices.payments') }}

@foreach($payments_list->payments as $payment) @endforeach
{{ trans('general.date') }} {{ trans('general.amount') }} {{ trans_choice('general.accounts', 1) }}
{{ Date::parse($payment->paid_at)->format($date_format) }} @money($payment->amount, $payment->currency_code, true) {{ isset($payment->account->name_number)?$payment->account->name_number:'Credit Memo' }}
@include('accounts/common/models/chartofaccount',['account_details_name'=>$account_details_name,'types'=>$types]) @endforeach @include('includes.datepicker') @endsection