diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 9acece015cc2..ae8b7293042c 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -189,10 +189,7 @@ class BaseController extends Controller { $user = auth()->user(); - if ($user->getCompany()->is_large) - $this->manager->parseIncludes($this->mini_load); - else - $this->manager->parseIncludes($this->first_load); + $this->manager->parseIncludes($this->first_load); $this->serializer = request()->input('serializer') ?: EntityTransformer::API_SERIALIZER_ARRAY; diff --git a/app/PaymentDrivers/Stripe/ImportCustomers.php b/app/PaymentDrivers/Stripe/ImportCustomers.php index 0875dac36ec6..734ba631d9dd 100644 --- a/app/PaymentDrivers/Stripe/ImportCustomers.php +++ b/app/PaymentDrivers/Stripe/ImportCustomers.php @@ -8,7 +8,7 @@ * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://opensource.org/licenses/AAL - */ +*/ namespace App\PaymentDrivers\Stripe; diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 640ba7f43acc..17169b85b157 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -238,6 +238,8 @@ class SubscriptionService */ private function calculateProRataRefund($invoice) :float { + if(!$this->invoice->date) + return 0; $start_date = Carbon::parse($invoice->date);