U sestavy "Objednávka" lze nyní nastavit, jestli se bude tisknout s
cenami, nebo bez cen. closes #151
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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<String, Object> params = new HashMap<String, Object>();
|
||||
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()) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user