mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 04:48:40 -05: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->hosted_company_count = config('ninja.quotas.free.max_companies');
 | 
				
			||||||
            $sp794f3f->account_sms_verified = true;
 | 
					            $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;
 | 
					                $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();
 | 
					        $this->company->save();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    	return $this;
 | 
					    	return $this;
 | 
				
			||||||
 | 
				
			|||||||
@ -516,6 +516,12 @@ class Import implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if(Ninja::isHosted())   
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    $data['portal_mode'] = 'subdomain';
 | 
				
			||||||
 | 
					                    $data['portal_domain'] = '';
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					           
 | 
				
			||||||
            $data['settings'] = $company_settings;
 | 
					            $data['settings'] = $company_settings;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -564,6 +570,11 @@ class Import implements ShouldQueue
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        TaxRate::reguard();
 | 
					        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*/
 | 
					        /*Improve memory handling by setting everything to null when we have finished*/
 | 
				
			||||||
        $data = null;
 | 
					        $data = null;
 | 
				
			||||||
        $rules = null;
 | 
					        $rules = null;
 | 
				
			||||||
 | 
				
			|||||||
@ -101,6 +101,11 @@ class Document extends BaseModel
 | 
				
			|||||||
        return $this->morphTo();
 | 
					        return $this->morphTo();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function user()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        return $this->belongsTo(User::class)->withTrashed();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function generateUrl($absolute = false)
 | 
					    public function generateUrl($absolute = false)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $url = Storage::disk($this->disk)->url($this->url);
 | 
					        $url = Storage::disk($this->disk)->url($this->url);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,13 @@
 | 
				
			|||||||
<?php
 | 
					<?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;
 | 
					namespace App\Policies;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user