Výpočet vyčerpané částky za komisy se nyní počítá z vyfakturované částky

na položce objednávky.
closes #137
Verze_1.0
Josef Rokos 10 years ago
parent a10abe6961
commit 44178c52e6

@ -53,7 +53,7 @@ public class OrderServiceImpl extends AbstractOwnedService<Order> 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();
}

Loading…
Cancel
Save