first commit
This commit is contained in:
64
resources/views/customers/payments/index.blade.php
Normal file
64
resources/views/customers/payments/index.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.payments', 1))
|
||||
|
||||
@permission('create-customers-revenues')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('incomes/revenues/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/payments', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('category_id', $categories, request('category_id'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!}
|
||||
{!! Form::select('payment_method', $payment_methods, request('payment_method'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans_choice('general.payment_methods', 2)]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-revenues">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('payment_method', trans_choice('general.payment_methods', 1))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customers/payments/' . $item->id . '') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $payment_methods[$item->payment_method] }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/payments/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $payments, 'type' => 'payments'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
107
resources/views/customers/payments/show.blade.php
Normal file
107
resources/views/customers/payments/show.blade.php
Normal file
@@ -0,0 +1,107 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1))
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<div class="invoice"><span class="badge" style="background-color : {{ $payment->category->color }}">{{ $payment->category->name }}</span>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="page-header">
|
||||
<i class="fa fa-globe"></i> {{ $payment->customer->name }}
|
||||
<small class="pull-right">{{ trans('general.date') }}: {{ Date::parse($payment->paid_at)->format($date_format) }}</small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row invoice-info">
|
||||
<div class="col-sm-4 invoice-col">
|
||||
{{ trans('general.from') }}
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
{{ trans('general.phone') }}: (804) 123-5432<br>
|
||||
{{ trans('general.email') }}: {{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-sm-4 invoice-col">
|
||||
{{ trans('general.to') }}
|
||||
<address>
|
||||
<strong>{{ $payment->customer->name }}</strong><br>
|
||||
{{ $payment->customer->address }}<br>
|
||||
{{ trans('general.phone') }}: {{ $payment->customer->phone }}<br>
|
||||
{{ trans('general.email') }}: {{ $payment->customer->email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-sm-4 invoice-col">
|
||||
<b>{{ trans('invoices.payment_due') }}:</b> {{ Date::parse($payment->paid_at)->format($date_format) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th>{{ trans_choice('general.payment_methods', 1) }}</th>
|
||||
<th>{{ trans('general.reference') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $payment->category->name }}</td>
|
||||
<td>{{ $payment_methods[$payment->payment_method] }}</td>
|
||||
<td>{{ $payment->reference }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@if ($payment->description)
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<p class="lead">{{ trans('general.description') }}:</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $payment->description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($payment->attachment)
|
||||
<div class="box-footer">
|
||||
<ul class="mailbox-attachments clearfix">
|
||||
@if (1)
|
||||
<li>
|
||||
<span class="mailbox-attachment-icon"><i class="fa fa-file-pdf-o"></i></span>
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="#" class="mailbox-attachment-name"><i class="fa fa-paperclip"></i> {{ basename($payment->attachment) }}</a>
|
||||
<span class="mailbox-attachment-size">
|
||||
<a href="#" class="btn btn-default btn-xs pull-right"><i class="fa fa-cloud-download"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@else
|
||||
<li>
|
||||
<span class="mailbox-attachment-icon has-img"><img src="{{ asset($payment->attachment) }}" alt="Attachment"></span>
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="#" class="mailbox-attachment-name"><i class="fa fa-camera"></i> {{ basename($payment->attachment) }}</a>
|
||||
<span class="mailbox-attachment-size">
|
||||
<a href="#" class="btn btn-default btn-xs pull-right"><i class="fa fa-cloud-download"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user