ui fixes and bill layout improvements
This commit is contained in:
parent
96d5968fef
commit
5c9d54dabf
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com</groupId>
|
<groupId>com</groupId>
|
||||||
<artifactId>jFxKasse</artifactId>
|
<artifactId>jFxKasse</artifactId>
|
||||||
<version>0.3.0</version>
|
<version>0.3.1</version>
|
||||||
<name>jFxKasse</name>
|
<name>jFxKasse</name>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -378,7 +378,7 @@ public class MainWindowController
|
||||||
// creates a dialog
|
// creates a dialog
|
||||||
Dialog<Pair<String, String>> dialog = new Dialog<>();
|
Dialog<Pair<String, String>> dialog = new Dialog<>();
|
||||||
dialog.setTitle("Über jFxKasse");
|
dialog.setTitle("Über jFxKasse");
|
||||||
dialog.setHeaderText("Informationen und Lizenzen - Version 0.3.0");
|
dialog.setHeaderText("Informationen und Lizenzen - Version 0.3.1");
|
||||||
|
|
||||||
dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK);
|
dialog.getDialogPane().getButtonTypes().addAll(ButtonType.OK);
|
||||||
|
|
||||||
|
@ -398,8 +398,8 @@ public class MainWindowController
|
||||||
+ " \n(c) 2018 Hendrik Schutter"),
|
+ " \n(c) 2018 Hendrik Schutter"),
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
dialog.getDialogPane().setContent(grid); // Setzt die GridPane auf die
|
dialog.getDialogPane().setContent(grid);
|
||||||
dialog.setResizable(true); // DialogPane
|
dialog.setResizable(true);
|
||||||
dialog.showAndWait();
|
dialog.showAndWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -837,8 +837,11 @@ public class MainWindowController
|
||||||
public void changed(ObservableValue<? extends Number> ov,
|
public void changed(ObservableValue<? extends Number> ov,
|
||||||
Number value, Number new_value)
|
Number value, Number new_value)
|
||||||
{
|
{
|
||||||
selectedCatName = catChoise.getItems().get((int) new_value)
|
try {
|
||||||
.toString();
|
selectedCatName = catChoise.getItems().get((int) new_value)
|
||||||
|
.toString();
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -964,9 +967,8 @@ public class MainWindowController
|
||||||
int selected = entryTreeTable.getSelectionModel()
|
int selected = entryTreeTable.getSelectionModel()
|
||||||
.getSelectedIndex(); // get selected item
|
.getSelectedIndex(); // get selected item
|
||||||
|
|
||||||
idPositionen = columnPosnumber.getCellData(selected);
|
|
||||||
try {
|
try {
|
||||||
|
idPositionen = columnPosnumber.getCellData(selected);
|
||||||
tftNewPosition
|
tftNewPosition
|
||||||
.setText(dbc.getName_Positionen(idPositionen));
|
.setText(dbc.getName_Positionen(idPositionen));
|
||||||
tftNewValue.setText(dbc.getValue_Positionen(idPositionen));
|
tftNewValue.setText(dbc.getValue_Positionen(idPositionen));
|
||||||
|
@ -978,7 +980,7 @@ public class MainWindowController
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.jFxKasse.datatypes;
|
package com.jFxKasse.datatypes;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class Job
|
public class Job
|
||||||
|
@ -109,6 +110,8 @@ public class Job
|
||||||
jobvalue = jobvalue
|
jobvalue = jobvalue
|
||||||
+ (positionenQuantity.get(i) * positionenValue.get(i));
|
+ (positionenQuantity.get(i) * positionenValue.get(i));
|
||||||
}
|
}
|
||||||
|
//Round to two decimals
|
||||||
|
jobvalue = BigDecimal.valueOf(jobvalue).setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String createPosQuantityDBString()
|
public String createPosQuantityDBString()
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class PrintDataSimple extends PrintData
|
||||||
protected void generatePrintString()
|
protected void generatePrintString()
|
||||||
{
|
{
|
||||||
/* Header */
|
/* Header */
|
||||||
String header = "\n";
|
String header = " ";
|
||||||
for (int i = 1; i < headerSpace; i++) {
|
for (int i = 1; i < headerSpace; i++) {
|
||||||
header = header + "\n";
|
header = header + "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class PrintDataSplitted extends PrintData
|
||||||
String firstBill;
|
String firstBill;
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
String header = "\n";
|
String header = "-";
|
||||||
for (int i = 1; i < headerSpace; i++) {
|
for (int i = 1; i < headerSpace; i++) {
|
||||||
header = header + "\n";
|
header = header + "\n";
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public class PrintDataSplitted extends PrintData
|
||||||
String thisBill;
|
String thisBill;
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
header = "\n";
|
header = " ";
|
||||||
for (int o = 1; o < headerSpace; o++) {
|
for (int o = 1; o < headerSpace; o++) {
|
||||||
header = header + "\n";
|
header = header + "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
<content>
|
<content>
|
||||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="327.0" prefWidth="564.0">
|
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="327.0" prefWidth="564.0">
|
||||||
<children>
|
<children>
|
||||||
<ChoiceBox fx:id="printerChoise" layoutX="270.0" layoutY="10.0" prefHeight="25.0" prefWidth="178.0" />
|
<ChoiceBox fx:id="printerChoise" layoutX="270.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="178.0" />
|
||||||
<Spinner fx:id="linesSpinner" layoutX="35.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0" />
|
<Spinner fx:id="linesSpinner" layoutX="35.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="92.0" />
|
||||||
<JFXTextField fx:id="tftheader" alignment="CENTER" layoutX="65.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="377.0">
|
<JFXTextField fx:id="tftheader" alignment="CENTER" layoutX="65.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="377.0">
|
||||||
<font>
|
<font>
|
||||||
|
@ -247,13 +247,13 @@
|
||||||
<Font name="Cantarell Regular" size="18.0" />
|
<Font name="Cantarell Regular" size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<ChoiceBox fx:id="colorChoise" layoutX="340.0" layoutY="90.0" prefHeight="25.0" prefWidth="169.0" />
|
<ChoiceBox fx:id="colorChoise" layoutX="340.0" layoutY="90.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="169.0" />
|
||||||
<Label fx:id="labelSelectCat" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="185.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Kategorie:">
|
<Label fx:id="labelSelectCat" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="185.0" layoutY="10.0" prefHeight="34.0" prefWidth="105.0" text="Kategorie:">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Cantarell Regular" size="18.0" />
|
<Font name="Cantarell Regular" size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<ChoiceBox fx:id="catChoise" layoutX="16.0" layoutY="10.0" prefHeight="25.0" prefWidth="180.0" />
|
<ChoiceBox fx:id="catChoise" layoutX="16.0" layoutY="10.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="25.0" prefWidth="180.0" />
|
||||||
<Button fx:id="btnSaveEntry" layoutX="23.0" layoutY="86.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern">
|
<Button fx:id="btnSaveEntry" layoutX="23.0" layoutY="86.0" mnemonicParsing="false" onAction="#btnSaveEntryAction" text="Ausgewählten Eintrag speichern">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Cantarell Regular" size="17.0" />
|
<Font name="Cantarell Regular" size="17.0" />
|
||||||
|
@ -279,11 +279,11 @@
|
||||||
<Label text="" />
|
<Label text="" />
|
||||||
</placeholder>
|
</placeholder>
|
||||||
<columns>
|
<columns>
|
||||||
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="85.0" resizable="false" text="Nummer" />
|
<TreeTableColumn fx:id="columnJobNumber" editable="false" maxWidth="3000.0" prefWidth="85.0" resizable="false" sortable="false" text="Nummer" />
|
||||||
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="160.0" resizable="false" text="Zeit" />
|
<TreeTableColumn fx:id="columnTime" editable="false" prefWidth="160.0" resizable="false" sortable="false" text="Zeit" />
|
||||||
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="856.0" resizable="false" sortable="false" text="Positionen" />
|
<TreeTableColumn fx:id="columnPositions" editable="false" prefWidth="856.0" resizable="false" sortable="false" text="Positionen" />
|
||||||
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="116.0" resizable="false" text="Zustand" />
|
<TreeTableColumn fx:id="columnState" editable="false" prefWidth="116.0" resizable="false" sortable="false" text="Zustand" />
|
||||||
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="103.0" resizable="false" text="Betrag" />
|
<TreeTableColumn fx:id="columnJobValue" editable="false" prefWidth="103.0" resizable="false" sortable="false" text="Betrag" />
|
||||||
</columns>
|
</columns>
|
||||||
</TreeTableView>
|
</TreeTableView>
|
||||||
<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken">
|
<Button fx:id="btnReprintJob" layoutX="378.0" layoutY="603.0" mnemonicParsing="false" onAction="#btnReprintJobAction" text="Ausgewählter Auftrag drucken">
|
||||||
|
|
Loading…
Reference in New Issue