Merge branch 'akaunting:master' into invoice-form-enhancements

This commit is contained in:
bengü thon mai mochi
2021-08-25 11:15:51 +03:00
committed by GitHub
148 changed files with 2103 additions and 1033 deletions

View File

@ -57,7 +57,7 @@
<td class="col-sm-2 col-md-2 col-lg-3 d-none d-sm-block long-texts">{{ $item->email }}</td>
<td class="col-md-2 col-lg-2 d-none d-md-block">
@foreach($item->roles as $role)
<label class="label label-default">{{ $role->display_name }}</label>
<label class="badge badge-default">{{ $role->display_name }}</label>
@endforeach
</td>
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-2">

View File

@ -44,7 +44,7 @@
<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.edit', $item->id) }}">{{ $item->name }}</a></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">

View File

@ -0,0 +1,281 @@
@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('revenue_button_start')
@can('create-sales-revenues')
<a class="dropdown-item" href="{{ route('accounts.create-revenue', $account->id) }}">
{{ trans('general.add_income')}}
</a>
@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>
@endcan
@stack('transfer_button_end')
<div class="dropdown-divider"></div>
@stack('performance_button_start')
@can('read-banking-accounts')
<a class="dropdown-item" href="{{ route('accounts.see-performance', $account->id) }}">
{{ trans('accounts.see_performance') }}
</a>
@endcan
@stack('performance_button_end')
<div class="dropdown-divider"></div>
@stack('delete_button_start')
@can('delete-sales-customers')
{!! Form::deleteLink($account, 'accounts.destroy') !!}
@endcan
@stack('delete_button_end')
@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
@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')
@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')
@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>
<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('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>
</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>
</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>
</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="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_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>
<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>
<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>
@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('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>
<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>
@endforeach
</tbody>
</table>
</div>
<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
@push('scripts_start')
<script src="{{ asset('public/js/banking/accounts.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -78,7 +78,7 @@
@if (!$hideQuantity)
<div>
@stack('quantity_input_start')
<input
<input
type="number"
min="0"
class="form-control text-center p-0 input-number-disabled"
@ -163,11 +163,15 @@
</div>
@stack('discount_input_start')
<div class="form-group mb-0 w-100" style="display: inline-block; position: relative;">
<div class="input-group input-group-merge mb-0 select-tax">
<div class="input-group mb-0 select-tax">
<div class="input-group-prepend">
<span class="input-group-text" id="input-discount">
<i class="fa fa-percent"></i>
</span>
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'percentage'}, {'btn-primary' : row.discount_type === 'percentage'}]"
@click="onChangeLineDiscountType(index, 'percentage')" type="button">
<i class="fa fa-percent fa-sm"></i>
</button>
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'fixed'}, {'btn-primary' : row.discount_type === 'fixed'}]"
@click="onChangeLineDiscountType(index, 'fixed')" type="button">{{ $currency->symbol }}
</button>
</div>
<input type="number"
max="100"
@ -217,18 +221,19 @@
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
:name="'items.' + index + '.taxes.' + row_tax_index"
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
:dynamic-options="dynamic_taxes"
:disabled-options="form.items[index].tax_ids"
:value="row_tax.id"
@interface="row_tax.id = $event"
@change="onCalculateTotal()"
@new="taxes.push($event)"
@new="dynamic_taxes.push($event)"
:form-error="form.errors.get('items.' + index + '.taxes')"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
></akaunting-select>
@stack('taxes_input_end')
</div>
<div class="line-item-content-right">
<div class="line-item-content-right-price long-texts text-right">
{{ Form::moneyGroup('tax', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row_tax.price', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
@ -243,7 +248,7 @@
<div v-if="row.add_tax" class="line-item-area pb-3" :class="{'pt-2' : row.add_discount}">
<div class="line-item-content">
<div class="long-texts line-item-text" style="float: left; margin-top: 15px; margin-right:2px; position: absolute; left: -63px;">
{{ trans_choice('general.taxes', 1) }}
{{ trans_choice('general.taxes', 1) }}
</div>
@stack('taxes_input_start')
@ -256,6 +261,7 @@
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}'"
:name="'items.' + index + '.taxes.999'"
:options="{{ json_encode($taxes->pluck('title', 'id')) }}"
:dynamic-options="dynamic_taxes"
:disabled-options="form.items[index].tax_ids"
:value="tax_id"
:add-new="{{ json_encode([
@ -281,7 +287,7 @@
])}}"
@interface="tax_id = $event"
@visible-change="onSelectedTax(index)"
@new="taxes.push($event)"
@new="dynamic_taxes.push($event)"
:form-error="form.errors.get('items.' + index + '.taxes')"
:no-data-text="'{{ trans('general.no_data') }}'"
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"

