diff --git a/app/Livewire/RequiredClientInfo.php b/app/Livewire/RequiredClientInfo.php
index a4327f95faa4..361338b33a90 100644
--- a/app/Livewire/RequiredClientInfo.php
+++ b/app/Livewire/RequiredClientInfo.php
@@ -190,6 +190,8 @@ class RequiredClientInfo extends Component
public $db;
+ public bool $is_subscription = false;
+
public function mount()
{
MultiDB::setDb($this->db);
@@ -230,12 +232,11 @@ class RequiredClientInfo extends Component
$this->invoice_terms = $invoice->terms;
}
- if(!$this->company_gateway->always_show_required_fields)
+ if(!$this->company_gateway->always_show_required_fields || $this->is_subscription)
$this->checkFields();
- if($this->unfilled_fields > 0 || $this->company_gateway->always_show_required_fields)
+ if($this->unfilled_fields > 0 || ($this->company_gateway->always_show_required_fields || $this->is_subscription))
$this->show_form = true;
-
}
#[Computed]
@@ -371,7 +372,7 @@ class RequiredClientInfo extends Component
public function checkFields()
{
-
+
MultiDB::setDb($this->db);
$_contact = ClientContact::withTrashed()->find($this->contact_id);
@@ -398,7 +399,7 @@ class RequiredClientInfo extends Component
}
}
- if ($this->unfilled_fields === 0 && !$this->company_gateway->always_show_required_fields) {
+ if ($this->unfilled_fields === 0 && (!$this->company_gateway->always_show_required_fields || $this->is_subscription)) {
$this->dispatch(
'passed-required-fields-check',
client_postal_code: $this->contact->client->postal_code
diff --git a/resources/views/billing-portal/v3/rff.blade.php b/resources/views/billing-portal/v3/rff.blade.php
index 0017d27967ac..f24da0e533c8 100644
--- a/resources/views/billing-portal/v3/rff.blade.php
+++ b/resources/views/billing-portal/v3/rff.blade.php
@@ -10,6 +10,6 @@
@endif
- @livewire('required-client-info', ['db' => $company->db, 'fields' => method_exists($gateway, 'getClientRequiredFields') ? $gateway->getClientRequiredFields() : [], 'contact_id' => auth()->guard('contact')->user()->id, 'countries' => $countries, 'company_id' => $company->id, 'company_gateway_id' => $gateway->company_gateway ? $gateway->company_gateway->id : $gateway->id, 'form_only' => true])
+ @livewire('required-client-info', ['db' => $company->db, 'fields' => method_exists($gateway, 'getClientRequiredFields') ? $gateway->getClientRequiredFields() : [], 'contact_id' => auth()->guard('contact')->user()->id, 'countries' => $countries, 'company_id' => $company->id, 'company_gateway_id' => $gateway->company_gateway ? $gateway->company_gateway->id : $gateway->id, 'form_only' => true, 'is_subscription' => true])
diff --git a/resources/views/portal/ninja2020/layout/payments.blade.php b/resources/views/portal/ninja2020/layout/payments.blade.php
index 5c5177d0dacb..0102fd8a98bf 100644
--- a/resources/views/portal/ninja2020/layout/payments.blade.php
+++ b/resources/views/portal/ninja2020/layout/payments.blade.php
@@ -11,7 +11,7 @@
@endpush
@section('body')
- @livewire('required-client-info', ['db' => $company->db, 'fields' => method_exists($gateway, 'getClientRequiredFields') ? $gateway->getClientRequiredFields() : [], 'contact_id' => auth()->guard('contact')->user()->id, 'countries' => $countries, 'company_id' => $company->id, 'company_gateway_id' => $gateway->company_gateway ? $gateway->company_gateway->id : $gateway->id])
+ @livewire('required-client-info', ['db' => $company->db, 'fields' => method_exists($gateway, 'getClientRequiredFields') ? $gateway->getClientRequiredFields() : [], 'contact_id' => auth()->guard('contact')->user()->id, 'countries' => $countries, 'company_id' => $company->id, 'company_gateway_id' => $gateway->company_gateway ? $gateway->company_gateway->id : $gateway->id, 'is_subscription' => request()->query('source') == 'subscriptions'])
@@ -72,7 +72,7 @@
});
});
-
+
document.addEventListener('DOMContentLoaded', function() {
let toggleWithToken = document.querySelector('.toggle-payment-with-token');
let toggleWithCard = document.querySelector('#toggle-payment-with-credit-card');