From 44178c52e6cbaa53245daf274b97e11600056f4e Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Thu, 16 Oct 2014 08:54:32 +0200 Subject: [PATCH] =?UTF-8?q?V=C3=BDpo=C4=8Det=20vy=C4=8Derpan=C3=A9=20?= =?UTF-8?q?=C4=8D=C3=A1stky=20za=20komisy=20se=20nyn=C3=AD=20po=C4=8D?= =?UTF-8?q?=C3=ADt=C3=A1=20z=20vyfakturovan=C3=A9=20=C4=8D=C3=A1stky=20na?= =?UTF-8?q?=20polo=C5=BEce=20objedn=C3=A1vky.=20closes=20#137?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../info/bukova/isspst/services/approved/OrderServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/info/bukova/isspst/services/approved/OrderServiceImpl.java b/src/main/java/info/bukova/isspst/services/approved/OrderServiceImpl.java index 86f2fa13..bb3113aa 100644 --- a/src/main/java/info/bukova/isspst/services/approved/OrderServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/approved/OrderServiceImpl.java @@ -53,7 +53,7 @@ public class OrderServiceImpl extends AbstractOwnedService implements @Override @Transactional public BigDecimal totalOrderedForWorkgroup(Workgroup workgroup) { - Query q = dao.getQuery("select sum(oi.total) from OrderItem oi join oi.reqItem ri join ri.requirement rq join rq.workgroup w where ri.delivered = true and w = :workgroup"); + Query q = dao.getQuery("select sum(oi.totalInvoice) from OrderItem oi join oi.reqItem ri join ri.requirement rq join rq.workgroup w where (ri.orderNum is not null or ri.orderNum = '') and w = :workgroup "); q.setParameter("workgroup", workgroup); return (BigDecimal)q.uniqueResult(); }