mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Fix 'spent per day' budget box
This commit is contained in:
		| @@ -97,7 +97,7 @@ class BoxController extends Controller | ||||
|         // also calculate spent per day. | ||||
|         $spent       = $opsRepository->sumExpenses($start, $end, null, null, $currency); | ||||
|         $spentAmount = $spent[(int) $currency->id]['sum'] ?? '0'; | ||||
|         $days        = $today->diffInDays($start) + 1; | ||||
|         $days        = min( $today->diffInDays($start), $end->diffInDays($start) ) + 1; | ||||
|         $spentPerDay = bcdiv($spentAmount, (string) $days); | ||||
|         if ($availableBudgets->count() > 0) { | ||||
|             $display           = 0; // assume user overspent | ||||
|   | ||||
		Reference in New Issue
	
	Block a user