Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a4e00182
authored
Nov 17, 2012
by
Juho Salli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Varastosaldon listaus tuotesivulla
1 parent
7fd52215
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
0 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
code/LanBortalWeb/WebContent/resources/cditools/products/list.xhtml
code/LanBortalWeb/WebContent/useradmin/accountEvents.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
View file @
a4e0018
...
@@ -171,6 +171,23 @@ public class Product extends GenericEntity {
...
@@ -171,6 +171,23 @@ public class Product extends GenericEntity {
return
ret
;
return
ret
;
}
}
public
BigDecimal
getInventoryCount
()
{
BigDecimal
ret
=
new
BigDecimal
(
0
);
if
(
accountEvents
!=
null
)
{
for
(
AccountEvent
ae
:
accountEvents
)
{
ret
=
ret
.
subtract
(
ae
.
getQuantity
());
}
}
if
(
inventoryEvents
!=
null
)
{
for
(
InventoryEvent
ie
:
inventoryEvents
)
{
ret
=
ret
.
add
(
ie
.
getQuantity
());
}
}
return
ret
;
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
...
...
code/LanBortalWeb/WebContent/resources/cditools/products/list.xhtml
View file @
a4e0018
...
@@ -48,6 +48,15 @@
...
@@ -48,6 +48,15 @@
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"2"
/>
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"2"
/>
</h:outputText>
</h:outputText>
</h:column>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['product.inventoryQuantity']}"
/>
</f:facet>
<h:outputText
value=
"#{product.inventoryCount}"
>
<f:convertNumber
minFractionDigits=
"0"
maxFractionDigits=
"2"
/>
</h:outputText>
</h:column>
</h:dataTable>
</h:dataTable>
</h:form>
</h:form>
...
...
code/LanBortalWeb/WebContent/useradmin/accountEvents.xhtml
View file @
a4e0018
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
</h:column>
</h:column>
<h:column>
<h:column>
<h:link
outcome=
"/useradmin/editAccountevent"
value=
"#{i18n['accountEvent.edit']}"
>
<h:link
outcome=
"/useradmin/editAccountevent"
value=
"#{i18n['accountEvent.edit']}"
>
<f:param
name=
"id"
value=
"#{ac.id}"
/>
<f:param
name=
"id"
value=
"#{ac.id}"
/>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_en.properties
View file @
a4e0018
...
@@ -9,6 +9,7 @@ accountEvent.commit = Save
...
@@ -9,6 +9,7 @@ accountEvent.commit = Save
accountEvent.delivered
=
Delivered
accountEvent.delivered
=
Delivered
accountEvent.edit
=
Edit
accountEvent.edit
=
Edit
accountEvent.eventTime
=
Time
accountEvent.eventTime
=
Time
accountEvent.inventoryQuantity
=
Inventory Count
accountEvent.productname
=
Product
accountEvent.productname
=
Product
accountEvent.quantity
=
Count
accountEvent.quantity
=
Count
accountEvent.seller
=
Sold by
accountEvent.seller
=
Sold by
...
@@ -527,6 +528,7 @@ product.color = Color in UI
...
@@ -527,6 +528,7 @@ product.color = Color in UI
product.create
=
Create product
product.create
=
Create product
product.createDiscount
=
Add volumediscount
product.createDiscount
=
Add volumediscount
product.edit
=
edit
product.edit
=
edit
product.inventoryQuantity
=
Inventory count
product.name
=
Name of product
product.name
=
Name of product
product.paid
=
Paid
product.paid
=
Paid
product.prepaid
=
Prepaid
product.prepaid
=
Prepaid
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
View file @
a4e0018
...
@@ -9,6 +9,7 @@ accountEvent.commit = Tallenna
...
@@ -9,6 +9,7 @@ accountEvent.commit = Tallenna
accountEvent.delivered
=
Toimitettu
accountEvent.delivered
=
Toimitettu
accountEvent.edit
=
Muokkaa
accountEvent.edit
=
Muokkaa
accountEvent.eventTime
=
Aika
accountEvent.eventTime
=
Aika
accountEvent.inventoryQuantity
=
Varastossa
accountEvent.productname
=
Tuote
accountEvent.productname
=
Tuote
accountEvent.quantity
=
Lkm
accountEvent.quantity
=
Lkm
accountEvent.seller
=
Myyj
\u
00E4
accountEvent.seller
=
Myyj
\u
00E4
...
@@ -510,6 +511,7 @@ product.color = V\u00E4ri k\u00E4ytt\u00F6liittym\u00E4ss\u00E4
...
@@ -510,6 +511,7 @@ product.color = V\u00E4ri k\u00E4ytt\u00F6liittym\u00E4ss\u00E4
product.create
=
Luo tuote
product.create
=
Luo tuote
product.createDiscount
=
Lis
\u
00E4
\u
00E4 m
\u
00E4
\u
00E4r
\u
00E4alennus
product.createDiscount
=
Lis
\u
00E4
\u
00E4 m
\u
00E4
\u
00E4r
\u
00E4alennus
product.edit
=
Muokkaa
product.edit
=
Muokkaa
product.inventoryQuantity
=
Varastotilanne
product.name
=
Tuotteen nimi
product.name
=
Tuotteen nimi
product.paid
=
Maksettu
product.paid
=
Maksettu
product.prepaid
=
Prepaid
product.prepaid
=
Prepaid
...
...
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