Conflicts: src/main/java/id/amigogroup/posterminal/FormUtamaController.javapull/7/head
| @@ -24,6 +24,7 @@ public class App extends Application { | |||||
| Scene scene = new Scene(root); | Scene scene = new Scene(root); | ||||
| stage.setScene(scene); | stage.setScene(scene); | ||||
| stage.setResizable(false); | |||||
| stage.setTitle(Fucout.APP_TITLE); | stage.setTitle(Fucout.APP_TITLE); | ||||
| stage.getIcons().add(new Image(Fucout.APP_ICON)); | stage.getIcons().add(new Image(Fucout.APP_ICON)); | ||||
| stage.show(); | stage.show(); | ||||
| @@ -60,6 +60,8 @@ public class FormUtamaController implements Initializable { | |||||
| @FXML | @FXML | ||||
| private VBox vbNavigasi; | private VBox vbNavigasi; | ||||
| @FXML | @FXML | ||||
| private Button btnTambahNota; | |||||
| @FXML | |||||
| private Label lblNamaLogin; | private Label lblNamaLogin; | ||||
| @FXML | @FXML | ||||
| private Label lblMemberNonMember; | private Label lblMemberNonMember; | ||||
| @@ -280,15 +282,6 @@ public class FormUtamaController implements Initializable { | |||||
| }; | }; | ||||
| listShortcuts.put(kcCariNotaTunda, rnCariNotaTunda); | listShortcuts.put(kcCariNotaTunda, rnCariNotaTunda); | ||||
| KeyCombination kcCariCetakUlangNota = new KeyCodeCombination(KeyCode.P, KeyCombination.CONTROL_DOWN); | |||||
| Runnable rnCetakUlangNota = () -> { | |||||
| DialogCetakUlangNotaController dialogCetakUlangNota = new DialogCetakUlangNotaController(); | |||||
| dialogCetakUlangNota.initOwner(bpMain.getScene().getWindow()); | |||||
| Optional<String> result = dialogCetakUlangNota.showAndWait(); | |||||
| }; | |||||
| listShortcuts.put(kcCariCetakUlangNota, rnCetakUlangNota); | |||||
| KeyCombination kcCheckout = new KeyCodeCombination(KeyCode.F8); | KeyCombination kcCheckout = new KeyCodeCombination(KeyCode.F8); | ||||
| Runnable rnCheckout = () -> { | Runnable rnCheckout = () -> { | ||||
| switch (tipeTransaksiState) { | switch (tipeTransaksiState) { | ||||
| @@ -304,6 +297,27 @@ public class FormUtamaController implements Initializable { | |||||
| }; | }; | ||||
| listShortcuts.put(kcCheckout, rnCheckout); | listShortcuts.put(kcCheckout, rnCheckout); | ||||
| KeyCombination kcCariCetakUlangNota = new KeyCodeCombination(KeyCode.P, KeyCombination.CONTROL_DOWN); | |||||
| Runnable rnCetakUlangNota = () -> { | |||||
| DialogCetakUlangNotaController dialogCetakUlangNota = new DialogCetakUlangNotaController(); | |||||
| dialogCetakUlangNota.initOwner(bpMain.getScene().getWindow()); | |||||
| Optional<String> result = dialogCetakUlangNota.showAndWait(); | |||||
| }; | |||||
| listShortcuts.put(kcCariCetakUlangNota, rnCetakUlangNota); | |||||
| KeyCombination kcTambah = new KeyCodeCombination(KeyCode.T, KeyCombination.CONTROL_DOWN); | |||||
| Runnable rnTambah = () -> { | |||||
| btnTambahNota.fire(); | |||||
| }; | |||||
| listShortcuts.put(kcTambah, rnTambah); | |||||
| KeyCombination kcScanMember = new KeyCodeCombination(KeyCode.S, KeyCombination.CONTROL_DOWN); | |||||
| Runnable rnScanMember = () -> { | |||||
| tfScanMember.requestFocus(); | |||||
| }; | |||||
| listShortcuts.put(kcScanMember, rnScanMember); | |||||
| KeyCombination kcLogout = new KeyCodeCombination(KeyCode.L, KeyCombination.CONTROL_DOWN); | KeyCombination kcLogout = new KeyCodeCombination(KeyCode.L, KeyCombination.CONTROL_DOWN); | ||||
| Runnable rnLogout = () -> { | Runnable rnLogout = () -> { | ||||
| try { | try { | ||||
| @@ -10,6 +10,7 @@ import java.net.URL; | |||||
| import java.util.ResourceBundle; | import java.util.ResourceBundle; | ||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.fxml.Initializable; | import javafx.fxml.Initializable; | ||||
| import javafx.scene.control.Label; | |||||
| import javafx.scene.control.TextField; | import javafx.scene.control.TextField; | ||||
| import javafx.scene.input.KeyCode; | import javafx.scene.input.KeyCode; | ||||
| import javafx.scene.input.KeyEvent; | import javafx.scene.input.KeyEvent; | ||||
| @@ -30,6 +31,8 @@ public class FormBayarKartuController implements Initializable { | |||||
| private TextField fldNoKartu3; | private TextField fldNoKartu3; | ||||
| @FXML | @FXML | ||||
| private TextField fldNoKartu4; | private TextField fldNoKartu4; | ||||
| @FXML | |||||
| private TextField fldBayar; | |||||
| private BayarInterface parent; | private BayarInterface parent; | ||||
| @@ -43,11 +46,11 @@ public class FormBayarKartuController implements Initializable { | |||||
| public void initData(BayarInterface parent) { | public void initData(BayarInterface parent) { | ||||
| this.parent = parent; | this.parent = parent; | ||||
| if (parent != null && parent.getBayarContent() != null | |||||
| && parent.getBayarContent().getNodeKartu() != null) { | |||||
| parent.getBayarContent().setBayarKartu(50000); | |||||
| parent.updateKurangBayarView(); | |||||
| } | |||||
| // if (parent != null && parent.getBayarContent() != null | |||||
| // && parent.getBayarContent().getNodeKartu() != null) { | |||||
| // parent.getBayarContent().setBayarKartu(50000); | |||||
| // parent.updateKurangBayarView(); | |||||
| // } | |||||
| } | } | ||||
| private void initComponents() { | private void initComponents() { | ||||
| @@ -71,4 +74,28 @@ public class FormBayarKartuController implements Initializable { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @FXML | |||||
| void fldBayarOnKeyReleased(KeyEvent event) { | |||||
| int bayar = 0; | |||||
| if (!fldBayar.getText().equals("")) { | |||||
| try { | |||||
| bayar = Integer.parseInt(fldBayar.getText()); | |||||
| } catch (NumberFormatException nfe) { | |||||
| fldBayar.setText(""); | |||||
| } | |||||
| } | |||||
| if (parent != null && parent.getBayarContent() != null | |||||
| && parent.getBayarContent().getNodeKartu() != null) { | |||||
| parent.getBayarContent().setBayarKartu(bayar); | |||||
| parent.updateKurangBayarView(); | |||||
| if (parent.getBayarContent().getTotalPerluBayar() | |||||
| < parent.getBayarContent().getTotalBayar()) { | |||||
| int kembali = parent.getBayarContent().getTotalBayar() | |||||
| - parent.getBayarContent().getTotalPerluBayar(); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -48,6 +48,10 @@ public class DNotaTunai { | |||||
| private Barang barang; | private Barang barang; | ||||
| public DNotaTunai() { | |||||
| } | |||||
| public DNotaTunai(String noNota, String kdBarang, String noBarang, | public DNotaTunai(String noNota, String kdBarang, String noBarang, | ||||
| int jumlah, int diskon, int diskon2, int hargaJual, String hargaPokok, | int jumlah, int diskon, int diskon2, int hargaJual, String hargaPokok, | ||||
| String kodePram, int bonus) { | String kodePram, int bonus) { | ||||
| @@ -10,27 +10,22 @@ | |||||
| <?import javafx.scene.layout.GridPane?> | <?import javafx.scene.layout.GridPane?> | ||||
| <?import javafx.scene.layout.HBox?> | <?import javafx.scene.layout.HBox?> | ||||
| <?import javafx.scene.layout.RowConstraints?> | <?import javafx.scene.layout.RowConstraints?> | ||||
| <?import javafx.scene.text.Font?> | |||||
| <AnchorPane id="AnchorPane" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.bayar.FormBayarKartuController"> | |||||
| <AnchorPane id="AnchorPane" prefWidth="478.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.bayar.FormBayarKartuController"> | |||||
| <children> | <children> | ||||
| <Separator layoutX="30.0" layoutY="13.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="5.0" /> | <Separator layoutX="30.0" layoutY="13.0" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="5.0" /> | ||||
| <Label layoutX="15.0" layoutY="14.0" text="Non Tunai - diset statis bayar 50rb" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="14.0"> | |||||
| <font> | |||||
| <Font size="16.0" /> | |||||
| </font> | |||||
| </Label> | |||||
| <GridPane layoutX="14.0" layoutY="39.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="39.0"> | |||||
| <GridPane layoutX="14.0" layoutY="22.0" AnchorPane.bottomAnchor="22.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="22.0"> | |||||
| <columnConstraints> | <columnConstraints> | ||||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" prefWidth="100.0" /> | <ColumnConstraints hgrow="SOMETIMES" maxWidth="100.0" minWidth="10.0" prefWidth="100.0" /> | ||||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | ||||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="150.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="50.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="148.0" /> | |||||
| <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="52.0" /> | |||||
| </columnConstraints> | </columnConstraints> | ||||
| <rowConstraints> | <rowConstraints> | ||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | ||||
| <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> | ||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | ||||
| <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> | |||||
| </rowConstraints> | </rowConstraints> | ||||
| <children> | <children> | ||||
| <Label text="Nama Bank"> | <Label text="Nama Bank"> | ||||
| @@ -69,6 +64,12 @@ | |||||
| <Insets left="5.0" right="2.5" top="2.5" /> | <Insets left="5.0" right="2.5" top="2.5" /> | ||||
| </GridPane.margin> | </GridPane.margin> | ||||
| </TextField> | </TextField> | ||||
| <Label text="Bayar" GridPane.rowIndex="3" /> | |||||
| <TextField fx:id="fldBayar" onKeyReleased="#fldBayarOnKeyReleased" prefHeight="25.0" prefWidth="203.0" GridPane.columnIndex="1" GridPane.rowIndex="3"> | |||||
| <GridPane.margin> | |||||
| <Insets left="5.0" right="2.5" top="2.5" /> | |||||
| </GridPane.margin> | |||||
| </TextField> | |||||
| </children> | </children> | ||||
| </GridPane> | </GridPane> | ||||
| </children> | </children> | ||||
| @@ -96,7 +96,7 @@ | |||||
| </ImageView> | </ImageView> | ||||
| </children> | </children> | ||||
| </HBox> | </HBox> | ||||
| <Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnTambahNotaOnAction" text="Tambah"> | |||||
| <Button fx:id="btnTambahNota" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#btnTambahNotaOnAction" text="Tambah"> | |||||
| <VBox.margin> | <VBox.margin> | ||||
| <Insets bottom="9.0" right="5.0" top="14.0" /> | <Insets bottom="9.0" right="5.0" top="14.0" /> | ||||
| </VBox.margin> | </VBox.margin> | ||||