mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +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
|
public function getPartsCountWithPrice(): int
|
||||||
{
|
{
|
||||||
$qb = $this->createQueryBuilder('part');
|
$qb = $this->createQueryBuilder('part');
|
||||||
$qb->select('COUNT(part)')
|
$qb->select('COUNT(DISTINCT part)')
|
||||||
->innerJoin('part.orderdetails', 'orderdetail')
|
->innerJoin('part.orderdetails', 'orderdetail')
|
||||||
->innerJoin('orderdetail.pricedetails', 'pricedetail')
|
->innerJoin('orderdetail.pricedetails', 'pricedetail')
|
||||||
->where('pricedetail.price > 0.0');
|
->where('pricedetail.price > 0.0');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue