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 6f12b1bb
authored
Oct 26, 2012
by
Tuukka Kivilahti, TKffTK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
we need this
1 parent
1700c652
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
code/LanBortalWeb/src/fi/insomnia/bortal/web/helpers/FoodwaveProductSummary.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/helpers/FoodwaveProductSummary.java
0 → 100644
View file @
6f12b1b
package
fi
.
insomnia
.
bortal
.
web
.
helpers
;
import
java.math.BigDecimal
;
import
fi.insomnia.bortal.model.AccountEvent
;
import
fi.insomnia.bortal.model.Product
;
public
class
FoodwaveProductSummary
{
private
Product
product
;
private
BigDecimal
count
;
private
BigDecimal
summaryPrice
;
public
FoodwaveProductSummary
(
Product
product
,
BigDecimal
count
,
BigDecimal
summaryPrice
)
{
setProduct
(
product
);
setCount
(
count
);
setSummaryPrice
(
summaryPrice
);
}
public
Product
getProduct
()
{
return
product
;
}
public
void
setProduct
(
Product
product
)
{
this
.
product
=
product
;
}
public
BigDecimal
getCount
()
{
return
count
;
}
public
void
setCount
(
BigDecimal
count
)
{
this
.
count
=
count
;
}
public
BigDecimal
getSummaryPrice
()
{
return
summaryPrice
;
}
public
void
setSummaryPrice
(
BigDecimal
summaryPrice
)
{
this
.
summaryPrice
=
summaryPrice
;
}
public
void
add
(
AccountEvent
ae
)
{
setCount
(
getCount
().
add
(
ae
.
getQuantity
()));
setSummaryPrice
(
getSummaryPrice
().
add
((
ae
.
getTotal
().
negate
())));
}
}
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