diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 7587da2e5062..352b89b181e2 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -94,8 +94,6 @@ class Kernel extends ConsoleKernel /* Performs system maintenance such as pruning the backup table */ $schedule->job(new SystemMaintenance)->sundays()->at('02:30')->withoutOverlapping()->name('system-maintenance-job')->onOneServer(); - /* Pulls in bank transactions from third party services */ - $schedule->job(new BankTransactionSync)->dailyAt('04:10')->withoutOverlapping()->name('bank-trans-sync-job')->onOneServer(); if (Ninja::isSelfHost()) { @@ -110,6 +108,9 @@ class Kernel extends ConsoleKernel $schedule->job(new AdjustEmailQuota)->dailyAt('23:30')->withoutOverlapping(); + /* Pulls in bank transactions from third party services */ + $schedule->job(new BankTransactionSync)->dailyAt('04:10')->withoutOverlapping()->name('bank-trans-sync-job')->onOneServer(); + //not used @deprecate // $schedule->job(new SendFailedEmails)->daily()->withoutOverlapping(); diff --git a/app/Jobs/Ninja/BankTransactionSync.php b/app/Jobs/Ninja/BankTransactionSync.php index 7699d951bb36..1fc0bec9d445 100644 --- a/app/Jobs/Ninja/BankTransactionSync.php +++ b/app/Jobs/Ninja/BankTransactionSync.php @@ -44,6 +44,7 @@ class BankTransactionSync implements ShouldQueue */ public function handle() { + //multiDB environment, need to foreach (MultiDB::$dbs as $db) { 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 6c0ff64b36c7..b5398e952937 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 @@ -51,18 +51,34 @@

-
+
@if($subscription->per_seat_enabled) -

+

+ @if($subscription->use_inventory_management && $product->in_stock_quantity == 0) +

Out of stock

+ @else

{{ ctrans('texts.qty') }}

+ @endif + - - @for ($i = 2; $i <= $subscription->max_seats_limit; $i++) + @if($subscription->max_seats_limit > 1) + { + @for ($i = 2; $i <= ($subscription->use_inventory_management ? min($subscription->max_seats_limit,$product->in_stock_quantity) : $subscription->max_seats_limit); $i++) @endfor - + } + @else + @for ($i = 2; $i <= ($subscription->use_inventory_management ? min($product->in_stock_quantity, max(100,$product->custom_value2)) : max(100,$product->custom_value2)); $i++) + + @endfor + @endif +
@endif