mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 09:18:24 +00:00 
			
		
		
		
	Fix issue with duration aggregator as month
This commit is contained in:
		| @@ -38,7 +38,7 @@ final readonly class DurationAggregator implements AggregatorInterface | ||||
|         match ($data['precision']) { | ||||
|             'day' => $qb->addSelect('(COALESCE(acp.closingDate, :now) - acp.openingDate)  AS duration_aggregator'), | ||||
|             'week' => $qb->addSelect('(COALESCE(acp.closingDate, :now) - acp.openingDate) / 7  AS duration_aggregator'), | ||||
|             'month' => $qb->addSelect('(EXTRACT (MONTH FROM AGE(COALESCE(acp.closingDate, :now), acp.openingDate)) * 12 + | ||||
|             'month' => $qb->addSelect('(EXTRACT (YEAR FROM AGE(COALESCE(acp.closingDate, :now), acp.openingDate)) * 12 + | ||||
|                     EXTRACT (MONTH FROM AGE(COALESCE(acp.closingDate, :now), acp.openingDate))) AS duration_aggregator'), | ||||
|             default => throw new \LogicException('precision not supported: '.$data['precision']), | ||||
|         }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user