mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-01 20:17:35 -04:00 
			
		
		
		
	Minor fixes for import
This commit is contained in:
		
							parent
							
								
									24aa73c359
								
							
						
					
					
						commit
						c62456b319
					
				| @ -86,7 +86,7 @@ class CreateAccount | ||||
|             $sp794f3f->hosted_company_count = config('ninja.quotas.free.max_companies'); | ||||
|             $sp794f3f->account_sms_verified = true; | ||||
| 
 | ||||
|             if(in_array($this->getDomain($this->request['email']), ['givmail.com','yopmail.com','gmail.com', 'hotmail.com', 'outlook.com', 'yahoo.com', 'aol.com', 'mail.ru'])){ | ||||
|             if(in_array($this->getDomain($this->request['email']), ['givmail.com','yopmail.com','gmail.com', 'hotmail.com', 'outlook.com', 'yahoo.com', 'aol.com', 'mail.ru','brand-app.biz','proton.me','ema-sofia.eu'])){ | ||||
|                 $sp794f3f->account_sms_verified = false; | ||||
|             } | ||||
| 
 | ||||
|  | ||||
| @ -506,6 +506,12 @@ class CompanyImport implements ShouldQueue | ||||
| 
 | ||||
|         } | ||||
|          | ||||
|         if(Ninja::isHosted()) | ||||
|         { | ||||
|             $this->company->portal_mode = 'sub_domain'; | ||||
|             $this->company->portal_domain = '';             | ||||
|         } | ||||
| 
 | ||||
|         $this->company->save(); | ||||
| 
 | ||||
|     	return $this; | ||||
|  | ||||
| @ -516,6 +516,12 @@ class Import implements ShouldQueue | ||||
| 
 | ||||
|             } | ||||
| 
 | ||||
|                 if(Ninja::isHosted())    | ||||
|                 { | ||||
|                     $data['portal_mode'] = 'subdomain'; | ||||
|                     $data['portal_domain'] = ''; | ||||
|                 } | ||||
|             | ||||
|             $data['settings'] = $company_settings; | ||||
|         } | ||||
| 
 | ||||
| @ -564,6 +570,11 @@ class Import implements ShouldQueue | ||||
| 
 | ||||
|         TaxRate::reguard(); | ||||
| 
 | ||||
|         if(TaxRate::count() > 0){ | ||||
|             $this->company->enabled_tax_rates = 2; | ||||
|             $this->company->save(); | ||||
|         } | ||||
| 
 | ||||
|         /*Improve memory handling by setting everything to null when we have finished*/ | ||||
|         $data = null; | ||||
|         $rules = null; | ||||
|  | ||||
| @ -101,6 +101,11 @@ class Document extends BaseModel | ||||
|         return $this->morphTo(); | ||||
|     } | ||||
| 
 | ||||
|     public function user() | ||||
|     { | ||||
|         return $this->belongsTo(User::class)->withTrashed(); | ||||
|     } | ||||
| 
 | ||||
|     public function generateUrl($absolute = false) | ||||
|     { | ||||
|         $url = Storage::disk($this->disk)->url($this->url); | ||||
|  | ||||
| @ -1,4 +1,13 @@ | ||||
| <?php | ||||
| /** | ||||
|  * Invoice Ninja (https://invoiceninja.com). | ||||
|  * | ||||
|  * @link https://github.com/invoiceninja/invoiceninja source repository | ||||
|  * | ||||
|  * @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com) | ||||
|  * | ||||
|  * @license https://www.elastic.co/licensing/elastic-license | ||||
|  */ | ||||
| 
 | ||||
| namespace App\Policies; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user