|
|
|
@ -164,17 +164,30 @@ public class FormUtamaController implements Initializable {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
switch (tipe) {
|
|
|
|
switch (tipe) {
|
|
|
|
case FormConstanta.TRANSAKSI_TUNAI:
|
|
|
|
case FormConstanta.TRANSAKSI_TUNAI:
|
|
|
|
loader.setLocation(getClass().getResource("/fxml/FormTransaksiTunai.fxml"));
|
|
|
|
if (notaContent.nodeTunai != null) {
|
|
|
|
node = loader.load();
|
|
|
|
node = notaContent.nodeTunai;
|
|
|
|
FormTransaksiTunaiController fttc = loader.getController();
|
|
|
|
} else {
|
|
|
|
notaContent.controllerTunai = fttc;
|
|
|
|
loader.setLocation(getClass().getResource("/fxml/FormTransaksiTunai.fxml"));
|
|
|
|
fttc.initData(noNota, baru);
|
|
|
|
node = loader.load();
|
|
|
|
|
|
|
|
notaContent.nodeTunai = node;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormTransaksiTunaiController fttc = loader.getController();
|
|
|
|
|
|
|
|
notaContent.controllerTunai = fttc;
|
|
|
|
|
|
|
|
fttc.initData(noNota, baru);
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case FormConstanta.TRANSAKSI_RETUR:
|
|
|
|
case FormConstanta.TRANSAKSI_RETUR:
|
|
|
|
loader.setLocation(getClass().getResource("/fxml/FormTransaksiRetur.fxml"));
|
|
|
|
if (notaContent.nodeRetur != null) {
|
|
|
|
node = loader.load();
|
|
|
|
node = notaContent.nodeRetur;
|
|
|
|
FormTransaksiReturController ftrc = loader.getController();
|
|
|
|
} else {
|
|
|
|
ftrc.initData(noNota, baru);
|
|
|
|
loader.setLocation(getClass().getResource("/fxml/FormTransaksiRetur.fxml"));
|
|
|
|
|
|
|
|
node = loader.load();
|
|
|
|
|
|
|
|
notaContent.nodeRetur = node;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormTransaksiReturController ftrc = loader.getController();
|
|
|
|
|
|
|
|
notaContent.controllerRetur = ftrc;
|
|
|
|
|
|
|
|
ftrc.initData(noNota, baru);
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -227,6 +240,12 @@ public class FormUtamaController implements Initializable {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
listShortcuts.put(kcNextNota, rnNextNota);
|
|
|
|
listShortcuts.put(kcNextNota, rnNextNota);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KeyCombination kcTambah = new KeyCodeCombination(KeyCode.F3);
|
|
|
|
|
|
|
|
Runnable rnTambah = () -> {
|
|
|
|
|
|
|
|
btnTambahNota.fire();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
listShortcuts.put(kcTambah, rnTambah);
|
|
|
|
|
|
|
|
|
|
|
|
KeyCombination kcCariBarang = new KeyCodeCombination(KeyCode.F5);
|
|
|
|
KeyCombination kcCariBarang = new KeyCodeCombination(KeyCode.F5);
|
|
|
|
Runnable rnCariBarang = () -> {
|
|
|
|
Runnable rnCariBarang = () -> {
|
|
|
|
DialogCariBarangController dialogCariBarang = new DialogCariBarangController();
|
|
|
|
DialogCariBarangController dialogCariBarang = new DialogCariBarangController();
|
|
|
|
@ -306,12 +325,6 @@ public class FormUtamaController implements Initializable {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
listShortcuts.put(kcCariCetakUlangNota, rnCetakUlangNota);
|
|
|
|
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);
|
|
|
|
KeyCombination kcScanMember = new KeyCodeCombination(KeyCode.S, KeyCombination.CONTROL_DOWN);
|
|
|
|
Runnable rnScanMember = () -> {
|
|
|
|
Runnable rnScanMember = () -> {
|
|
|
|
tfScanMember.requestFocus();
|
|
|
|
tfScanMember.requestFocus();
|
|
|
|
@ -321,7 +334,10 @@ public class FormUtamaController implements Initializable {
|
|
|
|
KeyCombination kcLogout = new KeyCodeCombination(KeyCode.L, KeyCombination.CONTROL_DOWN);
|
|
|
|
KeyCombination kcLogout = new KeyCodeCombination(KeyCode.L, KeyCombination.CONTROL_DOWN);
|
|
|
|
Runnable rnLogout = () -> {
|
|
|
|
Runnable rnLogout = () -> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
generateNewWindow("/fxml/FormLogin.fxml").show();
|
|
|
|
Stage stage = generateNewWindow("/fxml/FormLogin.fxml");
|
|
|
|
|
|
|
|
stage.setResizable(false);
|
|
|
|
|
|
|
|
stage.show();
|
|
|
|
|
|
|
|
|
|
|
|
Stage thisStage = (Stage) bpMain.getScene().getWindow();
|
|
|
|
Stage thisStage = (Stage) bpMain.getScene().getWindow();
|
|
|
|
thisStage.close();
|
|
|
|
thisStage.close();
|
|
|
|
} catch (IOException ex) {
|
|
|
|
} catch (IOException ex) {
|
|
|
|
@ -538,9 +554,11 @@ public class FormUtamaController implements Initializable {
|
|
|
|
|
|
|
|
|
|
|
|
Button btnTunai;
|
|
|
|
Button btnTunai;
|
|
|
|
FormTransaksiTunaiController controllerTunai = null;
|
|
|
|
FormTransaksiTunaiController controllerTunai = null;
|
|
|
|
|
|
|
|
Node nodeTunai = null;
|
|
|
|
Button btnBawa;
|
|
|
|
Button btnBawa;
|
|
|
|
Button btnBon;
|
|
|
|
Button btnBon;
|
|
|
|
Button btnRetur;
|
|
|
|
Button btnRetur;
|
|
|
|
FormTransaksiReturController controllerRetur = null;
|
|
|
|
FormTransaksiReturController controllerRetur = null;
|
|
|
|
|
|
|
|
Node nodeRetur = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|