new Field("STOCKSECURITY", Datas.DOUBLE, Formats.DOUBLE),
new Field("STOCKMAXIMUM", Datas.DOUBLE, Formats.DOUBLE),
new Field("UNITS", Datas.DOUBLE, Formats.DOUBLE)
);
lpr = new ListProviderCreator(new PreparedSentence(app.getSession(),
"SELECT L.ID, P.ID, P.REFERENCE, P.NAME," +
"L.STOCKSECURITY, L.STOCKMAXIMUM, COALESCE(S.SUMUNITS, 0) " +
"FROM PRODUCTS P " +
"LEFT OUTER JOIN (SELECT ID, PRODUCT, LOCATION, STOCKSECURITY, STOCKMAXIMUM FROM STOCKLEVEL WHERE LOCATION = ?) L ON P.ID = L.PRODUCT " +
"LEFT OUTER JOIN (SELECT PRODUCT, SUM(UNITS) AS SUMUNITS FROM STOCKCURRENT WHERE LOCATION = ? GROUP BY PRODUCT) S ON P.ID = S.PRODUCT " +