From 66ba48bb497a1648ed2456f5b2d795b4a36e3060 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 19 Dec 2022 12:38:03 +1100 Subject: [PATCH] minor fixes for subscriptions --- app/Services/Subscription/SubscriptionService.php | 2 +- .../components/livewire/billing-portal-purchasev2.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index c24e97ccaf26..0b06aeddddf3 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -101,7 +101,7 @@ class SubscriptionService 'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id), 'client' => $recurring_invoice->client->hashed_id, 'subscription' => $this->subscription->hashed_id, - 'contact' => auth()->guard('contact')->user() ? auth()->guard('contact')->user()->hashed_id : $recurring_invoice->client->contacts()->first()->hashed_id, + 'contact' => auth()->guard('contact')->user() ? auth()->guard('contact')->user()->hashed_id : $recurring_invoice->client->contacts()->whereNotNull('email')->first()->hashed_id, 'account_key' => $recurring_invoice->client->custom_value2, ]; diff --git a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php index f16a1822f50c..1a4bc20f2599 100644 --- a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchasev2.blade.php @@ -209,7 +209,7 @@ @foreach($bundle->toArray() as $item)
- {{ substr(str_replace(["\r","\n","
","
","
","
"]," ", $item['product']), 0, 30) . "..." }} x {{ $item['qty'] }}
+ {{ $item['qty'] }} x {{ substr(str_replace(["\r","\n","
","
","
","
"]," ", $item['product']), 0, 30) . "..." }}
{{ $item['price'] }}
@endforeach