Skip to content

Commit

Permalink
Merge branch 'master' into feat/add-shrinkify
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension authored Oct 15, 2024
2 parents 22977fb + d32405e commit 3fa3fd6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="200" max="32767" attributes="0"/>
<EmptySpace min="0" pref="185" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
Expand Down Expand Up @@ -375,7 +375,7 @@
<Component class="javax.swing.JSpinner" name="spnReadTimeout">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="5" maximum="60" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
<SpinnerModel initial="120" maximum="300" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
</Property>
</Properties>
</Component>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand Down

0 comments on commit 3fa3fd6

Please sign in to comment.