Fix bug with monthlyRecurrings function in Space model where comparison operators were pointing the wrong way..
MODIFY
app/Space.php
app/Space.php
@@ -65,7 +65,7 @@ class Space extends Model {
$query = DB::selectOne('
SELECT SUM(amount) as amount
FROM recurrings
- WHERE space_id = :space_id AND YEAR(starts_on) >= :start_year AND MONTH(starts_on) >= :start_month AND ((YEAR(ends_on) <= :end_year AND MONTH(ends_on) <= :end_month) OR ends_on IS NULL)
+ WHERE space_id = :space_id AND YEAR(starts_on) <= :start_year AND MONTH(starts_on) <= :start_month AND ((YEAR(ends_on) >= :end_year AND MONTH(ends_on) >= :end_month) OR ends_on IS NULL)
', ['space_id' => $this->id, 'start_year' => $year, 'start_month' => $month, 'end_year' => $year, 'end_month' => $month]);
return $query->amount;

Fix bug with monthlyRecurrings function in Space model where comparison operators were pointing the wrong way..