Merge branch 'master' of github.com:akaunting/akaunting into 2.1-dev

# Conflicts:
#	app/Http/Controllers/Common/Items.php
#	resources/views/modules/item/documentation.blade.php
#	resources/views/modules/item/show.blade.php
#	resources/views/partials/admin/header.blade.php
#	resources/views/purchases/bills/show.blade.php
#	resources/views/purchases/vendors/show.blade.php
#	resources/views/sales/customers/show.blade.php
#	resources/views/sales/invoices/show.blade.php
#	resources/views/wizard/companies/edit.blade.php
#	resources/views/wizard/currencies/index.blade.php
#	resources/views/wizard/finish/index.blade.php
#	resources/views/wizard/taxes/index.blade.php
This commit is contained in:
Cüneyt Şentürk
2020-08-28 19:24:26 +03:00
824 changed files with 14086 additions and 5612 deletions

View File

@ -27,7 +27,7 @@
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), setting('default.locale')) }}
{{ Form::selectGroup('landing_page', trans('auth.landing_page'), 'sign-in-alt', $routes, 'dashboard') }}
{{ Form::selectGroup('landing_page', trans('auth.landing_page'), 'sign-in-alt', $landing_pages, 'dashboard') }}
@if (setting('default.use_gravatar', '0') == '1')
@stack('picture_input_start')
@ -48,7 +48,7 @@
@endif
@permission('read-common-companies')
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'name') }}
{{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, [], ['required' => 'required', 'remote_action' => route('companies.autocomplete'), 'remote_type' => 'company']) }}
@endpermission
@permission('read-auth-roles')
@ -68,6 +68,15 @@
</div>
@endsection
@push('stylesheet')
<style type="text/css">
.el-select .el-select__tags > span {
display: flex;
margin-bottom: -75px;
}
</style>
@endpush
@push('scripts_start')
<script src="{{ asset('public/js/auth/users.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -28,7 +28,7 @@
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $user->locale) }}
{{ Form::selectGroup('landing_page', trans('auth.landing_page'), 'sign-in-alt', $routes, $user->landing_page) }}
{{ Form::selectGroup('landing_page', trans('auth.landing_page'), 'sign-in-alt', $landing_pages, $user->landing_page) }}
@if (setting('default.use_gravatar', '0') == '1')
@stack('picture_input_start')
@ -49,7 +49,7 @@
@endif
@permission('read-common-companies')
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'name') }}
{{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, $user->company_ids, ['required' => 'required', 'remote_action' => route('companies.autocomplete'), 'remote_type' => 'company']) }}
@endpermission
@permission('read-auth-roles')
@ -60,7 +60,7 @@
</div>
</div>
@permission('update-auth-users')
@permission(['update-auth-users', 'update-auth-profile'])
<div class="card-footer">
<div class="row save-buttons">
{{ Form::saveButtons('users.index') }}
@ -71,6 +71,15 @@
</div>
@endsection
@push('stylesheet')
<style type="text/css">
.el-select .el-select__tags > span {
display: flex;
margin-bottom: -75px;
}
</style>
@endpush
@push('scripts_start')
<script src="{{ asset('public/js/auth/users.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -54,11 +54,11 @@
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-3">
<a class="col-aka" href="{{ route('users.edit', $item->id) }}">
@if (setting('default.use_gravatar', '0') == '1')
<img src="{{ $item->picture }}" alt="{{ $item->name }}" title="{{ $item->name }}">
<img src="{{ $item->picture }}" alt="{{ $item->name }}" class="rounded-circle user-img p-1 mr-3 hidden-md" title="{{ $item->name }}">
@elseif (is_object($item->picture))
<img src="{{ Storage::url($item->picture->id) }}" class="rounded-circle user-img p-1 mr-3 hidden-md" alt="{{ $item->name }}" title="{{ $item->name }}">
@else
@if ($item->picture)
<img src="{{ Storage::url($item->picture->id) }}" alt="{{ $item->name }}" title="{{ $item->name }}">
@endif
<img src="{{ asset('public/img/user.svg') }}" class="user-img p-1 mr-3 hidden-md" alt="{{ $item->name }}"/>
@endif
{{ $item->name }}
</a>

View File

@ -23,7 +23,7 @@
{{ 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']) }}
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency], 0) }}
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0) }}
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}

View File

@ -24,7 +24,7 @@
{{ 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']) }}
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency], $account->opening_balance) }}
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], $account->opening_balance) }}
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}

View File

