diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.form b/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.form
index c3830a249..9604b4b8b 100644
--- a/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.form
+++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.form
@@ -61,7 +61,7 @@
-
+
@@ -375,7 +375,7 @@
-
+
diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.java
index dcaee324b..bf8687585 100644
--- a/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.java
+++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/configuration/AssistantSetupDialog.java
@@ -735,7 +735,7 @@ private void resetDetails() {
this.txtUser.setText("");
this.txtConfigurations.setText("");
this.spnConnectTimeout.setValue(3);
- this.spnReadTimeout.setValue(5);
+ this.spnReadTimeout.setValue(120);
}
@@ -891,7 +891,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
spnConnectTimeout.setModel(new javax.swing.SpinnerNumberModel(3, 1, 10, 1));
- spnReadTimeout.setModel(new javax.swing.SpinnerNumberModel(5, 1, 60, 1));
+ spnReadTimeout.setModel(new javax.swing.SpinnerNumberModel(120, 1, 300, 1));
jLabel10.setText("lesen");
@@ -1062,7 +1062,7 @@ private void cmdAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:
ac.setName(newNameObject.toString());
ac.setUrl("");
ac.setConnectionTimeout(5);
- ac.setReadTimeout(60);
+ ac.setReadTimeout(120);
ac.setUserName(null);
ac.setPassword(null);
ac.setConfiguration("");
diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/InvoiceDialog.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/InvoiceDialog.java
index 7df687d91..b8ac14fb1 100644
--- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/InvoiceDialog.java
+++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/files/InvoiceDialog.java
@@ -2483,26 +2483,35 @@ private void cmdCreateInvoiceDocumentActionPerformed(java.awt.event.ActionEvent
JOptionPane.showMessageDialog(this, "Es ist kein Rechnungssender definiert, E-Rechnung kann nicht erstellt werden.", com.jdimension.jlawyer.client.utils.DesktopUtils.POPUP_TITLE_WARNING, JOptionPane.WARNING_MESSAGE);
return;
}
-
- // Options to display
- String[] options = {"Elektronische Rechnung (an Unternehmen)", "XRechnung (an öffentliche Auftraggeber)"};
-
- // Show option dialog
- int choice = JOptionPane.showOptionDialog(
- this, // Parent component (null for no parent)
- "Rechnung erstellen als:", // Message to display
- "Rechnungsdokument erstellen", // Title of the dialog
- JOptionPane.DEFAULT_OPTION, // Option type (default for custom buttons)
- JOptionPane.QUESTION_MESSAGE, // Message type (question icon)
- null, // Icon (null for default icon)
- options, // Options array
- options[0] // Initial value (default selection)
- );
-
- if (choice < 0) {
- return;
+
+
+ // by default, create document from document template
+ int choice=0;
+
+ // if the invoice type indicates a real invoice where there is a turnover, we need to create an electronic invoice
+ if(this.currentEntry.getInvoiceType().isTurnOver()) {
+ // Options to display
+ String[] options = {"Elektronische Rechnung (an Unternehmen)", "XRechnung (an öffentliche Auftraggeber)"};
+
+ // Show option dialog
+ choice = JOptionPane.showOptionDialog(
+ this, // Parent component (null for no parent)
+ "Rechnung erstellen als:", // Message to display
+ "Rechnungsdokument erstellen", // Title of the dialog
+ JOptionPane.DEFAULT_OPTION, // Option type (default for custom buttons)
+ JOptionPane.QUESTION_MESSAGE, // Message type (question icon)
+ null, // Icon (null for default icon)
+ options, // Options array
+ options[0] // Initial value (default selection)
+ );
+
+ if (choice < 0) {
+ return;
+ }
}
+
+
AppUserBean senderUser = null;
try {
JLawyerServiceLocator locator = JLawyerServiceLocator.getInstance(ClientSettings.getInstance().getLookupProperties());
diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/utils/FileConverter.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/utils/FileConverter.java
index 24e758a09..558a912b1 100755
--- a/j-lawyer-client/src/com/jdimension/jlawyer/client/utils/FileConverter.java
+++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/utils/FileConverter.java
@@ -736,7 +736,8 @@ public String convertToPDF(String file, ArchiveFileDocumentsBean doc) throws Exc
throw new Exception("Diesem Dokument ist mit mehreren Rechnungen verknüpft, elektronische Rechnung kann nicht erstellt werden.");
}
- if (invoices.size() == 1) {
+ // only create e-invoice if the invoice type indicates a turnover / flow of money
+ if (invoices.size() == 1 && invoices.get(0).getInvoiceType()!=null && invoices.get(0).getInvoiceType().isTurnOver()) {
// generate electronic invoice
Invoice sourceInvoice = invoices.get(0);
if (StringUtils.isEmpty(sourceInvoice.getSender())) {