diff --git a/pom.xml b/pom.xml
index 4038947e..0380a74c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
fdvsolution.public
Dynamic Jasper
- http://archiva.fdvs.com.ar/repository/public1/
+ http://nexus.fdvs.com.ar/content/groups/public/
@@ -407,6 +407,22 @@
+
+
+ src/main/java
+
+ **/*.xml
+ **/*.js
+ **/*.wpd
+
+
+
+ src/main/resources
+
+ **/*.xml
+
+
+
diff --git a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java
index 414ed36f..81605df9 100644
--- a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java
+++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingService.java
@@ -23,4 +23,12 @@ public interface InvoicingService extends Service {
public List getArchiveList();
public Invoicing getForRequirement(Requirement req);
+
+ public List getMaterialPendingList();
+
+ public List getMaterialArchiveList();
+
+ public List getServicesPendingList();
+
+ public List getServicesArchiveList();
}
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 7386188c..aee1dc15 100644
--- a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java
+++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java
@@ -1,5 +1,6 @@
package info.bukova.isspst.services.invoicing;
+import info.bukova.isspst.Constants;
import info.bukova.isspst.data.Invoicing;
import info.bukova.isspst.data.InvoicingItem;
import info.bukova.isspst.data.Requirement;
@@ -101,4 +102,44 @@ public class InvoicingServiceImpl extends AbstractOwnedService implem
return (Invoicing) query.uniqueResult();
}
+
+ @SuppressWarnings("unchecked")
+ @Override
+ @Transactional
+ @PreAuthorize("hasPermission(this, 'PERM_READ')")
+ public List getMaterialPendingList() {
+ Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy where (inv.completed Is Null or inv.completed = false) and (rq.kind = :kind) order by rq.numser");
+ q.setParameter("kind", Constants.REQ_TYPE_MATERIAL);
+ return q.list();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ @Transactional
+ @PreAuthorize("hasPermission(this, 'PERM_READ')")
+ public List getMaterialArchiveList() {
+ Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy where (inv.completed = true) and (rq.kind = :kind) order by rq.numser");
+ q.setParameter("kind", Constants.REQ_TYPE_MATERIAL);
+ return q.list();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ @Transactional
+ @PreAuthorize("hasPermission(this, 'PERM_READ')")
+ public List getServicesPendingList() {
+ Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy where (inv.completed Is Null or inv.completed = false) and (rq.kind = :kind) order by rq.numser");
+ q.setParameter("kind", Constants.REQ_TYPE_SERVICES);
+ return q.list();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ @Transactional
+ @PreAuthorize("hasPermission(this, 'PERM_READ')")
+ public List getServicesArchiveList() {
+ Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy where (inv.completed = true) and (rq.kind = :kind) order by rq.numser");
+ q.setParameter("kind", Constants.REQ_TYPE_SERVICES);
+ return q.list();
+ }
}
diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingList.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingList.java
index 3cef1248..31dced36 100644
--- a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingList.java
+++ b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingList.java
@@ -29,7 +29,6 @@ public class InvoicingList extends ListViewModel {
public void initInvoicing() {
service = invoicingService;
dataClass = Invoicing.class;
- formZul = "invoicingForm.zul";
dataFilter = new InvoicingFilter(getFilterTemplate());
}
diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingMaterialArchiveList.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingMaterialArchiveList.java
new file mode 100644
index 00000000..ea333095
--- /dev/null
+++ b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingMaterialArchiveList.java
@@ -0,0 +1,30 @@
+package info.bukova.isspst.ui.main.invoicing;
+
+import info.bukova.isspst.data.Invoicing;
+import org.springframework.security.access.AccessDeniedException;
+import org.zkoss.bind.annotation.Init;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class InvoicingMaterialArchiveList extends InvoicingList {
+
+ @Init(superclass = true)
+ public void initInvoicingMaterialArchiveList()
+ {
+ formZul = "/main/invoicing/material/invHeadForm.zul";
+ }
+
+ @Override
+ protected List getListFromService() {
+ try
+ {
+ return invoicingService.getMaterialArchiveList();
+ }
+ catch (AccessDeniedException e)
+ {
+ e.printStackTrace();
+ return new ArrayList();
+ }
+ }
+}
diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingMaterialPendingList.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingMaterialPendingList.java
new file mode 100644
index 00000000..eb4ea56d
--- /dev/null
+++ b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingMaterialPendingList.java
@@ -0,0 +1,30 @@
+package info.bukova.isspst.ui.main.invoicing;
+
+import info.bukova.isspst.data.Invoicing;
+import org.springframework.security.access.AccessDeniedException;
+import org.zkoss.bind.annotation.Init;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class InvoicingMaterialPendingList extends InvoicingList {
+
+ @Init(superclass = true)
+ public void initInvoicingMaterialPendingList()
+ {
+ formZul = "/main/invoicing/material/invHeadForm.zul";
+ }
+
+ @Override
+ protected List getListFromService() {
+ try
+ {
+ return invoicingService.getMaterialPendingList();
+ }
+ catch (AccessDeniedException e)
+ {
+ e.printStackTrace();
+ return new ArrayList();
+ }
+ }
+}
diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingPendingList.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingPendingList.java
deleted file mode 100644
index 463e039b..00000000
--- a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingPendingList.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package info.bukova.isspst.ui.main.invoicing;
-
-import info.bukova.isspst.data.Invoicing;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.security.access.AccessDeniedException;
-import org.zkoss.bind.annotation.Init;
-
-public class InvoicingPendingList extends InvoicingList
-{
- @Init(superclass = true)
- public void initInvoicingPendingList()
- {
- }
-
- @Override
- protected List getListFromService()
- {
- try
- {
- return invoicingService.getPendingList();
- }
- catch (AccessDeniedException e)
- {
- // BindUtils.postGlobalCommand(null, null, "disableCentre", null);
- // e.printStackTrace();
- return new ArrayList();
- }
- }
-}
diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingServicesArchiveList.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingServicesArchiveList.java
new file mode 100644
index 00000000..58e9568f
--- /dev/null
+++ b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingServicesArchiveList.java
@@ -0,0 +1,30 @@
+package info.bukova.isspst.ui.main.invoicing;
+
+import info.bukova.isspst.data.Invoicing;
+import org.springframework.security.access.AccessDeniedException;
+import org.zkoss.bind.annotation.Init;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class InvoicingServicesArchiveList extends InvoicingList {
+
+ @Init(superclass = true)
+ public void initInvoicingServicesArchiveList()
+ {
+ formZul = "/main/invoicing/services/invHeadForm.zul";
+ }
+
+ @Override
+ protected List getListFromService() {
+ try
+ {
+ return invoicingService.getServicesArchiveList();
+ }
+ catch (AccessDeniedException e)
+ {
+ e.printStackTrace();
+ return new ArrayList();
+ }
+ }
+}
diff --git a/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingServicesPendingList.java b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingServicesPendingList.java
new file mode 100644
index 00000000..1ab34310
--- /dev/null
+++ b/src/main/java/info/bukova/isspst/ui/main/invoicing/InvoicingServicesPendingList.java
@@ -0,0 +1,30 @@
+package info.bukova.isspst.ui.main.invoicing;
+
+import info.bukova.isspst.data.Invoicing;
+import org.springframework.security.access.AccessDeniedException;
+import org.zkoss.bind.annotation.Init;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class InvoicingServicesPendingList extends InvoicingList {
+
+ @Init(superclass = true)
+ public void initInvoicingServicesPendingList()
+ {
+ formZul = "/main/invoicing/services/invHeadForm.zul";
+ }
+
+ @Override
+ protected List getListFromService() {
+ try
+ {
+ return invoicingService.getServicesPendingList();
+ }
+ catch (AccessDeniedException e)
+ {
+ e.printStackTrace();
+ return new ArrayList();
+ }
+ }
+}
diff --git a/src/main/webapp/WEB-INF/locales/zk-label.properties b/src/main/webapp/WEB-INF/locales/zk-label.properties
index 5bf0e745..c5a76254 100644
--- a/src/main/webapp/WEB-INF/locales/zk-label.properties
+++ b/src/main/webapp/WEB-INF/locales/zk-label.properties
@@ -392,6 +392,9 @@ InvoicingDescription=Popis
InvoicingInvoiced=Fakturováno
InvoicingApplicant=Žadatel
+InvoicingMaterial=Fakturace požadavků na materiál
+InvoicingServices=Fakturace požadavků na servis
+
HandleComboKeyFilter=#del
HandleComboKey=$#del
diff --git a/src/main/webapp/WEB-INF/storage.properties b/src/main/webapp/WEB-INF/storage.properties
index 103f9058..570a762a 100644
--- a/src/main/webapp/WEB-INF/storage.properties
+++ b/src/main/webapp/WEB-INF/storage.properties
@@ -1,3 +1,3 @@
-storage.root=/home/pepa/tmp/isspst
-storage.fulltextIndex=/home/pepa/tmp/isspst
-storage.signedDocuments=/home/pepa/tmp/isspst/signedDoc
\ No newline at end of file
+storage.root=~/tmp/isspst
+storage.fulltextIndex=~/tmp/isspst
+storage.signedDocuments=~/tmp/isspst/signedDoc
\ No newline at end of file
diff --git a/src/main/webapp/app/mainMenu.zul b/src/main/webapp/app/mainMenu.zul
index 93135908..a825abb5 100644
--- a/src/main/webapp/app/mainMenu.zul
+++ b/src/main/webapp/app/mainMenu.zul
@@ -38,8 +38,14 @@
+
diff --git a/src/main/webapp/main/invoicing/invoicingForm.zul b/src/main/webapp/main/invoicing/invoicingForm.zul
deleted file mode 100644
index 47be8025..00000000
--- a/src/main/webapp/main/invoicing/invoicingForm.zul
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${labels.InvoicingRequirementNumber} : |
-
-
- |
-
-
- ${labels.InvoicingDescription} : |
-
-
- |
-
-
- ${labels.InvoicingRequirementPrice} : |
-
-
- |
-
-
- ${labels.InvoicingInvoicedPrice} : |
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/index.zul b/src/main/webapp/main/invoicing/material/index.zul
similarity index 52%
rename from src/main/webapp/main/invoicing/index.zul
rename to src/main/webapp/main/invoicing/material/index.zul
index 1b90f56d..7f851099 100644
--- a/src/main/webapp/main/invoicing/index.zul
+++ b/src/main/webapp/main/invoicing/material/index.zul
@@ -1,4 +1,4 @@
-
+
diff --git a/src/main/webapp/main/invoicing/material/invHeadForm.zul b/src/main/webapp/main/invoicing/material/invHeadForm.zul
new file mode 100644
index 00000000..697edec3
--- /dev/null
+++ b/src/main/webapp/main/invoicing/material/invHeadForm.zul
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/invHeadListArchive.zul b/src/main/webapp/main/invoicing/material/invHeadListArchive.zul
similarity index 76%
rename from src/main/webapp/main/invoicing/invHeadListArchive.zul
rename to src/main/webapp/main/invoicing/material/invHeadListArchive.zul
index c520c9f1..a4fea925 100644
--- a/src/main/webapp/main/invoicing/invHeadListArchive.zul
+++ b/src/main/webapp/main/invoicing/material/invHeadListArchive.zul
@@ -4,10 +4,10 @@
vflex="1"
border="none"
apply="org.zkoss.bind.BindComposer"
- viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingArchiveList')">
+ viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingMaterialArchiveList')">
+ src="/main/invoicing/shared/invoicingGrid.zul" />
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/invHeadListPending.zul b/src/main/webapp/main/invoicing/material/invHeadListPending.zul
similarity index 76%
rename from src/main/webapp/main/invoicing/invHeadListPending.zul
rename to src/main/webapp/main/invoicing/material/invHeadListPending.zul
index 4000df43..da7346f7 100644
--- a/src/main/webapp/main/invoicing/invHeadListPending.zul
+++ b/src/main/webapp/main/invoicing/material/invHeadListPending.zul
@@ -4,10 +4,10 @@
vflex="1"
border="none"
apply="org.zkoss.bind.BindComposer"
- viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingPendingList')">
+ viewModel="@id('vm') @init('info.bukova.isspst.ui.main.invoicing.InvoicingMaterialPendingList')">
+ src="/main/invoicing/shared/invoicingGrid.zul" />
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/setup.zul b/src/main/webapp/main/invoicing/material/setup.zul
similarity index 55%
rename from src/main/webapp/main/invoicing/setup.zul
rename to src/main/webapp/main/invoicing/material/setup.zul
index 3034b64e..6d9ceb58 100644
--- a/src/main/webapp/main/invoicing/setup.zul
+++ b/src/main/webapp/main/invoicing/material/setup.zul
@@ -2,8 +2,8 @@
- String gridPending = "/main/invoicing/invHeadListPending.zul";
- String gridArchive = "/main/invoicing/invHeadListArchive.zul";
+ String gridPending = "/main/invoicing/material/invHeadListPending.zul";
+ String gridArchive = "/main/invoicing/material/invHeadListArchive.zul";
+ label="${labels.InvoicingMaterial}" />
+ src="/main/invoicing/shared/tabPanels.zul" />
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/services/index.zul b/src/main/webapp/main/invoicing/services/index.zul
new file mode 100644
index 00000000..06a52d93
--- /dev/null
+++ b/src/main/webapp/main/invoicing/services/index.zul
@@ -0,0 +1,10 @@
+
+
+
+
+ String gridZul = "setup.zul";
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/services/invHeadForm.zul b/src/main/webapp/main/invoicing/services/invHeadForm.zul
new file mode 100644
index 00000000..3465c6e8
--- /dev/null
+++ b/src/main/webapp/main/invoicing/services/invHeadForm.zul
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/services/invHeadListArchive.zul b/src/main/webapp/main/invoicing/services/invHeadListArchive.zul
new file mode 100644
index 00000000..8854f832
--- /dev/null
+++ b/src/main/webapp/main/invoicing/services/invHeadListArchive.zul
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/services/invHeadListPending.zul b/src/main/webapp/main/invoicing/services/invHeadListPending.zul
new file mode 100644
index 00000000..2dbf4d09
--- /dev/null
+++ b/src/main/webapp/main/invoicing/services/invHeadListPending.zul
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/services/setup.zul b/src/main/webapp/main/invoicing/services/setup.zul
new file mode 100644
index 00000000..5a979997
--- /dev/null
+++ b/src/main/webapp/main/invoicing/services/setup.zul
@@ -0,0 +1,19 @@
+
+
+
+
+ String gridPending = "/main/invoicing/services/invHeadListPending.zul";
+ String gridArchive = "/main/invoicing/services/invHeadListArchive.zul";
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/main/invoicing/shared/invoicingForm.zul b/src/main/webapp/main/invoicing/shared/invoicingForm.zul
new file mode 100644
index 00000000..72da8cd5
--- /dev/null
+++ b/src/main/webapp/main/invoicing/shared/invoicingForm.zul
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ${labels.InvoicingRequirementNumber} : |
+
+
+ |
+
+
+ ${labels.InvoicingDescription} : |
+
+
+ |
+
+
+ ${labels.InvoicingRequirementPrice} : |
+
+
+ |
+
+
+ ${labels.InvoicingInvoicedPrice} : |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/webapp/main/invoicing/invoicingGrid.zul b/src/main/webapp/main/invoicing/shared/invoicingGrid.zul
similarity index 100%
rename from src/main/webapp/main/invoicing/invoicingGrid.zul
rename to src/main/webapp/main/invoicing/shared/invoicingGrid.zul
diff --git a/src/main/webapp/main/invoicing/tabPanels.zul b/src/main/webapp/main/invoicing/shared/tabPanels.zul
similarity index 100%
rename from src/main/webapp/main/invoicing/tabPanels.zul
rename to src/main/webapp/main/invoicing/shared/tabPanels.zul