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 e5216936
authored
Oct 27, 2012
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ehdoton ehkä, ehkä confligtoi tuomarin kanssa
1 parent
46de4485
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
23 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
code/LanBortalWeb/WebContent/WEB-INF/web.xml
code/LanBortalWeb/WebContent/foodmanager/listFoodwaves.xhtml
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWave.java
View file @
e521693
...
...
@@ -182,17 +182,12 @@ public class FoodWave extends GenericEntity {
this
.
billLines
=
billLines
;
}
public
int
getReservedCount
()
{
int
retval
=
0
;
if
(
getAccountEvents
()
!=
null
)
{
retval
+=
getAccountEvents
().
size
();
}
if
(
getUnpaidBillLineCount
()
!=
null
)
{
retval
+=
getUnpaidBillLineCount
();
}
public
Integer
getReservedCount
()
{
Integer
retval
=
0
;
retval
+=
getOrderedCount
();
retval
+=
getUnpaidCount
();
return
retval
;
}
...
...
@@ -200,14 +195,30 @@ public class FoodWave extends GenericEntity {
this
.
maximumFoods
=
maximumFoods
;
}
public
Integer
getUnpaid
BillLine
Count
()
{
Integer
i
=
0
;
public
Integer
getUnpaidCount
()
{
Integer
ret
=
0
;
for
(
BillLine
line
:
getBillLines
())
{
if
(!
line
.
getBill
().
isPaid
())
{
++
i
;
ret
+=
line
.
getQuantity
().
intValue
()
;
}
}
return
i
;
return
ret
;
}
public
Integer
getOrderedCount
()
{
Integer
ret
=
0
;
if
(
getAccountEvents
()
!=
null
)
{
for
(
AccountEvent
ae
:
getAccountEvents
())
{
ret
+=
ae
.
getQuantity
().
intValue
();
}
}
return
ret
;
}
}
}
code/LanBortalWeb/WebContent/WEB-INF/web.xml
View file @
e521693
...
...
@@ -9,9 +9,9 @@
</session-config>
<context-param>
<param-name>
javax.faces.PROJECT_STAGE
</param-name>
<
param-value>
Production
</param-value
>
<
!-- <param-value>Production</param-value> --
>
<
!-- <param-value>Development</param-value>--
>
<
param-value>
Development
</param-value
>
</context-param>
<context-param>
...
...
code/LanBortalWeb/WebContent/foodmanager/listFoodwaves.xhtml
View file @
e521693
...
...
@@ -49,13 +49,13 @@
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['foodWave.paid']}"
/>
</f:facet>
<h:outputText
value=
"#{foodwave.
accountEvents.size()
}"
/>
<h:outputText
value=
"#{foodwave.
orderedCount
}"
/>
</p:column>
<p:column
styleClass=
"text-center"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['foodWave.unconfirmedOrders']}"
/>
</f:facet>
<h:outputText
value=
"#{foodwave.unpaid
BillLine
Count}"
/>
<h:outputText
value=
"#{foodwave.unpaidCount}"
/>
</p:column>
<p:column>
<f:facet
name=
"header"
>
...
...
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
View file @
e521693
...
...
@@ -83,11 +83,11 @@
</h:form>
<div>
<h:outputLabel
value=
"#{i18n['foodwave.price']}"
/>
<h:outputText
value=
"#{foodWaveView.food
w
avePrice}"
/>
<h:outputText
value=
"#{foodWaveView.food
W
avePrice}"
/>
</div>
<div>
<h:outputLabel
value=
"#{i18n['foodwave.buyInPrice']}"
/>
<h:outputText
value=
"#{foodWaveView.
foodwaveB
uyInPrice}"
/>
<h:outputText
value=
"#{foodWaveView.
b
uyInPrice}"
/>
</div>
<br></br>
<br></br>
...
...
@@ -173,8 +173,8 @@
<!--
<foodwave:summary foodwaveProductSummaries="#{foodWaveView.productSummaries}" foodwave="#{foodWaveView.selectedFoodWave}"/>
-->
<foodwave:summary
foodwaveProductSummaries=
"#{foodWaveView.productSummaries}"
foodwave=
"#{foodWaveView.selectedFoodWave}"
/>
</ui:define>
...
...
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