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 87d8f64c
authored
Oct 26, 2012
by
Tuukka Kivilahti, TKffTK
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of codecrew.fi:bortal
2 parents
af57bbd5
6ccbd31f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
9 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/BillBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/CheckoutFiBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/MenuBean.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
code/LanBortalWeb/WebContent/foodwave/ThanksForOrderingFromCounter.xhtml
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listFoods.xhtml
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listTemplates.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/BillBean.java
View file @
87d8f64
...
...
@@ -205,6 +205,12 @@ public class BillBean implements BillBeanLocal {
if
(
bill
.
getAccountEvent
()
!=
null
||
bill
.
getPaidDate
()
!=
null
)
{
throw
new
EJBException
(
"Bill already marked paid!"
);
}
if
(
bill
.
isFoowavePaymentOver
())
{
throw
new
EJBException
(
"Trying to mark paid a closed or left foodwave"
);
}
bill
=
billFacade
.
reload
(
bill
);
Product
creditproduct
=
productBean
.
findCreditProduct
();
...
...
@@ -222,7 +228,7 @@ public class BillBean implements BillBeanLocal {
bill
.
setPaidDate
(
when
.
getTime
());
// bill = billFacade.merge(bill);
boolean
checked
=
false
;
for
(
BillLine
bl
:
bill
.
getBillLines
())
{
Product
prod
=
bl
.
getLineProduct
();
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/CheckoutFiBean.java
View file @
87d8f64
...
...
@@ -107,6 +107,11 @@ public class CheckoutFiBean implements CheckoutFiBeanLocal {
@RolesAllowed
(
BillPermission
.
S_CREATE_VERKKOMAKSU
)
public
List
<
CheckoutBank
>
getToken
(
Bill
bill
)
{
if
(
bill
.
isFoowavePaymentOver
())
{
return
null
;
}
final
LanEventPrivateProperty
expire
=
eventbean
.
getPrivateProperty
(
LanEventPrivatePropertyKey
.
CHECKOUT_FI_KEY_EXPIRE
);
final
String
merchantid
=
eventbean
.
getPrivatePropertyString
(
LanEventPrivatePropertyKey
.
CHECKOUT_FI_MERCHANT_ID
);
final
String
merchantPassword
=
eventbean
.
getPrivatePropertyString
(
LanEventPrivatePropertyKey
.
CHECKOUT_FI_MERCHANT_PASSWORD
);
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/MenuBean.java
View file @
87d8f64
...
...
@@ -116,7 +116,7 @@ public class MenuBean implements MenuBeanLocal {
MenuNavigation
foodwaveTopmenu
=
usernavi
.
addPage
(
null
,
null
);
foodwaveTopmenu
.
setKey
(
"topnavi.foodwave"
);
foodwaveTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/list"
),
ShopPermission
.
SHOP_FOODWAVE
);
foodwaveTopmenu
.
addPage
(
menuitemfacade
.
findOrCreate
(
"/foodwave/list
Templates
"
),
ShopPermission
.
SHOP_FOODWAVE
);
MenuNavigation
pollTopmenu
=
usernavi
.
addPage
(
null
,
null
);
pollTopmenu
.
setKey
(
"topnavi.poll"
);
...
...
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
View file @
87d8f64
...
...
@@ -132,7 +132,7 @@ public class Bill extends GenericEntity {
@ManyToOne
(
optional
=
false
)
@JoinColumn
(
updatable
=
false
,
name
=
"eventuser_id"
)
private
EventUser
user
;
@SuppressWarnings
(
"unused"
)
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Bill
.
class
);
...
...
@@ -342,7 +342,7 @@ public class Bill extends GenericEntity {
public
void
addProduct
(
Product
product
,
BigDecimal
count
)
{
this
.
addProduct
(
product
,
count
,
null
);
}
public
void
addProduct
(
Product
product
,
BigDecimal
count
,
FoodWave
foodwave
)
{
// If bill number > 0 bill has been sent and extra privileges are needed
// to modify.
...
...
@@ -415,4 +415,16 @@ public class Bill extends GenericEntity {
this
.
sentDate
=
sentDate
;
}
public
boolean
isFoowavePaymentOver
()
{
boolean
ret
=
false
;
for
(
BillLine
bl
:
billLines
)
{
if
(
bl
.
getFoodwave
()
!=
null
&&
(
bl
.
getFoodwave
().
getClosed
()
||
bl
.
getFoodwave
().
getTime
().
after
(
Calendar
.
getInstance
())))
{
ret
=
true
;
break
;
}
}
return
ret
;
}
}
code/LanBortalWeb/WebContent/foodwave/ThanksForOrderingFromCounter.xhtml
View file @
87d8f64
...
...
@@ -23,8 +23,7 @@
<ui:define
name=
"content"
>
Kiitoksia tilauksesta, muista käydä maksamassa tilaukset tiskillä.
Maksamattomia tilauksia ei pistetä etiäpäin.
Maksamattomia tilauksia ei pistetä eteenpäin.
</ui:define>
...
...
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listFoods.xhtml
View file @
87d8f64
...
...
@@ -66,7 +66,7 @@
<f:convertNumber
maxFractionDigits=
"2"
minFractionDigits=
"2"
/>
</h:outputText>
</p:column>
<p:column>
<p:column
style=
"text-align: center;"
>
<f:facet
name=
"header"
>
<h:outputText
id=
"count"
value=
"${i18n['product.cart.count']}"
/>
</f:facet>
...
...
code/LanBortalWeb/WebContent/resources/cditools/foodwave/listTemplates.xhtml
View file @
87d8f64
...
...
@@ -39,7 +39,7 @@
</f:facet>
<h:outputText
id=
"description"
value=
"#{template.description}"
/>
</p:column>
<p:column
s
ize=
"20px
"
>
<p:column
s
tyle=
"width:20px;text-align:center;
"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"${i18n['foodWave.template.waves']}"
/>
</f:facet>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n.properties
View file @
87d8f64
...
...
@@ -136,4 +136,4 @@ resetMail.username = Username
resetmailSent.body
=
Email has been sent containing a link where you can change the password.
resetmailSent.header
=
Email sent
user.unauthenticated
=
Kirjautumaton
user.unauthenticated
=
Kirjautumaton
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
View file @
87d8f64
...
...
@@ -189,6 +189,7 @@ foodWave.orders = Amount of Orders
foodWave.paid
=
Paid
foodWave.show
=
Show
foodWave.template.name
=
Template
foodWave.template.waves
=
Foodwaves
foodWave.templatename
=
Choose Products
foodWave.time
=
Time
foodWave.totalReserved
=
Total
...
...
@@ -692,6 +693,7 @@ user.edit.title = My information
user.email
=
Email
user.firstNames
=
Firstname
user.food.title
=
Choose Menu
user.foodwave.products.title
=
Choose Products
user.foodwavelist.title
=
Choose Foodwave
user.hasImage
=
Image
user.image
=
Image
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
View file @
87d8f64
...
...
@@ -187,6 +187,7 @@ foodWave.orders = Tilausten M\u00E4\u00E4r\u00E4
foodWave.paid
=
Maksettuja
foodWave.show
=
N
\u
00E4yt
\u
00E4
foodWave.template.name
=
Template
foodWave.template.waves
=
Foodwaves
foodWave.templatename
=
Valitse tuotteet
foodWave.time
=
Aika
foodWave.totalReserved
=
Yhteens
\u
00E4
...
...
@@ -675,6 +676,7 @@ user.edit.title = Omat tiedot
user.email
=
S
\u
00E4hk
\u
00F6posti
user.firstNames
=
Etunimi
user.food.title
=
Valitse Menu
user.foodwave.products.title
=
Valitse tuotteet
user.foodwavelist.title
=
Valitse Ruokatilaus
user.hasImage
=
Kuva
user.imageUploaded
=
Kuva l
\u
00E4hetetty.
...
...
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