Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d1d18d22
authored
Oct 26, 2012
by
Riku Silvola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accountevents and stuff are nice
1 parent
0335b31b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
8 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/ProductPBean.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/ProductPBean.java
View file @
d1d18d2
...
...
@@ -86,6 +86,10 @@ public class ProductPBean {
if
(
foodwave
!=
null
)
{
ret
.
setFoodWave
(
foodwave
);
if
(
foodwave
.
getAccountEvents
()
==
null
)
{
foodwave
.
setAccountEvents
(
new
ArrayList
<
AccountEvent
>());
}
foodwave
.
getAccountEvents
().
add
(
ret
);
}
List
<
DiscountInstance
>
accEventdiscounts
=
ret
.
getDiscountInstances
();
...
...
code/LanBortalDatabase/src/fi/insomnia/bortal/model/BillLine.java
View file @
d1d18d2
...
...
@@ -117,6 +117,8 @@ public class BillLine extends GenericEntity {
this
.
setUnitPrice
(
product
.
getPrice
().
abs
());
this
.
setVat
(
product
.
getVat
());
this
.
setFoodwave
(
foodwave
);
}
...
...
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
View file @
d1d18d2
...
...
@@ -6,8 +6,9 @@
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initFoodwaveBillLineList}"
/>
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initFoodwaveAccountEventList}"
/>
<f:viewParam
name=
"foodwaveid"
value=
"#{foodWaveView.foodWaveId}"
required=
"true"
/>
<f:event
type=
"preRenderView"
listener=
"#{foodWaveView.initFoodWaveOrderList}"
/>
<!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
</f:metadata>
<ui:define
name=
"title"
>
...
...
@@ -32,14 +33,14 @@
</f:facet>
<h:link
outcome=
"/foodmanager/listOrders"
value=
"#{foodwave.template.name}"
>
<f:param
name=
"foodwaveid"
value=
"#{
billLine.quantiny
}"
/>
<f:param
name=
"foodwaveid"
value=
"#{
foodWaveView.billLines.rowCount
}"
/>
</h:link>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['billLine.unitprice']}"
/>
</f:facet>
<h:link
outcome=
"/foodmanager/listOrders"
value=
"#{
billLine.unit
price}"
>
<h:link
outcome=
"/foodmanager/listOrders"
value=
"#{
foodWaveView.currentProduct.
price}"
>
<f:param
name=
"foodwaveid"
value=
"#{foodwave.id}"
/>
</h:link>
</h:column>
...
...
@@ -47,18 +48,18 @@
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['foodWave.unconfirmedOrders']}"
/>
</f:facet>
<h:link
outcome=
"/foodmanager/listOrders"
value=
"#{food
wave
.billLines.size()}"
>
<h:link
outcome=
"/foodmanager/listOrders"
value=
"#{food
WaveView
.billLines.size()}"
>
<f:param
name=
"foodwaveid"
value=
"#{foodwave.id}"
/>
</h:link>
</h:column>
</h:column>
<!--
<h:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.totalReserved']}" />
</f:facet>
<h:link
outcome=
"/foodmanager/listOrders"
value=
"#{food
wave.reservedCount
}"
>
<h:link outcome="/foodmanager/listOrders" value="#{food
WaveView.currentProduct.totalreserved
}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
</h:column>
-->
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['foodWave.time']}"
/>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
d1d18d2
...
...
@@ -17,6 +17,8 @@ import fi.insomnia.bortal.beans.EventBeanLocal;
import
fi.insomnia.bortal.beans.FoodWaveBeanLocal
;
import
fi.insomnia.bortal.beans.ProductBeanLocal
;
import
fi.insomnia.bortal.enums.apps.ShopPermission
;
import
fi.insomnia.bortal.model.AccountEvent
;
import
fi.insomnia.bortal.model.BillLine
;
import
fi.insomnia.bortal.model.FoodWave
;
import
fi.insomnia.bortal.model.FoodWaveTemplate
;
import
fi.insomnia.bortal.model.Product
;
...
...
@@ -50,6 +52,10 @@ public class FoodWaveView extends GenericCDIView {
private
Date
startDate
;
private
Product
currentProduct
;
private
ListDataModel
<
BillLine
>
billLines
;
private
Integer
foodWaveId
;
private
ListDataModel
<
AccountEvent
>
accountEventLines
;
public
List
<
Product
>
getProducts
()
{
...
...
@@ -132,6 +138,18 @@ public class FoodWaveView extends GenericCDIView {
public
void
initFoodwaveManagerList
()
{
this
.
foodWaves
=
new
ListDataModel
<
FoodWave
>(
foodWaveBean
.
getEventFoodWaves
());
}
public
void
initFoodWaveOrderList
()
{
if
(
foodWaveId
!=
null
)
{
setSelectedFoodWave
(
foodWaveBean
.
findFoodwave
(
foodWaveId
));
this
.
setBillLines
(
new
ListDataModel
<
BillLine
>(
selectedFoodWave
.
getBillLines
()));
this
.
accountEventLines
=
new
ListDataModel
<
AccountEvent
>(
selectedFoodWave
.
getAccountEvents
());
super
.
beginConversation
();
}
}
public
String
editTemplate
()
{
setTemplate
(
getTemplates
().
getRowData
());
...
...
@@ -219,4 +237,20 @@ public class FoodWaveView extends GenericCDIView {
public
void
setStartDate
(
Date
startDate
)
{
this
.
startDate
=
startDate
;
}
public
Integer
getFoodWaveId
()
{
return
foodWaveId
;
}
public
void
setFoodWaveId
(
Integer
foodWaveId
)
{
this
.
foodWaveId
=
foodWaveId
;
}
public
ListDataModel
<
BillLine
>
getBillLines
()
{
return
billLines
;
}
public
void
setBillLines
(
ListDataModel
<
BillLine
>
billLines
)
{
this
.
billLines
=
billLines
;
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment