Merge pull request #79 from hmatuschek/fixed-parts-stats

Fixed 'Number of parts with price information' statistic.
This commit is contained in:
Jan Böhmer 2020-10-03 13:32:42 +02:00 committed by GitHub
commit e05d707918
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,7 @@ class PartRepository extends NamedDBElementRepository
public function getPartsCountWithPrice(): int
{
$qb = $this->createQueryBuilder('part');
$qb->select('COUNT(part)')
$qb->select('COUNT(DISTINCT part)')
->innerJoin('part.orderdetails', 'orderdetail')
->innerJoin('orderdetail.pricedetails', 'pricedetail')
->where('pricedetail.price > 0.0');