View File

@ -49,27 +49,32 @@
<el-popover
popper-class="p-0 h-0"
placement="bottom"
width="300"
width="350"
v-model="discount">
<div class="card d-none" :class="[{'show' : discount}]">
<div class="discount card-body">
<div class="row align-items-center">
<div class="col-sm-6">
<div class="input-group input-group-merge">
<div class="col-sm-8">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="input-discount">
<i class="fa fa-percent"></i>
</span>
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'percentage'}, {'btn-primary' : form.discount_type === 'percentage'}]"
@click="onChangeDiscountType('percentage')" type="button">
<i class="fa fa-percent fa-sm"></i>
</button>
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'fixed'}, {'btn-primary' : form.discount_type === 'fixed'}]"
@click="onChangeDiscountType('fixed')" type="button">{{ $currency->symbol }}
</button>
</div>
{!! Form::number('pre_discount', null, ['id' => 'pre-discount', 'class' => 'form-control', 'v-model' => 'form.discount']) !!}
</div>
</div>
<div class="col-sm-6">
<div class="col-sm-4">
<div class="discount-description">
<strong>{{ trans('invoices.discount_desc') }}</strong>
</div>
</div>
</div>
</div>
</div>
<div class="discount card-footer">
<div class="row float-right">

View File

@ -175,74 +175,76 @@
</div>
</div>
<div class="row">
<div class="col-100">
<div class="text">
<table class="c-lines">
<thead>
<tr>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="text-left item">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
</thead>
<tbody>
@if ($document->items->count())
@foreach($document->items as $item)
<x-documents.template.line-item
type="{{ $type }}"
:item="$item"
:document="$document"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
/>
@endforeach
@else
@if (!$hideItems)
<div class="row">
<div class="col-100">
<div class="text">
<table class="c-lines">
<thead>
<tr>
<td colspan="5" class="text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="text-left item">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
@endif
</tbody>
</table>
</thead>
<tbody>
@if ($document->items->count())
@foreach($document->items as $item)
<x-documents.template.line-item
type="{{ $type }}"
:item="$item"
:document="$document"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
/>
@endforeach
@else
<tr>
<td colspan="5" class="text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
@endif
<div class="row mt-4 clearfix">
<div class="col-58">

View File

@ -160,73 +160,75 @@
</div>
</div>
<div class="row">
<div class="col-100">
<div class="text">
<table class="lines">
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price text-white">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total text-white">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
</thead>
<tbody>
@if ($document->items->count())
@foreach($document->items as $item)
<x-documents.template.line-item
type="{{ $type }}"
:item="$item"
:document="$document"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
/>
@endforeach
@else
@if (!$hideItems)
<div class="row">
<div class="col-100">
<div class="text">
<table class="lines">
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr>
<td colspan="5" class="text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price text-white">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total text-white">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
@endif
</tbody>
</table>
</thead>
<tbody>
@if ($document->items->count())
@foreach($document->items as $item)
<x-documents.template.line-item
type="{{ $type }}"
:item="$item"
:document="$document"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
/>
@endforeach
@else
<tr>
<td colspan="5" class="text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
@endif
<div class="row mt-9 clearfix">
<div class="col-58">

View File

