Commit 581d1512 by Tuomas Riihimäki

AccountEvent fixes

1 parent e999a1c9
<!DOCTYPE html <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:f="http://java.sun.com/jsf/core">
xmlns:f="http://java.sun.com/jsf/core"
>
<h:body> <h:body>
<ui:composition template="#{sessionHandler.template}"> <ui:composition template="#{sessionHandler.template}">
<f:metadata> <f:metadata>
...@@ -64,12 +62,16 @@ ...@@ -64,12 +62,16 @@
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{i18n['accountEvent.delivered']}" /> <h:outputText value="#{i18n['accountEvent.delivered']}" />
</f:facet> </f:facet>
<h:outputText rendered="#{!empty ac.delivered}" value="#{ac.delivered.time}"> <h:outputText rendered="#{!empty ac.delivered}" value="#{ac.delivered.time}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" /> <f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText> </h:outputText>
</h:column> </h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['accountEvent.foodwave']}" />
</f:facet>
<h:outputText rendered="#{!empty ac.foodWave}" value="#{ac.foodWave.name}" />
</h:column>
<h:column> <h:column>
<h:link outcome="/useradmin/editAccountevent" value="#{i18n['accountEvent.edit']}"> <h:link outcome="/useradmin/editAccountevent" value="#{i18n['accountEvent.edit']}">
......
...@@ -19,30 +19,40 @@ ...@@ -19,30 +19,40 @@
<h:form id="acform"> <h:form id="acform">
<h:panelGrid columns="3"> <h:panelGrid columns="3">
<h:outputLabel for="user" value="#{i18n['accountevent.user']}" /> <h:outputLabel for="user" value="#{i18n['accountEvent.user']}" />
<h:outputText id="user" value="#{accountEventView.accountevent.user.user.id} / #{accountEventView.accountevent.user.user.wholeName}" /> <h:outputText id="user" value="#{accountEventView.accountevent.user.user.id} / #{accountEventView.accountevent.user.user.wholeName}" />
<h:message for="user" /> <h:message for="user" />
<h:outputLabel for="price" value="#{i18n['accountevent.price']}" /> <h:outputLabel for="price" value="#{i18n['accountEvent.price']}" />
<h:inputText id="price" value="#{accountEventView.accountevent.unitPrice}"> <h:inputText id="price" value="#{accountEventView.accountevent.unitPrice}">
<f:convertNumber minFractionDigits="0" maxFractionDigits="4" /> <f:convertNumber minFractionDigits="0" maxFractionDigits="4" />
</h:inputText> </h:inputText>
<h:message for="price" /> <h:message for="price" />
<h:outputLabel for="quantity" value="#{i18n['accountevent.quantity']}" /> <h:outputLabel for="quantity" value="#{i18n['accountEvent.quantity']}" />
<h:inputText id="quantity" value="#{accountEventView.accountevent.quantity}"> <h:inputText id="quantity" value="#{accountEventView.accountevent.quantity}">
<f:convertNumber minFractionDigits="0" maxFractionDigits="4" /> <f:convertNumber minFractionDigits="0" maxFractionDigits="4" />
</h:inputText> </h:inputText>
<h:message for="quantity" /> <h:message for="quantity" />
<h:outputLabel for="time" value="#{i18n['accountevent.quantity']}" /> <h:outputLabel for="time" value="#{i18n['accountEvent.eventTime']}" />
<p:calendar id="time" value="#{accountEventView.accountevent.eventTime.time}" pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" /> <p:calendar id="time" value="#{accountEventView.accountevent.eventTime.time}" pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
<h:message for="time" /> <h:message for="time" />
<h:outputLabel for="fw" value="#{i18n['accountEvent.foodwave']}" />
<h:link id="fw" value="#{accountEventView.accountevent.foodWave.name}" outcome="/foodmanager/listOrders">
<f:param name="foodwaveid" value="#{accountEventView.accountevent.foodWave.id}" />
</h:link>
<h:message for="fw" />
<h:outputLabel for="delivered" value="#{i18n['accountEvent.delivered']}" />
<p:calendar id="delivered" value="#{accountEventView.accountevent.delivered.time}" pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
<h:message for="delivered" />
</h:panelGrid> </h:panelGrid>
<h:commandButton action="#{accountEventView.save()}" rendered="#{accountEventView.canSave}" value="#{i18n['accountevent.save']}" /> <h:commandButton action="#{accountEventView.save()}" rendered="#{accountEventView.canSave}" value="#{i18n['accountEvent.save']}" />
<h:commandButton action="#{accountEventView.delete()}" rendered="#{accountEventView.canSave}" value="#{i18n['accountevent.delete']}" /> <h:commandButton action="#{accountEventView.delete()}" rendered="#{accountEventView.canSave}" value="#{i18n['accountEvent.delete']}" />
</h:form> </h:form>
</ui:define> </ui:define>
......
...@@ -8,15 +8,20 @@ acc_line.quantity = Quantity ...@@ -8,15 +8,20 @@ acc_line.quantity = Quantity
acc_line.time = Transaction Date acc_line.time = Transaction Date
accountEvent.commit = Save accountEvent.commit = Save
accountEvent.delete = Delete
accountEvent.delivered = Delivered accountEvent.delivered = Delivered
accountEvent.edit = Edit accountEvent.edit = Edit
accountEvent.eventTime = Time accountEvent.eventTime = Time
accountEvent.foodwave = Foodwave
accountEvent.inventoryQuantity = Inventory Count accountEvent.inventoryQuantity = Inventory Count
accountEvent.price = Price
accountEvent.productname = Product accountEvent.productname = Product
accountEvent.quantity = Count accountEvent.quantity = Count
accountEvent.save = Save
accountEvent.seller = Sold by accountEvent.seller = Sold by
accountEvent.total = Total accountEvent.total = Total
accountEvent.unitPrice = Unit price accountEvent.unitPrice = Unit price
accountEvent.user = User
actionlog.create.header = Create new actionmessage actionlog.create.header = Create new actionmessage
actionlog.create.message = Message actionlog.create.message = Message
......
...@@ -8,15 +8,20 @@ acc_line.quantity = M\u00E4\u00E4r\u00E4 ...@@ -8,15 +8,20 @@ acc_line.quantity = M\u00E4\u00E4r\u00E4
acc_line.time = Ostoaika acc_line.time = Ostoaika
accountEvent.commit = Tallenna accountEvent.commit = Tallenna
accountEvent.delete = Poista
accountEvent.delivered = Toimitettu accountEvent.delivered = Toimitettu
accountEvent.edit = Muokkaa accountEvent.edit = Muokkaa
accountEvent.eventTime = Aika accountEvent.eventTime = Aika
accountEvent.foodwave = Ruokatilaus
accountEvent.inventoryQuantity = Varastossa accountEvent.inventoryQuantity = Varastossa
accountEvent.price = Hinta
accountEvent.productname = Tuote accountEvent.productname = Tuote
accountEvent.quantity = Lkm accountEvent.quantity = Lkm
accountEvent.save = Tallenna
accountEvent.seller = Myyj\u00E4 accountEvent.seller = Myyj\u00E4
accountEvent.total = Yhteens\u00E4 accountEvent.total = Yhteens\u00E4
accountEvent.unitPrice = Yksikk\u00F6hinta accountEvent.unitPrice = Yksikk\u00F6hinta
accountEvent.user = K\u00E4ytt\u00E4j\u00E4
actionlog.create.header = Luo uusi ActionMessage actionlog.create.header = Luo uusi ActionMessage
actionlog.create.message = Viesti actionlog.create.message = Viesti
......
...@@ -79,7 +79,7 @@ public class FoodWaveView extends GenericCDIView { ...@@ -79,7 +79,7 @@ public class FoodWaveView extends GenericCDIView {
public void onEdit() { public void onEdit() {
this.foodWaveBean.saveTemplate(template); this.foodWaveBean.saveTemplate(template);
} }
public void onEditFoodWave() { public void onEditFoodWave() {
FoodWave fw = foodWaves.getRowData(); FoodWave fw = foodWaves.getRowData();
this.foodWaveBean.merge(fw); this.foodWaveBean.merge(fw);
...@@ -92,8 +92,8 @@ public class FoodWaveView extends GenericCDIView { ...@@ -92,8 +92,8 @@ public class FoodWaveView extends GenericCDIView {
public void initFoodwaveManagerList() { public void initFoodwaveManagerList() {
if (super.requirePermissions(ShopPermission.MANAGE_FOODWAVES)) if (super.requirePermissions(ShopPermission.MANAGE_FOODWAVES))
{ {
if(foodWaves == null) { if (foodWaves == null) {
super.beginConversation(); super.beginConversation();
foodWaves = new ListDataModel<FoodWave>(foodWaveBean.getEventFoodWaves()); foodWaves = new ListDataModel<FoodWave>(foodWaveBean.getEventFoodWaves());
} }
...@@ -231,7 +231,7 @@ public class FoodWaveView extends GenericCDIView { ...@@ -231,7 +231,7 @@ public class FoodWaveView extends GenericCDIView {
public String markBillPaid() { public String markBillPaid() {
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 = billbean.markPaid(b, Calendar.getInstance());
foodWaveId = selectedFoodWave.getId(); foodWaveId = selectedFoodWave.getId();
selectedFoodWave = null; selectedFoodWave = null;
......
...@@ -53,7 +53,7 @@ public class AccountEventView extends GenericCDIView { ...@@ -53,7 +53,7 @@ public class AccountEventView extends GenericCDIView {
public String delete() public String delete()
{ {
accounteventbean.delete(accountevent); userview.setUser(accounteventbean.delete(accountevent));
return "/useradmin/accountEvents"; return "/useradmin/accountEvents";
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!