1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for types

This commit is contained in:
David Bomba 2023-08-17 08:58:10 +10:00
parent 156aa5cc55
commit 035b683eb7
5 changed files with 18 additions and 14 deletions

View File

@ -35,6 +35,7 @@ use App\Models\BankTransaction;
use App\Models\QuoteInvitation; use App\Models\QuoteInvitation;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use App\Models\CreditInvitation; use App\Models\CreditInvitation;
use App\Models\RecurringInvoice;
use App\Models\InvoiceInvitation; use App\Models\InvoiceInvitation;
use App\DataMapper\ClientSettings; use App\DataMapper\ClientSettings;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;

View File

@ -108,7 +108,7 @@ class StoreShopClientRequest extends Request
$settings->currency_id = $this->getCurrencyCode($input['currency_code']); $settings->currency_id = $this->getCurrencyCode($input['currency_code']);
} }
$input['settings'] = $settings; $input['settings'] = (array)$settings;
if (isset($input['contacts'])) { if (isset($input['contacts'])) {
foreach ($input['contacts'] as $key => $contact) { foreach ($input['contacts'] as $key => $contact) {

View File

@ -79,7 +79,7 @@ trait Inviteable
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
$domain = $this->company->domain(); $domain = $this->company->domain();
} else { } else {
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); $domain = strlen($this->company->portal_domain ?? '') > 5 ? $this->company->portal_domain : config('ninja.app_url');
} }
$entity_type = Str::snake(class_basename($this->entityType())); $entity_type = Str::snake(class_basename($this->entityType()));
@ -94,7 +94,7 @@ trait Inviteable
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
$domain = $this->company->domain(); $domain = $this->company->domain();
} else { } else {
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); $domain = strlen($this->company->portal_domain ?? '') > 5 ? $this->company->portal_domain : config('ninja.app_url');
} }
switch ($this->company->portal_mode) { switch ($this->company->portal_mode) {
@ -119,7 +119,7 @@ trait Inviteable
if (Ninja::isHosted()) { if (Ninja::isHosted()) {
$domain = $this->company->domain(); $domain = $this->company->domain();
} else { } else {
$domain = strlen($this->company->portal_domain) > 5 ? $this->company->portal_domain : config('ninja.app_url'); $domain = strlen($this->company->portal_domain ?? '') > 5 ? $this->company->portal_domain : config('ninja.app_url');
} }
switch ($this->company->portal_mode) { switch ($this->company->portal_mode) {

View File

@ -13,6 +13,7 @@ parameters:
- 'app/DataMapper/Analytics/*' - 'app/DataMapper/Analytics/*'
- 'app/PaymentDrivers/Authorize/*' - 'app/PaymentDrivers/Authorize/*'
- 'app/Utils/Traits/*' - 'app/Utils/Traits/*'
- 'resources/views/*'
universalObjectCratesClasses: universalObjectCratesClasses:
- App\DataMapper\Tax\RuleInterface - App\DataMapper\Tax\RuleInterface
- App\DataMapper\FeesAndLimits - App\DataMapper\FeesAndLimits

View File

@ -1,5 +1,5 @@
<div> <div>
<div class="flex flex-col items-end mb-2" x-data> <div class="flex flex-row space-x-2 float-right mb-2" x-data>
<button wire:loading.attr="disabled" wire:click="downloadPdf" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button"> <button wire:loading.attr="disabled" wire:click="downloadPdf" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<span class="mr-0">{{ ctrans('texts.download_pdf') }}</span> <span class="mr-0">{{ ctrans('texts.download_pdf') }}</span>
<div wire:loading wire:target="downloadPdf"> <div wire:loading wire:target="downloadPdf">
@ -9,6 +9,7 @@
</svg> </svg>
</div> </div>
</button> </button>
@if($settings->enable_e_invoice && $entity_type == 'invoice')
<button wire:loading.attr="disabled" wire:click="downloadEInvoice" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button"> <button wire:loading.attr="disabled" wire:click="downloadEInvoice" class="bg-primary text-white px-4 py-4 lg:px-2 lg:py-2 rounded" type="button">
<span>{{ ctrans('texts.download_e_invoice') }}</span> <span>{{ ctrans('texts.download_e_invoice') }}</span>
<div wire:loading wire:target="downloadEInvoice"> <div wire:loading wire:target="downloadEInvoice">
@ -18,6 +19,7 @@
</svg> </svg>
</div> </div>
</button> </button>
@endif
</div> </div>
<div class="hidden lg:block"> <div class="hidden lg:block">
<div wire:init="getPdf()"> <div wire:init="getPdf()">