diff --git a/src/main/java/info/bukova/isspst/Constants.java b/src/main/java/info/bukova/isspst/Constants.java index d185e32e..80e295e2 100644 --- a/src/main/java/info/bukova/isspst/Constants.java +++ b/src/main/java/info/bukova/isspst/Constants.java @@ -151,7 +151,9 @@ public class Constants { new ReportMapping(MOD_ORDER, new Report(5, false, "Objednávka", "order", true, true)), new ReportMapping(MOD_REQUIREMENTS, new Report(6, false, "Požadavky", "requirements")), new ReportMapping(MOD_TRIPREQUIREMENTS, new Report(7, true, "Žádost o SC", "tripRequirementApp", false, true)), - new ReportMapping(MOD_REQUIREMENTS, new Report(8, true, "Protokol o kontrole", "orderRequirement", false, true)) + new ReportMapping(MOD_REQUIREMENTS, new Report(8, true, "Protokol o kontrole", "orderRequirement", false, true)), + new ReportMapping(MOD_INVOICING, new Report(9, false, "Přehled o protokolech předběžné kontroly", "requirementProtocol")), + new ReportMapping(MOD_TRIPREQUIREMENTS, new Report(10, true, "Přehled o protokolech předběžné kontroly", "tripRequirementProtocol")) }; // pokud je v agnde vic nez jedena podepisovaci sestava, musi se definovat ktera sestava nalezi jake entite diff --git a/src/main/java/info/bukova/isspst/data/Invoicing.java b/src/main/java/info/bukova/isspst/data/Invoicing.java index a19107e8..8a876506 100644 --- a/src/main/java/info/bukova/isspst/data/Invoicing.java +++ b/src/main/java/info/bukova/isspst/data/Invoicing.java @@ -70,6 +70,18 @@ public class Invoicing extends BaseData implements Cloneable this.completed = completed; } + public String getInvoiceNumbers() { + String ret = ""; + for (InvoicingItem invNum : items) { + if (!ret.isEmpty()) { + ret += ", "; + } + ret += invNum.getInvoiceNumber(); + } + + return ret; + } + @Override public Object clone() throws CloneNotSupportedException { diff --git a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java index b2c05149..1b8da0c1 100644 --- a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java @@ -59,6 +59,14 @@ public class InvoicingServiceImpl extends AbstractOwnedService implem invoicing.setItems(inv.getItems()); } + @Transactional + @LazyLoader + public void loadReqAuth(Invoicing invoicing) { + Invoicing inv = getById(invoicing.getId()); + Hibernate.initialize(inv.getRequirement().getAuthorization()); + invoicing.getRequirement().setAuthorization(inv.getRequirement().getAuthorization()); + } + @Override public void calculate(Invoicing invoicing) { BigDecimal total = BigDecimal.ZERO; diff --git a/src/main/webapp/WEB-INF/reports/requirementProtocol.jasper b/src/main/webapp/WEB-INF/reports/requirementProtocol.jasper new file mode 100644 index 00000000..ea427e1f Binary files /dev/null and b/src/main/webapp/WEB-INF/reports/requirementProtocol.jasper differ diff --git a/src/main/webapp/WEB-INF/reports/requirementProtocol.jrxml b/src/main/webapp/WEB-INF/reports/requirementProtocol.jrxml new file mode 100644 index 00000000..7fcc9a68 --- /dev/null +++ b/src/main/webapp/WEB-INF/reports/requirementProtocol.jrxml @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="57"> + <image onErrorType="Blank"> + <reportElement x="0" y="0" width="100" height="54" uuid="42476349-f707-4035-b93e-23e50fc5e82e"> + <printWhenExpression><![CDATA[$P{P_LOGO} != null]]></printWhenExpression> + </reportElement> + <imageExpression><![CDATA[$P{P_LOGO}]]></imageExpression> + </image> + <textField> + <reportElement x="113" y="0" width="689" height="46" uuid="408b5871-7dc2-4d87-a432-f3cc8df0f823"/> + <textElement textAlignment="Center"> + <font size="16" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250"/> + </textElement> + <textFieldExpression><![CDATA[$P{P_MAIN_ADDRESS}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/reports/tripRequirementProtocol.jasper b/src/main/webapp/WEB-INF/reports/tripRequirementProtocol.jasper new file mode 100644 index 00000000..433da795 Binary files /dev/null and b/src/main/webapp/WEB-INF/reports/tripRequirementProtocol.jasper differ diff --git a/src/main/webapp/WEB-INF/reports/tripRequirementProtocol.jrxml b/src/main/webapp/WEB-INF/reports/tripRequirementProtocol.jrxml new file mode 100644 index 00000000..e45506df --- /dev/null +++ b/src/main/webapp/WEB-INF/reports/tripRequirementProtocol.jrxml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="59" splitType="Stretch"> + <textField> + <reportElement x="113" y="0" width="689" height="46" uuid="33458c13-a1ec-4e96-ab93-60f001e32542"/> + <textElement textAlignment="Center"> + <font size="16" isBold="true" pdfFontName="Helvetica-Bold" pdfEncoding="Cp1250"/> + </textElement> + <textFieldExpression><![CDATA[$P{P_MAIN_ADDRESS}]]></textFieldExpression> + </textField> + <image onErrorType="Blank"> + <reportElement x="0" y="0" width="100" height="54" uuid="159b16e8-ffa6-4ff5-956f-8807ebc11eb3"> + <printWhenExpression><![CDATA[$P{P_LOGO} != null]]></printWhenExpression> + </reportElement> + <imageExpression><![CDATA[$P{P_LOGO}]]></imageExpression> + </image> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +