Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kpatzwald committed Nov 10, 2021
1 parent 90e15a5 commit b887429
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>

<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<NonVisualComponents>
<Component class="javax.swing.JOptionPane" name="jOptionAlert">
<Properties>
Expand All @@ -19,6 +19,14 @@
</Property>
</Properties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,40,0,0,3,20"/>
</AuxValues>

Expand All @@ -44,7 +52,7 @@
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="1. Kunden auswählen"/>
<TitledBorder title="1. Kunden ausw&#xe4;hlen"/>
</Border>
</Property>
</Properties>
Expand Down Expand Up @@ -126,7 +134,7 @@
</Component>
<Component class="javax.swing.JLabel" name="jLabelNeuerVertragAnsprueche">
<Properties>
<Property name="text" type="java.lang.String" value="Ansprüche"/>
<Property name="text" type="java.lang.String" value="Anspr&#xfc;che"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand Down Expand Up @@ -168,7 +176,7 @@
</Component>
<Component class="javax.swing.JLabel" name="jLabelNeuerVertragAnzahlVertraege">
<Properties>
<Property name="text" type="java.lang.String" value="weitere Verträge"/>
<Property name="text" type="java.lang.String" value="weitere Vertr&#xe4;ge"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand All @@ -195,7 +203,7 @@
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="2. Artikel auswählen"/>
<TitledBorder title="2. Artikel ausw&#xe4;hlen"/>
</Border>
</Property>
</Properties>
Expand Down Expand Up @@ -292,7 +300,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand All @@ -313,7 +321,7 @@
<Font name="Dialog" size="14" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="2"/>
<Property name="text" type="java.lang.String" value="Stückpreis"/>
<Property name="text" type="java.lang.String" value="St&#xfc;ckpreis"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand All @@ -338,7 +346,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand Down Expand Up @@ -627,7 +635,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand Down Expand Up @@ -728,7 +736,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand All @@ -742,7 +750,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand All @@ -756,7 +764,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand Down Expand Up @@ -791,7 +799,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand Down Expand Up @@ -826,7 +834,7 @@
<Font name="Dialog" size="18" style="1"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" value=""/>
<Property name="text" type="java.lang.String" value="&#x20ac;"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private void initDAO(WiSimMainController wiSimMainController) {
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() { //GEN-BEGIN:initComponents
private void initComponents() {//GEN-BEGIN:initComponents
jOptionAlert = new javax.swing.JOptionPane();
jOptionPaneConfirm = new javax.swing.JOptionPane();
jLabelNeuerVertrag = new javax.swing.JLabel();
Expand Down Expand Up @@ -621,62 +621,62 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
add(jButtonNeuerVertragAbbrechen);
jButtonNeuerVertragAbbrechen.setBounds(430, 510, 120, 25);

} //GEN-END:initComponents
}//GEN-END:initComponents

private void jTextFieldSkontofristTageFocusLost(java.awt.event.FocusEvent evt) { //GEN-FIRST:event_jTextFieldSkontofristTageFocusLost
private void jTextFieldSkontofristTageFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldSkontofristTageFocusLost
checkCashDiscountLimit();
} //GEN-LAST:event_jTextFieldSkontofristTageFocusLost
}//GEN-LAST:event_jTextFieldSkontofristTageFocusLost

private void jTextFieldNeuerVertragJahrFocusLost(java.awt.event.FocusEvent evt) { //GEN-FIRST:event_jTextFieldNeuerVertragJahrFocusLost
private void jTextFieldNeuerVertragJahrFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldNeuerVertragJahrFocusLost
checkDateYear();
} //GEN-LAST:event_jTextFieldNeuerVertragJahrFocusLost
}//GEN-LAST:event_jTextFieldNeuerVertragJahrFocusLost

private void jTextFieldNeuerVertragMonatFocusLost(java.awt.event.FocusEvent evt) { //GEN-FIRST:event_jTextFieldNeuerVertragMonatFocusLost
private void jTextFieldNeuerVertragMonatFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldNeuerVertragMonatFocusLost
checkDateMonth();
} //GEN-LAST:event_jTextFieldNeuerVertragMonatFocusLost
}//GEN-LAST:event_jTextFieldNeuerVertragMonatFocusLost

private void jTextFieldNeuerVertragTagFocusLost(java.awt.event.FocusEvent evt) { //GEN-FIRST:event_jTextFieldNeuerVertragTagFocusLost
private void jTextFieldNeuerVertragTagFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldNeuerVertragTagFocusLost
checkDateDay();
} //GEN-LAST:event_jTextFieldNeuerVertragTagFocusLost
}//GEN-LAST:event_jTextFieldNeuerVertragTagFocusLost

private void jComboBoxKundeActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_jComboBoxKundeActionPerformed
private void jComboBoxKundeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxKundeActionPerformed
loadCustomerData();
} //GEN-LAST:event_jComboBoxKundeActionPerformed
}//GEN-LAST:event_jComboBoxKundeActionPerformed