@ -33,7 +33,11 @@
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<td class="discount">{{ $item->discount }}</td>
@if ($item->discount_type === 'percentage')
<td class="discount">{{ $item->discount }}</td>
@else
<td class="discount">@money($item->discount, $document->currency_code, true)</td>
@endif
@stack('discount_td_end')
@endif
@endif

View File

@ -150,73 +150,75 @@
</div>
</div>
<div class="row">
<div class="col-100">
<div class="text">
<table class="m-lines">
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price text-white">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total text-white">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
</thead>
<tbody>
@if ($document->items->count())
@foreach($document->items as $item)
<x-documents.template.line-item
type="{{ $type }}"
:item="$item"
:document="$document"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
/>
@endforeach
@else
@if (!$hideItems)
<div class="row">
<div class="col-100">
<div class="text">
<table class="m-lines">
<thead style="background-color:{{ $backgroundColor }} !important; -webkit-print-color-adjust: exact;">
<tr>
<td colspan="5" class="text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
@stack('name_th_start')
@if (!$hideItems || (!$hideName && !$hideDescription))
<th class="item text-left text-white">{{ (trans_choice($textItems, 2) != $textItems) ? trans_choice($textItems, 2) : trans($textItems) }}</th>
@endif
@stack('name_th_end')
@stack('quantity_th_start')
@if (!$hideQuantity)
<th class="quantity text-white">{{ trans($textQuantity) }}</th>
@endif
@stack('quantity_th_end')
@stack('price_th_start')
@if (!$hidePrice)
<th class="price text-white">{{ trans($textPrice) }}</th>
@endif
@stack('price_th_end')
@if (!$hideDiscount)
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
@stack('discount_td_start')
<th class="discount text-white">{{ trans('invoices.discount') }}</th>
@stack('discount_td_end')
@endif
@endif
@stack('total_th_start')
@if (!$hideAmount)
<th class="total text-white">{{ trans($textAmount) }}</th>
@endif
@stack('total_th_end')
</tr>
@endif
</tbody>
</table>
</thead>
<tbody>
@if ($document->items->count())
@foreach($document->items as $item)
<x-documents.template.line-item
type="{{ $type }}"
:item="$item"
:document="$document"
hide-items="{{ $hideItems }}"
hide-name="{{ $hideName }}"
hide-description="{{ $hideDescription }}"
hide-quantity="{{ $hideQuantity }}"
hide-price="{{ $hidePrice }}"
hide-discount="{{ $hideDiscount }}"
hide-amount="{{ $hideAmount }}"
/>
@endforeach
@else
<tr>
<td colspan="5" class="text-center empty-items">
{{ trans('documents.empty_items') }}
</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
@endif
<div class="row mt-7">
<div class="col-58">

View File

@ -7,7 +7,9 @@
<strong>
<span class="float-left long-texts mwpx-200 transaction-head-text">
{{ $transaction->account->name }}
<a href="{{ route('accounts.show', $transaction->account->id) }}">
{{ $transaction->account->name }}
</a>
</span>
</strong>
<br><br>

View File

