Skip to content

Commit e6dc531

Browse files
committed
verkehr01: Anzahl Tage Nutzungsausfall
1 parent eb139b2 commit e6dc531

11 files changed

Lines changed: 62 additions & 10707 deletions

src/2.0.0.0/arbeitsrecht02_meta.groovy

Lines changed: 0 additions & 552 deletions
This file was deleted.

src/2.0.0.0/arbeitsrecht02_ui.groovy

Lines changed: 0 additions & 1776 deletions
This file was deleted.

src/2.0.0.0/miete01_meta.groovy

Lines changed: 0 additions & 671 deletions
This file was deleted.

src/2.0.0.0/miete01_ui.groovy

Lines changed: 0 additions & 950 deletions
This file was deleted.

src/2.0.0.0/verkehr01_meta.groovy

Lines changed: 0 additions & 671 deletions
This file was deleted.

src/2.0.0.0/verkehr01_ui.groovy

Lines changed: 0 additions & 3424 deletions
This file was deleted.

src/2.6.0.0/notariat01_meta.groovy

Lines changed: 0 additions & 552 deletions
This file was deleted.

src/2.6.0.0/notariat01_ui.groovy

Lines changed: 0 additions & 2058 deletions
This file was deleted.

src/3.4.0.0/verkehr01_meta.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,8 @@ For more information on this, and how to apply and follow the GNU AGPL, see
664664

665665
name = "Verkehrsunfalldaten"
666666
description = "Verkehrsunfalldaten"
667-
version = "3.4.0";
667+
version = "3.4.1";
668668
author = "Jens Kutschke"
669-
updated = "22.06.2026"
669+
updated = "26.06.2026"
670670

671671

src/3.4.0.0/verkehr01_ui.groovy

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,8 @@ public class verkehr01_ui implements com.jdimension.jlawyer.client.plugins.form.
838838
JComboBox cmbFahrzeugart;
839839
JTextField txtNutzungsAusfallVon;
840840
JTextField txtNutzungsAusfallBis;
841-
841+
JTextField txtNutzungsAusfallTage;
842+
842843
JTextField txtSummeSchaden;
843844
JTextField txtSummeReguliert;
844845
JTextField txtSummeDifferenz;
@@ -1718,9 +1719,19 @@ public class verkehr01_ui implements com.jdimension.jlawyer.client.plugins.form.
17181719
}
17191720
}
17201721
td {
1721-
1722+
1723+
}
1724+
1725+
}
1726+
tr {
1727+
td {
1728+
label(text: ' Tage:')
1729+
}
1730+
td {
1731+
txtNutzungsAusfallTage=textField(id: 'sNutzungsAusfallTage', clientPropertyJlawyerdescription: "Nutzungsausfall Anzahl Tage", name: "_NUTZAUSFALLTAGE", columns: 10, text: '', enabled: false)
1732+
}
1733+
td {
17221734
}
1723-
17241735
}
17251736
tr {
17261737
td {
@@ -3659,7 +3670,22 @@ public class verkehr01_ui implements com.jdimension.jlawyer.client.plugins.form.
36593670
}
36603671

36613672
private void berechnenNutzungsausfall(JTextField value, JTextField reg, JTextField diff, String ausfallGruppe, JTextField from, JTextField to, String fahrzeugTyp) {
3662-
3673+
3674+
// Anzahl Tage anzeigen, sobald beide Datumsangaben vorhanden sind
3675+
if ("".equals(from.getText()) || "".equals(to.getText())) {
3676+
txtNutzungsAusfallTage.setText("");
3677+
} else {
3678+
try {
3679+
DateTimeFormatter dayFormatter = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm");
3680+
LocalDateTime fromDay = LocalDateTime.parse(from.getText() + " 00:00", dayFormatter);
3681+
LocalDateTime toDay = LocalDateTime.parse(to.getText() + " 24:00", dayFormatter);
3682+
long days = ChronoUnit.DAYS.between(fromDay, toDay);
3683+
txtNutzungsAusfallTage.setText(days > 0 ? String.valueOf(days) : "");
3684+
} catch (Exception e) {
3685+
txtNutzungsAusfallTage.setText("");
3686+
}
3687+
}
3688+
36633689
if("".equals(from.getText()) || "".equals(to.getText()) || "".equals(ausfallGruppe) || "".equals(ausfallGruppe)) {
36643690
value.setText(betragFormat.format(0f));
36653691
diff.setText(betragFormat.format(0f));

0 commit comments

Comments
 (0)