private void jTextFieldSkontoFocusLost(java.awt.event.FocusEvent evt) { //GEN-FIRST:event_jTextFieldSkontoFocusLost
private void jTextFieldSkontoFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldSkontoFocusLost
checkCashDiscount();
calculate();
} //GEN-LAST:event_jTextFieldSkontoFocusLost
}//GEN-LAST:event_jTextFieldSkontoFocusLost

private void jTextFieldRabattFocusLost(java.awt.event.FocusEvent evt) { //GEN-FIRST:event_jTextFieldRabattFocusLost
private void jTextFieldRabattFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldRabattFocusLost
checkDiscount();
calculate();
} //GEN-LAST:event_jTextFieldRabattFocusLost
}//GEN-LAST:event_jTextFieldRabattFocusLost

private void jTextFieldNeuerVertragAbnahmemengeFocusLost(java.awt.event.FocusEvent evt) { //GEN-FIRST:event_jTextFieldNeuerVertragAbnahmemengeFocusLost
private void jTextFieldNeuerVertragAbnahmemengeFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextFieldNeuerVertragAbnahmemengeFocusLost
checkPurchaseAmount();
calculate();
} //GEN-LAST:event_jTextFieldNeuerVertragAbnahmemengeFocusLost
}//GEN-LAST:event_jTextFieldNeuerVertragAbnahmemengeFocusLost

private void jComboBoxArtikelActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_jComboBoxArtikelActionPerformed
private void jComboBoxArtikelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxArtikelActionPerformed
loadPrice();
} //GEN-LAST:event_jComboBoxArtikelActionPerformed
}//GEN-LAST:event_jComboBoxArtikelActionPerformed

private void jComboBoxArtikelAncestorAdded(javax.swing.event.AncestorEvent evt) { //GEN-FIRST:event_jComboBoxArtikelAncestorAdded
private void jComboBoxArtikelAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-FIRST:event_jComboBoxArtikelAncestorAdded
loadArticle();
} //GEN-LAST:event_jComboBoxArtikelAncestorAdded
}//GEN-LAST:event_jComboBoxArtikelAncestorAdded

private void jComboBoxKundeAncestorAdded(javax.swing.event.AncestorEvent evt) { //GEN-FIRST:event_jComboBoxKundeAncestorAdded
private void jComboBoxKundeAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-FIRST:event_jComboBoxKundeAncestorAdded
loadCustomer();
} //GEN-LAST:event_jComboBoxKundeAncestorAdded
}//GEN-LAST:event_jComboBoxKundeAncestorAdded

private void jButtonNeuerVertragAbbrechenActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_jButtonNeuerVertragAbbrechenActionPerformed
private void jButtonNeuerVertragAbbrechenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNeuerVertragAbbrechenActionPerformed
clearFields();
} //GEN-LAST:event_jButtonNeuerVertragAbbrechenActionPerformed
}//GEN-LAST:event_jButtonNeuerVertragAbbrechenActionPerformed

private void jButtonNeuerVertragSpeichernActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_jButtonNeuerVertragSpeichernActionPerformed
private void jButtonNeuerVertragSpeichernActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNeuerVertragSpeichernActionPerformed
saveContract();
} //GEN-LAST:event_jButtonNeuerVertragSpeichernActionPerformed
}//GEN-LAST:event_jButtonNeuerVertragSpeichernActionPerformed

/**
* Method pruefeSkontofrist. Überprüft, ob eine Zahl und das etwas eingegeben wurde.
Expand Down Expand Up @@ -1309,9 +1309,7 @@ private void saveContract() {

try {
dao.setAuftragsrechnung(atr);
} catch (WiSimDAOException e) {
wiSimLogger.log("speicherVertrag()", e);
} catch (WiSimDAOWriteException e) {
} catch (WiSimDAOException | WiSimDAOWriteException e) {
wiSimLogger.log("speicherVertrag()", e);
}

Expand All @@ -1322,23 +1320,21 @@ private void saveContract() {
vertrag.setLieferdatum(lieferDateSQL);
vertrag.setRabatt(getDiscount());
vertrag.setSkonto(getCashDiscount());
vertrag.setSkontofrist(Long.parseLong(jTextFieldSkontofristTage.getText().toString()));
vertrag.setSkontofrist(Long.parseLong(jTextFieldSkontofristTage.getText()));
vertrag.setVertragsdatum(new java.sql.Date(wiSimMainController.getActDate().getTime()));
vertrag.setAuftragsrechnungsId(j + 1);

try {
dao.setNeuenVertrag(vertrag);
} catch (WiSimDAOException e) {
wiSimLogger.log("speicherVertrag()", e);
} catch (WiSimDAOWriteException e) {
} catch (WiSimDAOException | WiSimDAOWriteException e) {
wiSimLogger.log("speicherVertrag()", e);
}

OrderItem atp = new OrderItem();
//AuftragsPositionsdaten vorbereiten
atp.setAtNr(i + 1);
atp.setArtNr(artId);
atp.setBestellmenge(Long.parseLong(jTextFieldNeuerVertragAbnahmemenge.getText().toString()));
atp.setBestellmenge(Long.parseLong(jTextFieldNeuerVertragAbnahmemenge.getText()));

try {
dao.setAuftragsPosition(atp);
Expand Down

0 comments on commit b887429

Please sign in to comment.