@ -8,6 +8,7 @@
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@stack('edit_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $transaction->id) }}">
@ -15,9 +16,11 @@
</a>
@endcan
@endif
@endif
@stack('edit_button_end')
@stack('duplicate_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonDuplicate)
@can($permissionCreate)
<a class="dropdown-item" href="{{ route($routeButtonDuplicate, $transaction->id) }}">
@ -25,12 +28,15 @@
</a>
@endcan
@endif
@endif
@stack('duplicate_button_end')
@stack('button_dropdown_divider_1_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonGroupDivider1)
<div class="dropdown-divider"></div>
@endif
@endif
@stack('button_dropdown_divider_1_end')
@if (!$hideButtonPrint)
@ -42,14 +48,17 @@
@endif
@stack('share_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonShare)
<a class="dropdown-item" href="{{ $signedUrl }}" target="_blank">
{{ trans('general.share') }}
</a>
@endif
@endif
@stack('share_button_end')
@stack('edit_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonEmail)
@if($transaction->contact->email)
<a class="dropdown-item" href="{{ route($routeButtonEmail, $transaction->id) }}">
@ -63,6 +72,7 @@
</el-tooltip>
@endif
@endif
@endif
@stack('edit_button_end')
@stack('button_pdf_start')
@ -74,12 +84,15 @@
@stack('button_pdf_end')
@stack('button_dropdown_divider_3_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonGroupDivider3)
<div class="dropdown-divider"></div>
@endif
@endif
@stack('button_dropdown_divider_3_end')
@stack('delete_button_start')
@if (!$transaction->hasTransferRelation)
@if (!$hideButtonDelete)
@can($permissionDelete)
@if ($checkButtonReconciled)
@ -91,6 +104,7 @@
@endif
@endcan
@endif
@endif
@stack('delete_button_end')
@stack('button_dropdown_end')
</div>

View File

@ -8,6 +8,8 @@
hide-header-to-account="{{ $hideHeaderToAccount }}"
text-header-to-account="{{ $textHeaderToAccount }}"
class-header-to-account="{{ $classHeaderToAccount }}"
route-from-account-show="{{ $routeFromAccountShow }}"
route-to-account-show="{{ $routeToAccountShow }}"
hide-header-amount="{{ $hideHeaderAmount }}"
text-header-amount="{{ $textHeaderAmount }}"
class-header-amount="{{ $classHeaderAmount }}"

View File

@ -7,7 +7,9 @@
<strong>
<span class="float-left long-texts mwpx-200 transaction-head-text">
{{ $transfer->expense_transaction->account->name }}
<a href="{{ route($routeFromAccountShow, $transfer->expense_transaction->account->id) }}">
{{ $transfer->expense_transaction->account->name }}
</a>
</span>
</strong>
<br><br>
@ -23,7 +25,9 @@
<strong>
<span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transfer->income_transaction->account->name }}
<a href="{{ route($routeToAccountShow, $transfer->income_transaction->account->id) }}">
{{ $transfer->income_transaction->account->name }}
</a>
</span>
</strong>
<br><br>

View File

@ -1,4 +1,4 @@
<div class="accordion" id="exports">
<div class="accordion" id="notification-exports">
<div class="card">
<div class="card-header" id="heading-exports" data-toggle="collapse" data-target="#collapse-exports"
aria-expanded="false" aria-controls="collapse-exports">
@ -22,7 +22,7 @@
</div>
</div>
<div id="collapse-exports" class="collapse" aria-labelledby="heading-exports" data-parent="#exports">
<div id="collapse-exports" class="collapse" aria-labelledby="heading-exports" data-parent="#notification-exports">
@if ($notifications->total())
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-export">

View File

@ -1,4 +1,4 @@
<div class="accordion" id="imports">
<div class="accordion" id="notification-imports">
<div class="card">
<div class="card-header" id="heading-imports" data-toggle="collapse" data-target="#collapse-imports"
aria-expanded="false" aria-controls="collapse-imports">
@ -22,7 +22,7 @@
</div>
</div>
<div id="collapse-imports" class="collapse" aria-labelledby="heading-imports" data-parent="#imports">
<div id="collapse-imports" class="collapse" aria-labelledby="heading-imports" data-parent="#notification-imports">
@if ($notifications->total())
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-import">

View File

@ -1,4 +1,4 @@
<div class="accordion" id="new-apps">
<div class="accordion" id="notification-new-apps">
<div class="card">
<div class="card-header" id="heading-new-apps" data-toggle="collapse" data-target="#collapse-new-apps"
aria-expanded="{{ ($notifications) ? 'true' : 'false' }}" aria-controls="collapse-new-apps">
@ -20,7 +20,7 @@
</div>
</div>
<div id="collapse-new-apps" class="collapse{{ ($notifications) ? ' show' : '' }}" aria-labelledby="heading-new-apps" data-parent="#new-apps">
<div id="collapse-new-apps" class="collapse{{ ($notifications) ? ' show' : '' }}" aria-labelledby="heading-new-apps" data-parent="#notification-new-apps">
@if ($notifications)
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-export">

View File

@ -1,4 +1,4 @@
<div class="accordion" id="recurring-{{$type}}">
<div class="accordion" id="notification-recurring-{{$type}}">
<div class="card">
<div class="card-header" id="heading-recurring-{{$type}}" data-toggle="collapse" data-target="#collapse-recurring-{{$type}}"
aria-expanded="false" aria-controls="collapse-recurring-{{$type}}">
@ -22,7 +22,7 @@
</div>
</div>
<div id="collapse-recurring-{{$type}}" class="collapse" aria-labelledby="heading-recurring-{{$type}}" data-parent="#recurring-{{$type}}">
<div id="collapse-recurring-{{$type}}" class="collapse" aria-labelledby="heading-recurring-{{$type}}" data-parent="#notification-recurring-{{$type}}">
@if ($notifications->total())
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-recurring-{{ $type }}">

View File

@ -1,4 +1,4 @@
<div class="accordion" id="reminder-{{$type}}">
<div class="accordion" id="notification-reminder-{{$type}}">
<div class="card">
<div class="card-header" id="heading-reminder-{{$type}}" data-toggle="collapse" data-target="#collapse-reminder-{{$type}}"
aria-expanded="false" aria-controls="collapse-reminder-{{$type}}">
@ -22,7 +22,7 @@
</div>
</div>
<div id="collapse-reminder-{{$type}}" class="collapse" aria-labelledby="heading-reminder-{{$type}}" data-parent="#reminder-{{$type}}">
<div id="collapse-reminder-{{$type}}" class="collapse" aria-labelledby="heading-reminder-{{$type}}" data-parent="#notification-reminder-{{$type}}">
@if ($notifications->total())
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-reminder-{{ $type }}">

View File

@ -79,6 +79,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -57,6 +57,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -81,6 +81,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -59,6 +59,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -73,6 +73,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -51,6 +51,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -75,6 +75,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -53,6 +53,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -75,6 +75,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -53,6 +53,12 @@
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif

View File

@ -73,6 +73,14 @@
'value' => \Date::now()->year,
];
}
if (old($key) || request()->get($key)) {
$filtered[] = [
'option' => $key,
'operator' => '=',
'value' => old($key, request()->get($key)),
];
}
}
@endphp

View File

@ -6,7 +6,7 @@
<div class="card">
{!! Form::open([
'route' => 'payments.store',
'id' => 'payment',
'id' => 'transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
@ -56,5 +56,5 @@
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/purchases/payments.js?v=' . version('short')) }}"></script>
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -27,7 +27,7 @@
'files' => true,
'route' => ['payments.update', $payment->id],
'role' => 'form',
'id' => 'payment',
'id' => 'transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'class' => 'form-loading-button',
@ -80,5 +80,5 @@
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/purchases/payments.js?v=' . version('short')) }}"></script>
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -125,5 +125,5 @@
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/purchases/payments.js?v=' . version('short')) }}"></script>
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -6,7 +6,7 @@
<div class="card">
{!! Form::open([
'route' => 'revenues.store',
'id' => 'revenue',
'id' => 'transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
@ -56,5 +56,5 @@
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/sales/revenues.js?v=' . version('short')) }}"></script>
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -27,7 +27,7 @@
'files' => true,
'route' => ['revenues.update', $revenue->id],
'role' => 'form',
'id' => 'revenue',
'id' => 'transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'class' => 'form-loading-button',
@ -80,5 +80,5 @@
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/sales/revenues.js?v=' . version('short')) }}"></script>
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -55,7 +55,7 @@
<td class="col-md-2 col-lg-3 col-xl-3 d-none d-md-block text-left">
{{ $item->contact->name }}
@if($item->invoice)
@if ($item->invoice)
@if ($item->invoice->status == 'paid')
<el-tooltip content="{{ $item->invoice->document_number }} / {{ trans('documents.statuses.paid') }}"
effect="success"
@ -125,5 +125,5 @@
@endsection
@push('scripts_start')
<script src="{{ asset('public/js/sales/revenues.js?v=' . version('short')) }}"></script>
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
@endpush