mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 22:17:35 -05:00 
			
		
		
		
	Merge pull request #7417 from turbo124/v5-develop
Fixes for converting company gateway ids for client gateway tokens
This commit is contained in:
		
						commit
						96509ec9a1
					
				@ -149,7 +149,7 @@ class CompanyExport implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $this->export_data['client_gateway_tokens'] = $this->company->client_gateway_tokens->map(function ($client_gateway_token){
 | 
					        $this->export_data['client_gateway_tokens'] = $this->company->client_gateway_tokens->map(function ($client_gateway_token){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $client_gateway_token = $this->transformArrayOfKeys($client_gateway_token, ['company_id', 'client_id']);
 | 
					            $client_gateway_token = $this->transformArrayOfKeys($client_gateway_token, ['company_id', 'client_id', 'company_gateway_id']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return $client_gateway_token->makeVisible(['id']);
 | 
					            return $client_gateway_token->makeVisible(['id']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -688,7 +688,7 @@ class CompanyImport implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $this->genericNewClassImport(ClientGatewayToken::class, 
 | 
					        $this->genericNewClassImport(ClientGatewayToken::class, 
 | 
				
			||||||
            ['company_id', 'id', 'hashed_id','client_id'], 
 | 
					            ['company_id', 'id', 'hashed_id','client_id'], 
 | 
				
			||||||
            [['clients' => 'client_id']], 
 | 
					            [['clients' => 'client_id', 'company_gateways' => 'company_gateway_id']], 
 | 
				
			||||||
            'client_gateway_tokens');
 | 
					            'client_gateway_tokens');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $this;        
 | 
					        return $this;        
 | 
				
			||||||
@ -1235,7 +1235,6 @@ class CompanyImport implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $class::unguard();
 | 
					        $class::unguard();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // foreach($this->backup_file->{$object_property} as $obj)
 | 
					 | 
				
			||||||
        foreach((object)$this->getObject($object_property) as $obj)
 | 
					        foreach((object)$this->getObject($object_property) as $obj)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            /* Remove unwanted keys*/
 | 
					            /* Remove unwanted keys*/
 | 
				
			||||||
@ -1270,7 +1269,7 @@ class CompanyImport implements ShouldQueue
 | 
				
			|||||||
                        $activity_invitation_key = 'invoice_invitations';
 | 
					                        $activity_invitation_key = 'invoice_invitations';
 | 
				
			||||||
                    elseif(isset($obj->quote_id))
 | 
					                    elseif(isset($obj->quote_id))
 | 
				
			||||||
                        $activity_invitation_key = 'quote_invitations';
 | 
					                        $activity_invitation_key = 'quote_invitations';
 | 
				
			||||||
                    elseif($isset($obj->credit_id))
 | 
					                    elseif(isset($obj->credit_id))
 | 
				
			||||||
                        $activity_invitation_key  = 'credit_invitations';
 | 
					                        $activity_invitation_key  = 'credit_invitations';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user