<%@page import="mainapp.User"%>
<%@page import="mainapp.UserInfoHelper"%>
<%@page import="mainapp.FactoryInfoHelper"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@page import="mainapp.Production"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<h3 style="text-decoration:underline; text-align: center;margin-bottom: 22px">Συνολικές Αναφορές ανά Χρήστη</h3>
<table class="info-table">
    <tr>
        <th>Χρήστης</th><th>Όγκος(ελιές kg)</th><th>Λάδι(kg)</th>
        <th>Μέση Οξύτητα</th><th>Σύνολο εισπράξεων(&euro;)</th>
    </tr>
<%
    ArrayList res = Production.getProductionsInfoByUser();
    Iterator i;
    i = res.iterator();
    while (i.hasNext()) {
        UserInfoHelper info = (UserInfoHelper) i.next();
        User u = new User(info.getUserID());
        out.print("<tr><td>"+u.getName()+"</td><td>"+info.getTotalOlivesWeight()
                +"</td><td>"+info.getTotalOilWeight()+"</td><td>"+info.getAverageAcidity()
                +"</td><td>"+info.getIncome()+"</td></tr>");
    }
%>
</table>