diff --git a/src/main/java/info/bukova/isspst/Constants.java b/src/main/java/info/bukova/isspst/Constants.java index 552ebf7a..36febdb0 100644 --- a/src/main/java/info/bukova/isspst/Constants.java +++ b/src/main/java/info/bukova/isspst/Constants.java @@ -114,7 +114,7 @@ public class Constants { new ReportMapping(MOD_ADDRESSBOOK, new Report("Adresa", "address", false, true)), new ReportMapping(MOD_TRIPBILL, new Report("Žádost", "tripRequirement", false, true)), new ReportMapping(MOD_TRIPBILL, new Report("Vyúčtování", "tripBill", false, true)), - new ReportMapping(MOD_ORDER, new Report("Objednávka", "order", false, true)) + new ReportMapping(MOD_ORDER, new Report("Objednávka", "order", true, true)) }; public final static String REQTYPE_ORDER = "ORDER"; diff --git a/src/main/java/info/bukova/isspst/reporting/ParamFiller.java b/src/main/java/info/bukova/isspst/reporting/ParamFiller.java index 3911a175..4cb8e873 100644 --- a/src/main/java/info/bukova/isspst/reporting/ParamFiller.java +++ b/src/main/java/info/bukova/isspst/reporting/ParamFiller.java @@ -1,5 +1,8 @@ package info.bukova.isspst.reporting; +import java.util.HashMap; +import java.util.Map; + import info.bukova.isspst.data.AuthItem; import info.bukova.isspst.data.Order; import info.bukova.isspst.data.TripBill; @@ -30,7 +33,15 @@ public class ParamFiller { return; } + Map params = new HashMap(); + for (String paramKey : definition.getParams().keySet()) { + if (paramKey.startsWith("SET_")) { + params.put(paramKey, definition.getParam(paramKey)); + } + } + definition.getParams().clear(); + definition.getParams().putAll(params); if ((definition.getDataSet().get(0) instanceof TripBill) && definition.getReport().isSingleRecord()) { diff --git a/src/main/java/info/bukova/isspst/ui/reporting/OrderOptionsVM.java b/src/main/java/info/bukova/isspst/ui/reporting/OrderOptionsVM.java new file mode 100644 index 00000000..789ab185 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/reporting/OrderOptionsVM.java @@ -0,0 +1,29 @@ +package info.bukova.isspst.ui.reporting; + +import info.bukova.isspst.reporting.ReportDefinition; + +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class OrderOptionsVM { + + private boolean printPrices; + @WireVariable + private ReportDefinition reportDefinition; + + @Init + public void init() { + printPrices = true; + reportDefinition.setParam("SET_PRICES", true); + } + + public boolean isPrintPrices() { + return printPrices; + } + + public void setPrintPrices(boolean printPrices) { + this.printPrices = printPrices; + reportDefinition.setParam("SET_PRICES", printPrices); + } + +} diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties index bdcb007c..13246e59 100644 --- a/src/main/webapp/WEB-INF/locales/zk-label.properties +++ b/src/main/webapp/WEB-INF/locales/zk-label.properties @@ -327,6 +327,7 @@ OrderFormOrdered=Objednáno OrderFormDeliveredDate=Dodáno dne OrderFormInvoiceNumber=Číslo faktury OrderFormInvoiceTotal=Částka faktury +OrderPrintPrices=Tisknout ceny HandleComboKeyFilter=#del HandleComboKey=$#del diff --git a/src/main/webapp/WEB-INF/reports/order.jasper b/src/main/webapp/WEB-INF/reports/order.jasper index 098cdda9..da732859 100644 Binary files a/src/main/webapp/WEB-INF/reports/order.jasper and b/src/main/webapp/WEB-INF/reports/order.jasper differ diff --git a/src/main/webapp/WEB-INF/reports/order.jrxml b/src/main/webapp/WEB-INF/reports/order.jrxml index e7a6a7bc..e69d7983 100644 --- a/src/main/webapp/WEB-INF/reports/order.jrxml +++ b/src/main/webapp/WEB-INF/reports/order.jrxml @@ -7,6 +7,9 @@ + + + @@ -265,6 +268,9 @@ + + + diff --git a/src/main/webapp/WEB-INF/reports/orderItems.jasper b/src/main/webapp/WEB-INF/reports/orderItems.jasper index 6de75818..be4b810a 100644 Binary files a/src/main/webapp/WEB-INF/reports/orderItems.jasper and b/src/main/webapp/WEB-INF/reports/orderItems.jasper differ diff --git a/src/main/webapp/WEB-INF/reports/orderItems.jrxml b/src/main/webapp/WEB-INF/reports/orderItems.jrxml index 3c5a9067..bc277510 100644 --- a/src/main/webapp/WEB-INF/reports/orderItems.jrxml +++ b/src/main/webapp/WEB-INF/reports/orderItems.jrxml @@ -1,8 +1,11 @@ - - + + + + + @@ -36,12 +39,16 @@ - + + + - + + + @@ -78,7 +85,9 @@ - + + + @@ -107,14 +116,18 @@ - + + + - + + + @@ -160,7 +173,9 @@ - + + + @@ -176,30 +191,42 @@ - + + + - + + + - + + + - + + + - + + + - + + + diff --git a/src/main/webapp/app/reporting/order.zul b/src/main/webapp/app/reporting/order.zul new file mode 100644 index 00000000..cdc8e29c --- /dev/null +++ b/src/main/webapp/app/reporting/order.zul @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file