@extends('layouts.default') @section('title', trans('bills.bill_payment')) @section('content')
@if($errors->any()) @foreach ($errors->all() as $error)
{{ $error }}
@endforeach @endif
{!! Form::open(['url' => 'expenses/bills/payment', 'files' => true, 'id' => 'payment','role' => 'form']) !!}
{{ Form::textGroup('name', trans('general.name'), $bill->vendor_name, ['disabled' => 'disabled']) }}
{{ Form::textGroup('paid_at', trans('bills.payment_date'), Date::now()->format('Y-m-d'), ['id' => 'paid_at', 'class' => 'form-control', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'']) }}
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), $accounts, setting('general.default_account'), ['data-live-search'=>'true']) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), $payment_methods, setting('general.default_payment_method')) }}

{!! Form::hidden('currency_code', 'USD',['id' => 'currency_code']) !!} {!! Form::hidden('bill_id', $bill->id, ['id' => 'bill_id']) !!} {!! Form::hidden('bill_id_return', 1, ['id' => 'bill_id']) !!} {{ Form::hidden('account_chart_id',null,['id'=>'account_chart_id']) }}

Outstanding Transactions

{{ trans('general.description') }} {{ trans('invoices.due_date') }} {{ trans('general.totalamount') }} {{ trans('general.paidamount') }} {{ trans_choice('general.balance', 2) }} {{ trans_choice('general.payments',1) }}
{{ $bill->bill_number }} {{ Date::parse($bill->due_at)->format($date_format) }} @money($bill->amount,$bill->currency_code,true) @money($paid_amount,$bill->currency_code,true) @money(($bill->amount - $paid_amount),$bill->currency_code,true) @if($bill->amount - $paid_amount != 0)
@else Full Paid @endif
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
@if($bill->amount - $paid_amount != 0) @endif {!! Form::close() !!}
@include('includes.datepicker') @endsection