mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	More exact search for available budgets. #7853
This commit is contained in:
		| @@ -200,6 +200,23 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface | ||||
|         return $query->get(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Returns all available budget objects. | ||||
|      * | ||||
|      * @param Carbon $start | ||||
|      * @param Carbon $end | ||||
|      * | ||||
|      * @return Collection | ||||
|      * | ||||
|      */ | ||||
|     public function getAvailableBudgetsByExactDate(Carbon $start, Carbon $end): Collection | ||||
|     { | ||||
|         return $this->user->availableBudgets() | ||||
|                           ->where('start_date', '=', $start->format('Y-m-d')) | ||||
|                           ->where('end_date', '=', $end->format('Y-m-d')) | ||||
|                           ->get(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * @inheritDoc | ||||
|      */ | ||||
|   | ||||
| @@ -116,6 +116,14 @@ interface AvailableBudgetRepositoryInterface | ||||
|      */ | ||||
|     public function getAvailableBudgetsByDate(?Carbon $start, ?Carbon $end): Collection; | ||||
| 
 | ||||
|     /** | ||||
|      * @param Carbon $start | ||||
|      * @param Carbon $end | ||||
|      * | ||||
|      * @return Collection | ||||
|      */ | ||||
|     public function getAvailableBudgetsByExactDate(Carbon $start, Carbon $end): Collection; | ||||
| 
 | ||||
|     /** | ||||
|      * Get by transaction currency and date. Should always result in one entry or NULL. | ||||
|      * | ||||
|   | ||||
		Reference in New Issue
	
	Block a user