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 6ccbd31f
authored
Oct 26, 2012
by
Riku Silvola
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of codecrew.fi:bortal
2 parents
1edd3b9f
5121e6f8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/BillBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/CheckoutFiBean.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/BillBean.java
View file @
6ccbd31
...
...
@@ -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 @
6ccbd31
...
...
@@ -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/LanBortalDatabase/src/fi/insomnia/bortal/model/Bill.java
View file @
6ccbd31
...
...
@@ -411,4 +411,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
;
}
}
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