@ -20,7 +20,7 @@
{{ Form::dateGroup('ended_at', trans('reconciliations.end_date'), 'calendar', ['id' => 'ended_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], request('ended_at', Date::now()->endOfMonth()->toDateString()), 'col-xl-3') }}
{{ Form::moneyGroup('closing_balance', trans('reconciliations.closing_balance'), 'balance-scale', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency], request('closing_balance', 0.00), 'col-xl-2') }}
{{ Form::moneyGroup('closing_balance', trans('reconciliations.closing_balance'), 'balance-scale', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency', 'input' => 'onCalculate'], request('closing_balance', 0.00), 'col-xl-2') }}
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, request('account_id', setting('default.account')), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount'], 'col-xl-2') }}
@ -83,7 +83,7 @@
@endif
<td class="col-md-1 text-right d-none d-md-block">
<div class="custom-control custom-checkbox">
{{ Form::checkbox($item->type . '_' . $item->id, $item->amount, $item->reconciled, [
{{ Form::checkbox($item->type . '_' . $item->id, $item->amount_for_account, $item->reconciled, [
'data-field' => 'transactions',
'v-model' => 'form.transactions.' . $item->type . '_' . $item->id,
'id' => 'transaction-' . $item->id . '-'. $item->type,
@ -100,6 +100,12 @@
@if ($transactions->count())
<table class="table">
<tbody>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.opening_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
<span>@money($opening_balance, $account->currency_code, true)</span>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">

View File

@ -55,7 +55,7 @@
@endif
<td class="col-md-1 text-right d-none d-md-block">
<div class="custom-control custom-checkbox">
{{ Form::checkbox($item->type . '_' . $item->id, $item->amount, $item->reconciled, [
{{ Form::checkbox($item->type . '_' . $item->id, $item->amount_for_account, $item->reconciled, [
'data-field' => 'transactions',
'v-model' => 'form.transactions.' . $item->type . '_' . $item->id,
'id' => 'transaction-' . $item->id . '-'. $item->type,
@ -70,34 +70,40 @@
</tbody>
</table>
@if ($transactions->count())
<table class="table">
<tbody>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'masked' => 'true'], $reconciliation->closing_balance, 'text-right d-none') }}
<span id="closing-balance-total" v-if="totals.closing_balance" v-html="totals.closing_balance"></span>
<span v-else>@money($reconciliation->closing_balance, $account->currency_code, true)</span>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th>
<td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="cleared-amount-total" v-if="totals.cleared_amount" v-html="totals.cleared_amount"></span>
<span v-else>@money(0, $account->currency_code, true)</span>
</td>
</tr>
<tr :class="difference" class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th>
<td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.difference', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="difference-total" v-if="totals.difference" v-html="totals.difference"></span>
<span v-else>@money(0, $account->currency_code, true)</span>
</td>
</tr>
</tbody>
</table>
<table class="table">
<tbody>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.opening_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
<span>@money($opening_balance, $account->currency_code, true)</span>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'masked' => 'true'], $reconciliation->closing_balance, 'text-right d-none') }}
<span id="closing-balance-total" v-if="totals.closing_balance" v-html="totals.closing_balance"></span>
<span v-else>@money($reconciliation->closing_balance, $account->currency_code, true)</span>
</td>
</tr>
<tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th>
<td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="cleared-amount-total" v-if="totals.cleared_amount" v-html="totals.cleared_amount"></span>
<span v-else>@money(0, $account->currency_code, true)</span>
</td>
</tr>
<tr :class="difference" class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th>
<td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.difference', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="difference-total" v-if="totals.difference" v-html="totals.difference"></span>
<span v-else>@money(0, $account->currency_code, true)</span>
</td>
</tr>
</tbody>
</table>
@endif
</div>

View File

@ -35,11 +35,11 @@
<tr class="row table-head-line">
<th class="col-sm-2 col-md-1 col-lg-1 d-none d-sm-block">{{ Form::bulkActionAllGroup() }}</th>
<th class="col-sm-3 col-md-2 col-lg-2 d-none d-sm-block">@sortablelink('created_at', trans('general.created_date'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
<th class="col-xs-4 col-sm-3 col-md-3 col-lg-3">@sortablelink('account_id', trans_choice('general.accounts', 1))</th>
<th class="col-lg-2 d-none d-lg-block">{{ trans('general.period') }}</th>
<th class="col-xs-3 col-sm-2 col-md-2 col-lg-2">@sortablelink('account_id', trans_choice('general.accounts', 1))</th>
<th class="col-md-2 col-lg-2 d-none d-lg-block">{{ trans('general.period') }}</th>
<th class="col-md-2 col-lg-2 d-none d-md-block text-right">@sortablelink('closing_balance', trans('reconciliations.closing_balance'))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1">@sortablelink('status', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">{{ trans('general.actions') }}</th>
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-2">@sortablelink('status', trans_choice('general.statuses', 1))</th>
<th class="col-xs-4 col-sm-2 col-md-1 col-lg-1 text-center">{{ trans('general.actions') }}</th>
</tr>
</thead>
@ -48,17 +48,17 @@
<tr class="row align-items-center border-top-1">
<td class="col-sm-2 col-md-1 col-lg-1 d-none d-sm-block">{{ Form::bulkActionGroup($item->id, $item->account->name) }}</td>
<td class="col-sm-3 col-md-2 col-lg-2 d-none d-sm-block"><a class="col-aka" href="{{ route('reconciliations.edit', $item->id) }}">@date($item->created_at)</a></td>
<td class="col-xs-4 col-sm-3 col-md-3 col-lg-3">{{ $item->account->name }}</td>
<td class="col-lg-2 d-none d-lg-block border-0">@date($item->started_at) - @date($item->ended_at)</td>
<td class="col-xs-3 col-sm-2 col-md-2 col-lg-2">{{ $item->account->name }}</td>
<td class="col-md-2 col-lg-2 d-none d-lg-block border-0">@date($item->started_at) - @date($item->ended_at)</td>
<td class="col-md-2 col-lg-2 d-none d-md-block text-right">@money($item->closing_balance, $item->account->currency_code, true)</td>
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1">
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-2">
@if ($item->reconciled)
<span class="badge badge-pill badge-success">{{ trans('reconciliations.reconciled') }}</span>
@else
<span class="badge badge-pill badge-danger">{{ trans('reconciliations.unreconciled') }}</span>
@endif
</td>
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">
<td class="col-xs-4 col-sm-2 col-md-1 col-lg-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>

View File

@ -47,7 +47,7 @@
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-sm-2 col-md-2 d-none d-sm-block">@date($item->paid_at)</td>
<td class="col-xs-4 col-sm-3 col-md-2">{{ $item->account->name }}</td>
<td class="col-xs-4 col-sm-3 col-md-2">{{ trans_choice('general.' . Str::plural($item->type), 1) }}</td>
<td class="col-xs-4 col-sm-3 col-md-2">{{ $item->type_title }}</td>
<td class="col-sm-2 col-md-2 d-none d-sm-block">{{ $item->category->name }}</td>
<td class="col-md-2 d-none d-md-block long-texts">{{ $item->description }}</td>
<td class="col-xs-4 col-sm-2 col-md-2 text-right">

View File

@ -21,7 +21,7 @@
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency], 0) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0) }}
{{ Form::dateGroup('transferred_at', trans('general.date'), 'calendar', ['id' => 'transferred_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::now()->toDateString()) }}

View File

@ -22,7 +22,7 @@
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts, $transfer->to_account_id) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency], $transfer->amount) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], $transfer->amount) }}
{{ Form::dateGroup('transferred_at', trans('general.date'), 'calendar', ['id' => 'transferred_at', 'class' => 'form-control datepicker', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($transfer->transferred_at)->toDateString()) }}

View File

@ -37,20 +37,27 @@
) }}
@elseif ($type == 'textareaGroup')
{{ Form::$type($field['name'], $field['title']) }}
@elseif ($type == 'dateGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
'data-field' => 'settings',
],
$field['attributes']),
isset($report->settings->{$field['name']}) ? $report->settings->{$field['name']}: null
) }}
@elseif ($type == 'selectGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $report->settings->{$field['name']}, array_merge([
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], isset($report->settings->{$field['name']}) ? $report->settings->{$field['name']} : $field['selected'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'radioGroup')
{{ Form::$type($field['name'], $field['title'], isset($report->settings->{$field['name']}) ? $report->settings->{$field['name']} : 1, $field['enable'], $field['disable'], array_merge([
{{ Form::$type($field['name'], $field['title'], isset($report->settings->{$field['name']}) ? $report->settings->{$field['name']} : true, $field['enable'], $field['disable'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'checkboxGroup')
{{ Form::$type($field['name'], $field['title'], $field['items'], $report->settings->{$field['name']}, $field['id'], array_merge([
{{ Form::$type($field['name'], $field['title'], $field['items'], $report->settings->{$field['name']}, $field['id'], $report->settings->{$field['name']}, array_merge([
'data-field' => 'settings'
],
$field['attributes'])

View File

@ -47,9 +47,8 @@
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-4 col-sm-4 col-md-4">{{ trans('general.name') }}</th>
<th class="col-md-2 d-none d-md-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-3 col-md-2 d-none d-sm-block">{{ trans('updates.installed_version') }}</th>
<th class="col-xs-4 col-sm-3 col-md-2">{{ trans('updates.latest_version') }}</th>
<th class="col-sm-3 col-md-3 d-none d-sm-block">{{ trans('updates.installed_version') }}</th>
<th class="col-xs-4 col-sm-3 col-md-3">{{ trans('updates.latest_version') }}</th>
<th class="col-xs-4 col-sm-2 col-md-2 text-center">{{ trans('general.actions') }}</th>
</tr>
</thead>
@ -59,9 +58,8 @@
@foreach($modules as $module)
<tr class="row align-items-center border-top-1">
<td class="col-xs-4 col-sm-4 col-md-4">{{ $module->name }}</td>
<td class="col-md-2 d-none d-md-block">{{ $module->category }}</td>
<td class="col-sm-3 col-md-2 d-none d-sm-block">{{ $module->installed }}</td>
<td class="col-xs-4 col-md-2 col-sm-3">{{ $module->latest }}</td>
<td class="col-sm-3 col-md-3 d-none d-sm-block">{{ $module->installed }}</td>
<td class="col-xs-4 col-sm-3 col-md-3">{{ $module->latest }}</td>
<td class="col-xs-4 col-sm-2 col-md-2 text-center">
<a href="{{ route('updates.run', ['alias' => $module->alias, 'version' => $module->latest]) }}" class="btn btn-warning btn-sm">
{{ trans_choice('general.updates', 1) }}

View File

@ -1,5 +1,4 @@
<html lang="{{ app()->getLocale() }}">
@include('partials.print.head')
<body onload="window.print();">
@ -9,5 +8,4 @@
@stack('body_end')
</body>
</html>

View File

@ -14,7 +14,7 @@
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'change' => 'onChangeCurrency']) }}
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency], 0.00) }}
{{ Form::moneyGroup('opening_balance', trans('accounts.opening_balance'), 'balance-scale', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00) }}
{!! Form::hidden('enabled', '1', []) !!}
</div>

View File

@ -1,39 +1,35 @@
<div class="modal-body">
{!! Form::open([
'route' => ['modals.bills.bill.transactions.store', $bill->id],
'id' => 'transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'transaction_form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
<div class="row">
<base-alert type="warning" v-if="typeof transaction_form.response !== 'undefined' && transaction_form.response.error" v-html="transaction_form.response.message"></base-alert>
{!! Form::open([
'id' => 'form-transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'route' => ['modals.bills.bill.transactions.store', $bill->id],
'novalidate' => true
]) !!}
<base-alert type="warning" v-if="typeof form.response !== 'undefined' && form.response.error" v-html="form.response.message"></base-alert>
{{ Form::dateGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off', 'v-model' => 'transaction_form.paid_at', 'v-error' => 'payment.errors.get("paid_at")', 'v-error-message' => 'payment.errors.get("paid_at")'], Date::now()->toDateString()) }}
<div class="row">
{{ Form::dateGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::now()->toDateString()) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'v-model' => 'transaction_form.amount', 'v-error' => 'payment.errors.get("amount")', 'v-error-message' => 'payment.errors.get("amount")', 'currency' => $currency], $bill->grand_total) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], $bill->grand_total) }}
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'v-model' => 'transaction_form.account_id', 'v-error' => 'payment.errors.get("account_id")', 'v-error-message' => 'payment.errors.get("account_id")', 'change' => 'onChangePaymentAccount']) }}
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangePaymentAccount']) }}
@stack('currency_code_input_start')
{{ Form::textGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', ['disabled' => 'true', 'v-model' => 'transaction_form.currency', 'v-error' => 'payment.errors.get("currency")', 'v-error-message' => 'payment.errors.get("currency")'], $currencies[$bill->currency_code]) }}
@stack('currency_code_input_end')
{{ Form::textGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', ['disabled' => 'true'], $currencies[$bill->currency_code]) }}
{{ Form::textareaGroup('description', trans('general.description'), '', null, ['rows' => '3', 'v-model' => 'transaction_form.description', 'v-error' => 'payment.errors.get("description")', 'v-error-message' => 'payment.errors.get("description")']) }}
{{ Form::textareaGroup('description', trans('general.description'), '', null, ['rows' => '3']) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method'), ['required' => 'requied', 'v-model' => 'transaction_form.payment_method', 'v-error' => 'payment.errors.get("payment_method")', 'v-error-message' => 'payment.errors.get("payment_method")']) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method'), ['required' => 'requied']) }}
{{ Form::textGroup('reference', trans('general.reference'), 'fa fa-file', ['v-model' => 'transaction_form.reference', 'v-error' => 'payment.errors.get("reference")', 'v-error-message' => 'payment.errors.get("reference")']) }}
{{ Form::textGroup('reference', trans('general.reference'), 'fa fa-file', []) }}
{!! Form::hidden('bill_id', $bill->id, ['id' => 'bill_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('category_id', $bill->category->id, ['id' => 'category_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_code', $bill->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', $bill->currency_rate, ['id' => 'currency_rate', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('bill_id', $bill->id, ['id' => 'bill_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('category_id', $bill->category->id, ['id' => 'category_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('amount', $bill->grand_total, ['id' => 'amount', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_code', $bill->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', $bill->currency_rate, ['id' => 'currency_rate', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('type', 'expense') !!}
</div>
{!! Form::close() !!}
</div>
{!! Form::hidden('type', 'expense') !!}
</div>
{!! Form::close() !!}

View File

@ -1,37 +1,35 @@
<div class="modal-body pb-0">
{!! Form::open([
'route' => ['modals.invoices.invoice.transactions.store', $invoice->id],
'id' => 'transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'transaction_form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
<div class="row">
<base-alert type="warning" v-if="typeof transaction_form.response !== 'undefined' && transaction_form.response.error" v-html="transaction_form.response.message"></base-alert>
{!! Form::open([
'id' => 'form-transaction',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'role' => 'form',
'class' => 'form-loading-button',
'route' => ['modals.invoices.invoice.transactions.store', $invoice->id],
'novalidate' => true
]) !!}
<base-alert type="warning" v-if="typeof form.response !== 'undefined' && form.response.error" v-html="form.response.message"></base-alert>
{{ Form::dateGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off', 'v-model' => 'transaction_form.paid_at', 'v-error' => 'payment.errors.get("paid_at")', 'v-error-message' => 'payment.errors.get("paid_at")'], Date::now()->toDateString()) }}
<div class="row">
{{ Form::dateGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'required' => 'required', 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::now()->toDateString()) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'v-model' => 'transaction_form.amount', 'v-error' => 'payment.errors.get("amount")', 'v-error-message' => 'payment.errors.get("amount")', 'currency' => $currency], $invoice->grand_total) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], $invoice->grand_total) }}
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'v-model' => 'transaction_form.account_id', 'v-error' => 'payment.errors.get("account_id")', 'v-error-message' => 'payment.errors.get("account_id")', 'change' => 'onChangePaymentAccount']) }}
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangePaymentAccount']) }}
{{ Form::textGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', ['disabled' => 'true', 'v-model' => 'transaction_form.currency', 'v-error' => 'payment.errors.get("currency")', 'v-error-message' => 'payment.errors.get("currency")'], $currencies[$invoice->currency_code]) }}
{{ Form::textGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', ['disabled' => 'true'], $currencies[$invoice->currency_code]) }}
{{ Form::textareaGroup('description', trans('general.description'), '', null, ['rows' => '3', 'v-model' => 'transaction_form.description', 'v-error' => 'payment.errors.get("description")', 'v-error-message' => 'payment.errors.get("description")']) }}
{{ Form::textareaGroup('description', trans('general.description'), '', null, ['rows' => '3']) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method'), ['required' => 'requied', 'v-model' => 'transaction_form.payment_method', 'v-error' => 'payment.errors.get("payment_method")', 'v-error-message' => 'payment.errors.get("payment_method")']) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method'), ['required' => 'requied']) }}
{{ Form::textGroup('reference', trans('general.reference'), 'fa fa-file', ['v-model' => 'transaction_form.reference', 'v-error' => 'payment.errors.get("reference")', 'v-error-message' => 'payment.errors.get("reference")']) }}
{{ Form::textGroup('reference', trans('general.reference'), 'fa fa-file', []) }}
{!! Form::hidden('invoice_id', $invoice->id, ['id' => 'invoice_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('category_id', $invoice->category->id, ['id' => 'category_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_code', $invoice->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', $invoice->currency_rate, ['id' => 'currency_rate', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('invoice_id', $invoice->id, ['id' => 'invoice_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('category_id', $invoice->category->id, ['id' => 'category_id', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('amount', $invoice->grand_total, ['id' => 'amount', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_code', $invoice->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', $invoice->currency_rate, ['id' => 'currency_rate', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('type', 'income') !!}
</div>
{!! Form::close() !!}
</div>
{!! Form::hidden('type', 'income') !!}
</div>
{!! Form::close() !!}

View File

@ -52,14 +52,14 @@
<el-color-picker popper-class="template-color-picker" v-model="invoice_form.color" size="mini" :predefine="predefineColors" @change="onChangeColor"></el-color-picker>
</span>
</div>
{!! Form::text('color', $setting['color'], ['v-model' => 'invoice_form.color', '@input' => 'onChangeColorInput', 'id' => 'color', 'class' => 'form-control color-hex', 'required' => 'required']) !!}
{!! Form::text('color', setting('invoice.color'), ['v-model' => 'invoice_form.color', '@input' => 'onChangeColorInput', 'id' => 'color', 'class' => 'form-control color-hex', 'required' => 'required']) !!}
</div>
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
</div>
@stack('color_input_end')
</div>
{!! Form::hidden('_template', $setting['template']) !!}
{!! Form::hidden('_template', setting('invoice.template')) !!}
{!! Form::hidden('_prefix', 'invoice') !!}
{!! Form::close() !!}
</div>

View File

@ -22,7 +22,7 @@
<div class="card-footer">
<div class="row">
<div class="col-md-12">
<a href="{{ url($back) }}" class="btn btn-white">{{ trans('modules.back') }}</a>
<a href="{{ url($back) }}" class="btn btn-white">{{ trans('modules.back') }}</a>
</div>
</div>
</div>

View File

@ -12,24 +12,22 @@
<div class="row">
<div class="col-md-8">
<h3>{{ $module->name }}</h3>
<div class="nav-wrapper">
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-icons-text" role="tablist">
<li class="nav-item">
<a class="nav-link mb-sm-2 mb-md-0 active" href="#description" data-toggle="tab" aria-selected="false">{{ trans('general.description') }}</a>
</li>
</ul>
<div class="row">
<div class="col-xs-12 col-sm-12">
<div class="float-left">
<h3>{{ $module->name }}</h3>
</div>
</div>
</div>
<div class="card shadow">
<div class="card">
<div class="card-body">
<div class="tab-content">
<div class="tab-pane fade show active" id="description">
{!! $module->description !!}
@if ($module->screenshots || $module->video)
<akaunting-carousel :name="'{{ $module->name }}'" :height="'430px'"
<akaunting-carousel :name="'{{ $module->name }}'" :height="'430px'" arrow="always"
@if ($module->video)
@php
if (strpos($module->video->link, '=') !== false) {
@ -53,7 +51,16 @@
<div class="card">
<div class="card-body">
<div id="countdown-pre-sale"></div>
<akaunting-countdown id="countdown-pre-sale"
:year="{{ (int) $module->pre_sale_date->year }}"
:month="{{ (int) $module->pre_sale_date->month - 1 }}"
:date="{{ (int) $module->pre_sale_date->day }}"
></akaunting-countdown>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="text-center">
<strong>
<div class="text-xl">
@ -61,6 +68,7 @@
{{ trans('modules.free') }}
@else
{!! $module->price_prefix !!}
@if (isset($module->special_price))
<del class="text-danger">{{ $module->price }}</del>
{{ $module->special_price }}
@ -101,33 +109,37 @@
<table class="table">
<tbody>
@if ($module->vendor_name)
<tr>
<th>{{ trans_choice('general.developers', 1) }}</th>
<td class="text-right"><a href="{{ route('apps.vendors.show', $module->vendor->slug) }}">{{ $module->vendor_name }}</a></td>
<tr class="row">
<th class="col-5">{{ trans_choice('general.developers', 1) }}</th>
<td class="col-7 text-right"><a href="{{ route('apps.vendors.show', $module->vendor->slug) }}">{{ $module->vendor_name }}</a></td>
</tr>
@endif
@if ($module->version)
<tr>
<th>{{ trans('footer.version') }}</th>
<td class="text-right">{{ $module->version }}</td>
<tr class="row">
<th class="col-5">{{ trans('footer.version') }}</th>
<td class="col-7 text-right">{{ $module->version }}</td>
</tr>
@endif
@if ($module->created_at)
<tr>
<th>{{ trans('modules.added') }}</th>
<td class="text-right">@date($module->created_at)</td>
<tr class="row">
<th class="col-5">{{ trans('modules.added') }}</th>
<td class="col-7 text-right long-texts">@date($module->created_at)</td>
</tr>
@endif
@if ($module->updated_at)
<tr>
<th>{{ trans('modules.updated') }}</th>
<td class="text-right">{{ Date::parse($module->updated_at)->diffForHumans() }}</td>
<tr class="row">
<th class="col-5">{{ trans('modules.updated') }}</th>
<td class="col-7 text-right">{{ Date::parse($module->updated_at)->diffForHumans() }}</td>
</tr>
@endif
@if ($module->category)
<tr>
<th>{{ trans_choice('general.categories', 1) }}</th>
<td class="text-right"><a href="{{ route('apps.categories.show', $module->category->slug) }}">{{ $module->category->name }}</a></td>
@if ($module->categories)
<tr class="row">
<th class="col-5">{{ trans_choice('general.categories', (count($module->categories) > 1) ? 2 : 1) }}</th>
<td class="col-7 text-right">
@foreach ($module->categories as $module_category)
<a href="{{ route('apps.categories.show', $module_category->slug) }}">{{ $module_category->name }}</a> </br>
@endforeach
</td>
</tr>
@endif
</tbody>

View File

@ -4,7 +4,7 @@
@section('new_button')
<a href="{{ route('apps.api-key.create') }}" class="btn btn-white btn-sm">{{ trans('modules.api_key') }}</a>
<a href="{{ route('apps.my.index') }}" class="btn btn-white btn-sm">{{ trans('modules.my_apps') }}</a>
<a href="{{ route('apps.my.index') }}" class="btn btn-white btn-sm">{{ trans('modules.my_apps') }}</a>
@endsection
@section('content')

View File

@ -7,7 +7,8 @@
@stack('content_content_end')
<notifications></notifications>
<form id="form-create" method="POST" action="#"/>
<form id="form-dynamic-component" method="POST" action="#"></form>
<component v-bind:is="component"></component>
</div>
@stack('content_end')

View File

@ -34,6 +34,7 @@
<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>
@stack('js')

View File

@ -1,30 +1,26 @@
@stack('header_start')
<div id="header" class="header pb-6">
<div class="container-fluid content-layout">
<div class="header-body">
<div class="row py-4 align-items-center">
<div class="col-xs-12 col-sm-4 col-md-5 align-items-center">
<h2 class="d-inline-flex mb-0 long-texts">@yield('title')</h2>
@yield('dashboard_action')
</div>
<div class="col-xs-12 col-sm-8 col-md-7">
<div class="text-right">
@yield('new_button')
<div id="header" class="header pb-6">
<div class="container-fluid content-layout">
<div class="header-body">
<div class="row py-4 align-items-center">
<div class="col-xs-12 col-sm-4 col-md-5 align-items-center">
<h2 class="d-inline-flex mb-0 long-texts">@yield('title')</h2>
@yield('dashboard_action')
</div>
@permission('read-modules-home')
@if (!empty($suggestion_modules))
@foreach($suggestion_modules as $s_module)
<a href="{{ url($s_module->action_url) . '?' . http_build_query((array) $s_module->action_parameters) }}" class="btn btn-white btn-sm" target="{{ $s_module->action_target }}">{{ $s_module->name }}</a>
@endforeach
@endif
@endpermission
<div class="col-xs-12 col-sm-8 col-md-7">
<div class="text-right">
@stack('header_button_start')
@stack('header_button')
</div>
@yield('new_button')
@stack('header_button_end')
</div>
</div>
</div>
</div>
</div>
</div>
@stack('header_end')

View File

@ -39,8 +39,24 @@
@endpermission
<ul class="navbar-nav align-items-center ml-md-auto">
<li class="nav-item d-xl-none">
<div class="pr-3 sidenav-toggler sidenav-toggler-dark" data-action="sidenav-pin" data-target="#sidenav-main">
<div class="sidenav-toggler-inner">
<i class="sidenav-toggler-line"></i>
<i class="sidenav-toggler-line"></i>
<i class="sidenav-toggler-line"></i>
</div>
</div>
</li>
@stack('navbar_create')
<li class="nav-item d-sm-none">
<a class="nav-link" href="#" data-action="search-show" data-target="#navbar-search-main">
<i class="fa fa-search"></i>
</a>
</li>
@permission(['create-sales-invoices', 'create-sales-revenues', 'create-sales-invoices', 'create-purchases-bills', 'create-purchases-payments', 'create-purchases-vendors'])
<li class="nav-item dropdown">
<a class="nav-link" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@ -211,14 +227,16 @@
<li class="nav-item dropdown">
<a class="nav-link pr-0" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<div class="media align-items-center">
<img src="{{ asset('public/img/user.svg') }}" height="36" width="36" alt="User"/>
<div class="media-body ml-2 d-none d-lg-block">
<span class="mb-0 text-sm font-weight-bold">
@if (!empty($user->name))
{{ $user->name }}
@endif
</span>
</div>
@if (is_object($user->picture))
<img src="{{ Storage::url($user->picture->id) }}" class="rounded-circle image-style user-img" alt="{{ $user->name }}"/>
@else
<img src="{{ asset('public/img/user.svg') }}" class="user-img" alt="{{ $user->name }}"/>
@endif
@if (!empty($user->name))
<div class="media-body ml-2 d-none d-lg-block">
<span class="mb-0 text-sm font-weight-bold">{{ $user->name }}</span>
</div>
@endif
</div>
</a>
@ -231,7 +249,7 @@
@stack('navbar_profile_edit')
@permission('update-auth-users')
@permission(['read-auth-users', 'read-auth-profile'])
<a href="{{ route('users.edit', $user->id) }}" class="dropdown-item">
<i class="fas fa-user"></i>
<span>{{ trans('auth.profile') }}</span>

View File

@ -10,7 +10,7 @@
<div class="col-xs-12 col-sm-7 pagination-xs">
<nav class="float-right">
{!! $items->withPath(request()->url())->appends(request()->except('page'))->links() !!}
{!! $items->withPath(request()->url())->withQueryString()->links() !!}
</nav>
</div>
@else

View File

@ -0,0 +1,6 @@
@foreach($modules as $module)
<span>
<a href="{{ url($module->action_url) . '?' . http_build_query((array) $module->action_parameters) }}" class="btn btn-white btn-sm" target="{{ $module->action_target }}">{{ $module->name }}</a>
</span>
@endforeach

View File

@ -29,6 +29,7 @@
<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>
@stack('js')

View File

@ -11,7 +11,7 @@
@foreach($items as $item)
<div class="col-md-3">
<div class="custom-control custom-checkbox">
{{ Form::checkbox($name, $item->$id, null, [
{{ Form::checkbox($name, $item->$id, (is_array($selected) && count($selected) ? (in_array($item->$id, $selected) ? true : false) : null), [
'id' => 'checkbox-' . $name . '-' . $item->$id,
'class' => 'custom-control-input',
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name),

View File

@ -9,6 +9,8 @@
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
:group_class="'{{ $group_class }}'"
icon="fa fa-{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
@ -40,11 +42,15 @@
}"
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (isset($attributes['required']))
:required="{{ ($attributes['required']) ? 'true' : 'false' }}"
@endif
@if (isset($attributes['readonly']))

View File

@ -45,11 +45,11 @@
}"
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (isset($attributes['readonly']))

View File

@ -1,31 +1,87 @@
@stack($name . '_input_start')
<div class="{{ $col }} input-group-invoice-text">
<akaunting-select
class="float-left{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
<div
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
:class="[{'has-error': form.errors.get('{{ $name }}')}]">
@if (!empty($text))
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
@endif
@if (!empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }, form.{{ $name }} == 'custom' ? 'col-md-6' : 'col-md-12']"
@else
:form-classes="[{'has-error': form.errors.has('{{ $name }}') }, form.{{ $name }} == 'custom' ? 'col-md-6' : 'col-md-12']"
@endif
<div class="input-group input-group-merge {{ $group_class }}">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fa fa-{{ $icon }}"></i>
</span>
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
@if (isset($selected) || old($name))
value="{{ old($name, $selected) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
@if (!empty($attributes['v-model']))
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event;"
@endif
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}($event)"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
@if (isset($attributes['show']))
v-if="{{ $attributes['show'] }}"
@endif
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select>
<div
class="form-group float-left{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
:class="[{'has-error': form.errors.get('{{ $input_name }}')}, form.{{ $name }} == 'custom' ? 'col-md-6' : 'd-none']">
{!! Form::label($input_name, trans('settings.invoice.custom'), ['class' => 'form-control-label'])!!}
<div class="input-group input-group-merge {{ $group_class }}">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fa fa-{{ $icon }}"></i>
</span>
</div>
{!! Form::text($input_name, $input_value, [
'class' => 'form-control',
'data-name' => $input_name,
'data-value' => $input_value,
'placeholder' => trans('general.form.enter', ['field' => $text]),
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $input_name : 'form.' . $input_name),
]) !!}
</div>
{!! Form::text($input_name, $input_value, [
'class' => 'form-control',
'data-name' => $input_name,
'data-value' => $input_value,
'placeholder' => trans('general.form.enter', ['field' => $text]),
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name),
]) !!}
</div>
<div class="invalid-feedback d-block"
v-if="form.errors.has('{{ $input_name }}')"
v-html="form.errors.get('{{ $input_name }}')">
<div class="invalid-feedback d-block"
v-if="form.errors.has('{{ $input_name }}')"
v-html="form.errors.get('{{ $input_name }}')">
</div>
</div>
</div>

View File

@ -49,12 +49,16 @@
@change="{{ $attributes['change'] }}($event)"
@endif
@if (!empty($attributes['input']))
@input="{{ $attributes['input'] }}"
@endif
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (isset($attributes['v-error-message']))

View File

@ -52,11 +52,11 @@
@endif
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))

View File

@ -30,11 +30,11 @@
@endif
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))

View File

@ -0,0 +1,76 @@
@stack($name . '_input_start')
<akaunting-select-remote
class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
id="form-select-{{ $name }}"
@if (!empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
@else
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
@endif
icon="{{ $icon }}"
title="{{ $text }}"
placeholder="{{ trans('general.form.select.field', ['field' => $text]) }}"
name="{{ $name }}"
:options="{{ json_encode($values) }}"
@if (!empty($selected) || old($name))
:value="{{ json_encode(old($name, $selected)) }}"
@endif
@if (!empty($attributes['model']))
:model="{{ $attributes['model'] }}"
@endif
:multiple="true"
@if (!empty($attributes['collapse']))
:collapse="true"
@endif
@if (!empty($attributes['v-model']))
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))
@change="{{ $attributes['change'] }}($event)"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
@if (isset($attributes['show']))
v-if="{{ $attributes['show'] }}"
@endif
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
remote-action="{{ $attributes['remote_action'] }}"
remote-type="{{ $attributes['remote_type'] }}"
@if (!empty($attributes['currecny_code']))
currency-code="{{ $attributes['currecny_code'] }}"
@endif
loading-text="{{ trans('general.loading') }}"
no-data-text="{{ trans('general.no_data') }}"
no-matching-data-text="{{ trans('general.no_matching_data') }}"
></akaunting-select-remote>
@stack($name . '_input_end')

View File

@ -46,9 +46,9 @@
])}}"
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event; form.errors.clear('{{ $name }}');"
@endif

View File

@ -24,9 +24,9 @@
@endif
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event;"
@endif

View File

@ -48,11 +48,11 @@
:group="true"
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event; form.errors.clear('{{ $name }}');"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event; form.errors.clear('{{ $name }}');"
@endif
@if (!empty($attributes['change']))

View File

@ -26,11 +26,11 @@
:group="true"
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))

View File

@ -24,11 +24,11 @@
@endif
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (!empty($attributes['change']))

View File

@ -10,12 +10,10 @@
<akaunting-html-editor
name="{{ $name }}"
@if (!empty($attributes['v-model']))
:value="{{ $attributes['v-model'] . ' = ' . `$value` }}"
@elseif (!empty($attributes['data-field']))
:value="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = '. `$value` }}"
@if (!empty($value))
:value="`{{ $value }}`"
@else
:value="form.{{ $name }} = `{{ $value }}`"
:value="''"
@endif
@if (!empty($attributes['v-model']))

View File

@ -33,11 +33,11 @@
}"
@if (!empty($attributes['v-model']))
@interface="{{ $attributes['v-model'] . ' = $event' }}"
@interface="form.errors.clear('{{ $attributes['v-model'] }}'); {{ $attributes['v-model'] . ' = $event' }}"
@elseif (!empty($attributes['data-field']))
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@interface="form.errors.clear('{{ 'form.' . $attributes['data-field'] . '.' . $name }}'); {{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
@else
@interface="form.{{ $name }} = $event"
@interface="form.errors.clear('{{ $name }}'); form.{{ $name }} = $event"
@endif
@if (isset($attributes['readonly']))

View File

@ -10,7 +10,7 @@
<i class="fas fa-file-image display-3"></i>
@else
<a href="#" class="avatar">
<img src="{{ url('uploads/' . $file->id) }}" alt="{{ $file->basename }}">
<img src="{{ route('uploads.get', $file->id) }}" alt="{{ $file->basename }}">
</a>
@endif
</div>
@ -26,26 +26,18 @@
<div class="col-auto">
@permission('delete-common-uploads')
{!! Form::open([
'id' => $column_name. '-' . $file->id,
'method' => 'DELETE',
'url' => [url('uploads/' . $file->id)],
'class' => 'd-inline'
]) !!}
<a href="javascript:void();" id="remove-{{ $column_name }}" @click="onDeleteFile('{{ $file->id }}', '{{ route('uploads.destroy', $file->id) }}', '{{ trans('general.title.delete', ['type' => $column_name]) }}', '{{ trans('general.delete_confirm', ['name' => $file->basename, 'type' => $column_name]) }} ', '{{ trans('general.cancel') }}', '{{ trans('general.delete') }}')" type="button" class="btn btn-sm btn-danger text-white header-button-top">
<i class="fas fa-times"></i>
</a>
<a href="javascript:void();" id="remove-{{ $column_name }}" type="button" class="btn btn-sm btn-danger text-white header-button-top">
<i class="fas fa-times"></i>
</a>
@if ($options)
<input type="hidden" name="page" value="{{ $options['page'] }}" />
<input type="hidden" name="key" value="{{ $options['key'] }}" />
<input type="hidden" name="value" value="{{ $file->id }}" />
@endif
{!! Form::close() !!}
@if ($options)
<input type="hidden" name="page_{{ $file->id}}" id="file-page-{{ $file->id}}" value="{{ $options['page'] }}" />
<input type="hidden" name="key_{{ $file->id}}" id="file-key-{{ $file->id}}" value="{{ $options['key'] }}" />
<input type="hidden" name="value_{{ $file->id}}" id="file-value-{{ $file->id}}" value="{{ $file->id }}" />
@endif
@endpermission
<a href="{{ url('uploads/' . $file->id . '/download') }}" type="button" class="btn btn-sm btn-info text-white header-button-top">
<a href="{{ rotue('uploads.download', $file->id) }}" type="button" class="btn btn-sm btn-info text-white header-button-top">
<i class="fas fa-file-download"></i>
</a>
</div>

View File

@ -32,6 +32,7 @@
var url = '{{ url("/") }}';
var app_home = '{{ route("apps.home.index") }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>
@stack('js')

View File

@ -1,22 +1,25 @@
<div class="col-md-3">
<div class="card">
<div class="card-header py-2">
<div class="float-left ml--3">
<h4 class="mb-0"><a href="{{ route('apps.app.show', $module->slug) }}">{{ $module->name }}</a></h4>
</div>
<div class="float-right mr--3">
<span class="badge badge-pill badge-danger">{{ trans('modules.badge.pre_sale') }}</span>
</div>
<h4 class="ml--3 mb-0 float-left">
<a href="{{ route('apps.app.show', $module->slug) }}">{{ $module->name }}</a>
</h4>
<span class="mr--3 float-right">
<span class="badge bg-danger text-white">{{ trans('modules.badge.pre_sale') }}</span>
</span>
</div>
<a href="{{ route('apps.app.show', [module->slug) }}">
<a href="{{ route('apps.app.show', $module->slug) }}">
@foreach ($module->files as $file)
@if (($file->media_type == 'image') && ($file->pivot->zone == 'thumbnail'))
<img src="{{ $file->path_string }}" alt="{{ $module->name }}" class="card-img-top card-border">
<img src="{{ $file->path_string }}" alt="{{ $module->name }}" class="card-img-top border-radius-none">
@endif
@endforeach
</a>
<div class="card-footer py-2">
<div class="float-left ml--3 mt-1">
<div class="float-left ml--3 mt--1">
<small class="text-sm">
{{ trans('modules.pre_sale') }}
</small>

View File

@ -6,5 +6,9 @@
@stack('content_content_end')
<notifications></notifications>
<form id="form-dynamic-component" method="POST" action="#"></form>
<component v-bind:is="component"></component>
</div>
@stack('content_end')

View File

@ -31,6 +31,7 @@
<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>
@stack('js')

View File

@ -91,14 +91,16 @@
<li class="nav-item dropdown">
<a class="nav-link pr-0" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<div class="media align-items-center">
<img src="{{ asset('public/img/user.svg') }}" height="36" width="36" alt="User"/>
<div class="media-body ml-2">
<span class="mb-0 text-sm font-weight-bold">
@if (!empty($user->name))
{{ $user->name }}
@endif
</span>
</div>
@if (is_object($user->picture))
<img src="{{ Storage::url($user->picture->id) }}" class="rounded-circle image-style user-img" alt="{{ $user->name }}"/>
@else
<img src="{{ asset('public/img/user.svg') }}" class="user-img" alt="{{ $user->name }}"/>
@endif
@if (!empty($user->name))
<div class="media-body ml-2">
<span class="mb-0 text-sm font-weight-bold">{{ $user->name }}</span>
</div>
@endif
</div>
</a>
<div class="dropdown-menu dropdown-menu-right">

View File

@ -13,7 +13,7 @@
<div class="col-6">
<nav class="float-right">
{!! $items->withPath(request()->url())->appends(request()->except('page'))->links() !!}
{!! $items->withPath(request()->url())->withQueryString()->links() !!}
</nav>
</div>
@else

View File

@ -20,7 +20,6 @@
}
</style>
@stack('css')
@stack('stylesheet')

View File

@ -9,6 +9,12 @@
) }}
@elseif ($type == 'textareaGroup')
{{ Form::$type($field['name'], $field['title']) }}
@elseif ($type == 'dateGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
'model' => 'form.settings'.'.'.$field['name']
],
$field['attributes'])
) }}
@elseif ($type == 'selectGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $field['selected'], array_merge([
'data-field' => 'settings'
@ -16,13 +22,13 @@
$field['attributes'])
) }}
@elseif ($type == 'radioGroup')
{{ Form::$type($field['name'], $field['title'], 1, $field['enable'], $field['disable'], array_merge([
{{ Form::$type($field['name'], $field['title'], $field['selected'] ?? true, $field['enable'], $field['disable'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'checkboxGroup')
{{ Form::$type($field['name'], $field['title'], $field['items'], $field['value'], $field['id'], array_merge([
{{ Form::$type($field['name'], $field['title'], $field['items'], $field['value'], $field['id'], $field['selected'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])

View File

@ -1,12 +1,13 @@
@extends('layouts.print')
@section('content')
@section('title', $class->model->name)
@section('content')
<h2>{{ $class->model->name }}</h2>
{{ setting('company.name') }}
@if(!empty($class->model->settings->chart))
@if (!empty($class->model->settings->chart))
@include($class->views['chart'])
@endif

View File

@ -9,7 +9,7 @@
@else
<tr>
<td colspan="{{ count($class->dates) + 2 }}">
<h5 class="text-center pl-0">{{ trans('general.no_records') }}</h5>
<div class="text-muted pl-0">{{ trans('general.no_records') }}</div>
</td>
</tr>
@endif

View File

@ -1,9 +1,9 @@
@php $grand_total = array_sum($class->footer_totals[$table]); @endphp
<tfoot>
<tr class="row rp-border-top-1 font-size-unset px-3">
<th class="{{ $class->column_name_width }} text-uppercase">{{ trans_choice('general.totals', 1) }}</th>
@php $grand_total = 0; @endphp
<th class="{{ $class->column_name_width }} text-uppercase text-left">{{ trans_choice('general.totals', 1) }}</th>
@foreach($class->footer_totals[$table] as $total)
@php $grand_total += $total; @endphp
<th class="{{ $class->column_value_width }} text-right px-0">@money($total, setting('default.currency'), true)</th>
@endforeach
<th class="{{ $class->column_name_width }} text-right pl-0 pr-4">@money($grand_total, setting('default.currency'), true)</th>

View File

@ -1,9 +1,9 @@
@php $row_total = 0; @endphp
<tr class="row rp-border-top-1 font-size-unset">
<td class="{{ $class->column_name_width }} long-texts pr-0">{{ $class->row_names[$table][$id] }}</td>
@foreach($rows as $row)
@php $row_total += $row; @endphp
<td class="{{ $class->column_value_width }} text-right px-0">@money($row, setting('default.currency'), true)</td>
@endforeach
<td class="{{ $class->column_name_width }} text-right pl-0 pr-4">@money($row_total, setting('default.currency'), true)</td>
</tr>
@if ($row_total = array_sum($rows))
<tr class="row rp-border-top-1 font-size-unset">
<td class="{{ $class->column_name_width }} long-texts pr-0" title="{{ $class->row_names[$table][$id] }}">{{ $class->row_names[$table][$id] }}</td>
@foreach($rows as $row)
<td class="{{ $class->column_value_width }} text-right px-0">@money($row, setting('default.currency'), true)</td>
@endforeach
<td class="{{ $class->column_name_width }} text-right pl-0 pr-4">@money($row_total, setting('default.currency'), true)</td>
</tr>
@endif

View File

@ -31,6 +31,7 @@
<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>
@stack('js')

View File

@ -3,7 +3,7 @@
<div class="row align-items-center">
<div class="col-10 text-nowrap">
<h4 class="mb-0 long-texts">{{ $class->model->name }}</h4>
<h4 class="mb-0 long-texts" title="{{ $class->model->name }}">{{ $class->model->name }}</h4>
</div>
<div class="col-2 hidden-sm">

View File

@ -31,6 +31,7 @@
<script type="text/javascript"><!--
var url = '{{ url("/") }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>
@stack('js')

View File

@ -4,7 +4,7 @@
<small>{{ trans('pagination.showing', ['first' => $items->firstItem(), 'last' => $items->lastItem(), 'total' => $items->total(), 'type' => strtolower(trans_choice('general.' . $type, 2))]) }}</small>
</div>
<div class="pull-right">
{!! $items->withPath(request()->url())->appends(request()->except('page'))->links() !!}
{!! $items->withPath(request()->url())->withQueryString()->links() !!}
</div>
@else
<div class="pull-left">

View File

@ -222,7 +222,7 @@
<th>
@if ($invoice->notes)
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
<p class="text-muted long-texts">{{ $invoice->notes }}</p>
<p class="text-muted long-texts">{!! nl2br($invoice->notes) !!}</p>
@endif
</th>
</tr>
@ -238,27 +238,29 @@
<tbody>
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<tr>
<th class="text-success">
{{ trans('invoices.paid') }}:
</th>
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_tr_end')
@endif
@endforeach
</tbody>

View File

@ -171,7 +171,7 @@
<th>
@if ($invoice->notes)
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
<p class="text-muted long-texts">{{ $invoice->notes }}</p>
<p class="text-muted long-texts">{!! nl2br($invoice->notes) !!}</p>
@endif
</th>
</tr>
@ -186,21 +186,27 @@
<tbody>
@foreach($invoice->totals_sorted as $total)
@if($total->code != 'total')
@stack($total->code . '_total_tr_start')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<tr class="text-success">
<th>{{ trans('invoices.paid') }}:</th>
<td class="text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_tr_start')
<tr>
<th>{{ trans($total['name']) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_tr_end')
@endif
@endforeach
</tbody>

View File

@ -201,25 +201,27 @@
{{ setting('company.name') }}
</th>
</tr>
<tr>
<th>
{!! nl2br(setting('company.address')) !!}
</th>
</tr>
<tr>
<th>
@if (setting('company.tax_number'))
@if (setting('company.address'))
<tr>
<th>
{!! nl2br(setting('company.address')) !!}
</th>
</tr>
@endif
@if (setting('company.tax_number'))
<tr>
<th>
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
@endif
</th>
</tr>
<tr>
<th>
@if (setting('company.phone'))
</th>
</tr>
@endif
@if (setting('company.phone'))
<tr>
<th>
{{ setting('company.phone') }}
@endif
</th>
</tr>
</th>
</tr>
@endif
<tr>
<th>
{{ setting('company.email') }}
@ -246,38 +248,50 @@
@stack('name_input_end')
</th>
</tr>
<tr>
<th>
@stack('address_input_start')
{!! nl2br($bill->contact_address) !!}
@stack('address_input_end')
</th>
</tr>
<tr>
<th>
@stack('tax_number_input_start')
@if ($bill->contact_tax_number)
{{ trans('general.tax_number') }}: {{ $bill->contact_tax_number }}
@endif
@stack('tax_number_input_end')
</th>
</tr>
<tr>
<th>
@stack('phone_input_start')
@if ($bill->contact_phone)
{{ $bill->contact_phone }}
@endif
@stack('phone_input_end')
</th>
</tr>
<tr>
<th>
@stack('email_start')
{{ $bill->contact_email }}
@stack('email_input_end')
</th>
</tr>
@if ($bill->contact_address || $__env->hasStack('address_input_start', 'address_input_end'))
<tr>
<th>
@stack('address_input_start')
@if ($bill->contact_address)
{!! nl2br($bill->contact_address) !!}
@endif
@stack('address_input_end')
</th>
</tr>
@endif
@if ($bill->contact_tax_number || $__env->hasStack('tax_number_input_start', 'tax_number_input_end'))
<tr>
<th>
@stack('tax_number_input_start')
@if ($bill->contact_tax_number)
{{ trans('general.tax_number') }}: {{ $bill->contact_tax_number }}
@endif
@stack('tax_number_input_end')
</th>
</tr>
@endif
@if ($bill->contact_phone || $__env->hasStack('phone_input_start', 'phone_input_end'))
<tr>
<th>
@stack('phone_input_start')
@if ($bill->contact_phone)
{{ $bill->contact_phone }}
@endif
@stack('phone_input_end')
</th>
</tr>
@endif
@if ($bill->contact_email || $__env->hasStack('email_start', 'email_input_end'))
<tr>
<th>
@stack('email_start')
@if ($bill->contact_email)
{{ $bill->contact_email }}
@endif
@stack('email_input_end')
</th>
</tr>
@endif
</tbody>
</table>
</div>
@ -372,7 +386,7 @@
<tr>
<th>
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
<p class="text-muted long-texts">{{ $bill->notes }}</p>
<p class="text-muted long-texts">{!! nl2br($bill->notes) !!}</p>
</th>
</tr>
@endif
@ -387,27 +401,29 @@
<tbody>
@foreach ($bill->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
</tr>
@stack($total->code . '_total_tr_end')
@else
@if ($bill->paid)
@stack('paid_total_tr_start')
<tr>
<th class="text-success">
{{ trans('bills.paid') }}:
</th>
<td class="text-success text-right">- @money($bill->paid, $bill->currency_code, true)</td>
</tr>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td>
</tr>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td>
</tr>
@stack('grand_total_tr_end')
@endif
@endforeach
</tbody>
@ -430,70 +446,76 @@
<div class="col-xs-12 col-sm-8 text-right">
@stack('button_edit_start')
@if(!$bill->reconciled)
<a href="{{ route('bills.edit', $bill->id) }}" class="btn btn-info header-button-top">
{{ trans('general.edit') }}
</a>
@endif
@if(!$bill->reconciled)
<a href="{{ route('bills.edit', $bill->id) }}" class="btn btn-info header-button-top">
{{ trans('general.edit') }}
</a>
@endif
@stack('button_edit_end')
@stack('button_print_start')
<a href="{{ route('bills.print', $bill->id) }}" target="_blank" class="btn btn-success header-button-top">
{{ trans('general.print') }}
</a>
<a href="{{ route('bills.print', $bill->id) }}" target="_blank" class="btn btn-success header-button-top">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@stack('button_group_start')
<div class="dropup header-drop-top">
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i>&nbsp; {{ trans('general.more_actions') }}</button>
<div class="dropup header-drop-top">
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i>&nbsp; {{ trans('general.more_actions') }}</button>
<div class="dropdown-menu" role="menu">
@if ($bill->status != 'cancelled')
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@if ($bill->status != 'cancelled')
@if ($bill->status != 'paid')
@stack('button_pay_start')
@if($bill->status != 'paid')
@permission('update-purchases-bills')
<a class="dropdown-item" href="{{ route('bills.paid', $bill->id) }}">{{ trans('bills.mark_paid') }}</a>
@endpermission
@permission('update-purchases-bills')
<a class="dropdown-item" href="{{ route('bills.paid', $bill->id) }}">{{ trans('bills.mark_paid') }}</a>
@endpermission
@if(empty($bill->paid) || ($bill->paid != $bill->amount))
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('bills.add_payment') }}</button>
@endif
<div class="dropdown-divider"></div>
@endif
@if (empty($bill->paid) || ($bill->paid != $bill->amount))
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('bills.add_payment') }}</button>
@endif
@stack('button_pay_end')
@stack('button_received_start')
@permission('update-purchases-bills')
@if($bill->status == 'draft')
<a class="dropdown-item" href="{{ route('bills.received', $bill->id) }}">{{ trans('bills.mark_received') }}</a></a>
@else
<button type="button" class="dropdown-item" disabled="disabled">{{ trans('bills.mark_received') }}</button>
@endif
@endpermission
@stack('button_received_end')
<div class="dropdown-divider"></div>
@endif
@stack('button_pdf_start')
<a class="dropdown-item" href="{{ route('bills.pdf', $bill->id) }}">{{ trans('bills.download_pdf') }}</a>
@stack('button_pdf_end')
@stack('button_dropdown_divider_1')
@permission('update-purchases-bills')
@if ($bill->status != 'cancelled')
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route('bills.cancelled', $bill->id) }}">{{ trans('general.cancel') }}</a>
@stack('button_cancelled_end')
@stack('button_received_start')
@if ($bill->status == 'draft')
<a class="dropdown-item" href="{{ route('bills.received', $bill->id) }}">{{ trans('bills.mark_received') }}</a></a>
@else
<button type="button" class="dropdown-item" disabled="disabled">{{ trans('bills.mark_received') }}</button>
@endif
@stack('button_received_end')
@endpermission
@endif
@permission('delete-purchases-bills')
@if (!$bill->reconciled)
@stack('button_delete_start')
{!! Form::deleteLink($bill, 'purchases/bills') !!}
@stack('button_delete_end')
@endif
@endpermission
</div>
@stack('button_pdf_start')
<a class="dropdown-item" href="{{ route('bills.pdf', $bill->id) }}">{{ trans('bills.download_pdf') }}</a>
@stack('button_pdf_end')
@permission('update-purchases-bills')
@if ($bill->status != 'cancelled')
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route('bills.cancelled', $bill->id) }}">{{ trans('general.cancel') }}</a>
@stack('button_cancelled_end')
@endif
@endpermission
@stack('button_dropdown_divider_2')
@permission('delete-purchases-bills')
@if (!$bill->reconciled)
@stack('button_delete_start')
{!! Form::deleteLink($bill, 'purchases/bills') !!}
@stack('button_delete_end')
@endif
@endpermission
@stack('button_dropdown_end')
</div>
</div>
@stack('button_group_end')
</div>
</div>
@ -504,7 +526,7 @@
@stack('row_footer_start')
<div class="row">
@stack('row_footer_history_start')
@stack('row_footer_histories_start')
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
<div class="accordion">
<div class="card">
@ -515,20 +537,28 @@
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_histories_head_tr_start')
<tr class="row table-head-line">
<th class="col-xs-4 col-sm-2">{{ trans('general.date') }}</th>
@stack('row_footer_histories_head_td_start')
<th class="col-xs-4 col-sm-3">{{ trans('general.date') }}</th>
<th class="col-xs-4 col-sm-3 text-left">{{ trans_choice('general.statuses', 1) }}</th>
<th class="col-xs-4 col-sm-7 text-left long-texts">{{ trans('general.description') }}</th>
<th class="col-xs-4 col-sm-6 text-left long-texts">{{ trans('general.description') }}</th>
@stack('row_footer_histories_head_td_end')
</tr>
@stack('row_footer_histories_head_tr_end')
</thead>
<tbody>
@stack('row_footer_histories_body_tr_start')
@foreach($bill->histories as $history)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-4 col-sm-2">@date($history->created_at)</td>
@stack('row_footer_histories_body_td_start')
<td class="col-xs-4 col-sm-3">@date($history->created_at)</td>
<td class="col-xs-4 col-sm-3 text-left">{{ trans('bills.statuses.' . $history->status) }}</td>
<td class="col-xs-4 col-sm-7 text-left long-texts">{{ $history->description }}</td>
<td class="col-xs-4 col-sm-6 text-left long-texts">{{ $history->description }}</td>
@stack('row_footer_histories_body_td_end')
</tr>
@endforeach
@stack('row_footer_histories_body_tr_end')
</tbody>
</table>
</div>
@ -536,9 +566,9 @@
</div>
</div>
</div>
@stack('row_footer_history_end')
@stack('row_footer_histories_end')
@stack('row_footer_transaction_start')
@stack('row_footer_transactions_start')
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
<div class="accordion">
<div class="card">
@ -549,17 +579,23 @@
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_transactions_head_tr_start')
<tr class="row table-head-line">
@stack('row_footer_transactions_head_td_start')
<th class="col-xs-4 col-sm-3">{{ trans('general.date') }}</th>
<th class="col-xs-4 col-sm-3">{{ trans('general.amount') }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
<th class="col-xs-4 col-sm-3">{{ trans('general.actions') }}</th>
@stack('row_footer_transactions_head_td_end')
</tr>
@stack('row_footer_transactions_head_tr_end')
</thead>
<tbody>
@stack('row_footer_transactions_body_tr_start')
@if ($bill->transactions->count())
@foreach($bill->transactions as $transaction)
<tr class="row align-items-center border-top-1 tr-py">
@stack('row_footer_transactions_body_td_start')
<td class="col-xs-4 col-sm-3">@date($transaction->paid_at)</td>
<td class="col-xs-4 col-sm-3">@money($transaction->amount, $transaction->currency_code, true)</td>
<td class="col-sm-3 d-none d-sm-block">{{ $transaction->account->name }}</td>
@ -583,6 +619,7 @@
)) !!}
@endif
</td>
@stack('row_footer_transactions_body_td_end')
</tr>
@endforeach
@else
@ -594,6 +631,7 @@
</td>
</tr>
@endif
@stack('row_footer_transactions_body_tr_end')
</tbody>
</table>
</div>
@ -601,39 +639,13 @@
</div>
</div>
</div>
@stack('row_footer_transaction_end')
@stack('row_footer_transactions_end')
</div>
@stack('row_footer_end')
{{ Form::hidden('bill_id', $bill->id, ['id' => 'bill_id']) }}
@endsection
@push('content_content_end')
<akaunting-modal
class="modal-payment"
:show="payment.modal"
@cancel="payment.modal = false"
:title="'{{ trans('general.title.new', ['type' => trans_choice('general.payments', 1)]) }}'"
:message="payment.html"
:button_cancel="'{{ trans('general.button.save') }}'"
:button_delete="'{{ trans('general.button.cancel') }}'">
<template #modal-body>
@include('modals.bills.payment')
</template>
<template #card-footer>
<div class="float-right">
<button type="button" class="btn btn-outline-secondary" @click="closePayment">
{{ trans('general.cancel') }}
</button>
<button :disabled="form.loading" type="button" class="btn btn-success button-submit" @click="addPayment">
<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
@push('scripts_start')
<script src="{{ asset('public/js/purchases/bills.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -22,7 +22,7 @@
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', '1', ['id' => 'currency_rate']) !!}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency], 0.00) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00) }}
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}

View File

@ -41,7 +41,7 @@
{!! Form::hidden('currency_code', $payment->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', null, ['id' => 'currency_rate']) !!}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency], $payment->amount) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], $payment->amount) }}
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $payment->account_id, ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}

View File

@ -92,15 +92,17 @@
<a class="dropdown-item" href="{{ route('payments.edit', $item->id) }}">{{ trans('general.edit') }}</a>
<div class="dropdown-divider"></div>
@endif
@if (empty($item->document_id))
@permission('create-purchases-payments')
<a class="dropdown-item" href="{{ route('payments.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
<div class="dropdown-divider"></div>
@endpermission
@endif
@if (!$item->reconciled)
@permission('delete-purchases-payments')
@if (!$item->reconciled)
<div class="dropdown-divider"></div>
{!! Form::deleteLink($item, 'payments.destroy') !!}
@endif
{!! Form::deleteLink($item, 'payments.destroy') !!}
@endpermission
@endif
</div>
</div>
</td>

View File

@ -5,53 +5,76 @@
@section('content')
<div class="row">
<div class="col-xl-3">
<div class="card">
<div class="card-header border-bottom-0 show-transaction-card-header">
<a class="text-sm">{{ trans_choice('general.bills', 2) }}</a> <a class="float-right text-xs">{{ $counts['bills'] }}</a>
</div>
<ul class="list-group mb-4">
@stack('vendor_bills_count_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0">
{{ trans_choice('general.bills', 2) }}
<span class="badge badge-primary badge-pill">{{ $counts['bills'] }}</span>
</li>
@stack('vendor_bills_count_end')
<div class="card-footer show-transaction-card-footer">
<a class="text-sm">{{ trans_choice('general.transactions', 2) }}</a> <a class="float-right text-xs">{{ $counts['transactions'] }}</a>
</div>
</div>
@stack('vendor_transactions_count_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0 border-top-1">
{{ trans_choice('general.transactions', 2) }}
<span class="badge badge-primary badge-pill">{{ $counts['transactions'] }}</span>
</li>
@stack('vendor_transactions_count_end')
</ul>
<div class="card">
<div class="card-header">
<h4 class="mb-0">{{ trans('auth.profile') }}</h4>
</div>
<ul class="list-group mb-4">
@stack('vendor_email_start')
<li class="list-group-item border-0">
<div class="font-weight-600">{{ trans('general.email') }}</div>
<div><small class="long-texts" title="{{ $vendor->email }}">{{ $vendor->email }}</small></div>
</li>
@stack('vendor_email_end')
<div class="card-body d-grid">
<a class="text-sm font-weight-600">{{ trans('general.email') }}</a> <a class="text-xs long-texts">{{ $vendor->email }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.phone') }}</a> <a class="text-xs long-texts">{{ $vendor->phone }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.website') }}</a> <a class="text-xs long-texts">{{ $vendor->website }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.tax_number') }}</a> <a class="text-xs long-texts">{{ $vendor->tax_number }}</a>
@if ($vendor->reference)
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.reference') }}</a> <a class="text-xs long-texts">{{ $vendor->reference }}</a>
@endif
</div>
</div>
@stack('vendor_phone_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.phone') }}</div>
<div><small class="long-texts" title="{{ $vendor->phone }}">{{ $vendor->phone }}</small></div>
</li>
@stack('vendor_phone_end')
<div class="card">
<div class="card-header">
<h4 class="mb-0">{{ trans('general.address') }}</h4>
</div>
@stack('vendor_website_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.website') }}</div>
<div><small class="long-texts" title="{{ $vendor->website }}">{{ $vendor->website }}</small></div>
</li>
@stack('vendor_website_end')
<div class="card-body">
<a class="text-xs m-0">
{{ $vendor->address }}
</p>
</div>
</div>
@stack('vendor_tax_number_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.tax_number') }}</div>
<div><small class="long-texts" title="{{ $vendor->tax_number }}">{{ $vendor->tax_number }}</small></div>
</li>
@stack('vendor_tax_number_end')
<a href="{{ route('vendors.edit', $vendor->id) }}" class="btn btn-info btn-block edit-sv"><b>{{ trans('general.edit') }}</b></a>
@stack('vendor_address_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.address') }}</div>
<div><small>{{ $vendor->address }}</small></div>
</li>
@stack('vendor_address_end')
@if ($vendor->reference)
@stack('vendor_reference_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.reference') }}</div>
<div><small class="long-texts" title="{{ $vendor->reference }}">{{ $vendor->reference }}</small></div>
</li>
@stack('vendor_reference_end')
@endif
</ul>
@stack('vendor_edit_button_start')
<a href="{{ route('vendors.edit', $vendor->id) }}" class="btn btn-info btn-block"><b>{{ trans('general.edit') }}</b></a>
@stack('vendor_edit_button_end')
</div>
<div class="col-xl-9">
<div class="row mb--3">
@stack('vendor_paid_card_start')
<div class="col-md-4">
<div class="card bg-gradient-success border-0">
<div class="card-body">
@ -65,7 +88,9 @@
</div>
</div>
</div>
@stack('vendor_paid_card_end')
@stack('vendor_open_card_start')
<div class="col-md-4">
<div class="card bg-gradient-warning border-0">
<div class="card-body">
@ -79,7 +104,9 @@
</div>
</div>
</div>
@stack('vendor_open_card_end')
@stack('vendor_overdue_card_start')
<div class="col-md-4">
<div class="card bg-gradient-danger border-0">
<div class="card-body">
@ -93,57 +120,64 @@
</div>
</div>
</div>
@stack('vendor_overdue_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('vendor_transactions_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0 active" id="tabs-header-transactions" data-toggle="tab" href="#tabs-content-transactions" role="tab" aria-controls="tabs-content-transactions" aria-selected="true">{{ trans_choice('general.transactions', 2) }}</a>
<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('vendor_transactions_tab_end')
@stack('vendor_bills_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0" id="tabs-header-invoices" data-toggle="tab" href="#tabs-content-invoices" role="tab" aria-controls="tabs-content-invoices" aria-selected="false">{{ trans_choice('general.bills', 2) }}</a>
<a class="nav-link mb-sm-3 mb-md-0" id="bills-tab" data-toggle="tab" href="#bills-content" role="tab" aria-controls="bills-content" aria-selected="false">{{ trans_choice('general.bills', 2) }}</a>
</li>
@stack('vendor_bills_tab_end')
</ul>
</div>
<div class="card shadow">
<div class="card">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="tabs-content-transactions" role="tabpanel" aria-labelledby="tabs-header-transactions">
@stack('vendor_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" id="tbl-transactions">
<table class="table table-flush table-hover" id="tbl-transactions">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-6 col-sm-3">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-3 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
<th class="col-xs-6 col-sm-2">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-2 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
</tr>
</thead>
<tbody>
@foreach($transactions as $item)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-6 col-sm-3">@date($item->paid_at)</td>
<td class="col-xs-6 col-sm-3 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-3 d-none d-sm-block">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="col-sm-3 d-none d-sm-block">{{ $item->account->name }}</td>
<td class="col-xs-6 col-sm-2">@date($item->paid_at)</td>
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $transactions, 'type' => 'transactions'])
</div>
</div>
</div>
@stack('vendor_transactions_content_end')
<div class="tab-pane fade" id="tabs-content-invoices" role="tabpanel" aria-labelledby="tabs-header-invoices">
@stack('vendor_bills_content_start')
<div class="tab-pane fade" id="bills-content" role="tabpanel" aria-labelledby="bills-tab">
<div class="table-responsive">
<table class="table table-flush" id="tbl-bills">
<table class="table table-flush table-hover" id="tbl-bills">
<thead class="thead-light">
<tr class="row table-head-line">
<th class="col-xs-4 col-sm-1">{{ trans_choice('general.numbers', 1) }}</th>
@ -166,13 +200,13 @@
</tbody>
</table>
</div>
<div class="card-footer py-4 table-action">
<div class="row">
@include('partials.admin.pagination', ['items' => $bills, 'type' => 'bills'])
</div>
</div>
</div>
@stack('vendor_bills_content_end')
</div>
</div>
</div>

View File

@ -1,8 +1,20 @@
@php
foreach ($class->footer_totals as $table => $dates) {
foreach ($dates as $date => $total) {
if (!isset($class->net_profit[$date])) {
$class->net_profit[$date] = 0;
}
$class->net_profit[$date] += $total;
}
}
@endphp
<div class="table-responsive my-2">
<table class="table table-hover align-items-center rp-border-collapse">
<tfoot class="border-top-style">
<tr class="row rp-border-top-1 font-size-unset px-3">
<th class="{{ $class->column_name_width }} text-uppercase text-nowrap border-top-0">{{ trans('reports.net_profit') }}</th>
<th class="{{ $class->column_name_width }} text-uppercase text-left border-top-0">{{ trans('reports.net_profit') }}</th>
@foreach($class->net_profit as $profit)
<th class="{{ $class->column_value_width }} text-right px-0 border-top-0">@money($profit, setting('default.currency'), true)</th>
@endforeach

View File

@ -1,9 +1,9 @@
@php $grand_total = array_sum($class->footer_totals[$table]); @endphp
<tfoot>
<tr class="row rp-border-top-1 font-size-unset px-3 mb-3">
<th class="{{ $class->column_name_width }} text-uppercase">{{ trans_choice('general.totals', 1) }}</th>
@php $grand_total = 0; @endphp
@foreach($class->footer_totals[$table] as $date => $total)
@php $grand_total += $total; @endphp
<th class="{{ $class->column_name_width }} text-uppercase text-left">{{ trans_choice('general.totals', 1) }}</th>
@foreach($class->footer_totals[$table] as $total)
<th class="{{ $class->column_value_width }} text-right px-0">@money($total, setting('default.currency'), true)</th>
@endforeach
<th class="{{ $class->column_name_width }} text-right pl-0 pr-4">@money($grand_total, setting('default.currency'), true)</th>

View File

@ -1,10 +1,10 @@
<div class="table-responsive">
<div class="table-responsive mt-4">
<table class="table table-hover align-items-center rp-border-collapse">
<thead class="border-top-style">
<tr class="row rp-border-bottom-1 font-size-unset px-3">
<th class="{{ $class->column_name_width }} text-right border-top-0 rp-border-bottom-1"></th>
<th class="{{ $class->column_name_width }} text-right px-0 border-top-0"></th>
@foreach($class->dates as $date)
<th class="{{ $class->column_value_width }} text-right px-0 border-top-0 rp-border-bottom-1">{{ $date }}</th>
<th class="{{ $class->column_value_width }} text-right px-0 border-top-0">{{ $date }}</th>
@endforeach
<th class="{{ $class->column_name_width }} text-right pl-0 pr-4 border-top-0 rp-border-bottom-1">{{ trans_choice('general.totals', 1) }}</th>
</tr>

View File

@ -1,9 +1,9 @@
@php $grand_total = array_sum($class->footer_totals[$table]); @endphp
<tfoot>
<tr class="row rp-border-bottom-1 font-size-unset px-3">
<th class="{{ $class->column_name_width }} text-left">{{ trans('reports.net') }}</th>
@php $grand_total = 0; @endphp
<tr class="row rp-border-top-1 font-size-unset px-3 mb-3">
<th class="{{ $class->column_name_width }} text-uppercase text-left">{{ trans('reports.net') }}</th>
@foreach($class->footer_totals[$table] as $total)
@php $grand_total += $total; @endphp
<th class="{{ $class->column_value_width }} text-right px-0">@money($total, setting('default.currency'), true)</th>
@endforeach
<th class="{{ $class->column_name_width }} text-right pl-0 pr-4">@money($grand_total, setting('default.currency'), true)</th>

View File

@ -1,4 +1,4 @@
<thead class="border-top-style mt-4">
<thead class="border-top-style">
<tr>
<th class="rp-float-left" colspan="{{ count($class->dates) + 2 }}">
<h4>{{ $table }}</h4>

View File

@ -5,50 +5,76 @@
@section('content')
<div class="row">
<div class="col-xl-3">
<div class="card">
<div class="card-header border-bottom-0 show-transaction-card-header">
<a class="text-sm font-weight-600">{{ trans_choice('general.invoices', 2) }}</a> <a class="float-right text-xs">{{ $counts['invoices'] }}</a>
</div>
<div class="card-footer show-transaction-card-footer">
<a class="text-sm font-weight-600">{{ trans_choice('general.transactions', 2) }}</a> <a class="float-right text-xs">{{ $counts['transactions'] }}</a>
</div>
</div>
<ul class="list-group mb-4">
@stack('customer_invoices_count_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0">
{{ trans_choice('general.invoices', 2) }}
<span class="badge badge-primary badge-pill">{{ $counts['invoices'] }}</span>
</li>
@stack('customer_invoices_count_end')
<div class="card">
<div class="card-header">
<h4 class="mb-0">{{ trans('auth.profile') }}</h4>
</div>
<div class="card-body d-grid">
<a class="text-sm font-weight-600">{{ trans('general.email') }}</a> <a class="text-xs long-texts">{{ $customer->email }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.phone') }}</a> <a class="text-xs long-texts">{{ $customer->phone }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.website') }}</a> <a class="text-xs long-texts">{{ $customer->website }}</a>
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.tax_number') }}</a> <a class="text-xs long-texts">{{ $customer->tax_number }}</a>
@if ($customer->reference)
<div class="dropdown-divider"></div>
<a class="text-sm font-weight-600">{{ trans('general.reference') }}</a> <a class="text-xs long-texts">{{ $customer->reference }}</a>
@endif
</div>
</div>
@stack('customer_transactions_count_start')
<li class="list-group-item d-flex justify-content-between align-items-center border-0 border-top-1">
{{ trans_choice('general.transactions', 2) }}
<span class="badge badge-primary badge-pill">{{ $counts['transactions'] }}</span>
</li>
@stack('customer_transactions_count_end')
</ul>
<div class="card">
<div class="card-header">
<h4 class="mb-0">{{ trans('general.address') }}</h4>
</div>
<div class="card-body">
<a class="text-xs m-0">
{{ $customer->address }}
</a>
</div>
</div>
<ul class="list-group mb-4">
@stack('customer_email_start')
<li class="list-group-item border-0">
<div class="font-weight-600">{{ trans('general.email') }}</div>
<div><small class="long-texts" title="{{ $customer->email }}">{{ $customer->email }}</small></div>
</li>
@stack('customer_email_end')
@stack('customer_phone_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.phone') }}</div>
<div><small class="long-texts" title="{{ $customer->phone }}">{{ $customer->phone }}</small></div>
</li>
@stack('customer_phone_end')
@stack('customer_website_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.website') }}</div>
<div><small class="long-texts" title="{{ $customer->website }}">{{ $customer->website }}</small></div>
</li>
@stack('customer_website_end')
@stack('customer_tax_number_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.tax_number') }}</div>
<div><small class="long-texts" title="{{ $customer->tax_number }}">{{ $customer->tax_number }}</small></div>
</li>
@stack('customer_tax_number_end')
@stack('customer_address_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.address') }}</div>
<div><small>{{ $customer->address }}</small></div>
</li>
@stack('customer_address_end')
@if ($customer->reference)
@stack('customer_reference_start')
<li class="list-group-item border-0 border-top-1">
<div class="font-weight-600">{{ trans('general.reference') }}</div>
<div><small class="long-texts" title="{{ $customer->reference }}">{{ $customer->reference }}</small></div>
</li>
@stack('customer_reference_end')
@endif
</ul>
@stack('customer_edit_button_start')
<a href="{{ route('customers.edit', $customer->id) }}" class="btn btn-info btn-block edit-sv"><b>{{ trans('general.edit') }}</b></a>
@stack('customer_edit_button_end')
</div>
<div class="col-xl-9">
<div class="row mb--3">
@stack('customer_paid_card_start')
<div class="col-md-4">
<div class="card bg-gradient-success border-0">
<div class="card-body">
@ -62,7 +88,9 @@
</div>
</div>
</div>
@stack('customer_paid_card_end')
@stack('customer_open_card_start')
<div class="col-md-4">
<div class="card bg-gradient-warning border-0">
<div class="card-body">
@ -76,7 +104,9 @@
</div>
</div>
</div>
@stack('customer_open_card_end')
@stack('customer_overdue_card_start')
<div class="col-md-4">
<div class="card bg-gradient-danger border-0">
<div class="card-body">
@ -90,40 +120,47 @@
</div>
</div>
</div>
@stack('customer_overdue_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('customer_transactions_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0 active" id="tabs-header-transactions" data-toggle="tab" href="#tabs-content-transactions" role="tab" aria-controls="tabs-content-transactions" aria-selected="true">{{ trans_choice('general.transactions', 2) }}</a>
<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('customer_transactions_tab_end')
@stack('customer_invoices_tab_start')
<li class="nav-item">
<a class="nav-link mb-sm-3 mb-md-0" id="tabs-invoices" data-toggle="tab" href="#tabs-content-invoices" role="tab" aria-controls="tabs-content-invoices" aria-selected="false">{{ trans_choice('general.invoices', 2) }}</a>
<a class="nav-link mb-sm-3 mb-md-0" id="invoices-tab" data-toggle="tab" href="#invoices-content" role="tab" aria-controls="invoices-content" aria-selected="false">{{ trans_choice('general.invoices', 2) }}</a>
</li>
@stack('customer_invoices_tab_end')
</ul>
</div>
<div class="card">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="tabs-content-transactions" role="tabpanel" aria-labelledby="tabs-header-transactions">
@stack('customer_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-xs-6 col-sm-3">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-3 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
<th class="col-xs-6 col-sm-2">{{ trans('general.date') }}</th>
<th class="col-xs-6 col-sm-2 text-right">{{ trans('general.amount') }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
</tr>
</thead>
<tbody>
@foreach($transactions as $item)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-6 col-sm-3">@date($item->paid_at)</td>
<td class="col-xs-6 col-sm-3 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-3 d-none d-sm-block">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
<td class="col-sm-3 d-none d-sm-block">{{ $item->account->name }}</td>
<td class="col-xs-6 col-sm-2">@date($item->paid_at)</td>
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
</tr>
@endforeach
</tbody>
@ -135,8 +172,10 @@
</div>
</div>
</div>
@stack('customer_transactions_content_end')
<div class="tab-pane fade" id="tabs-content-invoices" role="tabpanel" aria-labelledby="tabs-header-invoices">
@stack('customer_invoices_content_start')
<div class="tab-pane fade" id="invoices-content" role="tabpanel" aria-labelledby="invoices-tab">
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-invoices">
<thead class="thead-light">
@ -167,6 +206,7 @@
</div>
</div>
</div>
@stack('customer_invoices_content_end')
</div>
</div>
</div>

View File

@ -160,7 +160,7 @@
@stack('notes_input_start')
@if ($invoice->notes)
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
{{ $invoice->notes }}
{!! nl2br($invoice->notes) !!}
@endif
@stack('notes_input_end')
</div>
@ -170,25 +170,27 @@
<div class="text company pr-2">
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span>
</div>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<div class="border-top-dashed py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>
@ -199,7 +201,7 @@
<div class="row mt-1">
<div class="col-100">
<div class="text company">
<strong>{!! $invoice->footer !!}</strong>
<strong>{!! nl2br($invoice->footer) !!}</strong>
</div>
</div>
</div>

View File

@ -148,7 +148,7 @@
@if ($invoice->notes)
<br>
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
{{ $invoice->notes }}
{!! nl2br($invoice->notes) !!}
@endif
@stack('notes_input_end')
</div>
@ -158,25 +158,27 @@
<div class="text company">
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br>
</div>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br>
</div>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($invoice->paid, $invoice->currency_code, true)</span><br>
</div>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<div class="border-top-1 py-2">
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
</div>
@stack('grand_total_tr_end')
@endif
@endforeach
</div>
@ -187,7 +189,7 @@
<div class="row mt-4">
<div class="col-100 text-left">
<div class="text company">
<strong>{!! $invoice->footer !!}<strong>
<strong>{!! nl2br($invoice->footer) !!}<strong>
</div>
</div>
</div>

View File

@ -129,7 +129,7 @@
@stack('notes_input_start')
@if ($invoice->notes)
<strong>{{ trans_choice('general.notes', 2) }}</strong><br><br>
{{ $invoice->notes }}
{!! nl2br($invoice->notes) !!}
@endif
@stack('notes_input_end')
</div>
@ -139,19 +139,21 @@
<div class="text company pr-2">
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br><br>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<strong class="float-left">{{ trans($total->title) }}:</strong>
<span>@money($total->amount, $invoice->currency_code, true)</span><br><br>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<strong class="float-left">{{ trans('invoices.paid') }}:</strong>
<span>- @money($invoice->paid, $invoice->currency_code, true)</span><br><br>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
@stack('grand_total_tr_start')
<strong class="float-left">{{ trans($total->name) }}:</strong>
<span>@money($total->amount - $invoice->paid, $invoice->currency_code, true)</span>
@stack('grand_total_td_end')
@stack('grandtotal_tr_end')
@endif
@endforeach
</div>
@ -162,7 +164,7 @@
<div class="row mt-7">
<div class="col-100 py-2" style="background-color:{{ setting('invoice.color') }} !important; -webkit-print-color-adjust: exact;">
<div class="text pl-2">
<strong class="text-white">{!! $invoice->footer !!}</strong>
<strong class="text-white">{!! nl2br($invoice->footer) !!}</strong>
</div>
</div>
</div>

View File

@ -216,25 +216,27 @@
{{ setting('company.name') }}
</th>
</tr>
<tr>
<th>
{!! nl2br(setting('company.address')) !!}
</th>
</tr>
<tr>
<th>
@if (setting('company.tax_number'))
@if (setting('company.address'))
<tr>
<th>
{!! nl2br(setting('company.address')) !!}
</th>
</tr>
@endif
@if (setting('company.tax_number'))
<tr>
<th>
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
@endif
</th>
</tr>
<tr>
<th>
@if (setting('company.phone'))
</th>
</tr>
@endif
@if (setting('company.phone'))
<tr>
<th>
{{ setting('company.phone') }}
@endif
</th>
</tr>
</th>
</tr>
@endif
<tr>
<th>
{{ setting('company.email') }}
@ -261,38 +263,50 @@
@stack('name_input_end')
</th>
</tr>
<tr>
<th>
@stack('address_input_start')
{!! nl2br($invoice->contact_address) !!}
@stack('address_input_end')
</th>
</tr>
<tr>
<th>
@stack('tax_number_input_start')
@if ($invoice->contact_tax_number)
{{ trans('general.tax_number') }}: {{ $invoice->contact_tax_number }}
@endif
@stack('tax_number_input_end')
</th>
</tr>
<tr>
<th>
@stack('phone_input_start')
@if ($invoice->contact_phone)
{{ $invoice->contact_phone }}
@endif
@stack('phone_input_end')
</th>
</tr>
<tr>
<th>
@stack('email_start')
{{ $invoice->contact_email }}
@stack('email_input_end')
</th>
</tr>
@if ($invoice->contact_address || $__env->hasStack('address_input_start', 'address_input_end'))
<tr>
<th>
@stack('address_input_start')
@if ($invoice->contact_address)
{!! nl2br($invoice->contact_address) !!}
@endif
@stack('address_input_end')
</th>
</tr>
@endif
@if ($invoice->contact_tax_number || $__env->hasStack('tax_number_input_start', 'tax_number_input_end'))
<tr>
<th>
@stack('tax_number_input_start')
@if ($invoice->contact_tax_number)
{{ trans('general.tax_number') }}: {{ $invoice->contact_tax_number }}
@endif
@stack('tax_number_input_end')
</th>
</tr>
@endif
@if ($invoice->contact_phone || $__env->hasStack('phone_input_start', 'phone_input_end'))
<tr>
<th>
@stack('phone_input_start')
@if ($invoice->contact_phone)
{{ $invoice->contact_phone }}
@endif
@stack('phone_input_end')
</th>
</tr>
@endif
@if ($invoice->contact_email || $__env->hasStack('email_start', 'email_input_end'))
<tr>
<th>
@stack('email_start')
@if ($invoice->contact_email)
{{ $invoice->contact_email }}
@endif
@stack('email_input_end')
</th>
</tr>
@endif
</tbody>
</table>
</div>
@ -387,7 +401,7 @@
<tr>
<th>
<p class="form-control-label">{{ trans_choice('general.notes', 2) }}</p>
<p class="text-muted long-texts">{{ $invoice->notes }}</p>
<p class="text-muted long-texts">{!! nl2br($invoice->notes) !!}</p>
</th>
</tr>
@endif
@ -402,27 +416,29 @@
<tbody>
@foreach ($invoice->totals_sorted as $total)
@if ($total->code != 'total')
@stack($total->code . '_td_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_td_end')
@stack($total->code . '_total_tr_start')
<tr>
<th>{{ trans($total->title) }}:</th>
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
</tr>
@stack($total->code . '_total_tr_end')
@else
@if ($invoice->paid)
@stack('paid_total_tr_start')
<tr>
<th class="text-success">
{{ trans('invoices.paid') }}:
</th>
<td class="text-success text-right">- @money($invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('paid_total_tr_end')
@endif
@stack('grand_total_td_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_td_end')
@stack('grand_total_tr_start')
<tr>
<th>{{ trans($total->name) }}:</th>
<td class="text-right">@money($total->amount - $invoice->paid, $invoice->currency_code, true)</td>
</tr>
@stack('grand_total_tr_end')
@endif
@endforeach
</tbody>
@ -445,87 +461,93 @@
<div class="col-xs-12 col-sm-8 text-right">
@stack('button_edit_start')
@if(!$invoice->reconciled)
<a href="{{ route('invoices.edit', $invoice->id) }}" class="btn btn-info header-button-top">
{{ trans('general.edit') }}
</a>
@endif
@if(!$invoice->reconciled)
<a href="{{ route('invoices.edit', $invoice->id) }}" class="btn btn-info header-button-top">
{{ trans('general.edit') }}
</a>
@endif
@stack('button_edit_end')
@stack('button_print_start')
<a href="{{ route('invoices.print', $invoice->id) }}" target="_blank" class="btn btn-success header-button-top">
{{ trans('general.print') }}
</a>
<a href="{{ route('invoices.print', $invoice->id) }}" target="_blank" class="btn btn-success header-button-top">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@if ($invoice->status != 'cancelled')
@stack('button_share_start')
<a href="{{ $signed_url }}" target="_blank" class="btn btn-white header-button-top">
{{ trans('general.share') }}
</a>
@stack('button_share_end')
@stack('button_share_start')
<a href="{{ $signed_url }}" target="_blank" class="btn btn-white header-button-top">
{{ trans('general.share') }}
</a>
@stack('button_share_end')
@endif
@stack('button_group_start')
<div class="dropup header-drop-top">
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i>&nbsp; {{ trans('general.more_actions') }}</button>
<div class="dropdown-menu" role="menu">
@if ($invoice->status != 'cancelled')
<div class="dropup header-drop-top">
<button type="button" class="btn btn-primary header-button-top" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-chevron-up"></i>&nbsp; {{ trans('general.more_actions') }}</button>
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@if ($invoice->status != 'cancelled')
@if ($invoice->status != 'paid')
@stack('button_pay_start')
@if ($invoice->status != 'paid')
@permission('update-sales-invoices')
<a class="dropdown-item" href="{{ route('invoices.paid', $invoice->id) }}">{{ trans('invoices.mark_paid') }}</a>
@endpermission
@permission('update-sales-invoices')
<a class="dropdown-item" href="{{ route('invoices.paid', $invoice->id) }}">{{ trans('invoices.mark_paid') }}</a>
@endpermission
@if(empty($invoice->paid) || ($invoice->paid != $invoice->amount))
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('invoices.add_payment') }}</button>
@endif
<div class="dropdown-divider"></div>
@endif
@if (empty($invoice->paid) || ($invoice->paid != $invoice->amount))
<button class="dropdown-item" id="button-payment" @click="onPayment">{{ trans('invoices.add_payment') }}</button>
@endif
@stack('button_pay_end')
@stack('button_sent_start')
@permission('update-sales-invoices')
@if ($invoice->status == 'draft')
<a class="dropdown-item" href="{{ route('invoices.sent', $invoice->id) }}">{{ trans('invoices.mark_sent') }}</a>
@else
<button type="button" class="dropdown-item" disabled="disabled"><span class="text-disabled">{{ trans('invoices.mark_sent') }}</span></button>
@endif
@endpermission
@stack('button_sent_end')
@stack('button_email_start')
@if ($invoice->contact_email)
<a class="dropdown-item" href="{{ route('invoices.email', $invoice->id) }}">{{ trans('invoices.send_mail') }}</a>
@else
<button type="button" class="dropdown-item" disabled="disabled" data-toggle="tooltip" data-placement="right" title="{{ trans('invoices.messages.email_required') }}">
<span class="text-disabled">{{ trans('invoices.send_mail') }}</span>
</button>
@endif
@stack('button_email_end')
<div class="dropdown-divider"></div>
@endif
@stack('button_pdf_start')
<a class="dropdown-item" href="{{ route('invoices.pdf', $invoice->id) }}">{{ trans('invoices.download_pdf') }}</a>
@stack('button_pdf_end')
@stack('button_dropdown_divider_1')
@permission('update-sales-invoices')
@if ($invoice->status != 'cancelled')
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route('invoices.cancelled', $invoice->id) }}">{{ trans('general.cancel') }}</a>
@stack('button_cancelled_end')
@stack('button_sent_start')
@if ($invoice->status == 'draft')
<a class="dropdown-item" href="{{ route('invoices.sent', $invoice->id) }}">{{ trans('invoices.mark_sent') }}</a>
@else
<button type="button" class="dropdown-item" disabled="disabled"><span class="text-disabled">{{ trans('invoices.mark_sent') }}</span></button>
@endif
@stack('button_sent_end')
@endpermission
@permission('delete-sales-invoices')
@if (!$invoice->reconciled)
@stack('button_delete_start')
{!! Form::deleteLink($invoice, 'sales/invoices') !!}
@stack('button_delete_end')
@endif
@endpermission
</div>
@stack('button_email_start')
@if ($invoice->contact_email)
<a class="dropdown-item" href="{{ route('invoices.email', $invoice->id) }}">{{ trans('invoices.send_mail') }}</a>
@else
<button type="button" class="dropdown-item" disabled="disabled" data-toggle="tooltip" data-placement="right" title="{{ trans('invoices.messages.email_required') }}">
<span class="text-disabled">{{ trans('invoices.send_mail') }}</span>
</button>
@endif
@stack('button_email_end')
@endif
@stack('button_pdf_start')
<a class="dropdown-item" href="{{ route('invoices.pdf', $invoice->id) }}">{{ trans('invoices.download_pdf') }}</a>
@stack('button_pdf_end')
@permission('update-sales-invoices')
@if ($invoice->status != 'cancelled')
@stack('button_cancelled_start')
<a class="dropdown-item" href="{{ route('invoices.cancelled', $invoice->id) }}">{{ trans('general.cancel') }}</a>
@stack('button_cancelled_end')
@endif
@endpermission
@stack('button_dropdown_divider_2')
@permission('delete-sales-invoices')
@if (!$invoice->reconciled)
@stack('button_delete_start')
{!! Form::deleteLink($invoice, 'sales/invoices') !!}
@stack('button_delete_end')
@endif
@endpermission
@stack('button_dropdown_end')
</div>
</div>
@stack('button_group_end')
</div>
</div>
@ -536,7 +558,7 @@
@stack('row_footer_start')
<div class="row">
@stack('row_footer_history_start')
@stack('row_footer_histories_start')
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
<div class="accordion">
<div class="card">
@ -547,20 +569,28 @@
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_histories_head_tr_start')
<tr class="row table-head-line">
<th class="col-xs-4 col-sm-2">{{ trans('general.date') }}</th>
@stack('row_footer_histories_head_start')
<th class="col-xs-4 col-sm-3">{{ trans('general.date') }}</th>
<th class="col-xs-4 col-sm-3 text-left">{{ trans_choice('general.statuses', 1) }}</th>
<th class="col-xs-4 col-sm-7 text-left long-texts">{{ trans('general.description') }}</th>
<th class="col-xs-4 col-sm-6 text-left long-texts">{{ trans('general.description') }}</th>
@stack('row_footer_histories_head_end')
</tr>
@stack('row_footer_histories_head_tr_end')
</thead>
<tbody>
@stack('row_footer_histories_body_tr_start')
@foreach($invoice->histories as $history)
<tr class="row align-items-center border-top-1 tr-py">
<td class="col-xs-4 col-sm-2">@date($history->created_at)</td>
@stack('row_footer_histories_body_td_start')
<td class="col-xs-4 col-sm-3">@date($history->created_at)</td>
<td class="col-xs-4 col-sm-3 text-left">{{ trans('invoices.statuses.' . $history->status) }}</td>
<td class="col-xs-4 col-sm-7 text-left long-texts">{{ $history->description }}</td>
<td class="col-xs-4 col-sm-6 text-left long-texts">{{ $history->description }}</td>
@stack('row_footer_histories_body_td_end')
</tr>
@endforeach
@stack('row_footer_histories_body_tr_end')
</tbody>
</table>
</div>
@ -568,9 +598,9 @@
</div>
</div>
</div>
@stack('row_footer_history_end')
@stack('row_footer_histories_end')
@stack('row_footer_transaction_start')
@stack('row_footer_transactions_start')
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
<div class="accordion">
<div class="card">
@ -581,17 +611,23 @@
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_transactions_head_tr_start')
<tr class="row table-head-line">
@stack('row_footer_transactions_head_td_start')
<th class="col-xs-4 col-sm-3">{{ trans('general.date') }}</th>
<th class="col-xs-4 col-sm-3">{{ trans('general.amount') }}</th>
<th class="col-sm-3 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
<th class="col-xs-4 col-sm-3">{{ trans('general.actions') }}</th>
@stack('row_footer_transactions_head_td_end')
</tr>
@stack('row_footer_transactions_head_tr_end')
</thead>
<tbody>
@stack('row_footer_transactions_body_tr_start')
@if ($invoice->transactions->count())
@foreach($invoice->transactions as $transaction)
<tr class="row align-items-center border-top-1 tr-py">
@stack('row_footer_transactions_body_td_start')
<td class="col-xs-4 col-sm-3">@date($transaction->paid_at)</td>
<td class="col-xs-4 col-sm-3">@money($transaction->amount, $transaction->currency_code, true)</td>
<td class="col-sm-3 d-none d-sm-block">{{ $transaction->account->name }}</td>
@ -615,6 +651,7 @@
)) !!}
@endif
</td>
@stack('row_footer_transactions_body_td_end')
</tr>
@endforeach
@else
@ -626,6 +663,7 @@
</td>
</tr>
@endif
@stack('row_footer_transactions_body_tr_end')
</tbody>
</table>
</div>
@ -633,43 +671,13 @@
</div>
</div>
</div>
@stack('row_footer_transaction_end')
@stack('row_footer_transactions_end')
</div>
@stack('row_footer_end')
{{ Form::hidden('invoice_id', $invoice->id, ['id' => 'invoice_id']) }}
@endsection
@push('content_content_end')
<akaunting-modal
class="modal-payment"
:show="payment.modal"
@cancel="payment.modal = false"
:title="'{{ trans('general.title.new', ['type' => trans_choice('general.payments', 1)]) }}'"
:message="payment.html"
:button_cancel="'{{ trans('general.button.save') }}'"
:button_delete="'{{ trans('general.button.cancel') }}'">
<template #modal-body>
@include('modals.invoices.payment')
</template>
<template #card-footer>
<div class="float-right">
<button type="button" class="btn btn-outline-secondary" @click="closePayment">
{{ trans('general.cancel') }}
</button>
<a href="{{ route('apps.categories.show', 'payment-method') }}" class="btn btn-whitelong-texts">
{{ trans('invoices.accept_payments') }}
</a>
<button :disabled="form.loading" type="button" class="btn btn-success" @click="addPayment">
<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
@push('scripts_start')
<script src="{{ asset('public/js/sales/invoices.js?v=' . version('short')) }}"></script>
@endpush

View File

@ -22,7 +22,7 @@
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', '1', ['id' => 'currency_rate']) !!}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency], 0) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0) }}
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}

View File

@ -41,7 +41,7 @@
{!! Form::hidden('currency_code', $revenue->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', null, ['id' => 'currency_rate']) !!}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency], $revenue->amount) }}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], $revenue->amount) }}
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $revenue->account_id, ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}

View File

@ -92,15 +92,17 @@
<a class="dropdown-item" href="{{ route('revenues.edit', $item->id) }}">{{ trans('general.edit') }}</a>
<div class="dropdown-divider"></div>
@endif
@if (empty($item->document_id))
@permission('create-sales-revenues')
<a class="dropdown-item" href="{{ route('revenues.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
<div class="dropdown-divider"></div>
@endpermission
@endif
@if (!$item->reconciled)
@permission('delete-sales-revenues')
@if (!$item->reconciled)
<div class="dropdown-divider"></div>
{!! Form::deleteLink($item, 'revenues.destroy') !!}
@endif
{!! Form::deleteLink($item, 'revenues.destroy') !!}
@endpermission
@endif
</div>
</div>
</td>

View File

@ -3,7 +3,7 @@
@section('title', trans_choice('general.companies', 1))
@section('content')
{!! Form::model($setting, [
{!! Form::open([
'id' => 'setting',
'method' => 'PATCH',
'route' => 'settings.update',
@ -18,17 +18,17 @@
<div class="card">
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('settings.company.name'), 'building') }}
{{ Form::textGroup('name', trans('settings.company.name'), 'building', ['required' => 'required'], setting('company.name')) }}
{{ Form::textGroup('email', trans('settings.company.email'), 'envelope') }}
{{ Form::textGroup('email', trans('settings.company.email'), 'envelope', ['required' => 'required'], setting('company.email')) }}
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', [], setting('company.tax_number')) }}
{{ Form::textGroup('phone', trans('settings.company.phone'), 'phone', []) }}
{{ Form::textGroup('phone', trans('settings.company.phone'), 'phone', [], setting('company.phone')) }}
{{ Form::textareaGroup('address', trans('settings.company.address')) }}
{{ Form::textareaGroup('address', trans('settings.company.address'), null, setting('company.address')) }}
{{ Form::fileGroup('logo', trans('settings.company.logo')) }}
{{ Form::fileGroup('logo', trans('settings.company.logo'), 'file-image-o', [], setting('company.logo')) }}
</div>
</div>

View File

@ -23,7 +23,7 @@
{{ Form::textGroup('rate', trans('currencies.rate'), 'sliders-h', ['@input' => 'onChangeRate', 'required' => 'required']) }}
{{ Form::textGroup('precision', trans('currencies.precision'), 'dot-circle') }}
{{ Form::selectGroup('precision', trans('currencies.precision'), 'dot-circle', $precisions) }}
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}

View File

@ -24,7 +24,7 @@
{{ Form::textGroup('rate', trans('currencies.rate'), 'sliders-h', ['@input' => 'onChangeRate', 'required' => 'required']) }}
{{ Form::textGroup('precision', trans('currencies.precision'), 'dot-circle') }}
{{ Form::selectGroup('precision', trans('currencies.precision'), 'dot-circle', $precisions, $currency->precision) }}
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}

View File

@ -3,7 +3,7 @@
@section('title', trans_choice('general.defaults', 1))
@section('content')
{!! Form::model($setting, [
{!! Form::open([
'id' => 'setting',
'method' => 'PATCH',
'route' => 'settings.update',
@ -18,19 +18,19 @@
<div class="card">
<div class="card-body">
<div class="row">
{{ Form::selectGroup('account', trans_choice('general.accounts', 1), 'university', $accounts, !empty($setting['account']) ? $setting['account'] : null, []) }}
{{ Form::selectGroup('account', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), []) }}
{{ Form::selectGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, !empty($setting['currency']) ? $setting['currency'] : null, []) }}
{{ Form::selectGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), []) }}
{{ Form::selectGroup('tax', trans_choice('general.taxes', 1), 'percent', $taxes, !empty($setting['tax']) ? $setting['tax'] : null, []) }}
{{ Form::selectGroup('tax', trans_choice('general.taxes', 1), 'percent', $taxes, setting('default.tax'), []) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, !empty($setting['payment_method']) ? $setting['payment_method'] : null, []) }}
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method'), []) }}
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), !empty($setting['locale']) ? $setting['locale'] : null, []) }}
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), setting('default.locale'), []) }}
{{ Form::selectGroup('list_limit', trans('settings.default.list_limit'), 'columns', ['10' => '10', '25' => '25', '50' => '50', '100' => '100'], !empty($setting['list_limit']) ? $setting['list_limit'] : null, []) }}
{{ Form::selectGroup('list_limit', trans('settings.default.list_limit'), 'columns', ['10' => '10', '25' => '25', '50' => '50', '100' => '100'], setting('default.list_limit'), []) }}
{{ Form::radioGroup('use_gravatar', trans('settings.default.use_gravatar'), $setting->get('use_gravatar')) }}
{{ Form::radioGroup('use_gravatar', trans('settings.default.use_gravatar'), setting('default.use_gravatar')) }}
</div>
</div>

