first commit
This commit is contained in:
102
resources/views/customers/dashboard/index.blade.php
Normal file
102
resources/views/customers/dashboard/index.blade.php
Normal file
@@ -0,0 +1,102 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans('general.dashboard'))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Invoices List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans_choice('general.invoices', 2) }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($user->invoices->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}</th>
|
||||
<th>{{ trans_choice('general.customers', 1) }}</th>
|
||||
<th>{{ trans('invoices.total_price') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('invoices.invoice_date') }}</th>
|
||||
<th style="width: 18%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($user->invoices as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customer/invoices/' . $item->id . '/edit') }}">{{ $item->invoice_number }}</a></td>
|
||||
<td>{{ $item->customer_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Revenues List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans_choice('general.payments', 2) }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($user->revenues->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($user->revenues as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customer/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>{{ $item->account->name }}</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>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
68
resources/views/customers/invoices/index.blade.php
Normal file
68
resources/views/customers/invoices/index.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 2))
|
||||
|
||||
@permission('create-customers-invoices')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('customers/invoices/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/invoices', '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('status', $status, request('status'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('status.all')]) !!}
|
||||
{!! 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-invoices">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('invoice_number', trans('invoices.invoice_number'))</th>
|
||||
<th>@sortablelink('customer_name', trans_choice('general.customers', 1))</th>
|
||||
<th>@sortablelink('amount', trans('invoices.total_price'))</th>
|
||||
<th>@sortablelink('status.name', trans('general.status'))</th>
|
||||
<th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
|
||||
<th>@sortablelink('due_at', trans('invoices.due_date'))</th>
|
||||
<th style="width: 18%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customers/invoices/' . $item->id . '/edit') }}">{{ $item->invoice_number }}</a></td>
|
||||
<td>{{ $item->customer_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
|
||||
<td>{{ Date::parse($item->due_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/invoices/' . $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' => $invoices, 'type' => 'invoices'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
141
resources/views/customers/invoices/invoice.blade.php
Normal file
141
resources/views/customers/invoices/invoice.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
@extends('layouts.invoice')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<section class="invoice">
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="max-width: 214px">{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
449
resources/views/customers/invoices/show.blade.php
Normal file
449
resources/views/customers/invoices/show.blade.php
Normal file
@@ -0,0 +1,449 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<section class="invoice">
|
||||
<span class="badge bg-aqua">{{ $invoice->status->name }}</span>
|
||||
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if ($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer row no-print">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ url('incomes/invoices/' . $invoice->id . '/print') }}" target="_blank" class="btn btn-default">
|
||||
<i class="fa fa-print"></i> {{ trans('general.print') }}
|
||||
</a>
|
||||
<button type="button" id="button-email" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.send_mail') }}">
|
||||
<i class="fa fa-envelope-o"></i> {{ trans('general.send') }}
|
||||
</button>
|
||||
<button type="button" id="button-pdf" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.download_pdf') }}">
|
||||
<i class="fa fa-file-pdf-o"></i> {{ trans('general.download') }}
|
||||
</button>
|
||||
<button type="button" id="button-payment" class="btn btn-success">
|
||||
<i class="fa fa-credit-card"></i> {{ trans('invoices.add_payment') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-left">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.histories') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('general.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->histories as $history)
|
||||
<tr>
|
||||
<td>{{ Date::parse($history->created_at)->format($date_format) }}</td>
|
||||
<td>{{ $history->status->name }}</td>
|
||||
<td>{{ $history->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-right">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.payments') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->payments as $payment)
|
||||
<tr>
|
||||
<td>{{ Date::parse($payment->paid_at)->format($date_format) }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
<td>{{ $payment->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/invoices/' . $payment->id . '') }}" class="btn btn-info btn-xs hidden"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('incomes/revenues/' . $payment->id . '/edit') }}" class="btn btn-primary btn-xs hidden"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-payment-' . $payment->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => ['incomes/invoices/paymentDestroy', $payment->id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#invoice-payment-' . $payment->id . '", "' . trans_choice('general.payments', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . Date::parse($payment->paid_at)->format($date_format) . ' - ' . money($payment->amount, $payment->currency_code, true) . ' - ' . $payment->account->name . '</strong>', 'type' => strtolower(trans_choice('general.revenues', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '#button-payment', function (e) {
|
||||
$('#payment-modal').remove();
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="modal fade" id="payment-modal" tabindex="-1" role="dialog" aria-labelledby="paymentModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content box box-success">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="paymentModalLabel">{{ trans('invoices.add_payment') }}</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body box-body">';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('paid_at', trans('general.date'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-calendar"></i></div>';
|
||||
html += ' {!! Form::text('paid_at', \Carbon\Carbon::now()->toDateString(), ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('amount', trans('general.amount'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-money"></i></div>';
|
||||
html += ' {!! Form::text('amount', $invoice->grand_total, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('general.amount')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('account_id', trans_choice('general.accounts', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-university"></i></div>';
|
||||
html += ' {!! Form::select('account_id', $accounts, setting('general.default_account'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||
html += ' {!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}';
|
||||
html += ' {!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-12">';
|
||||
html += ' {!! Form::label('description', trans('general.description'), ['class' => 'control-label']) !!}';
|
||||
html += ' {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => '3', 'placeholder' => trans('general.form.enter', ['field' => trans('general.description')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('payment_method', trans_choice('general.payment_methods', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-folder-open-o"></i></div>';
|
||||
html += ' {!! Form::select('payment_method', $payment_methods, setting('general.default_payment_method'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6">';
|
||||
html += ' {!! Form::label('reference', trans('general.reference'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-file-text-o"></i></div>';
|
||||
html += ' {!! Form::text('reference', null, ['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => trans('general.reference')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' {!! Form::hidden('invoice_id', $invoice->id, ['id' => 'invoice_id', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" onclick="addPayment();" class="btn btn-success">{{ trans('general.save') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#payment-modal').modal('show');
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-pdf', function (e) {
|
||||
location.href = "{{ url('incomes/invoices/' . $invoice->id . '/pdf') }}";
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-email', function (e) {
|
||||
$('#email-modal').remove();
|
||||
|
||||
var html = '<div class="modal fade" id="email-modal" tabindex="-1" role="dialog" aria-labelledby="emailModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="emailModalLabel">Overflowing text</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body">';
|
||||
html += ' N/A';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" class="btn btn-success">Save changes</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#email-modal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
function addPayment() {
|
||||
$('.help-block').remove();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("incomes/invoices/payment") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#payment-modal input[type=\'text\'], #payment-modal input[type=\'hidden\'], #payment-modal textarea, #payment-modal select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
beforeSend: function() {
|
||||
$('#payment-modal .modal-content').append('<div id="loading" class="text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>');
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading').remove();
|
||||
},
|
||||
success: function(data) {
|
||||
$("#payment-modal").modal('hide');
|
||||
|
||||
location.reload();
|
||||
},
|
||||
error: function(data){
|
||||
var errors = data.responseJSON;
|
||||
|
||||
if (typeof errors !== 'undefined') {
|
||||
if (errors.paid_at) {
|
||||
$('#payment-modal #paid_at').parent().after('<p class="help-block">' + errors.paid_at + '</p>');
|
||||
}
|
||||
|
||||
if (errors.amount) {
|
||||
$('#payment-modal #amount').parent().after('<p class="help-block">' + errors.amount + '</p>');
|
||||
}
|
||||
|
||||
if (errors.account_id) {
|
||||
$('#payment-modal #account_id').parent().after('<p class="help-block">' + errors.account_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.currency_code) {
|
||||
$('#payment-modal #currency_code').parent().after('<p class="help-block">' + errors.currency_code + '</p>');
|
||||
}
|
||||
|
||||
if (errors.category_id) {
|
||||
$('#payment-modal #category_id').parent().after('<p class="help-block">' + errors.category_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.payment_method) {
|
||||
$('#payment-modal #payment_method').parent().after('<p class="help-block">' + errors.payment_method + '</p>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
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
|
||||
|
||||
56
resources/views/customers/transactions/index.blade.php
Normal file
56
resources/views/customers/transactions/index.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.transactions', 2))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/transactions', '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::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-transactions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('account.name', trans('accounts.account_name'))</th>
|
||||
<th>@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr>
|
||||
<td>{{ Date::parse($item->date)->format($date_format) }}</td>
|
||||
<td>{{ $item->account }}</td>
|
||||
<td>{{ $item->type }}</td>
|
||||
<td>{{ $item->category }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
Reference in New Issue
Block a user