mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 05:37:33 -05:00 
			
		
		
		
	Fix date range in profit/loss report
This commit is contained in:
		
							parent
							
								
									85352f02cf
								
							
						
					
					
						commit
						557e088c46
					
				@ -23,7 +23,9 @@ class ProfitAndLossReport extends AbstractReport
 | 
			
		||||
        $payments = Payment::scope()
 | 
			
		||||
                        ->with('client.contacts')
 | 
			
		||||
                        ->withArchived()
 | 
			
		||||
                        ->excludeFailed();
 | 
			
		||||
                        ->excludeFailed()
 | 
			
		||||
                        ->where('payment_date', '>=', $this->startDate)
 | 
			
		||||
                        ->where('payment_date', '<=', $this->endDate);
 | 
			
		||||
 | 
			
		||||
        foreach ($payments->get() as $payment) {
 | 
			
		||||
            $client = $payment->client;
 | 
			
		||||
@ -43,7 +45,9 @@ class ProfitAndLossReport extends AbstractReport
 | 
			
		||||
 | 
			
		||||
        $expenses = Expense::scope()
 | 
			
		||||
                        ->with('client.contacts')
 | 
			
		||||
                        ->withArchived();
 | 
			
		||||
                        ->withArchived()
 | 
			
		||||
                        ->where('expense_date', '>=', $this->startDate)
 | 
			
		||||
                        ->where('expense_date', '<=', $this->endDate);
 | 
			
		||||
 | 
			
		||||
        foreach ($expenses->get() as $expense) {
 | 
			
		||||
            $client = $expense->client;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user