1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

updates for disabling gatways in groups

This commit is contained in:
David Bomba 2023-08-08 09:32:21 +10:00
parent a122c6f3cc
commit c005f8b4ac
2 changed files with 9 additions and 1 deletions

View File

@ -424,7 +424,7 @@ class BillingPortalPurchasev2 extends Component
$client_repo = new ClientRepository(new ClientContactRepository());
$data = [
'name' => '',
'group_id' => $this->encodePrimaryKey($this->subscription->group_id),
'group_settings_id' => $this->subscription->group_id,
'contacts' => [
['email' => $this->email],
],

View File

@ -64,6 +64,9 @@ class PaymentMethod
if ($company_gateways || $company_gateways == '0') {
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
if($company_gateways == '0')
$transformed_ids = [];
$this->gateways = $this->client
->company
->company_gateways
@ -93,6 +96,11 @@ class PaymentMethod
if ($company_gateways || $company_gateways == '0') {
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
if($company_gateways == '0') {
$transformed_ids = [];
}
$this->gateways = $this->client
->company
->company_gateways