mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Fetch all partLots when loading a parts table, to show correct part amount
This fixes issue #190
This commit is contained in:
parent
984fc9be14
commit
1f6f39172f
1 changed files with 14 additions and 1 deletions
|
@ -343,7 +343,20 @@ final class PartsDataTable implements DataTableTypeInterface
|
||||||
->leftJoin('part.partUnit', 'partUnit')
|
->leftJoin('part.partUnit', 'partUnit')
|
||||||
->leftJoin('part.parameters', 'parameters')
|
->leftJoin('part.parameters', 'parameters')
|
||||||
|
|
||||||
->groupBy('part')
|
//We have to group by all elements, or only the first sub elements of an association is fetched! (caused issue #190)
|
||||||
|
->addGroupBy('part')
|
||||||
|
->addGroupBy('partLots')
|
||||||
|
->addGroupBy('category')
|
||||||
|
->addGroupBy('master_picture_attachment')
|
||||||
|
->addGroupBy('storelocations')
|
||||||
|
->addGroupBy('footprint')
|
||||||
|
->addGroupBy('footprint_attachment')
|
||||||
|
->addGroupBy('manufacturer')
|
||||||
|
->addGroupBy('orderdetails')
|
||||||
|
->addGroupBy('suppliers')
|
||||||
|
->addGroupBy('attachments')
|
||||||
|
->addGroupBy('partUnit')
|
||||||
|
->addGroupBy('parameters');
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue