|  | @@ -123,7 +123,7 @@ class AccountService
 | 
		
	
		
			
			| 123 | 123 |                  'journal_entries.type',
 | 
		
	
		
			
			| 124 | 124 |                  'journal_entries.amount',
 | 
		
	
		
			
			| 125 | 125 |                  'journal_entries.description',
 | 
		
	
		
			
			| 126 |  | -                DB::raw('journal_entries.amount * IF(journal_entries.type = "debit", 1, -1) AS signed_amount')
 | 
		
	
		
			
			|  | 126 | +                DB::raw("journal_entries.amount * CASE WHEN journal_entries.type = 'debit' THEN 1 ELSE -1 END AS signed_amount")
 | 
		
	
		
			
			| 127 | 127 |              )
 | 
		
	
		
			
			| 128 | 128 |                  ->whereBetween('transactions.posted_at', [$startDate, $endDate])
 | 
		
	
		
			
			| 129 | 129 |                  ->join('transactions', 'transactions.id', '=', 'journal_entries.transaction_id')
 |