mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:37:34 -05:00 
			
		
		
		
	Adjustments for tests
This commit is contained in:
		
							parent
							
								
									743ff50b82
								
							
						
					
					
						commit
						4852a134da
					
				@ -127,7 +127,7 @@ class ClientExport extends BaseExport
 | 
				
			|||||||
                                ->withTrashed()
 | 
					                                ->withTrashed()
 | 
				
			||||||
                                ->where('company_id', $this->company->id);
 | 
					                                ->where('company_id', $this->company->id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if(!$this->input['include_deleted'])
 | 
					        if(!$this->input['include_deleted'] ?? false)
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $query = $this->addDateRange($query);
 | 
					        $query = $this->addDateRange($query);
 | 
				
			||||||
 | 
				
			|||||||
@ -62,7 +62,8 @@ class InvoiceExport extends BaseExport
 | 
				
			|||||||
                        })
 | 
					                        })
 | 
				
			||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					
 | 
				
			||||||
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -75,7 +75,7 @@ class InvoiceItemExport extends BaseExport
 | 
				
			|||||||
                        })
 | 
					                        })
 | 
				
			||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -76,7 +76,7 @@ class ProductExport extends BaseExport
 | 
				
			|||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -63,7 +63,7 @@ class PurchaseOrderExport extends BaseExport
 | 
				
			|||||||
                        })
 | 
					                        })
 | 
				
			||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -67,7 +67,7 @@ class PurchaseOrderItemExport extends BaseExport
 | 
				
			|||||||
                        })
 | 
					                        })
 | 
				
			||||||
                        ->with('vendor')->where('company_id', $this->company->id);
 | 
					                        ->with('vendor')->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -69,7 +69,7 @@ class QuoteExport extends BaseExport
 | 
				
			|||||||
                        })
 | 
					                        })
 | 
				
			||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -70,7 +70,7 @@ class QuoteItemExport extends BaseExport
 | 
				
			|||||||
                            })
 | 
					                            })
 | 
				
			||||||
                            ->with('client')->where('company_id', $this->company->id);
 | 
					                            ->with('client')->where('company_id', $this->company->id);
 | 
				
			||||||
                            
 | 
					                            
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -61,7 +61,7 @@ class RecurringInvoiceExport extends BaseExport
 | 
				
			|||||||
                        })
 | 
					                        })
 | 
				
			||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -70,7 +70,7 @@ class TaskExport extends BaseExport
 | 
				
			|||||||
                        ->withTrashed()
 | 
					                        ->withTrashed()
 | 
				
			||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -64,7 +64,7 @@ class VendorExport extends BaseExport
 | 
				
			|||||||
                        ->withTrashed()
 | 
					                        ->withTrashed()
 | 
				
			||||||
                        ->where('company_id', $this->company->id);
 | 
					                        ->where('company_id', $this->company->id);
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
        if(!$this->input['include_deleted']) {
 | 
					        if(!$this->input['include_deleted'] ?? false){
 | 
				
			||||||
            $query->where('is_deleted', 0);
 | 
					            $query->where('is_deleted', 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -68,14 +68,14 @@ class GenericReportRequest extends Request
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $input['user_id'] = auth()->user()->id;
 | 
					        $input['user_id'] = auth()->user()->id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // if(!$this->checkAuthority()){
 | 
					        if(!$this->checkAuthority()){
 | 
				
			||||||
        //     $input['date_range'] = '';            
 | 
					            $input['date_range'] = '';            
 | 
				
			||||||
        //     $input['start_date'] = '';
 | 
					            $input['start_date'] = '';
 | 
				
			||||||
        //     $input['end_date'] = '';
 | 
					            $input['end_date'] = '';
 | 
				
			||||||
        //     $input['send_email'] = true;
 | 
					            $input['send_email'] = true;
 | 
				
			||||||
        //     $input['report_keys'] = [];
 | 
					            $input['report_keys'] = [];
 | 
				
			||||||
        //     $input['document_email_attachment'] = false;
 | 
					            $input['document_email_attachment'] = false;
 | 
				
			||||||
        // }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->replace($input);
 | 
					        $this->replace($input);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user