-Buat shortcut (ctrl+T) untuk tambah nota -Buat shortcut (ctrl+S) untuk scan memberpull/5/head
| @@ -61,6 +61,8 @@ public class FormUtamaController implements Initializable { | |||
| @FXML | |||
| private VBox vbNavigasi; | |||
| @FXML | |||
| private Button btnTambahNota; | |||
| @FXML | |||
| private Label lblNamaLogin; | |||
| @FXML | |||
| private Label lblMemberNonMember; | |||
| @@ -166,13 +168,13 @@ public class FormUtamaController implements Initializable { | |||
| loader.setLocation(getClass().getResource("/fxml/FormTransaksiTunai.fxml")); | |||
| node = loader.load(); | |||
| FormTransaksiTunaiController fttc = loader.getController(); | |||
| fttc.initData(noNota,baru); | |||
| fttc.initData(noNota, baru); | |||
| break; | |||
| case FormConstanta.TRANSAKSI_RETUR: | |||
| loader.setLocation(getClass().getResource("/fxml/FormTransaksiRetur.fxml")); | |||
| node = loader.load(); | |||
| FormTransaksiReturController ftrc = loader.getController(); | |||
| ftrc.initData(noNota,baru); | |||
| ftrc.initData(noNota, baru); | |||
| break; | |||
| } | |||
| @@ -258,15 +260,6 @@ public class FormUtamaController implements Initializable { | |||
| }; | |||
| 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); | |||
| Runnable rnCheckout = () -> { | |||
| switch (tipeTransaksiState) { | |||
| @@ -282,6 +275,27 @@ public class FormUtamaController implements Initializable { | |||
| }; | |||
| 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); | |||
| Runnable rnLogout = () -> { | |||
| try { | |||
| @@ -10,6 +10,7 @@ import java.net.URL; | |||
| import java.util.ResourceBundle; | |||
| import javafx.fxml.FXML; | |||
| import javafx.fxml.Initializable; | |||
| import javafx.scene.control.Label; | |||
| import javafx.scene.control.TextField; | |||
| import javafx.scene.input.KeyCode; | |||
| import javafx.scene.input.KeyEvent; | |||
| @@ -30,6 +31,8 @@ public class FormBayarKartuController implements Initializable { | |||
| private TextField fldNoKartu3; | |||
| @FXML | |||
| private TextField fldNoKartu4; | |||
| @FXML | |||
| private TextField fldBayar; | |||
| private BayarInterface parent; | |||
| @@ -43,11 +46,11 @@ public class FormBayarKartuController implements Initializable { | |||
| public void initData(BayarInterface 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() { | |||
| @@ -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(); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -10,27 +10,22 @@ | |||
| <?import javafx.scene.layout.GridPane?> | |||
| <?import javafx.scene.layout.HBox?> | |||
| <?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> | |||
| <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 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="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> | |||
| <rowConstraints> | |||
| <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> | |||
| <children> | |||
| <Label text="Nama Bank"> | |||
| @@ -69,6 +64,12 @@ | |||
| <Insets left="5.0" right="2.5" top="2.5" /> | |||
| </GridPane.margin> | |||
| </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> | |||
| </GridPane> | |||
| </children> | |||
| @@ -96,7 +96,7 @@ | |||
| </ImageView> | |||
| </children> | |||
| </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> | |||
| <Insets bottom="9.0" right="5.0" top="14.0" /> | |||
| </VBox.margin> | |||