mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Merge pull request #79 from hmatuschek/fixed-parts-stats
Fixed 'Number of parts with price information' statistic.
This commit is contained in:
commit
e05d707918
1 changed files with 1 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue