276 lines
14 KiB
PHP
Raw Normal View History

2021-08-03 17:56:52 +03:00
@extends('layouts.admin')
@section('title', $account->name)
@section('new_button')
<div class="dropup header-drop-top">
<button type="button" class="btn btn-white btn-sm" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-chevron-down"></i>&nbsp; {{ trans('general.more_actions') }}
</button>
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@stack('duplicate_button_start')
@can('create-banking-accounts')
<a class="dropdown-item" href="{{ route('accounts.duplicate', $account->id) }}">
{{ trans('general.duplicate') }}
</a>
@endcan
@stack('duplicate_button_end')
<div class="dropdown-divider"></div>
@stack('transaction_button_start')
@can('create-account-transactions')
<a class="dropdown-item" href="{{ route('banking.create-transaction', $account->id) }}">
CREATE TRANSACTION
</a>
@endcan
@stack('transaction_button_end')
@stack('transfer_button_start')
@can('show-performance')
<a class="dropdown-item" href="{{ route('banking.create-transfer', $account->id) }}">
create_transfer
</a>
@endcan
@stack('transfer_button_end')
@stack('performance_button_start')
@can('show-performance')
<a class="dropdown-item" href="{{ route('accounts.show-performance', $account->id) }}">
performance
</a>
@endcan
@stack('performance_button_end')
<div class="dropdown-divider"></div>
@stack('delete_button_start')
@can('delete-banking-accounts')
{!! Form::deleteLink($account, 'accounts.destroy') !!}
@endcan
@stack('delete_button_end')
@stack('button_dropdown_end')
</div>
</div>
@stack('account_edit_button_start')
@can('update-banking-account')
<a href="{{ route('accounts.edit', $account->id) }}" class="btn btn-white btn-sm">
{{ trans('general.edit') }}
</a>
@endcan
@stack('account_edit_button_end')
@endsection
@section('content')
<div class="row">
<div class="col-xl-3">
<ul class="list-group mb-4">
@stack('account_number_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0">
{{ trans_choice('general.account_number', 2) }}
<span class="badge badge-primary badge-pill">{{ }}</span>
</li>
@stack('account_number_end')
@stack('account_currency_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0 border-top-1">
{{ trans_choice('general.transactions', 2) }}
<span class="badge badge-primary badge-pill">{{ $ }}</span>
</li>
@stack('account_currency_end')
@stack('account_starting_balance_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0">
{{ trans_choice('banking.starting_balance', 2) }}
<span class="badge badge-primary badge-pill">{{ }}</span>
</li>
@stack('account_starting_balance_end')
</ul>
<ul class="list-group mb-4">
@stack('bank_name_start')
<li class="list-group-item border-0">
<div class="font-weight-600">{{ trans('') }}</div>
<div><small class="long-texts" title="{{ $account->name }}">{{ $account->name }}</small></div>
</li>
@stack('bank_name_end')
@stack('account_phone_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.phone') }}</div>
<div><small class="long-texts" title="{{ $account->phone }}">{{ $account->phone }}</small></div>
</li>
@stack('account_phone_end')
@stack('account_address_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.address') }}</div>
<div><small class="long-texts" title="{{ $account->address }}">{{ $account->address }}</small></div>
</li>
@stack('account_address_end')
</ul>
@stack('account_edit_button_start')
@stack('account_edit_button_end')
</div>
<div class="col-xl-9">
<div class="row mb--3">
@stack('account_incoming_card_start')
<div class="col-md-4">
<div class="card bg-gradient-success border-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="text-uppercase text-muted mb-0 text-white">{{ trans('general.incoming') }}</h5>
<div class="dropdown-divider"></div>
<span class="h2 font-weight-bold mb-0 text-white">@money($amounts['incoming'], setting('default.currency'), true)</span>
</div>
</div>
</div>
</div>
</div>
@stack('account_incoming_card_end')
@stack('account_outgoing_card_start')
<div class="col-md-4">
<div class="card bg-gradient-warning border-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="text-uppercase text-muted mb-0 text-white">{{ trans('widgets.outgoing') }}</h5>
<div class="dropdown-divider"></div>
<span class="h2 font-weight-bold mb-0 text-white">@money($amounts['outgoing'], setting('default.currency'), true)</span>
</div>
</div>
</div>
</div>
</div>
@stack('account_outgoing_card_end')
@stack('account_balance_card_start')
<div class="col-md-4">
<div class="card bg-gradient-danger border-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="text-uppercase text-muted mb-0 text-white">{{ trans('widgets.balance') }}</h5>
<div class="dropdown-divider"></div>
<span class="h2 font-weight-bold mb-0 text-white">@money($amounts['balance'], setting('default.currency'), true)</span>
</div>
</div>
</div>
</div>
</div>
@stack('account_balance_card_end')
</div>
<div class="row">
<div class="col-md-12">
<div class="nav-wrapper">
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-icons-text" role="tablist">
@stack('account_transactions_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0 active" id="invoices-tab" data-toggle="tab" href="#invoices-content" role="tab" aria-controls="invoices-content" aria-selected="true">
{{ trans_choice('general.invoices', 2) }}
</a>
</li>
@stack('account_transactions_tab_end')
@stack('account_transfers_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0" id="transactions-tab" data-toggle="tab" href="#transactions-content" role="tab" aria-controls="transactions-content" aria-selected="false">
{{ trans_choice('general.transactions', 2) }}
</a>
</li>
@stack('account_transfers_tab_end')
</ul>
</div>
<div class="card">
<div class="tab-content" id="account-tab-content">
@stack('account_transactions_content_start')
<div class="tab-pane fade show active" id="transactions-content" role="tabpanel" aria-labelledby="transactions-tab">
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-invoices">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-4 col-sm-1">{{ trans_choice('general.date', 1) }}</th>
<th class="col-xs-4 col-sm-3 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-3 d-none d-sm-block text-left">{{ trans('general.type') }}</th>
<th class="col-sm-3 d-none d-sm-block text-left">{{ trans('general.category') }}</th>
</tr>
</thead>
<tbody>
@foreach($transactions as $item)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-4 col-sm-1">@date($item->issued_at)</td>
<td class="col-xs-4 col-sm-3 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-3 d-none d-sm-block text-left">{{ $item->type }}</td>
<td class="col-sm-3 d-none d-sm-block text-left">$item->category </td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $transactions, 'type' => 'transactions'])
</div>
</div>
</div>
@stack('account_transactions_content_end')
@stack('customer_transactions_content_start')
<div class="tab-pane fade" id="transactions-content" role="tabpanel" aria-labelledby="transactions-tab">
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-transactions">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-6 col-sm-2">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-2 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
</tr>
</thead>
<tbody>
@foreach($transactions as $item)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-6 col-sm-2"><a href="{{ route('revenues.show', $item->id) }}">@date($item->paid_at)</a></td>
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $transactions, 'type' => 'transactions'])
</div>
</div>
</div>
@stack('customer_transactions_content_end')
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/sales/accounts.js?v=' . version('short')) }}"></script>
@endpush