Commit 5121e6f8 by Tuomas Riihimäki

Merge branch 'master' of codecrew.fi:bortal

2 parents 7b399077 ab9d6a3c
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Calendar; import java.util.Calendar;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.ArrayList;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -52,6 +54,9 @@ public class FoodWave extends GenericEntity { ...@@ -52,6 +54,9 @@ public class FoodWave extends GenericEntity {
@OneToMany(mappedBy = "foodwave") @OneToMany(mappedBy = "foodwave")
private List<BillLine> billLines; private List<BillLine> billLines;
@OneToMany(mappedBy = "foodwave")
private List<BillLine> unpaidBills;
@ManyToOne @ManyToOne
@JoinColumn(name = "template_id", referencedColumnName = "id", nullable = false) @JoinColumn(name = "template_id", referencedColumnName = "id", nullable = false)
...@@ -175,4 +180,12 @@ public class FoodWave extends GenericEntity { ...@@ -175,4 +180,12 @@ public class FoodWave extends GenericEntity {
this.maximumFoods = maximumFoods; this.maximumFoods = maximumFoods;
} }
public List<BillLine> getUnpaidBills() {
return unpaidBills;
}
public void setUnpaidBills(List<BillLine> unpaidBills) {
this.unpaidBills = unpaidBills;
}
} }
...@@ -25,66 +25,90 @@ ...@@ -25,66 +25,90 @@
</ui:define> </ui:define>
<ui:define name="content"> <ui:define name="content">
<h1> <p:dataTable styleClass="bordertable"
<h:outputLabel id="name" value="${i18n['foodWave.billLines']}" /> value="#{foodWaveView.unpaidBills}" var="bill_line">
</h1> <f:facet name="header">
<p:dataTable ${i18n['foodWave.billLines']}
styleClass="bordertable" value="#{foodWaveView.foodWaves.billLines}" </f:facet>
var="foodwave" >
<p:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputLabel id="name" value="${i18n['billLine.name']}" /> <h:outputLabel id="name" value="${i18n['billLine.time']}" />
</f:facet> </f:facet>
<h:outputText value="#{bill_line.bill.sentDate.getTime()}">
<h:link outcome="/foodmanager/listOrders" value="#{foodwave.billLines.name}"> <f:convertDateTime pattern="hh:mm d/M/yy" />
<f:param name="foodwaveid" value="#{foodwave.id}" /> </h:outputText>
</h:link>
</p:column> </p:column>
<p:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['billLine.quantity']}" /> <h:outputLabel id="name" value="${i18n['billLine.quantity']}" />
</f:facet> </f:facet>
<h:link outcome="/foodmanager/listOrders" <h:outputText value="#{bill_line.quantity}" />
value="#{foodwave.billLines.rowCount}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</p:column> </p:column>
<p:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['billLine.unitprice']}" /> <h:outputLabel id="name" value="${i18n['billLine.product']}" />
</f:facet> </f:facet>
<h:link outcome="/foodmanager/listOrders" <h:outputText value="#{bill_line.name}" />
value="#{foodwave.currentProduct.price}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</p:column> </p:column>
<p:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['foodWave.unconfirmedOrders']}" /> <h:outputLabel id="name" value="${i18n['billLine.eventuser']}" />
</f:facet> </f:facet>
<h:link outcome="/foodmanager/listOrders" <h:link outcome="/useradmin/edit"
value="#{foodwave.billLines.rowCount}"> value="#{bill_line.bill.user.wholeName}">
<f:param name="foodwaveid" value="#{foodwave.id}" /> <f:param name="userid" value="#{bill_line.bill.user.id}" />
</h:link> </h:link>
</p:column> </p:column>
<!--
<p:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['foodWave.totalReserved']}" /> <h:outputLabel id="name" value="${i18n['billLine.price']}" />
</f:facet> </f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodWaveView.currentProduct.totalreserved}"> <h:outputText value="#{bill_line.linePrice}" />
<f:param name="foodwaveid" value="#{foodwave.id}" /> </p:column>
</h:link> </p:dataTable>
</p:column> --> <br/>
<br/>
<p:dataTable styleClass="bordertable"
value="#{foodWaveView.accountEventLines}" var="acc_lines">
<f:facet name="header">
${i18n['foodWave.accountevents']}
</f:facet>
<p:column>
<f:facet name="header">
<h:outputLabel id="name" value="${i18n['acc_lines.time']}" />
</f:facet>
<h:outputText value="#{acc_line.eventTime.getTime()}">
<f:convertDateTime pattern="hh:mm d/M/yy" />
</h:outputText>
</p:column>
<p:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['foodWave.time']}" /> <h:outputLabel id="name" value="${i18n['acc_line.quantity']}" />
</f:facet> </f:facet>
<h:link outcome="/foodmanager/listOrders" <h:outputText value="#{acc_line.quantity}" />
value="#{foodwave.billLine}"> </p:column>
<f:param name="foodwaveid" value="#{foodwave.id}" /> <p:column>
<f:facet name="header">
<h:outputLabel id="name" value="${i18n['acc_line.product']}" />
</f:facet>
<h:outputText value="#{acc_line.product}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputLabel id="name" value="${i18n['acc_line.eventuser']}" />
</f:facet>
<h:link outcome="/useradmin/edit"
value="#{acc_line.user.wholeName}">
<f:param name="userid" value="#{acc_line.user.id}" />
</h:link> </h:link>
</p:column> </p:column>
<p:column>
<f:facet name="header">
<h:outputLabel id="name" value="${i18n['acc_line.price']}" />
</f:facet>
<h:outputText value="#{acc_line.total}" />
</p:column>
</p:dataTable> </p:dataTable>
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
xmlns:f="http://java.sun.com/jsf/core" xmlns:f="http://java.sun.com/jsf/core"
xmlns:foodwave="http://java.sun.com/jsf/composite/cditools/foodwave" xmlns:foodwave="http://java.sun.com/jsf/composite/cditools/foodwave"
xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:c="http://java.sun.com/jsp/jstl/core"> xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui">
<h:body> <h:body>
<ui:composition <ui:composition
template="/layout/#{sessionHandler.layout}/template.xhtml"> template="/layout/#{sessionHandler.layout}/template.xhtml">
...@@ -22,10 +23,10 @@ ...@@ -22,10 +23,10 @@
</ui:define> </ui:define>
<ui:define name="content"> <ui:define name="content">
<h:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign" <p:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign"
styleClass="bordertable" value="#{foodWaveView.foodWaves}" styleClass="bordertable" value="#{foodWaveView.foodWaves}"
var="foodwave"> var="foodwave">
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputLabel id="name" value="${i18n['foodWave.name']}" /> <h:outputLabel id="name" value="${i18n['foodWave.name']}" />
</f:facet> </f:facet>
...@@ -33,33 +34,33 @@ ...@@ -33,33 +34,33 @@
<h:link outcome="/foodwave/listProducts" value="#{foodwave.name}"> <h:link outcome="/foodwave/listProducts" value="#{foodwave.name}">
<f:param name="foodwaveid" value="#{foodwave.id}" /> <f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link> </h:link>
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['foodWave.templatename']}" /> <h:outputText value="Menu" />
</f:facet> </f:facet>
<h:link outcome="/foodwave/listProducts" <h:outputText
value="#{foodwave.template.name}"> value="#{foodwave.template.name}">
<f:param name="foodwaveid" value="#{foodwave.id}" /> <f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link> </h:outputText>
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['foodWave.description']}" /> <h:outputText value="${i18n['foodWave.description']}" />
</f:facet> </f:facet>
<h:outputText id="description" <h:outputText id="description"
value="#{foodwave.template.description}" /> value="#{foodwave.template.description}" />
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['foodWave.time']}" /> <h:outputText value="${i18n['foodWave.time']}" />
</f:facet> </f:facet>
<h:link outcome="/foodwave/listProducts" <h:outputText
value="#{foodwave.time.time}"> value="#{foodwave.time.time}">
<f:param name="foodwaveid" value="#{foodwave.id}" /> <f:convertDateTime pattern="hh:mm d/M/yy" />
</h:link> </h:outputText>
</h:column> </p:column>
</h:dataTable> </p:dataTable>
</ui:define> </ui:define>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</f:metadata> </f:metadata>
<ui:define name="title"> <ui:define name="title">
<h1>#{i18n['user.shop.title']}</h1> <h1>#{i18n['user.food.title']}</h1>
</ui:define> </ui:define>
<ui:define name="content"> <ui:define name="content">
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
xmlns:composite="http://java.sun.com/jsf/composite" xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools"> xmlns:tools="http://java.sun.com/jsf/composite/tools"
xmlns:p="http://primefaces.org/ui">
<composite:interface> <composite:interface>
...@@ -24,48 +25,48 @@ ...@@ -24,48 +25,48 @@
<h:form> <h:form>
<h:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign" <p:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign"
styleClass="bordertable" value="#{cc.attrs.items}" var="cart"> styleClass="bordertable" value="#{cc.attrs.items}" var="cart">
<!-- h:column> <!-- p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputLabel id="name" value="${i18n['product.name']}" /> <h:outputLabel id="name" value="${i18n['product.name']}" />
</f:facet> </f:facet>
<h:commandLink action="#{cc.attrs.selectaction}" value="#{cart.product.name}" /> <h:commandLink action="#{cc.attrs.selectaction}" value="#{cart.product.name}" />
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['product.price']}" /> <h:outputText value="${i18n['product.price']}" />
</f:facet> </f:facet>
<h:commandLink action="#{cc.attrs.selectaction}" id="template_name" value="#{cart.product.price}" /> <h:commandLink action="#{cc.attrs.selectaction}" id="template_name" value="#{cart.product.price}" />
</h:column> </p:column>
<h:commandButton action="#{cc.attrs.selectaction}" <h:commandButton action="#{cc.attrs.selectaction}"
id="selectbutton-botton" value="Valitte" /--> id="selectbutton-botton" value="Valitte" /-->
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText id="name" value="${i18n['product.name']}" /> <h:outputText id="name" value="${i18n['product.name']}" />
</f:facet> </f:facet>
<h:outputText value="#{cart.product.name}" /> <h:outputText value="#{cart.product.name}" />
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['product.price']}" /> <h:outputText value="${i18n['product.price']}" />
</f:facet> </f:facet>
<h:outputText id="price" value="#{cart.product.price.abs()}"> <h:outputText id="price" value="#{cart.product.price.abs()}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" /> <f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText> </h:outputText>
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['product.totalPrice']}" /> <h:outputText value="${i18n['product.totalPrice']}" />
</f:facet> </f:facet>
<h:outputText id="total" value="#{cart.price}"> <h:outputText id="total" value="#{cart.price}">
<f:convertNumber maxFractionDigits="2" minFractionDigits="2" /> <f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
</h:outputText> </h:outputText>
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText id="count" value="${i18n['product.cart.count']}" /> <h:outputText id="count" value="${i18n['product.cart.count']}" />
</f:facet> </f:facet>
...@@ -81,9 +82,9 @@ ...@@ -81,9 +82,9 @@
value="#{i18n['productshop.plusOne']}"> value="#{i18n['productshop.plusOne']}">
<f:ajax render="@form" /> <f:ajax render="@form" />
</h:commandButton> </h:commandButton>
</h:column> </p:column>
</h:dataTable> </p:dataTable>
<h:commandButton action="#{foodWaveFoodView.buyFromCounter}" value="#{i18n['foodshop.buyFromCounter']}" > <h:commandButton action="#{foodWaveFoodView.buyFromCounter}" value="#{i18n['foodshop.buyFromCounter']}" >
......
<?xml version='1.0' encoding='UTF-8' ?> <?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite" <html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools"> xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools"
xmlns:p="http://primefaces.org/ui">
<composite:interface> <composite:interface>
...@@ -16,23 +22,31 @@ ...@@ -16,23 +22,31 @@
<h:outputScript library="primefaces" name="jquery/jquery.js" /> <h:outputScript library="primefaces" name="jquery/jquery.js" />
<h:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign" styleClass="bordertable" id="billcart" value="#{cc.attrs.items}" var="template"> <p:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign"
<h:column> styleClass="bordertable" id="billcart" value="#{cc.attrs.items}"
var="template">
<p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText id="name" value="${i18n['foodWave.name']}" /> <h:outputText id="name" value="Menu" />
</f:facet> </f:facet>
<h:link outcome="#{cc.attrs.outcome}" value="#{template.name}"> <h:link outcome="#{cc.attrs.outcome}" value="#{template.name}">
<f:param name="templateid" value="#{template.id}" /> <f:param name="templateid" value="#{template.id}" />
</h:link> </h:link>
</h:column> </p:column>
<h:column> <p:column>
<f:facet name="header"> <f:facet name="header">
<h:outputText value="${i18n['foodWave.description']}" /> <h:outputText value="${i18n['foodWave.description']}" />
</f:facet> </f:facet>
<h:outputText id="description" value="#{template.description}" /> <h:outputText id="description" value="#{template.description}" />
</h:column> </p:column>
<p:column size="20px">
<f:facet name="header">
<h:outputText value="${i18n['foodWave.template.waves']}" />
</f:facet>
<h:outputText id="nowaves" value="#{template.foodwaves.size()}" />
</p:column>
</h:dataTable> </p:dataTable>
</composite:implementation> </composite:implementation>
......
...@@ -117,7 +117,7 @@ public class HostnameFilter implements Filter { ...@@ -117,7 +117,7 @@ public class HostnameFilter implements Filter {
{ {
sessionmgmt.updateSessionUser(httpRequest.getSession().getId(), httpRequest.getUserPrincipal().getName()); sessionmgmt.updateSessionUser(httpRequest.getSession().getId(), httpRequest.getUserPrincipal().getName());
} }
if (trail.size() == 10) { while (trail.size() >= 10) {
trail.remove(); trail.remove();
} }
if (!httpRequest.getRequestURI().matches(".*(resource).*")) { if (!httpRequest.getRequestURI().matches(".*(resource).*")) {
......
...@@ -136,4 +136,4 @@ resetMail.username = Username ...@@ -136,4 +136,4 @@ resetMail.username = Username
resetmailSent.body = Email has been sent containing a link where you can change the password. resetmailSent.body = Email has been sent containing a link where you can change the password.
resetmailSent.header = Email sent resetmailSent.header = Email sent
user.unauthenticated = Kirjautumaton user.unauthenticated = Kirjautumaton
...@@ -189,6 +189,7 @@ foodWave.orders = Amount of Orders ...@@ -189,6 +189,7 @@ foodWave.orders = Amount of Orders
foodWave.paid = Paid foodWave.paid = Paid
foodWave.show = Show foodWave.show = Show
foodWave.template.name = Template foodWave.template.name = Template
foodWave.templatename = Choose Products
foodWave.time = Time foodWave.time = Time
foodWave.totalReserved = Total foodWave.totalReserved = Total
foodWave.unconfirmedOrders = Unconfirmed foodWave.unconfirmedOrders = Unconfirmed
...@@ -690,6 +691,8 @@ user.edit = Edit ...@@ -690,6 +691,8 @@ user.edit = Edit
user.edit.title = My information user.edit.title = My information
user.email = Email user.email = Email
user.firstNames = Firstname user.firstNames = Firstname
user.food.title = Choose Menu
user.foodwavelist.title = Choose Foodwave
user.hasImage = Image user.hasImage = Image
user.image = Image user.image = Image
user.imagelist = Saved images user.imagelist = Saved images
......
...@@ -187,6 +187,7 @@ foodWave.orders = Tilausten M\u00E4\u00E4r\u00E4 ...@@ -187,6 +187,7 @@ foodWave.orders = Tilausten M\u00E4\u00E4r\u00E4
foodWave.paid = Maksettuja foodWave.paid = Maksettuja
foodWave.show = N\u00E4yt\u00E4 foodWave.show = N\u00E4yt\u00E4
foodWave.template.name = Template foodWave.template.name = Template
foodWave.templatename = Valitse tuotteet
foodWave.time = Aika foodWave.time = Aika
foodWave.totalReserved = Yhteens\u00E4 foodWave.totalReserved = Yhteens\u00E4
foodWave.unconfirmedOrders = Vahvistamattomia foodWave.unconfirmedOrders = Vahvistamattomia
...@@ -673,6 +674,8 @@ user.edit = Muokkaa ...@@ -673,6 +674,8 @@ user.edit = Muokkaa
user.edit.title = Omat tiedot user.edit.title = Omat tiedot
user.email = S\u00E4hk\u00F6posti user.email = S\u00E4hk\u00F6posti
user.firstNames = Etunimi user.firstNames = Etunimi
user.food.title = Valitse Menu
user.foodwavelist.title = Valitse Ruokatilaus
user.hasImage = Kuva user.hasImage = Kuva
user.imageUploaded = Kuva l\u00E4hetetty. user.imageUploaded = Kuva l\u00E4hetetty.
user.imagelist = Tallennetut kuvat user.imagelist = Tallennetut kuvat
......
...@@ -3,6 +3,7 @@ package fi.insomnia.bortal.web.cdiview.shop; ...@@ -3,6 +3,7 @@ package fi.insomnia.bortal.web.cdiview.shop;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.TreeSet; import java.util.TreeSet;
...@@ -48,6 +49,7 @@ public class FoodWaveView extends GenericCDIView { ...@@ -48,6 +49,7 @@ public class FoodWaveView extends GenericCDIView {
private Product currentProduct; private Product currentProduct;
private ListDataModel<BillLine> billLines; private ListDataModel<BillLine> billLines;
private List<BillLine> unpaidBills;
private Integer foodWaveId; private Integer foodWaveId;
private ListDataModel<AccountEvent> accountEventLines; private ListDataModel<AccountEvent> accountEventLines;
...@@ -56,7 +58,7 @@ public class FoodWaveView extends GenericCDIView { ...@@ -56,7 +58,7 @@ public class FoodWaveView extends GenericCDIView {
public List<Product> getProducts() { public List<Product> getProducts() {
return productbeanlocal.getProducts(); return productbeanlocal.getProducts();
} }
public void onEdit() { public void onEdit() {
this.foodWaveBean.saveTemplate(template); this.foodWaveBean.saveTemplate(template);
} }
...@@ -80,7 +82,7 @@ public class FoodWaveView extends GenericCDIView { ...@@ -80,7 +82,7 @@ public class FoodWaveView extends GenericCDIView {
foodWaveBean.createFoodWave(selectedFoodWave); foodWaveBean.createFoodWave(selectedFoodWave);
initFoodwaveManagerList(); initFoodwaveManagerList();
return "/foodmanager/listFoodwaves"; return "/foodmanager/listFoodwaves";
} }
...@@ -106,7 +108,7 @@ public class FoodWaveView extends GenericCDIView { ...@@ -106,7 +108,7 @@ public class FoodWaveView extends GenericCDIView {
template = foodWaveBean.findTemplate(templateId); template = foodWaveBean.findTemplate(templateId);
createNewProductSkeleton(); createNewProductSkeleton();
// prepare to make new foodwaves // prepare to make new foodwaves
selectedFoodWave = new FoodWave(); selectedFoodWave = new FoodWave();
selectedFoodWave.setTemplate(template); selectedFoodWave.setTemplate(template);
...@@ -165,8 +167,16 @@ public class FoodWaveView extends GenericCDIView { ...@@ -165,8 +167,16 @@ public class FoodWaveView extends GenericCDIView {
selectedFoodWave = foodWaveBean.findFoodwave(foodWaveId); selectedFoodWave = foodWaveBean.findFoodwave(foodWaveId);
billLines = new ListDataModel<BillLine>(selectedFoodWave.getBillLines()); billLines = new ListDataModel<BillLine>(selectedFoodWave.getBillLines());
this.accountEventLines = new ListDataModel<AccountEvent>(selectedFoodWave.getAccountEvents());
this.setAccountEventLines(new ListDataModel<AccountEvent>(selectedFoodWave.getAccountEvents()));
setUnpaidBills(new ArrayList<BillLine>());
Iterator<BillLine> biterator = billLines.iterator();
while (biterator.hasNext()) {
BillLine unpaidBill = biterator.next();
if (unpaidBill.getBill().isPaid())
this.getUnpaidBills().add(unpaidBill);
}
super.beginConversation(); super.beginConversation();
} }
...@@ -244,4 +254,20 @@ public class FoodWaveView extends GenericCDIView { ...@@ -244,4 +254,20 @@ public class FoodWaveView extends GenericCDIView {
return foodWaves; return foodWaves;
} }
public ListDataModel<AccountEvent> getAccountEventLines() {
return accountEventLines;
}
public void setAccountEventLines(ListDataModel<AccountEvent> accountEventLines) {
this.accountEventLines = accountEventLines;
}
public List<BillLine> getUnpaidBills() {
return unpaidBills;
}
public void setUnpaidBills(List<BillLine> unpaidBills) {
this.unpaidBills = unpaidBills;
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!