Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Max Mecklin
/
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 ca8bb0dd
authored
Oct 26, 2012
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
foooood
1 parent
543f6031
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
View file @
ca8bb0d
...
@@ -419,7 +419,7 @@ public class Bill extends GenericEntity {
...
@@ -419,7 +419,7 @@ public class Bill extends GenericEntity {
boolean
ret
=
false
;
boolean
ret
=
false
;
for
(
BillLine
bl
:
billLines
)
for
(
BillLine
bl
:
billLines
)
{
{
if
(
bl
.
getFoodwave
()
!=
null
&&
(
bl
.
getFoodwave
().
getClosed
()
||
bl
.
getFoodwave
().
getTime
().
after
(
Calendar
.
getInstance
())))
if
(
bl
.
getFoodwave
()
!=
null
&&
(
bl
.
getFoodwave
().
getClosed
()
||
bl
.
getFoodwave
().
getTime
().
before
(
Calendar
.
getInstance
())))
{
{
ret
=
true
;
ret
=
true
;
break
;
break
;
...
...
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
View file @
ca8bb0d
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</p:column>
</p:column>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"#{i18n['billLine.eventuser']}"
/>
<h:outputLabel
value=
"#{i18n['billLine.eventuser']}"
/>
</f:facet>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.wholeName}"
>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.wholeName}"
>
<f:param
name=
"userid"
value=
"#{bill_line.bill.user.id}"
/>
<f:param
name=
"userid"
value=
"#{bill_line.bill.user.id}"
/>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</p:column>
</p:column>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"#{i18n['billLine.nick']}"
/>
<h:outputLabel
value=
"#{i18n['billLine.nick']}"
/>
</f:facet>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.nick}"
>
<h:link
outcome=
"/useradmin/edit"
value=
"#{bill_line.bill.user.nick}"
>
<f:param
name=
"userid"
value=
"#{bill_line.bill.user.id}"
/>
<f:param
name=
"userid"
value=
"#{bill_line.bill.user.id}"
/>
...
@@ -79,20 +79,21 @@
...
@@ -79,20 +79,21 @@
</p:column> -->
</p:column> -->
</p:dataTable>
</p:dataTable>
</h:form>
<br
/>
<br
/>
<br
/>
<br
/>
<h1>
<h1>
<h:outputLabel
value=
"#{i18n['foodwave.orders']}"
/>
<h:outputLabel
value=
"#{i18n['foodwave.orders']}"
/>
</h1>
</h1>
<h:form>
<p:dataTable
styleClass=
"bordertable"
value=
"#{foodWaveView.accountEventLines}"
var=
"acc_lines"
>
<p:dataTable
styleClass=
"bordertable"
value=
"#{foodWaveView.accountEventLines}"
var=
"acc_lines"
>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
value=
"#{i18n['foodWave.accountevents']}"
/>
<h:outputLabel
value=
"#{i18n['foodWave.accountevents']}"
/>
</f:facet>
</f:facet>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"${i18n['acc_lines.time']}"
/>
<h:outputLabel
value=
"${i18n['acc_lines.time']}"
/>
</f:facet>
</f:facet>
<h:outputText
value=
"#{acc_line.eventTime.getTime()}"
>
<h:outputText
value=
"#{acc_line.eventTime.getTime()}"
>
<f:convertDateTime
pattern=
"hh:mm d/M/yy"
/>
<f:convertDateTime
pattern=
"hh:mm d/M/yy"
/>
...
@@ -100,19 +101,19 @@
...
@@ -100,19 +101,19 @@
</p:column>
</p:column>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"${i18n['acc_line.quantity']}"
/>
<h:outputLabel
value=
"${i18n['acc_line.quantity']}"
/>
</f:facet>
</f:facet>
<h:outputText
value=
"#{acc_line.quantity}"
/>
<h:outputText
value=
"#{acc_line.quantity}"
/>
</p:column>
</p:column>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"${i18n['acc_line.product']}"
/>
<h:outputLabel
value=
"${i18n['acc_line.product']}"
/>
</f:facet>
</f:facet>
<h:outputText
value=
"#{acc_line.product.name}"
/>
<h:outputText
value=
"#{acc_line.product.name}"
/>
</p:column>
</p:column>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"${i18n['acc_line.eventuser']}"
/>
<h:outputLabel
value=
"${i18n['acc_line.eventuser']}"
/>
</f:facet>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.wholeName}"
>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.wholeName}"
>
<f:param
name=
"userid"
value=
"#{acc_line.user.id}"
/>
<f:param
name=
"userid"
value=
"#{acc_line.user.id}"
/>
...
@@ -120,7 +121,7 @@
...
@@ -120,7 +121,7 @@
</p:column>
</p:column>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"${i18n['acc_line.nick']}"
/>
<h:outputLabel
value=
"${i18n['acc_line.nick']}"
/>
</f:facet>
</f:facet>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.nick}"
>
<h:link
outcome=
"/useradmin/edit"
value=
"#{acc_line.user.nick}"
>
<f:param
name=
"userid"
value=
"#{acc_line.user.id}"
/>
<f:param
name=
"userid"
value=
"#{acc_line.user.id}"
/>
...
@@ -128,7 +129,7 @@
...
@@ -128,7 +129,7 @@
</p:column>
</p:column>
<p:column>
<p:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputLabel
id=
"name"
value=
"${i18n['accountEvent.delivered']}"
/>
<h:outputLabel
value=
"${i18n['accountEvent.delivered']}"
/>
</f:facet>
</f:facet>
<h:outputText
rendered=
"#{acc_line.delivered}"
value=
"#{i18n['accountEvent.delivered']}"
/>
<h:outputText
rendered=
"#{acc_line.delivered}"
value=
"#{i18n['accountEvent.delivered']}"
/>
<h:commandButton
rendered=
"#{not acc_line.delivered}"
value=
"#{i18n['accountEvent.deliver']}"
action=
"#{foodWaveView.deliverAccountEvent}"
/>
<h:commandButton
rendered=
"#{not acc_line.delivered}"
value=
"#{i18n['accountEvent.deliver']}"
action=
"#{foodWaveView.deliverAccountEvent}"
/>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
ca8bb0d
...
@@ -174,10 +174,14 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -174,10 +174,14 @@ public class FoodWaveView extends GenericCDIView {
if
(
permbean
.
hasPermission
(
BillPermission
.
WRITE_ALL
)
&&
getBillLines
().
isRowAvailable
())
{
if
(
permbean
.
hasPermission
(
BillPermission
.
WRITE_ALL
)
&&
getBillLines
().
isRowAvailable
())
{
Bill
b
=
getBillLines
().
getRowData
().
getBill
();
Bill
b
=
getBillLines
().
getRowData
().
getBill
();
b
=
getBillbean
().
markPaid
(
b
,
Calendar
.
getInstance
());
b
=
getBillbean
().
markPaid
(
b
,
Calendar
.
getInstance
());
foodWaveId
=
selectedFoodWave
.
getId
();
selectedFoodWave
=
null
;
initFoodWaveOrderList
();
}
}
return
null
;
return
null
;
}
}
public
String
deliverAccountEvent
()
{
public
String
deliverAccountEvent
()
{
if
(
getAccountEventLines
().
isRowAvailable
())
{
if
(
getAccountEventLines
().
isRowAvailable
())
{
...
@@ -189,8 +193,6 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -189,8 +193,6 @@ public class FoodWaveView extends GenericCDIView {
return
null
;
return
null
;
}
}
public
void
initFoodWaveOrderList
()
{
public
void
initFoodWaveOrderList
()
{
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
)
&&
selectedFoodWave
==
null
)
{
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
)
&&
selectedFoodWave
==
null
)
{
...
@@ -208,7 +210,6 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -208,7 +210,6 @@ public class FoodWaveView extends GenericCDIView {
setBillLines
(
new
ListDataModel
<
BillLine
>(
tmpLines
));
setBillLines
(
new
ListDataModel
<
BillLine
>(
tmpLines
));
setAccountEventLines
(
new
ListDataModel
<
AccountEvent
>(
selectedFoodWave
.
getAccountEvents
()));
setAccountEventLines
(
new
ListDataModel
<
AccountEvent
>(
selectedFoodWave
.
getAccountEvents
()));
super
.
beginConversation
();
super
.
beginConversation
();
...
@@ -295,6 +296,7 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -295,6 +296,7 @@ public class FoodWaveView extends GenericCDIView {
public
void
setAccountEventLines
(
ListDataModel
<
AccountEvent
>
accountEventLines
)
{
public
void
setAccountEventLines
(
ListDataModel
<
AccountEvent
>
accountEventLines
)
{
this
.
accountEventLines
=
accountEventLines
;
this
.
accountEventLines
=
accountEventLines
;
}
}
/*
/*
* public List<BillLine> getUnpaidBills() { return unpaidBills; }
* public List<BillLine> getUnpaidBills() { return unpaidBills; }
*
*
...
...
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