1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-29 09:11:11 +01:00

Fix raggruppamento movimenti composti

This commit is contained in:
loviuz 2020-09-03 09:50:53 +02:00
parent d8914215f3
commit f0f4b273ae

View File

@ -183,7 +183,7 @@ class Articolo extends Model
public function movimentiComposti()
{
return $this->movimenti()
->selectRaw('*, sum(qta) as qta_documento, IFNULL(reference_type, UUID()) as tipo_gruppo')
->selectRaw('*, sum(qta) as qta_documento, IFNULL(reference_type, id) as tipo_gruppo')
->groupBy('tipo_gruppo', 'reference_id');
}