Merge branch 'akaunting:master' into master

This commit is contained in:
Burak Civan 2022-10-10 16:40:45 +03:00 committed by GitHub
commit 093e324c27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -425,15 +425,15 @@ abstract class Form extends Component
protected function getCurrency($document, $currency, $currency_code) protected function getCurrency($document, $currency, $currency_code)
{ {
if (!empty($currency)) { if (! empty($currency)) {
return $currency; return $currency;
} }
if (!empty($currency_code)) { if (! empty($currency_code)) {
$currency = Currency::where('code', $currency_code)->first(); $currency = Currency::where('code', $currency_code)->first();
} }
if (empty($currency) && !empty($document)) { if (empty($currency) && ! empty($document)) {
$currency = Currency::where('code', $document->currency_code)->first(); $currency = Currency::where('code', $document->currency_code)->first();
} }

View File

@ -39,6 +39,7 @@ return [
'error' => [ 'error' => [
'self_delete' => 'Error: Can not delete yourself!', 'self_delete' => 'Error: Can not delete yourself!',
'self_disable' => 'Error: Can not disable yourself!', 'self_disable' => 'Error: Can not disable yourself!',
'unassigned' => 'Error: Can not unassigned company! The :company company must be assigned at least one user.',
'no_company' => 'Error: No company assigned to your account. Please, contact the system administrator.', 'no_company' => 'Error: No company assigned to your account. Please, contact the system administrator.',
], ],

View File

@ -4,7 +4,7 @@
id="{{ $formId }}" id="{{ $formId }}"
:route="$formRoute" :route="$formRoute"
method="{{ $formMethod }}" method="{{ $formMethod }}"
:model="$contact" :model="$document"
> >
@if (! $hideCompany) @if (! $hideCompany)
<x-documents.form.company :type="$type" /> <x-documents.form.company :type="$type" />