akaunting 3.0 (the last dance)
This commit is contained in:
@@ -1,51 +1,68 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }}"
|
||||
icon="account_balance"
|
||||
route="accounts.create"
|
||||
></x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'accounts.store',
|
||||
'id' => 'account',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
<x-slot name="content">
|
||||
<x-form.container>
|
||||
<x-form id="account" route="accounts.store">
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans('general.general') }}" description="{{ trans('accounts.form_description.general') }}" />
|
||||
</x-slot>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'font') }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.radio
|
||||
name="type"
|
||||
label="{{ trans_choice('general.types', 1) }}"
|
||||
:options="[
|
||||
'bank' => trans_choice('accounts.banks', 1),
|
||||
'credit_card' => trans_choice('accounts.credit_cards', 1),
|
||||
]"
|
||||
checked="bank"
|
||||
@input="onType($event)"
|
||||
/>
|
||||
|
||||
{{ Form::textGroup('number', trans('accounts.number'), 'pencil-alt') }}
|
||||
<x-form.group.text name="name" label="{{ trans('general.name') }}" form-group-class="sm:col-span-6" />
|
||||
|
||||
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name'], 'change' => 'onChangeCurrency']) }}
|
||||
<x-form.group.text name="number" label="{{ trans('accounts.number') }}" form-group-class="sm:col-span-6" />
|
||||
|
||||
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0) }}
|
||||
<x-form.group.currency />
|
||||
|
||||
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
|
||||
<x-form.group.money name="opening_balance" label="{{ trans('accounts.opening_balance') }}" value="0" :currency="$currency" dynamicCurrency="currency" />
|
||||
|
||||
{{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
|
||||
<x-form.group.toggle name="default_account" label="{{ trans('accounts.default_account') }}" :value="false" show="form.type != 'credit_card'" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans_choice('accounts.banks', 1) }}" description="{{ trans('accounts.form_description.bank') }}" />
|
||||
</x-slot>
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account'), false) }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.text name="bank_name" label="{{ trans('accounts.bank_name') }}" not-required />
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
<x-form.group.text name="bank_phone" label="{{ trans('accounts.bank_phone') }}" not-required />
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('accounts.index') }}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
<x-form.group.textarea name="bank_address" label="{{ trans('accounts.bank_address') }}" not-required />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-form.section>
|
||||
<x-slot name="foot">
|
||||
<x-form.buttons cancel-route="accounts.index" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
</x-form>
|
||||
</x-form.container>
|
||||
</x-slot>
|
||||
|
||||
<x-script folder="banking" file="accounts" />
|
||||
</x-layouts.admin>
|
||||
|
||||
@@ -1,54 +1,66 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.accounts', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.accounts', 1)]))
|
||||
<x-slot name="content">
|
||||
<x-form.container>
|
||||
<x-form id="account" method="PATCH" :route="['accounts.update', $account->id]" :model="$account">
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans('general.general') }}" description="{{ trans('accounts.form_description.general') }}" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::model($account, [
|
||||
'id' => 'account',
|
||||
'method' => 'PATCH',
|
||||
'route' => ['accounts.update', $account->id],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
<x-slot name="body">
|
||||
<x-form.group.radio
|
||||
name="type"
|
||||
label="{{ trans_choice('general.types', 1) }}"
|
||||
:options="[
|
||||
'bank' => trans_choice('accounts.banks', 1),
|
||||
'credit_card' => trans_choice('accounts.credit_cards', 1),
|
||||
]"
|
||||
checked="{{ $account->type }}"
|
||||
@input="onType($event)"
|
||||
/>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'font') }}
|
||||
<x-form.group.text name="name" label="{{ trans('general.name') }}" form-group-class="sm:col-span-6" />
|
||||
|
||||
{{ Form::textGroup('number', trans('accounts.number'), 'pencil-alt') }}
|
||||
<x-form.group.text name="number" label="{{ trans('accounts.number') }}" form-group-class="sm:col-span-6" />
|
||||
|
||||
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $account->currency_code, ['required' => 'required', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name'], 'change' => 'onChangeCurrency']) }}
|
||||
<x-form.group.currency />
|
||||
|
||||
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], $account->opening_balance) }}
|
||||
<x-form.group.money name="opening_balance" label="{{ trans('accounts.opening_balance') }}" :value="$account->opening_balance" :currency="$currency" dynamicCurrency="currency" />
|
||||
|
||||
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
|
||||
<x-form.group.toggle name="default_account" label="{{ trans('accounts.default_account') }}" :value="$account->default_account" show="form.type != 'credit_card'" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
{{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans_choice('accounts.banks', 1) }}" description="{{ trans('accounts.form_description.bank') }}" />
|
||||
</x-slot>
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.text name="bank_name" label="{{ trans('accounts.bank_name') }}" not-required />
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account'), $account->default_account) }}
|
||||
<x-form.group.text name="bank_phone" label="{{ trans('accounts.bank_phone') }}" not-required />
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $account->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
<x-form.group.textarea name="bank_address" label="{{ trans('accounts.bank_address') }}" not-required />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
@can('update-banking-accounts')
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('accounts.index') }}
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
<x-form.group.switch name="enabled" label="{{ trans('general.enabled') }}" />
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
@can('update-banking-accounts')
|
||||
<x-form.section>
|
||||
<x-slot name="foot">
|
||||
<x-form.buttons cancel-route="accounts.index" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
@endcan
|
||||
</x-form>
|
||||
</x-form.container>
|
||||
</x-slot>
|
||||
|
||||
<x-script folder="banking" file="accounts" />
|
||||
</x-layouts.admin>
|
||||
|
||||
@@ -1,93 +1,118 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.accounts', 2) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.accounts', 2))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans_choice('general.accounts', 2) }}"
|
||||
icon="account_balance"
|
||||
route="accounts.index"
|
||||
></x-slot>
|
||||
|
||||
@section('new_button')
|
||||
@can('create-banking-accounts')
|
||||
<a href="{{ route('accounts.create') }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
|
||||
@endcan
|
||||
@endsection
|
||||
<x-slot name="buttons">
|
||||
@can('create-banking-accounts')
|
||||
<x-link href="{{ route('accounts.create') }}" kind="primary">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" :class="[{'bg-gradient-primary': bulk_action.show}]">
|
||||
{!! Form::open([
|
||||
'method' => 'GET',
|
||||
'route' => 'accounts.index',
|
||||
'role' => 'form',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="align-items-center" v-if="!bulk_action.show">
|
||||
<x-search-string model="App\Models\Banking\Account" />
|
||||
</div>
|
||||
<x-slot name="content">
|
||||
<x-index.container>
|
||||
<x-index.search
|
||||
search-string="App\Models\Banking\Account"
|
||||
bulk-action="App\BulkActions\Banking\Accounts"
|
||||
/>
|
||||
|
||||
{{ Form::bulkActionRowGroup('general.accounts', $bulk_actions, ['group' => 'banking', 'type' => 'accounts']) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<x-table>
|
||||
<x-table.thead>
|
||||
<x-table.tr class="flex items-center px-1">
|
||||
<x-table.th class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
|
||||
<x-index.bulkaction.all />
|
||||
</x-table.th>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-xs-4 col-sm-4 col-md-4 col-lg-4 col-xl-3">@sortablelink('name', trans('general.name'), ['filter' => 'active, visible'], ['rel' => 'nofollow'])</th>
|
||||
<th class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block text-left">@sortablelink('number', trans('accounts.number'))</th>
|
||||
<th class="col-sm-2 col-md-2 col-lg-2 col-xl-4 d-none d-sm-block text-right">@sortablelink('opening_balance', trans('accounts.current_balance'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-2 col-xl-1">@sortablelink('enabled', trans('general.enabled'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-1 col-lg-1 col-xl-1 text-center">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<x-table.th class="w-6/12 sm:w-5/12">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="name" title="{{ trans('general.name') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="number" title="{{ trans('accounts.number') }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<tbody>
|
||||
<x-table.th class="w-4/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="bank_name" title="{{ trans('accounts.bank_name') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="bank_phone" title="{{ trans('general.phone') }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-6/12 sm:w-3/12" kind="amount">
|
||||
<x-sortablelink column="balance" title="{{ trans('accounts.current_balance') }}" />
|
||||
</x-table.th>
|
||||
</x-table.tr>
|
||||
</x-table.thead>
|
||||
|
||||
<x-table.tbody>
|
||||
@foreach($accounts as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">
|
||||
{{ Form::bulkActionGroup($item->id, $item->name) }}
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-4 col-md-4 col-lg-4 col-xl-3 long-texts"><a href="{{ route('accounts.show', $item->id) }}">{{ $item->name }}</a></td>
|
||||
<td class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block text-left">{{ $item->number }}</td>
|
||||
<td class="col-sm-2 col-md-2 col-lg-2 col-xl-4 d-none d-sm-block text-right">@money($item->balance, $item->currency_code, true)</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-1 col-lg-2 col-xl-1">
|
||||
@if (user()->can('update-banking-accounts'))
|
||||
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
||||
@else
|
||||
@if ($item->enabled)
|
||||
<badge rounded type="success" class="mw-60">{{ trans('general.yes') }}</badge>
|
||||
@else
|
||||
<badge rounded type="danger" class="mw-60">{{ trans('general.no') }}</badge>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-neutral btn-sm text-light items-align-center py-2" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h text-muted"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
@can('update-banking-accounts')
|
||||
<a class="dropdown-item" href="{{ route('accounts.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@endcan
|
||||
@can('delete-banking-accounts')
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($item, 'accounts.destroy') !!}
|
||||
@endcan
|
||||
<x-table.tr href="{{ route('accounts.show', $item->id) }}">
|
||||
<x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
|
||||
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->name }}" />
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-6/12 sm:w-5/12 truncate">
|
||||
<x-slot name="first" class="flex">
|
||||
<div class="font-bold truncate">
|
||||
{{ $item->name }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (! $item->enabled)
|
||||
<x-index.disable text="{{ trans_choice('general.accounts', 1) }}" />
|
||||
@endif
|
||||
|
||||
@if (setting('default.account') == $item->id)
|
||||
<x-index.default text="{{ trans('accounts.default_account') }}" />
|
||||
@endif
|
||||
</x-slot>
|
||||
<x-slot name="second" class="font-normal truncate">
|
||||
{{ $item->number }}
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 truncate hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
@if (! empty($item->bank_name))
|
||||
{{ $item->bank_name }}
|
||||
@else
|
||||
<x-empty-data />
|
||||
@endif
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
@if (! empty($item->phone))
|
||||
{{ $item->phone }}
|
||||
@else
|
||||
<x-empty-data />
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-6/12 sm:w-3/12" kind="amount">
|
||||
<x-money :amount="$item->balance" :currency="$item->currency_code" convert />
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td kind="action">
|
||||
<x-table.actions :model="$item" />
|
||||
</x-table.td>
|
||||
</x-table.tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</x-table.tbody>
|
||||
</x-table>
|
||||
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $accounts])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
<x-pagination :items="$accounts" />
|
||||
</x-index.container>
|
||||
</x-slot>
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-script folder="banking" file="accounts" />
|
||||
</x-layouts.admin>
|
||||
|
||||
@@ -1,281 +1,448 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ $account->name }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', $account->name)
|
||||
<x-slot name="status">
|
||||
@if (! $account->enabled)
|
||||
<x-index.disable text="{{ trans_choice('general.accounts', 1) }}" />
|
||||
@endif
|
||||
|
||||
@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> {{ trans('general.more_actions') }}
|
||||
</button>
|
||||
@if (setting('default.account') == $account->id)
|
||||
<x-index.default text="{{ trans('accounts.default_account') }}" />
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
<div class="dropdown-menu" role="menu">
|
||||
@stack('button_dropdown_start')
|
||||
<x-slot name="favorite"
|
||||
title="{{ $account->name }}"
|
||||
icon="account_balance"
|
||||
:route="['accounts.show', $account->id]"
|
||||
></x-slot>
|
||||
|
||||
@stack('duplicate_button_start')
|
||||
@can('create-banking-accounts')
|
||||
<a class="dropdown-item" href="{{ route('accounts.duplicate', $account->id) }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</a>
|
||||
<x-slot name="buttons">
|
||||
@stack('create_button_start')
|
||||
|
||||
<x-dropdown id="dropdown-new-actions">
|
||||
<x-slot name="trigger" class="flex items-center px-3 py-1.5 mb-3 sm:mb-0 bg-green hover:bg-green-700 rounded-xl text-white text-sm font-bold leading-6" override="class">
|
||||
{{ trans('general.new_more') }}
|
||||
<span class="material-icons ltr:ml-2 rtl:mr-2">expand_more</span>
|
||||
</x-slot>
|
||||
|
||||
@stack('income_button_start')
|
||||
|
||||
@can('create-banking-transactions')
|
||||
<x-dropdown.link href="{{ route('accounts.create-income', $account->id) }}">
|
||||
{{ trans_choice('general.incomes', 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@stack('duplicate_button_end')
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
@stack('expense_button_start')
|
||||
|
||||
@stack('revenue_button_start')
|
||||
@can('create-sales-revenues')
|
||||
<a class="dropdown-item" href="{{ route('accounts.create-revenue', $account->id) }}">
|
||||
{{ trans('general.add_income')}}
|
||||
</a>
|
||||
@can('create-banking-transactions')
|
||||
<x-dropdown.link href="{{ route('accounts.create-expense', $account->id) }}">
|
||||
{{ trans_choice('general.expenses', 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@stack('revenue_button_end')
|
||||
|
||||
@stack('payment_button_start')
|
||||
@can('create-purchases-payments')
|
||||
<a class="dropdown-item" href="{{ route('accounts.create-payment', $account->id) }}">
|
||||
{{ trans('general.add_expense') }}
|
||||
</a>
|
||||
@endcan
|
||||
@stack('payment_button_end')
|
||||
|
||||
@stack('transfer_button_start')
|
||||
|
||||
@can('create-banking-transfers')
|
||||
<a class="dropdown-item" href="{{ route('accounts.create-transfer', $account->id) }}">
|
||||
{{ trans('general.add_transfer') }}
|
||||
</a>
|
||||
<x-dropdown.link href="{{ route('accounts.create-transfer', $account->id) }}">
|
||||
{{ trans_choice('general.transfers', 1) }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
@stack('transfer_button_end')
|
||||
</x-dropdown>
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
@stack('edit_button_start')
|
||||
|
||||
@can('update-banking-accounts')
|
||||
<x-link href="{{ route('accounts.edit', $account->id) }}">
|
||||
{{ trans('general.edit') }}
|
||||
</x-link>
|
||||
@endcan
|
||||
|
||||
@stack('edit_button_end')
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="moreButtons">
|
||||
@stack('more_button_start')
|
||||
|
||||
<x-dropdown id="dropdown-more-actions">
|
||||
<x-slot name="trigger">
|
||||
<span class="material-icons">more_horiz</span>
|
||||
</x-slot>
|
||||
|
||||
@stack('see_performance_button_start')
|
||||
|
||||
@stack('performance_button_start')
|
||||
@can('read-banking-accounts')
|
||||
<a class="dropdown-item" href="{{ route('accounts.see-performance', $account->id) }}">
|
||||
{{ trans('accounts.see_performance') }}
|
||||
</a>
|
||||
<x-dropdown.link href="{{ route('accounts.see-performance', $account->id) }}">
|
||||
{{ trans('accounts.see_performance') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
@stack('performance_button_end')
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
<x-dropdown.divider />
|
||||
|
||||
@stack('duplicate_button_start')
|
||||
|
||||
@can('create-banking-accounts')
|
||||
<x-dropdown.link href="{{ route('accounts.duplicate', $account->id) }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
<x-dropdown.divider />
|
||||
|
||||
@stack('delete_button_start')
|
||||
@can('delete-sales-customers')
|
||||
{!! Form::deleteLink($account, 'accounts.destroy') !!}
|
||||
|
||||
@can('delete-banking-accounts')
|
||||
<x-delete-link :model="$account" route="accounts.destroy" />
|
||||
@endcan
|
||||
|
||||
@stack('delete_button_end')
|
||||
</x-dropdown>
|
||||
|
||||
@stack('button_dropdown_end')
|
||||
</div>
|
||||
@stack('edit_button_start')
|
||||
@can('update-sales-customers')
|
||||
<a href="{{ route('accounts.edit', $account->id) }}" class="btn btn-white btn-sm">
|
||||
{{ trans('general.edit') }}
|
||||
</a>
|
||||
@endcan
|
||||
@stack('edit_button_end')
|
||||
</div>
|
||||
@endsection
|
||||
@stack('more_button_end')
|
||||
</x-slot>
|
||||
|
||||
@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 font-weight-600">
|
||||
{{ trans_choice('general.accounts', 1) }} {{ trans_choice('accounts.number', 2) }}
|
||||
<small>{{ $account->number}}</small>
|
||||
</li>
|
||||
@stack('account_number_end')
|
||||
<x-slot name="content">
|
||||
<x-show.container>
|
||||
<x-show.summary>
|
||||
<x-show.summary.left>
|
||||
</x-show.summary.left>
|
||||
|
||||
@stack('account_currency_start')
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center border-0 border-top-1 font-weight-600">
|
||||
{{ trans_choice('general.currencies', 2) }}
|
||||
<small>{{ $account->currency->name}}</small>
|
||||
</li>
|
||||
@stack('account_currency_end')
|
||||
<x-show.summary.right>
|
||||
@stack('summary_incoming_start')
|
||||
<x-slot name="first" amount="{{ money($account->income_balance, $account->currency_code, true) }}" title="{{ trans('accounts.incoming') }}"></x-slot>
|
||||
@stack('summary_incoming_end')
|
||||
|
||||
@stack('account_starting_balance_start')
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center border-0 border-top-1 font-weight-600">
|
||||
{{ trans_choice('accounts.opening_balance', 2) }}
|
||||
<small>@money($account->opening_balance, $account->currency_code, true)</small>
|
||||
</li>
|
||||
@stack('account_starting_balance_end')
|
||||
</ul>
|
||||
@stack('summary_outgoing_start')
|
||||
<x-slot name="second" amount="{{ money($account->expense_balance, $account->currency_code, true) }}" title="{{ trans('accounts.outgoing') }}"></x-slot>
|
||||
@stack('summary_outgoing_end')
|
||||
|
||||
<ul class="list-group mb-4">
|
||||
@stack('bank_name_start')
|
||||
<li class="list-group-item border-0">
|
||||
<div class="font-weight-600">{{ trans('accounts.bank_name') }}</div>
|
||||
<div><small>{{ $account->bank_name }}</small></div>
|
||||
</li>
|
||||
@stack('bank_name_end')
|
||||
@stack('summary_current_start')
|
||||
<x-slot name="third" amount="{{ money($account->balance, $account->currency_code, true) }}" title="{{ trans('accounts.current_balance') }}"></x-slot>
|
||||
@stack('summary_current_end')
|
||||
</x-show.summary.right>
|
||||
</x-show.summary>
|
||||
|
||||
@stack('account_phone_start')
|
||||
<li class="list-group-item border-0 border-top-1">
|
||||
<div class="font-weight-600">{{ trans('accounts.bank_phone') }}</div>
|
||||
<div><small>{{ $account->bank_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('accounts.bank_address') }}</div>
|
||||
<div><small>{{ $account->bank_address }}</small></div>
|
||||
</li>
|
||||
@stack('account_address_end')
|
||||
</ul>
|
||||
</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-info border-0">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="text-uppercase text-muted mb-0 text-white">{{ trans('accounts.incoming') }}</h5>
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="h2 font-weight-bold mb-0 text-white">@money($account->income_balance, $account->currency_code, true)</span>
|
||||
</div>
|
||||
</div>
|
||||
<x-show.content>
|
||||
<x-show.content.left>
|
||||
@stack('account_number_start')
|
||||
<div class="flex flex-col text-sm mb-5">
|
||||
<div class="font-medium">
|
||||
{{ trans('accounts.number') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('account_incoming_card_end')
|
||||
|
||||
@stack('account_outgoing_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('accounts.outgoing') }}</h5>
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="h2 font-weight-bold mb-0 text-white">@money($account->expense_balance, $account->currency_code, true)</span>
|
||||
</div>
|
||||
</div>
|
||||
<span>{{ $account->number }}</span>
|
||||
</div>
|
||||
@stack('account_number_end')
|
||||
|
||||
@stack('account_currency_start')
|
||||
<div class="flex flex-col text-sm mb-5">
|
||||
<div class="font-medium">
|
||||
{{ trans_choice('general.currencies', 2) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('account_outgoing_card_end')
|
||||
|
||||
@stack('account_balance_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('widgets.account_balance') }}</h5>
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="h2 font-weight-bold mb-0 text-white">@money($account->balance, $account->currency_code, true)</span>
|
||||
</div>
|
||||
</div>
|
||||
<span>
|
||||
{{ $account->currency->name }}
|
||||
</span>
|
||||
</div>
|
||||
@stack('account_currency_end')
|
||||
|
||||
@stack('account_starting_balance_start')
|
||||
<div class="flex flex-col text-sm mb-5">
|
||||
<div class="font-medium">
|
||||
{{ trans_choice('accounts.opening_balance', 2) }}
|
||||
</div>
|
||||
|
||||
<span>
|
||||
<x-money :amount="$account->opening_balance" :currency="$account->currency_code" convert />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@stack('account_balance_card_end')
|
||||
</div>
|
||||
@stack('account_starting_balance_end')
|
||||
|
||||
<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="transactions-tab" data-toggle="tab" href="#transactions-content" role="tab" aria-controls="transactions-content" aria-selected="true">
|
||||
{{ trans_choice('general.transactions', 2) }}
|
||||
</a>
|
||||
</li>
|
||||
@stack('account_transactions_tab_end')
|
||||
@stack('account_phone_start')
|
||||
@if ($account->bank_phone)
|
||||
<div class="flex flex-col text-sm mb-5">
|
||||
<div class="font-medium">
|
||||
{{ trans('accounts.bank_phone') }}
|
||||
</div>
|
||||
|
||||
@stack('account_transfers_tab_start')
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-sm-3 mb-md-0" id="transfers-tab" data-toggle="tab" href="#transfers-content" role="tab" aria-controls="transfers-content" aria-selected="false">
|
||||
{{ trans_choice('general.transfers', 2) }}
|
||||
</a>
|
||||
</li>
|
||||
@stack('account_transfers_tab_end')
|
||||
</ul>
|
||||
</div>
|
||||
<span>
|
||||
{{ $account->bank_phone }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@stack('account_phone_end')
|
||||
|
||||
<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-transactions">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-3">{{ trans_choice('general.date', 1) }}</th>
|
||||
<th class="col-sm-3">{{ trans('general.amount') }}</th>
|
||||
<th class="col-sm-3">{{ trans_choice('general.types', 1) }}</th>
|
||||
<th class="col-sm-3">{{ trans_choice('general.categories', 1) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@stack('account_address_start')
|
||||
@if ($account->bank_address)
|
||||
<div class="flex flex-col text-sm mb-5">
|
||||
<div class="font-medium">
|
||||
{{ trans('accounts.bank_address') }}
|
||||
</div>
|
||||
|
||||
<tbody>
|
||||
<span>
|
||||
{{ $account->bank_address }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@stack('account_address_end')
|
||||
</x-show.content.left>
|
||||
|
||||
<x-show.content.right>
|
||||
<x-tabs active="transactions">
|
||||
<x-slot name="navs">
|
||||
@stack('transactions_nav_start')
|
||||
|
||||
<x-tabs.nav
|
||||
id="transactions"
|
||||
name="{{ trans_choice('general.transactions', 2) }}"
|
||||
active
|
||||
class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link"
|
||||
/>
|
||||
|
||||
@stack('transfers_nav_start')
|
||||
|
||||
<x-tabs.nav
|
||||
id="transfers"
|
||||
name="{{ trans_choice('general.transfers', 2) }}"
|
||||
class="relative px-8 text-sm text-black text-center pb-2 cursor-pointer transition-all border-b tabs-link"
|
||||
/>
|
||||
|
||||
@stack('transfers_nav_end')
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
@stack('transactions_tab_start')
|
||||
|
||||
<x-tabs.tab id="transactions">
|
||||
@if ($transactions->count())
|
||||
<x-table>
|
||||
<x-table.thead>
|
||||
<x-table.tr class="flex items-center px-1">
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="paid_at" title="{{ trans('general.date') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="number" title="{{ trans_choice('general.numbers', 1) }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-3/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="type" title="{{ trans_choice('general.types', 1) }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="category.name" title="{{ trans_choice('general.categories', 1) }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-2/12">
|
||||
<x-sortablelink column="account.name" title="{{ trans_choice('general.accounts', 1) }}" />
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-2/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="contact.name" title="{{ trans_choice('general.contacts', 1) }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="document.document_number" title="{{ trans_choice('general.documents', 1) }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-2/12" kind="amount">
|
||||
<x-sortablelink column="amount" title="{{ trans('general.amount') }}" />
|
||||
</x-table.th>
|
||||
</x-table.tr>
|
||||
</x-table.thead>
|
||||
|
||||
<x-table.tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr class="row align-items-center border-top-1 tr-py">
|
||||
<td class="col-sm-3"><a href="{{ route($item->route_name, $item->route_id) }}">@date($item->paid_at)</a></td>
|
||||
<td class="col-sm-3">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-sm-3">{{ $item->type_title }}</td>
|
||||
<td class="col-sm-3">{{ $item->category->name }}</td>
|
||||
</tr>
|
||||
<x-table.tr href="{{ route('transactions.show', $item->id) }}">
|
||||
<x-table.td class="w-4/12 sm:w-3/12">
|
||||
<x-slot name="first" class="font-bold truncate" override="class">
|
||||
<x-date date="{{ $item->paid_at }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
{{ $item->number }}
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-3/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
{{ $item->type_title }}
|
||||
</x-slot>
|
||||
<x-slot name="second" class="flex items-center">
|
||||
<x-index.category :model="$item->category" />
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-2/12">
|
||||
{{ $item->account->name }}
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-2/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
{{ $item->contact->name }}
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
@if ($item->document)
|
||||
<a href="{{ route($item->route_name, $item->route_id) }}" class="font-normal truncate border-b border-black border-dashed">
|
||||
{{ $item->document->document_number }}
|
||||
</a>
|
||||
@else
|
||||
<x-empty-data />
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="relative w-4/12 sm:w-2/12" kind="amount">
|
||||
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td kind="action">
|
||||
<x-table.actions :model="$item" />
|
||||
</x-table.td>
|
||||
</x-table.tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</x-table.tbody>
|
||||
</x-table>
|
||||
|
||||
<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')
|
||||
<x-pagination :items="$transactions" />
|
||||
@else
|
||||
<x-show.no-records type="account" :model="$account" group="banking" page="transactions" />
|
||||
@endif
|
||||
</x-tabs.tab>
|
||||
|
||||
@stack('account_transfers_content_start')
|
||||
<div class="tab-pane fade" id="transfers-content" role="tabpanel" aria-labelledby="transfers-tab">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover" id="tbl-transfers">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-3">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-3">{{ trans('general.amount') }}</th>
|
||||
<th class="col-sm-3">{{ trans_choice('transfers.from_account', 1) }}</th>
|
||||
<th class="col-sm-3">{{ trans_choice('transfers.to_account', 1) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@stack('transfers_tab_start')
|
||||
|
||||
<tbody>
|
||||
<x-tabs.tab id="transfers">
|
||||
@if ($transfers->count())
|
||||
<x-table>
|
||||
<x-table.thead>
|
||||
<x-table.tr class="flex items-center px-1">
|
||||
<x-table.th class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
|
||||
<x-index.bulkaction.all />
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-3/12 hidden sm:table-cell">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="expense_transaction.paid_at" title="{{ trans('general.created_date') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="expense_transaction.reference" title="{{ trans('general.reference') }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="expense_transaction.name" title="{{ trans('transfers.from_account') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="income_transaction.name" title="{{ trans('transfers.to_account') }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-3/12">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="expense_transaction.rate" title="{{ trans('transfers.from_rate') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="income_transaction.rate" title="{{ trans('transfers.to_rate') }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
|
||||
<x-table.th class="w-4/12 sm:w-3/12" kind="amount">
|
||||
<x-slot name="first">
|
||||
<x-sortablelink column="expense_transaction.amount" title="{{ trans('transfers.from_amount') }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-sortablelink column="income_transaction.amount" title="{{ trans('transfers.to_amount') }}" />
|
||||
</x-slot>
|
||||
</x-table.th>
|
||||
</x-table.tr>
|
||||
</x-table.thead>
|
||||
|
||||
<x-table.tbody>
|
||||
@foreach($transfers as $item)
|
||||
<tr class="row align-items-center border-top-1 tr-py">
|
||||
<td class="col-sm-3"><a href="{{ route('transfers.show', $item->id) }}">@date($item->expense_transaction->paid_at)</a></td>
|
||||
<td class="col-sm-3">@money($item->expense_transaction->amount, $item->expense_transaction->currency_code, true)</td>
|
||||
<td class="col-sm-3">{{ $item->expense_transaction->account->name }}</td>
|
||||
<td class="col-sm-3">{{ $item->income_transaction->account->name }}</td>
|
||||
</tr>
|
||||
@php
|
||||
$item->name = trans('transfers.messages.delete', [
|
||||
'from' => $item->expense_transaction->account->name,
|
||||
'to' => $item->income_transaction->account->name,
|
||||
'amount' => money($item->expense_transaction->amount, $item->expense_transaction->currency_code, true)
|
||||
]);
|
||||
@endphp
|
||||
|
||||
<x-table.tr href="{{ route('transfers.show', $item->id) }}">
|
||||
<x-table.td class="ltr:pr-6 rtl:pl-6 hidden sm:table-cell" override="class">
|
||||
<x-index.bulkaction.single id="{{ $item->id }}" name="{{ $item->expense_transaction->account->name }}" />
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-3/12 truncate hidden sm:table-cell">
|
||||
<x-slot name="first" class="flex items-center font-bold" override="class">
|
||||
<x-date date="{{ $item->expense_transaction->paid_at }}" />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
@if (! empty($item->reference))
|
||||
{{ $item->reference }}
|
||||
@else
|
||||
<x-empty-data />
|
||||
@endif
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-3/12 truncate">
|
||||
<x-slot name="first">
|
||||
{{ $item->expense_transaction->account->name }}
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
{{ $item->income_transaction->account->name }}
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-3/12 truncate">
|
||||
<x-slot name="first">
|
||||
{{ $item->expense_transaction->currency_rate }}
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
{{ $item->income_transaction->currency_rate }}
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td class="w-4/12 sm:w-3/12" kind="amount">
|
||||
<x-slot name="first">
|
||||
<x-money :amount="$item->expense_transaction->amount" :currency="$item->expense_transaction->currency_code" convert />
|
||||
</x-slot>
|
||||
<x-slot name="second">
|
||||
<x-money :amount="$item->income_transaction->amount" :currency="$item->income_transaction->currency_code" convert />
|
||||
</x-slot>
|
||||
</x-table.td>
|
||||
|
||||
<x-table.td kind="action">
|
||||
<x-table.actions :model="$item" />
|
||||
</x-table.td>
|
||||
</x-table.tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</x-table.tbody>
|
||||
</x-table>
|
||||
|
||||
<div class="card-footer py-4 table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $transfers, 'type' => 'transfers'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('account_transfers_content_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
<x-pagination :items="$transfers" />
|
||||
@else
|
||||
<x-show.no-records type="account" :model="$account" group="banking" page="transfers" />
|
||||
@endif
|
||||
</x-tabs.tab>
|
||||
|
||||
@stack('transfers_tab_end')
|
||||
</x-slot>
|
||||
</x-tabs>
|
||||
</x-show.content.right>
|
||||
</x-show.content>
|
||||
</x-show.container>
|
||||
</x-slot>
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-script folder="banking" file="accounts" />
|
||||
</x-layouts.admin>
|
||||
|
||||
Reference in New Issue
Block a user