View File

@ -3,7 +3,7 @@
@section('title', trans('general.email'))
@section('content')
{!! Form::model($setting, [
{!! Form::open([
'id' => 'setting',
'method' => 'PATCH',
'route' => 'settings.email.update',
@ -24,14 +24,15 @@
@php $collapse_status = in_array($card, [1, 2]) ? 'show' : ''; @endphp
<div class="col-md-6">
<div class="accordion" id="accordion{{ $card }}">
<div class="accordion" id="accordion-{{ $card }}">
<div class="card">
<div class="card-header" id="heading{{ $card }}" data-toggle="collapse" data-target="#collapse{{ $card }}" aria-expanded="{{ $aria_expanded_status }}" aria-controls="collapse{{ $card }}">
<div class="card-header" id="heading-{{ $card }}" data-toggle="collapse" data-target="#collapse-{{ $card }}" aria-expanded="{{ $aria_expanded_status }}" aria-controls="collapse-{{ $card }}">
<div class="align-items-center">
<h4 class="mb-0">{{ trans($template->name) }}</h4>
</div>
</div>
<div id="collapse{{ $card }}" class="collapse {{ $collapse_status }}" aria-labelledby="heading{{ $card }}" data-parent="#accordion{{ $card }}">
<div id="collapse-{{ $card }}" class="collapse {{ $collapse_status }}" aria-labelledby="heading-{{ $card }}" data-parent="#accordion-{{ $card }}">
<div class="card-body">
<div class="row">
{{ Form::textGroup('template_' . $template->alias . '_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], $template->subject, 'col-md-12') }}
@ -54,29 +55,30 @@
@endforeach
<div class="col-md-12">
<div class="accordion" id="accordion{{ $card }}">
<div class="accordion" id="accordion-{{ $card }}">
<div class="card">
<div class="card-header" id="heading{{ $card }}" data-toggle="collapse" data-target="#collapse{{ $card }}" aria-expanded="false" aria-controls="collapse{{ $card }}">
<div class="card-header" id="heading-{{ $card }}" data-toggle="collapse" data-target="#collapse-{{ $card }}" aria-expanded="false" aria-controls="collapse-{{ $card }}">
<div class="align-items-center">
<h4 class="mb-0">{{ trans('settings.email.protocol') }}</h4>
</div>
</div>
<div id="collapse{{ $card }}" class="collapse hide" aria-labelledby="heading{{ $card }}" data-parent="#accordion{{ $card }}">
<div id="collapse-{{ $card }}" class="collapse hide" aria-labelledby="heading-{{ $card }}" data-parent="#accordion-{{ $card }}">
<div class="card-body">
<div class="row">
{{ Form::selectGroup('protocol', trans('settings.email.protocol'), 'share', $email_protocols, !empty($setting['protocol']) ? $setting['protocol'] : null, ['change' => 'onChangeProtocol']) }}
{{ Form::selectGroup('protocol', trans('settings.email.protocol'), 'share', $email_protocols, setting('email.protocol'), ['change' => 'onChangeProtocol']) }}
{{ Form::textGroup('sendmail_path', trans('settings.email.sendmail_path'), 'road', [':disabled'=> 'email.sendmailPath']) }}
{{ Form::textGroup('sendmail_path', trans('settings.email.sendmail_path'), 'road', [':disabled'=> 'email.sendmailPath'], setting('email.sendmail_path')) }}
{{ Form::textGroup('smtp_host', trans('settings.email.smtp.host'), 'paper-plane', [':disabled' => 'email.smtpHost']) }}
{{ Form::textGroup('smtp_host', trans('settings.email.smtp.host'), 'paper-plane', [':disabled' => 'email.smtpHost'], setting('email.smtp_host')) }}
{{ Form::textGroup('smtp_port', trans('settings.email.smtp.port'), 'paper-plane', [':disabled' => 'email.smtpPort']) }}
{{ Form::textGroup('smtp_port', trans('settings.email.smtp.port'), 'paper-plane', [':disabled' => 'email.smtpPort'], setting('email.smtp_port')) }}
{{ Form::textGroup('smtp_username', trans('settings.email.smtp.username'), 'paper-plane', [':disabled' => 'email.smtpUsername']) }}
{{ Form::textGroup('smtp_username', trans('settings.email.smtp.username'), 'paper-plane', [':disabled' => 'email.smtpUsername'], setting('email.smtp_username')) }}
{{ Form::textGroup('smtp_password', trans('settings.email.smtp.password'), 'paper-plane', ['type' => 'password', ':disabled' => 'email.smtpPassword']) }}
{{ Form::textGroup('smtp_password', trans('settings.email.smtp.password'), 'paper-plane', ['type' => 'password', ':disabled' => 'email.smtpPassword'], setting('email.smtp_password')) }}
{{ Form::selectGroup('smtp_encryption', trans('settings.email.smtp.encryption'), 'paper-plane', ['' => trans('settings.email.smtp.none'), 'ssl' => 'SSL', 'tls' => 'TLS'], !empty($setting['smtp_encryption']) ? $setting['smtp_encryption'] : null , ['disabled' => 'email.smtpEncryption']) }}
{{ Form::selectGroup('smtp_encryption', trans('settings.email.smtp.encryption'), 'paper-plane', ['' => trans('settings.email.smtp.none'), 'ssl' => 'SSL', 'tls' => 'TLS'], setting('email.smtp_encryption', null), ['disabled' => 'email.smtpEncryption']) }}
</div>
</div>
</div>

View File

@ -3,7 +3,7 @@
@section('title', trans_choice('general.invoices', 1))
@section('content')
{!! Form::model($setting, [
{!! Form::open([
'id' => 'setting',
'method' => 'PATCH',
'route' => 'settings.update',
@ -18,27 +18,27 @@
<div class="card">
<div class="card-body">
<div class="row">
{{ Form::textGroup('number_prefix', trans('settings.invoice.prefix'), 'font', []) }}
{{ Form::textGroup('number_prefix', trans('settings.invoice.prefix'), 'font', [], setting('invoice.number_prefix')) }}
{{ Form::textGroup('number_digit', trans('settings.invoice.digit'), 'text-width', []) }}
{{ Form::textGroup('number_digit', trans('settings.invoice.digit'), 'text-width', [], setting('invoice.number_digit')) }}
{{ Form::textGroup('number_next', trans('settings.invoice.next'), 'chevron-right', []) }}
{{ Form::textGroup('number_next', trans('settings.invoice.next'), 'chevron-right', [], setting('invoice.number_next')) }}
{{ Form::selectGroup('payment_terms', trans('settings.invoice.payment_terms'), 'calendar', $payment_terms, $setting['payment_terms'], []) }}
{{ Form::selectGroup('payment_terms', trans('settings.invoice.payment_terms'), 'calendar', $payment_terms, setting('invoice.payment_terms'), []) }}
{{ Form::textGroup('title', trans('settings.invoice.title'), 'font', []) }}
{{ Form::textGroup('title', trans('settings.invoice.title'), 'font', [], setting('invoice.title')) }}
{{ Form::textGroup('subheading', trans('settings.invoice.subheading'), 'font', []) }}
{{ Form::textGroup('subheading', trans('settings.invoice.subheading'), 'font', [], setting('invoice.subheading')) }}
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2), 'sticky-note-o', setting('invoice.notes')) }}
{{ Form::textareaGroup('footer', trans('general.footer')) }}
{{ Form::textareaGroup('footer', trans('general.footer'), 'sticky-note-o', setting('invoice.footer')) }}
{{ Form::invoice_text('item_name', trans('settings.invoice.item_name'), 'font', $item_names, null, [], 'item_name_input', null) }}
{{ Form::invoice_text('item_name', trans('settings.invoice.item_name'), 'font', $item_names, setting('invoice.item_name'), [], 'item_name_input', null) }}
{{ Form::invoice_text('price_name', trans('settings.invoice.price_name'), 'font', $price_names, null, [], 'price_name_input', null) }}
{{ Form::invoice_text('price_name', trans('settings.invoice.price_name'), 'font', $price_names, setting('invoice.price_name'), [], 'price_name_input', null) }}
{{ Form::invoice_text('quantity_name', trans('settings.invoice.quantity_name'), 'font', $quantity_names, null, [], 'quantity_name_input', null) }}
{{ Form::invoice_text('quantity_name', trans('settings.invoice.quantity_name'), 'font', $quantity_names, setting('invoice.quantity_name'), [], 'quantity_name_input', null) }}
<div class="form-group col-md-6">
{!! Form::label('invoice_template', trans_choice('general.templates', 1), ['class' => 'form-control-label']) !!}

View File

@ -3,7 +3,7 @@
@section('title', trans_choice('general.localisations', 1))
@section('content')
{!! Form::model($setting, [
{!! Form::open([
'id' => 'setting',
'method' => 'PATCH',
'route' => 'settings.update',
@ -18,17 +18,17 @@
<div class="card">
<div class="card-body">
<div class="row">
{{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off'], $setting['financial_start']) }}
{{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off'], setting('localisation.financial_start')) }}
{{ Form::selectGroupGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, $setting['timezone'], []) }}
{{ Form::selectGroupGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, setting('localisation.timezone'), []) }}
{{ Form::selectGroup('date_format', trans('settings.localisation.date.format'), 'calendar', $date_formats, $setting['date_format'], ['autocomplete' => 'off']) }}
{{ Form::selectGroup('date_format', trans('settings.localisation.date.format'), 'calendar', $date_formats, setting('localisation.date_format'), ['autocomplete' => 'off']) }}
{{ Form::selectGroup('date_separator', trans('settings.localisation.date.separator'), 'minus', $date_separators, $setting['date_separator'], []) }}
{{ Form::selectGroup('date_separator', trans('settings.localisation.date.separator'), 'minus', $date_separators, setting('localisation.date_separator'), []) }}
{{ Form::selectGroup('percent_position', trans('settings.localisation.percent.title'), 'percent', $percent_positions, $setting['percent_position'], []) }}
{{ Form::selectGroup('percent_position', trans('settings.localisation.percent.title'), 'percent', $percent_positions, setting('localisation.percent_position'), []) }}
{{ Form::selectGroup('discount_location', trans('settings.localisation.discount_location.name'), 'percent', $discount_locations, !empty($setting['discount_location']) ? $setting['discount_location'] : 'total', []) }}
{{ Form::selectGroup('discount_location', trans('settings.localisation.discount_location.name'), 'percent', $discount_locations, setting('localisation.discount_location'), []) }}
</div>
</div>

View File

@ -30,9 +30,15 @@
@elseif ($type == 'radioGroup')
{{ Form::$type($field['name'], trans($field['title']), isset($setting[$field['name']]) ? $setting[$field['name']] : 1, trans($field['enable']), trans($field['disable']), $field['attributes']) }}
@elseif ($type == 'checkboxGroup')
{{ Form::$type($field['name'], trans($field['title']), $field['items'], $field['value'], $field['id'], $field['attributes']) }}
{{ Form::$type($field['name'], trans($field['title']), $field['items'], $field['value'], $field['id'], $field['selected'], $field['attributes']) }}
@elseif ($type == 'fileGroup')
{{ Form::$type($field['name'], trans($field['title']), $field['attributes']) }}
@elseif ($type == 'dateGroup')
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], array_merge(['id' => $field['name'], 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], $field['attributes']), Date::parse($setting[$field['name']] ?? now())->toDateString()) }}
@elseif ($type == 'accountSelectGroup')
{{ Form::selectGroup($field['name'], trans_choice('general.accounts', 1), 'university', $accounts, setting($module->getAlias() . '.' . $field['name']), $field['attributes']) }}
@elseif ($type == 'categorySelectGroup')
{{ Form::selectGroup($field['name'], trans_choice('general.categories', 1), 'folder', $categories, setting($module->getAlias() . '.' . $field['name']), $field['attributes']) }}
@endif
@endforeach

View File

@ -3,7 +3,7 @@
@section('title', trans('settings.scheduling.name'))
@section('content')
{!! Form::model($setting, [
{!! Form::open([
'id' => 'setting',
'method' => 'PATCH',
'route' => 'settings.update',
@ -18,20 +18,20 @@
<div class="card">
<div class="card-body">
<div class="row">
{{ Form::radioGroup('send_invoice_reminder', trans('settings.scheduling.send_invoice'), $setting->get('send_invoice_reminder')) }}
{{ Form::radioGroup('send_invoice_reminder', trans('settings.scheduling.send_invoice'), setting('schedule.send_invoice_reminder')) }}
{{ Form::textGroup('invoice_days', trans('settings.scheduling.invoice_days'), 'calendar', []) }}
{{ Form::textGroup('invoice_days', trans('settings.scheduling.invoice_days'), 'calendar', [], setting('schedule.invoice_days')) }}
{{ Form::radioGroup('send_bill_reminder', trans('settings.scheduling.send_bill'), $setting->get('send_bill_reminder')) }}
{{ Form::radioGroup('send_bill_reminder', trans('settings.scheduling.send_bill'), setting('schedule.send_bill_reminder')) }}
{{ Form::textGroup('bill_days', trans('settings.scheduling.bill_days'), 'calendar', []) }}
{{ Form::textGroup('bill_days', trans('settings.scheduling.bill_days'), 'calendar', [], setting('schedule.bill_days')) }}
<div class="col-sm-6">
<label for="cron_command" class="form-control-label">{{ trans('settings.scheduling.cron_command') }}</label>
<input type="text" class="form-control form-control-muted" value="php {{ base_path('artisan') }} schedule:run >> /dev/null 2>&1">
</div>
{{ Form::textGroup('time', trans('settings.scheduling.schedule_time'), 'clock', []) }}
{{ Form::textGroup('time', trans('settings.scheduling.schedule_time'), 'clock', [], setting('schedule.time')) }}
</div>
</div>

View File

@ -13,7 +13,7 @@
<tbody class="thead-light">
@foreach($accounts as $item)
<tr class="row border-top-1 tr-py">
<td class="col-xs-6 col-md-6 text-left">{{ $item->name }}</td>
<td class="col-xs-6 col-md-6 text-left long-texts">{{ $item->name }}</td>
<td class="col-xs-6 col-md-6 text-right">@money($item->balance, $item->currency_code, true)</td>
</tr>
@endforeach

View File

@ -17,7 +17,7 @@
@foreach($transactions as $item)
<tr class="row border-top-1 tr-py">
<td class="col-xs-4 col-md-4 text-left">@date($item->paid_at)</td>
<td class="col-xs-4 col-md-4 text-left">{{ $item->category->name }}</td>
<td class="col-xs-4 col-md-4 text-left long-texts" title="{{ $item->category->name }}">{{ $item->category->name }}</td>
<td class="col-xs-4 col-md-4 text-right">@money($item->amount, $item->currency_code, true)</td>
</tr>
@endforeach

View File

@ -17,7 +17,7 @@
@foreach($transactions as $item)
<tr class="row border-top-1 tr-py">
<td class="col-xs-4 col-md-4 text-left">@date($item->paid_at)</td>
<td class="col-xs-4 col-md-4 text-left">{{ $item->category->name }}</td>
<td class="col-xs-4 col-md-4 text-left long-texts" title="{{ $item->category->name }}">{{ $item->category->name }}</td>
<td class="col-xs-4 col-md-4 text-right">@money($item->amount, $item->currency_code, true)</td>
</tr>
@endforeach

View File

@ -70,7 +70,7 @@
'<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.save') . '</span>',
[':disabled' => 'form.loading', 'type' => 'submit', 'class' => 'btn btn-icon btn-success']) !!}
<a href="{{ url('wizard/currencies') }}" id="wizard-skip" class="btn btn-white">
<a href="{{ route('wizard.currencies.index') }}" id="wizard-skip" class="btn btn-white">
{{ trans('general.skip') }}
</a>
</div>

View File

@ -83,7 +83,7 @@
{{ Form::textGroup('name', trans('general.name'), 'font', [], null, '') }}
</td>
<td class="col-md-3 d-none d-md-block">
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required', 'change' => 'onChangeCode'], '') }}
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required', 'change' => 'onChangeCode', 'model' => 'form.code'], '') }}
</td>
<td class="col-md-2 d-none d-md-block">
{{ Form::textGroup('rate', trans('currencies.rate'), 'percentage', ['required' => 'required'], null, '') }}
@ -121,14 +121,14 @@
<div class="card-footer">
<div class="row">
<div class="col-sm-6">
<a href="{{ url('wizard/companies') }}" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('modules.back') }}</span>
<a href="{{ route('wizard.companies.edit') }}" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('pagination.previous') }}</span>
</a>
</div>
<div class="col-sm-6 text-right">
<a href="{{ url('wizard/taxes') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('general.skip') }}</span>
<a href="{{ route('wizard.taxes.index') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('pagination.next') }}</span>
</a>
</div>
</div>

View File

@ -50,13 +50,13 @@
<div class="card-footer">
<div class="row">
<div class="col-sm-6">
<a href="{{ url('wizard/taxes') }}" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('modules.back') }}</span>
<a href="{{ route('wizard.taxes.index') }}" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('pagination.previous') }}</span>
</a>
</div>
<div class="col-sm-6 text-right">
<a href="{{ url('/') }}" id="wizard-skip" class="btn btn-icon btn-success header-button-top">
<a href="{{ route('dashboard') }}" id="wizard-skip" class="btn btn-icon btn-success header-button-top">
<span class="btn-inner--text">{{ trans('general.go_to_dashboard') }}</span>
</a>
</div>

View File

@ -103,14 +103,14 @@
<div class="card-footer">
<div class="row">
<div class="col-sm-6">
<a href="{{ url('wizard/currencies') }}" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('modules.back') }}</span>
<a href="{{ route('wizard.currencies.index') }}" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('pagination.previous') }}</span>
</a>
</div>
<div class="col-sm-6 text-right">
<a href="{{ url('wizard/finish') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('general.skip') }}</span>
<a href="{{ route('wizard.finish.index') }}" id="wizard-skip" class="btn btn-icon btn-white header-button-top">
<span class="btn-inner--text">{{ trans('pagination.next') }}</span>
</a>
</div>
</div>