mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 22:07:33 -05:00 
			
		
		
		
	Merge pull request #6281 from turbo124/v5-develop
Fixes for checking constraints
This commit is contained in:
		
						commit
						e1e1787d08
					
				@ -561,6 +561,7 @@ class Import implements ShouldQueue
 | 
				
			|||||||
        $model_query = (new $model())
 | 
					        $model_query = (new $model())
 | 
				
			||||||
                            ->query()
 | 
					                            ->query()
 | 
				
			||||||
                            ->where($column, $value)
 | 
					                            ->where($column, $value)
 | 
				
			||||||
 | 
					                            ->where('company_id', $this->company->id)
 | 
				
			||||||
                            ->exists();
 | 
					                            ->exists();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if($model_query)
 | 
					        if($model_query)
 | 
				
			||||||
 | 
				
			|||||||
@ -63,6 +63,7 @@ class ClientRepository extends BaseRepository
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $client->fill($data);
 | 
					        $client->fill($data);
 | 
				
			||||||
 | 
					        $client->save();
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if (!isset($client->number) || empty($client->number)) {
 | 
					        if (!isset($client->number) || empty($client->number)) {
 | 
				
			||||||
            $client->number = $this->getNextClientNumber($client);
 | 
					            $client->number = $this->getNextClientNumber($client);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user