akaunting 3.0 (the last dance)
This commit is contained in:
@@ -1,65 +1,72 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]) }}"
|
||||
icon="sync_alt"
|
||||
route="transfers.create"
|
||||
></x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'transfers.store',
|
||||
'id' => 'transfer',
|
||||
'@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="transfer" route="transfers.store">
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans('general.general') }}" description="{{ trans('transfers.form_description.general') }}" />
|
||||
</x-slot>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::selectGroup('from_account_id', trans('transfers.from_account'), 'university', $accounts, null, ['required' => 'required', 'change' => 'onChangeFromAccount']) }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.select name="from_account_id" label="{{ trans('transfers.from_account') }}" :options="$accounts" change="onChangeFromAccount" />
|
||||
|
||||
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts, null, ['required' => 'required', 'change' => 'onChangeToAccount']) }}
|
||||
<x-form.group.select name="to_account_id" label="{{ trans('transfers.to_account') }}" :options="$accounts" change="onChangeToAccount" />
|
||||
|
||||
<div class="d-none w-100" :class="[{'d-flex' : show_rate}]">
|
||||
{!! Form::hidden('from_currency_code', null, ['id' => 'from_currency_code', 'v-model' => 'form.from_currency_code']) !!}
|
||||
<div v-if="show_rate" class="sm:col-span-3">
|
||||
<x-form.input.hidden name="from_currency_code" v-model="form.from_currency_code" />
|
||||
|
||||
{{ Form::textGroup('from_account_rate', trans('transfers.from_account_rate'), 'sliders-h', [':disabled' => "form.from_currency_code == '" . setting('default.currency') . "'"]) }}
|
||||
<x-form.group.text name="from_account_rate" label="{{ trans('transfers.from_account_rate') }}" v-disabled="form.from_currency_code == '{{ setting('default.currency') }}'" />
|
||||
</div>
|
||||
|
||||
{!! Form::hidden('to_currency_code', null, ['id' => 'to_currency_code', 'v-model' => 'form.to_currency_code']) !!}
|
||||
<div v-if="show_rate" class="sm:col-span-3">
|
||||
<x-form.input.hidden name="to_currency_code" v-model="form.to_currency_code" />
|
||||
|
||||
{{ Form::textGroup('to_account_rate', trans('transfers.to_account_rate'), 'sliders-h', [':disabled' => "form.to_currency_code == '" . setting('default.currency') . "'"]) }}
|
||||
</div>
|
||||
<x-form.group.text name="to_account_rate" label="{{ trans('transfers.to_account_rate') }}" v-disabled="form.to_currency_code == '{{ setting('default.currency') }}'" />
|
||||
</div>
|
||||
|
||||
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0) }}
|
||||
<x-form.group.date name="transferred_at" label="{{ trans('general.date') }}" icon="calendar_today" value="{{ Date::now()->toDateString() }}" show-date-format="{{ company_date_format() }}" date-format="Y-m-d" autocomplete="off" />
|
||||
|
||||
{{ Form::dateGroup('transferred_at', trans('general.date'), 'calendar', ['id' => 'transferred_at', 'class' => 'form-control datepicker', 'required' => 'required', 'show-date-format' => company_date_format(), 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::now()->toDateString()) }}
|
||||
<x-form.group.money name="amount" label="{{ trans('general.amount') }}" value="0" :currency="$currency" dynamicCurrency="currency" />
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
<x-form.group.textarea name="description" label="{{ trans('general.description') }}" not-required />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method')) }}
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans_choice('general.others', 1) }}" description="{{ trans('transfers.form_description.other') }}" />
|
||||
</x-slot>
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.payment-method />
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], null , 'col-md-12') }}
|
||||
<x-form.group.text name="reference" label="{{ trans('general.reference') }}" not-required />
|
||||
|
||||
{!! Form::hidden('currency_code', null, ['id' => 'currency_code', 'v-model' => 'form.currency_code']) !!}
|
||||
{!! Form::hidden('currency_rate', null, ['id' => 'currency_rate', 'v-model' => 'form.currency_rate']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<x-form.group.attachment />
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('transfers.index') }}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
<x-form.input.hidden name="currency_code" v-model="form.currency_code" />
|
||||
<x-form.input.hidden name="currency_rate" v-model="form.currency_rate" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<x-form.section>
|
||||
<x-slot name="foot">
|
||||
<x-form.buttons cancel-route="transfers.index" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
</x-form>
|
||||
</x-form.container>
|
||||
</x-slot>
|
||||
|
||||
<script src="{{ asset('public/js/banking/transfers.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-script folder="banking" file="transfers" />
|
||||
</x-layouts.admin>
|
||||
|
||||
@@ -1,81 +1,88 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.transfers', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.transfers', 1)]))
|
||||
<x-slot name="content">
|
||||
<x-form.container>
|
||||
<x-form id="transfer" method="PATCH" :route="['transfers.update', $transfer->id]" :model="$transfer">
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans('general.general') }}" description="{{ trans('transfers.form_description.general') }}" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::model($transfer, [
|
||||
'id' => 'transfer',
|
||||
'method' => 'PATCH',
|
||||
'route' => ['transfers.update', $transfer->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.select name="from_account_id" label="{{ trans('transfers.from_account') }}" :options="$accounts" change="onChangeFromAccount" />
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::selectGroup('from_account_id', trans('transfers.from_account'), 'university', $accounts, $transfer->from_account_id, ['required' => 'required', 'change' => 'onChangeFromAccount']) }}
|
||||
<x-form.group.select name="to_account_id" label="{{ trans('transfers.to_account') }}" :options="$accounts" change="onChangeToAccount" />
|
||||
|
||||
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts, $transfer->to_account_id, ['required' => 'required', 'change' => 'onChangeToAccount']) }}
|
||||
@if ($transfer->from_currency_code != $transfer->to_currency_code)
|
||||
<div v-if="show_rate" class="sm:col-span-3">
|
||||
<x-form.input.hidden name="from_currency_code" :value="$transfer->from_currency_code" v-model="form.from_currency_code" />
|
||||
|
||||
@if ($transfer->from_currency_code != $transfer->to_currency_code)
|
||||
<div class="w-100" :class="[show_rate ? 'd-flex' : 'd-none']">
|
||||
{!! Form::hidden('from_currency_code', $transfer->from_currency_code, ['id' => 'from_currency_code', 'v-model' => 'form.from_currency_code']) !!}
|
||||
<x-form.group.text name="from_account_rate" label="{{ trans('transfers.from_account_rate') }}" v-disabled="form.from_currency_code == '{{ setting('default.currency') }}'" />
|
||||
</div>
|
||||
|
||||
{{ Form::textGroup('from_account_rate', trans('transfers.from_account_rate'), 'sliders-h', [':disabled' => "form.from_currency_code == '" . setting('default.currency') . "'"], $transfer->from_account_rate) }}
|
||||
<div v-if="show_rate" class="sm:col-span-3">
|
||||
<x-form.input.hidden name="to_currency_code" :value="$transfer->to_currency_code" v-model="form.to_currency_code" />
|
||||
|
||||
{!! Form::hidden('to_currency_code', $transfer->to_currency_code, ['id' => 'to_currency_code', 'v-model' => 'form.to_currency_code']) !!}
|
||||
<x-form.group.text name="to_account_rate" label="{{ trans('transfers.to_account_rate') }}" v-disabled="form.to_currency_code == '{{ setting('default.currency') }}'" />
|
||||
</div>
|
||||
@else
|
||||
<div v-if="show_rate" class="sm:col-span-3">
|
||||
<x-form.input.hidden name="from_currency_code" :value="$transfer->from_currency_code" v-model="form.from_currency_code" />
|
||||
|
||||
{{ Form::textGroup('to_account_rate', trans('transfers.to_account_rate'), 'sliders-h', [':disabled' => "form.to_currency_code == '" . setting('default.currency') . "'"], $transfer->to_account_rate) }}
|
||||
</div>
|
||||
@else
|
||||
<div class="d-none w-100" :class="[{'d-flex' : show_rate}]">
|
||||
{!! Form::hidden('from_currency_code', $transfer->from_currency_code, ['id' => 'from_currency_code', 'v-model' => 'form.from_currency_code']) !!}
|
||||
<x-form.group.text name="from_account_rate" label="{{ trans('transfers.from_account_rate') }}" v-disabled="form.from_currency_code == '{{ setting('default.currency') }}'" />
|
||||
</div>
|
||||
|
||||
{{ Form::textGroup('from_account_rate', trans('transfers.from_account_rate'), 'sliders-h', [':disabled' => "form.from_currency_code == '" . setting('default.currency') . "'"], $transfer->from_account_rate) }}
|
||||
<div v-if="show_rate" class="sm:col-span-3">
|
||||
<x-form.input.hidden name="to_currency_code" :value="$transfer->to_currency_code" v-model="form.to_currency_code" />
|
||||
|
||||
{!! Form::hidden('to_currency_code', $transfer->to_currency_code, ['id' => 'to_currency_code', 'v-model' => 'form.to_currency_code']) !!}
|
||||
<x-form.group.text name="to_account_rate" label="{{ trans('transfers.to_account_rate') }}" v-disabled="form.to_currency_code == '{{ setting('default.currency') }}'" />
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ Form::textGroup('to_account_rate', trans('transfers.to_account_rate'), 'sliders-h', [':disabled' => "form.to_currency_code == '" . setting('default.currency') . "'"], $transfer->to_account_rate) }}
|
||||
</div>
|
||||
@endif
|
||||
<x-form.group.date name="transferred_at" label="{{ trans('general.date') }}" icon="calendar_today" value="{{ Date::parse($transfer->transferred_at)->toDateString() }}" show-date-format="{{ company_date_format() }}" date-format="Y-m-d" autocomplete="off" />
|
||||
|
||||
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], $transfer->amount) }}
|
||||
<x-form.group.money name="amount" label="{{ trans('general.amount') }}" :value="$transfer->amount" :currency="$currency" dynamicCurrency="currency" />
|
||||
|
||||
{{ Form::dateGroup('transferred_at', trans('general.date'), 'calendar', ['id' => 'transferred_at', 'class' => 'form-control datepicker', 'required' => 'required', 'show-date-format' => company_date_format(), 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($transfer->transferred_at)->toDateString()) }}
|
||||
<x-form.group.textarea name="description" label="{{ trans('general.description') }}" not-required />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans_choice('general.others', 1) }}" description="{{ trans('transfers.form_description.other') }}" />
|
||||
</x-slot>
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, $transfer->payment_method) }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.payment-method />
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
<x-form.group.text name="reference" label="{{ trans('general.reference') }}" not-required />
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], !empty($transfer) ? $transfer->attachment : null , 'col-md-12') }}
|
||||
<x-form.group.attachment />
|
||||
|
||||
{!! Form::hidden('currency_code', $currency->code, ['id' => 'currency_code', 'v-model' => 'form.currency_code']) !!}
|
||||
{!! Form::hidden('currency_rate', $currency->rate, ['id' => 'currency_rate', 'v-model' => 'form.currency_rate']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<x-form.input.hidden name="currency_code" :value="$currency->code" v-model="form.currency_code" />
|
||||
<x-form.input.hidden name="currency_rate" :value="$currency->rate" v-model="form.currency_rate" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
@can('update-banking-transfers')
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('transfers.index') }}
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
@can('update-banking-transfers')
|
||||
<x-form.section>
|
||||
<x-slot name="foot">
|
||||
<x-form.buttons cancel-route="transfers.index" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
@endcan
|
||||
</x-form>
|
||||
</x-form.container>
|
||||
</x-slot>
|
||||
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var transfer_edit = {{ $transfer->id }};
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script type="text/javascript">
|
||||
var transfer_edit = {{ $transfer->id }};
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
<script src="{{ asset('public/js/banking/transfers.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-script folder="banking" file="transfers" />
|
||||
</x-layouts.admin>
|
||||
|
||||
@@ -1,96 +1,162 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.transfers', 2) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.transfers', 2))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans_choice('general.transfers', 2) }}"
|
||||
icon="sync_alt"
|
||||
route="transfers.index"
|
||||
></x-slot>
|
||||
|
||||
@section('new_button')
|
||||
@can('create-banking-transfers')
|
||||
<a href="{{ route('transfers.create') }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
|
||||
@endcan
|
||||
<a href="{{ route('import.create', ['banking', 'transfers']) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
|
||||
<a href="{{ route('transfers.export', request()->input()) }}" class="btn btn-white btn-sm">{{ trans('general.export') }}</a>
|
||||
@endsection
|
||||
<x-slot name="buttons">
|
||||
@can('create-banking-transfers')
|
||||
<x-link href="{{ route('transfers.create') }}" kind="primary">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]) }}
|
||||
</x-link>
|
||||
@endcan
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
@if ($transfers->count() || request()->get('search', false))
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" :class="[{'bg-gradient-primary': bulk_action.show}]">
|
||||
{!! Form::open([
|
||||
'method' => 'GET',
|
||||
'route' => 'transfers.index',
|
||||
'role' => 'form',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="align-items-center" v-if="!bulk_action.show">
|
||||
<x-search-string model="App\Models\Banking\Transfer" />
|
||||
</div>
|
||||
<x-slot name="moreButtons">
|
||||
<x-dropdown id="dropdown-more-actions">
|
||||
<x-slot name="trigger">
|
||||
<span class="material-icons">more_horiz</span>
|
||||
</x-slot>
|
||||
|
||||
{{ Form::bulkActionRowGroup('general.transfers', $bulk_actions, ['group' => 'banking', 'type' => 'transfers']) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@can('create-banking-transfers')
|
||||
<x-dropdown.link href="{{ route('import.create', ['banking', 'transfers']) }}">
|
||||
{{ trans('import.import') }}
|
||||
</x-dropdown.link>
|
||||
@endcan
|
||||
|
||||
<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 d-none d-sm-block">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-md-2 d-none d-md-block">@sortablelink('expense_transaction.paid_at', trans('general.date'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-sm-2 col-md-3 d-none d-sm-block">@sortablelink('expense_transaction.name', trans('transfers.from_account'))</th>
|
||||
<th class="col-xs-4 col-sm-4 col-md-2">@sortablelink('income_transaction.name', trans('transfers.to_account'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 text-right">@sortablelink('expense_transaction.amount', trans('general.amount'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 text-center">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<x-dropdown.link href="{{ route('transfers.export', request()->input()) }}">
|
||||
{{ trans('general.export') }}
|
||||
</x-dropdown.link>
|
||||
</x-dropdown>
|
||||
</x-slot>
|
||||
|
||||
<tbody>
|
||||
<x-slot name="content">
|
||||
@if ($transfers->count() || request()->get('search', false))
|
||||
<x-index.container>
|
||||
<x-index.search
|
||||
search-string="App\Models\Banking\Transfer"
|
||||
bulk-action="App\BulkActions\Banking\Transfers"
|
||||
/>
|
||||
|
||||
<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)
|
||||
@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)
|
||||
]);
|
||||
$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
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-1 d-none d-sm-block">{{ Form::bulkActionGroup($item->id, $item->expense_transaction->account->name) }}</td>
|
||||
<td class="col-md-2 d-none d-md-block"><a class="col-aka" href="{{ route('transfers.show', $item->id) }}">@date($item->expense_transaction->paid_at)</a></td>
|
||||
<td class="col-sm-2 col-md-3 d-none d-sm-block long-texts">{{ $item->expense_transaction->account->name }}</td>
|
||||
<td class="col-xs-4 col-sm-4 col-md-2 long-texts">{{ $item->income_transaction->account->name }}</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 text-right long-texts">@money($item->expense_transaction->amount, $item->expense_transaction->currency_code, true)</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 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">
|
||||
<a class="dropdown-item" href="{{ route('transfers.show', $item->id) }}">{{ trans('general.show') }}</a>
|
||||
@can('update-banking-transfers')
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{{ route('transfers.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@endcan
|
||||
@can('delete-banking-transfers')
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($item, 'transfers.destroy') !!}
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<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 table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $transfers])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<x-empty-page group="banking" page="transfers" />
|
||||
@endif
|
||||
@endsection
|
||||
<x-pagination :items="$transfers" />
|
||||
</x-index.container>
|
||||
@else
|
||||
<x-empty-page group="banking" page="transfers" />
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/transfers.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-script folder="banking" file="transfers" />
|
||||
</x-layouts.admin>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('layouts.print')
|
||||
<x-layouts.print>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.transfers', 1) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.transfers', 1))
|
||||
|
||||
@section('content')
|
||||
<x-transfers.template.ddefault
|
||||
:transfer="$transfer"
|
||||
/>
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<x-transfers.template.default :model="$transfer" />
|
||||
</x-slot>
|
||||
</x-layouts.print>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('layouts.print')
|
||||
<x-layouts.print>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.transfers', 1) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.transfers', 1))
|
||||
|
||||
@section('content')
|
||||
<x-transfers.template.second
|
||||
:transfer="$transfer"
|
||||
/>
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<x-transfers.template.second :model="$transfer" />
|
||||
</x-slot>
|
||||
</x-layouts.print>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('layouts.print')
|
||||
<x-layouts.print>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.transfers', 1) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.transfers', 1))
|
||||
|
||||
@section('content')
|
||||
<x-transfers.template.third
|
||||
:transfer="$transfer"
|
||||
/>
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<x-transfers.template.third :model="$transfer" />
|
||||
</x-slot>
|
||||
</x-layouts.print>
|
||||
|
||||
@@ -1,44 +1,57 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.transfers', 1) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.transfers', 1))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans_choice('general.transfers', 2) }}"
|
||||
icon="sync_alt"
|
||||
:route="['transfers.show', $transfer->id]"
|
||||
></x-slot>
|
||||
|
||||
@section('new_button')
|
||||
<x-transfers.show.top-buttons :transfer="$transfer" />
|
||||
@endsection
|
||||
<x-slot name="buttons">
|
||||
<x-transfers.show.buttons :model="$transfer" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<x-transfers.show.content :transfer="$transfer" />
|
||||
@endsection
|
||||
<x-slot name="moreButtons">
|
||||
<x-transfers.show.more-buttons :model="$transfer" />
|
||||
</x-slot>
|
||||
|
||||
@push('content_content_end')
|
||||
<akaunting-modal
|
||||
:show="template.modal"
|
||||
@cancel="template.modal = false"
|
||||
:title="'{{ trans('settings.transfer.choose_template') }}'"
|
||||
:message="template.html"
|
||||
:button_cancel="'{{ trans('general.button.save') }}'"
|
||||
:button_delete="'{{ trans('general.button.cancel') }}'">
|
||||
<template #modal-body>
|
||||
@include('modals.settings.transfer_template')
|
||||
</template>
|
||||
<x-slot name="content">
|
||||
<x-transfers.show.content :model="$transfer" />
|
||||
</x-slot>
|
||||
|
||||
<template #card-footer>
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-outline-secondary" @click="closeTemplate">
|
||||
{{ trans('general.cancel') }}
|
||||
</button>
|
||||
@push('content_content_end')
|
||||
<akaunting-modal
|
||||
modal-dialog-class="max-w-screen-2xl"
|
||||
:show="template.modal"
|
||||
@cancel="template.modal = false"
|
||||
:title="'{{ trans('settings.transfer.choose_template') }}'"
|
||||
:message="template.html"
|
||||
:button_cancel="'{{ trans('general.button.save') }}'"
|
||||
:button_delete="'{{ trans('general.button.cancel') }}'">
|
||||
<template #modal-body>
|
||||
@include('modals.settings.transfer_template')
|
||||
</template>
|
||||
|
||||
<button :disabled="form.loading" type="button" class="btn btn-success button-submit" @click="addTemplate">
|
||||
<span v-if="form.loading" class="btn-inner--icon"><i class="aka-loader"></i></span>
|
||||
<span :class="[{'ml-0': form.loading}]" class="btn-inner--text">{{ trans('general.confirm') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</akaunting-modal>
|
||||
@endpush
|
||||
<template #card-footer>
|
||||
<div class="flex items-center justify-end">
|
||||
<button type="button" class="px-6 py-1.5 hover:bg-gray-200 rounded-lg ltr:mr-2 rtl:ml-2" @click="closeTemplate">
|
||||
{{ trans('general.cancel') }}
|
||||
</button>
|
||||
|
||||
@push('scripts_start')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
<button :disabled="form.loading" type="button" class="relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100" @click="addTemplate">
|
||||
<i v-if="form.loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': form.loading}]">{{ trans('general.confirm') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</akaunting-modal>
|
||||
@endpush
|
||||
|
||||
<x-transfers.script />
|
||||
@endpush
|
||||
@push('stylesheet')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
@endpush
|
||||
|
||||
<x-script folder="banking" file="transfers" />
|
||||
</x-layouts.admin>
|
||||
|
||||
Reference in New Issue
Block a user